commit 25158e780fd9af8f9ba693f545d1282c6dc1181d Author: Sendi Pebriyan Date: Thu Oct 22 16:06:51 2026 +0700 first diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore new file mode 100644 index 0000000..d20c0fe --- /dev/null +++ b/.codegraph/.gitignore @@ -0,0 +1,5 @@ +# CodeGraph data files — local to each machine, not for committing. +# Ignore everything in .codegraph/ except this file itself, so transient +# files (the database, daemon.pid, sockets, logs) never show up in git. +* +!.gitignore diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e5642d --- /dev/null +++ b/README.md @@ -0,0 +1,237 @@ +# Generator PDF Label QR Code - EPPOS RP-4610B + +Generator label barcode QR Code untuk printer label **EPPOS RP-4610B**. +Halaman PDF berukuran **100 x 150 mm** (portrait), **3 kolom x 6 baris** += **18 label per halaman**. Enam baris mengisi tinggi halaman; isi tiap label +rata tengah. + +Semua isi (teks + QR) digambar langsung sebagai **vektor** ke dalam PDF - +bukan hasil screenshot - sehingga tetap tajam saat dicetak pada skala 100%. + +Tata letak tiap label (sesuai referensi): + +``` ++------------------------------+ +| ONT-1910 +---------+ | +| 26-3BA3 | QR Code | | +| SN: - 12345678 +---------+ | ++------------------------------+ +``` + +Teks barcode dua baris (`ONT-1910` lalu `26-3BA3`), SN di baris ketiga. +Teks rata kiri, QR di area kanan. Posisi QR selalu dihitung dari pusat area +barcode (bukan dari tepi kanan label), lalu dipusatkan secara vertikal. + +--- + +## 1. Struktur proyek + +``` +src/ + layout.js engine layout (mm -> pt, grid, fitting teks) - dipakai PDF & browser + data.js parser input (TXT/JSON + SN per barcode) - dipakai PDF & browser + svg.js QR Code -> SVG vektor - dipakai browser + qr.js matriks QR Code (paket npm "qrcode") + pdf.js generator PDF (pdfkit, custom page size) + cli.js command line interface + input.js pembaca file/stdin +template_label_qr_eppos_rp4610b_100mm_3kolom.html + aplikasi browser: preview, cetak, unduh PDF +assets/ + qrcode-core.js bundel core QR Code (offline, tanpa CDN) + helvetica-metrics.js tabel lebar glif Helvetica (dari AFM pdfkit) +scripts/ + generate-samples.js membuat PDF contoh (1, 10, 13, 18, 25 label) + verify-pdf.js cek ukuran halaman fisik + pindai QR hasil PDF + verify-browser-print.js cek hasil cetak dari browser (headless Chrome/Edge) + build-browser-assets.js rebuild bundel browser +data/ + labels.sample.txt / labels.sample.json + labels.contoh-10.txt contoh 10 label format gabungan ONT-191026-3BA3 +test/ 36 pengujian otomatis +``` + +## 2. Menjalankan + +```bash +npm install # sekali saja +npm test # 36 pengujian otomatis +npm run sample # membuat output/labels-01, -10, -13, -18, -25.pdf +node src/cli.js -i data/labels.sample.txt -o output/labels.pdf +node src/cli.js -i data/labels.sample.txt -o output/labels-contoh-18.pdf +node src/cli.js -i data/labels.contoh-10.txt -o output/labels-contoh-10.pdf +``` + +### Format input + +Satu baris satu barcode, SN opsional dipisah `|` (atau TAB): + +``` +ONT-191026-3BA3 | 12345678 +ONT-191026-3D0F | 12345679 +``` + +- Isi **QR Code tetap kode persis seperti diketik** (SN tidak ikut dikodekan), + sama seperti implementasi aplikasi awal. +- Kode gabungan tanpa spasi otomatis ditampilkan dua baris: + `ONT-191026-3BA3` -> `ONT-1910` / `26-3BA3`. +- Format lama dengan spasi juga tetap didukung dan dipecah pada **spasi + terakhir** -> `ONT-0910` / `26-5BD9`. +- Baris tanpa SN tetap dicetak `SN: -`; dengan SN -> `SN: - 12345678`. +- Format JSON juga didukung: + +```json +[ { "code": "ONT-191026-3BA3", "sn": "12345678" } ] +``` + +JSON dengan kode dan kode unik terpisah tetap diterima: +`{ "code": "ONT-1910", "unique": "26-3BA3", "sn": "12345678" }`. + +### Opsi CLI + +| Opsi | Arti | Bawaan | +|---|---|---| +| `-i, --input ` | file data, `-` = stdin | wajib | +| `-o, --out ` | file PDF | `output/labels.pdf` | +| `--page-w`, `--page-h` | ukuran halaman (mm) | 100, 150 | +| `--cols` | jumlah kolom | 3 | +| `--rows` | jumlah baris per halaman | 6 (otomatis bila `--label-h` dipakai) | +| `--strip` | 1 baris label per halaman (roll, tinggi label 18 mm) | - | +| `--label-h ` | tinggi satu label dipatok, baris dihitung otomatis | 0 (isi tinggi halaman) | +| `--fill` | baris membagi rata tinggi halaman (abaikan tinggi label) | - | +| `--margin` | margin halaman (mm) | 2.5 kiri/kanan, 2.5 atas/bawah | +| `--gap` | jarak horizontal antar label (mm) | 4.5 | +| `--gap-y` | jarak vertikal antar baris (mm) | 5 | +| `--right-gap` | ruang putih di kanan tiap sel label (mm) | 0 | +| `--padding` | jarak teks/QR dari tepi sel (mm) | 1.0 | +| `--qr ` | ukuran QR | 13.5 | +| `--ec ` | koreksi kesalahan QR | M | +| `--guides` | garis bantu kotak label | - | +| `--json` | ringkasan keluaran JSON | - | + +### Format 2 baris (roll) + +``` +node src/cli.js -i data/labels.sample.txt -o output/strip.pdf --rows 2 --page-h 43.6 --fill +``` + +Menghasilkan halaman 100 x 43,6 mm berisi 3 kolom x 2 baris label (6 label/halaman). +Untuk mencetak roll label terus-menerus (1 baris per halaman): + +``` +node src/cli.js -i data/labels.sample.txt -o output/roll.pdf --strip +``` + +## 3. Aplikasi browser + +Buka `template_label_qr_eppos_rp4610b_100mm_3kolom.html` (double click, `file://` +sudah cukup; tidak perlu server). + +- **Buat / Perbarui Label** - preview label di layar, posisi dihitung memakai + engine layout yang sama dengan PDF. +- **Pratinjau PDF** - PDF dibuat lalu **ditampilkan di dalam halaman** (viewer + bawaan browser), **tidak langsung diunduh**. Setelah dicek, tekan + *Unduh PDF* di dalam pratinjau. Modal bisa ditutup dengan tombol *Tutup* + atau tombol `Esc`. +- **Hapus** - mengosongkan daftar. +- **Sembunyikan keterangan** - menyembunyikan/menampilkan seluruh panel + panduan. Tiap bagian (Format input, Pratinjau PDF, Pengaturan cetak, + Catatan) juga bisa dibuka/tutup lewat judulnya. + +> `assets/` dan `src/*.js` harus tetap berada di folder yang sama dengan file +> HTML. Kalau `assets/` hilang, jalankan `npm run build:assets`. +> Pratinjau PDF memakai jsPDF (CDN, butuh internet); untuk PDF presisi tanpa +> internet, pakai CLI Node. + +### Deploy ke Vercel + +Repo ini adalah aplikasi statis; Vercel hanya perlu menyajikan UI browser. +Konfigurasi `vercel.json` menjalankan `build:static`, lalu memublikasikan +folder `dist/` dengan `index.html` sebagai halaman utama. + +```bash +npm install +npm run build:static +npx vercel login +npx vercel # preview +npx vercel --prod # production +``` + +Alternatif: hubungkan repo ke Vercel lewat dashboard. Vercel membaca +`vercel.json`; tidak perlu mengatur build command secara manual. + +Yang tidak bisa berjalan di Vercel static: `node src/cli.js` untuk membuat PDF +ke filesystem lokal. Untuk pembuatan PDF di server, perlu Vercel Function +terpisah yang mengembalikan PDF sebagai response. + +## 4. Pengaturan cetak (Chrome Print Preview) + +| Setelan | Nilai | +|---|---| +| Destination | Label Printer | +| Paper size | 100 x 150 mm (Custom) | +| Pages | All | +| Color mode | Black and White | +| Scale | **100% / Actual size** (jangan "Fit to page") | +| Margins | None | +| Header/Footer | matikan | + +Ukuran halaman PDF sudah dikunci di dalam file (MediaBox 283.4646 x 425.1969 pt), +jadi hasil tidak bergantung pada zoom browser, ukuran monitor, atau DPI layar. +Yang tersisa adalah kalibrasi driver printer (media dan tinggi label) - bagian +itu sepenuhnya di sisi driver/perangkat. + +## 5. Rumus satuan + +``` +1 mm = 72 / 25.4 point +100 mm = 283.4646 pt +150 mm = 425.1969 pt +``` + +Semua koordinat, ukuran font, jarak, dan ukuran QR dihitung dalam milimeter, +lalu dikonversi ke point saat menulis PDF. Ukuran halaman PDF di-*custom* +langsung, bukan A4 yang dikecilkan. + +## 6. Pengujian + +```bash +npm test +``` + +36 pengujian otomatis, antara lain: + +- ukuran halaman PDF tepat 100 x 150 mm pada semua halaman (dibaca dari MediaBox) +- 18 label = tepat 1 halaman penuh (3 kolom x 6 baris) +- jumlah halaman otomatis: 19 label -> 2 halaman, 25 label -> 2 halaman, 30 -> 2 +- format 2 baris (100 x 43,6 mm, 6 label/halaman) +- isi tiap label rata tengah; 6 baris mengisi tinggi halaman +- QR tepat di pusat area barcode pada seluruh label, termasuk halaman kedua; + offset hasil render diverifikasi maksimal 0,5 mm +- kode gabungan `ONT-191026-3BA3` tampil dua baris tanpa mengubah payload QR +- semua kotak label di dalam halaman dan tidak saling tumpang tindih +- teks tidak pernah keluar area (font mengecil otomatis, teks panjang dipecah baris) +- **QR hasil PDF dipindai ulang** (render 300 dpi + 203 dpi lalu decode dengan jsQR) + dan payload-nya dibandingkan dengan data sumber +- teks hasil PDF dibandingkan dengan data sumber +- tepi halaman bebas tinta (tidak ada elemen terpotong) + +Verifikasi manual: + +```bash +node scripts/verify-pdf.js output/labels-18.pdf 300 +node scripts/verify-browser-preview.js # menguji alur pratinjau PDF di browser +node scripts/verify-browser-print.js # menguji jalur cetak browser +``` + +## 7. Catatan + +- Jumlah label tidak dibatasi 10; layout berlanjut ke halaman berikutnya. +- Jumlah baris bawaan 6 (18 label per halaman); tinggi baris otomatis mengisi + halaman. Gunakan `--label-h` bila ingin tinggi label dipatok. +- Lebar halaman 100 mm sudah sama dengan media roll printer; tetap cetak + **100% / Actual size** dan matikan *Fit to page*. +- QR Code memakai koreksi kesalahan **M**, quiet zone 2 modul di dalam kotak QR, + ditambah padding sel label sebagai ruang putih tambahan. +- Pemisahan modul QR memakai overlap 0.006 mm supaya tidak muncul garis putih + di antara modul saat dicetak. diff --git a/assets/helvetica-metrics.js b/assets/helvetica-metrics.js new file mode 100644 index 0000000..48a4ec3 --- /dev/null +++ b/assets/helvetica-metrics.js @@ -0,0 +1,21 @@ +/* Metrik lebar glif Helvetica & Helvetica-Bold (dari AFM PDFKit) - untuk pengukuran teks di browser. */ +(function (root) { + "use strict"; + var REGULAR = {32:278,33:278,34:355,35:556,36:556,37:889,38:667,39:222,40:333,41:333,42:389,43:584,44:278,45:333,46:278,47:278,48:556,49:556,50:556,51:556,52:556,53:556,54:556,55:556,56:556,57:556,58:278,59:278,60:584,61:584,62:584,63:556,64:1015,65:667,66:667,67:722,68:722,69:667,70:611,71:778,72:722,73:278,74:500,75:667,76:556,77:833,78:722,79:778,80:667,81:778,82:722,83:667,84:611,85:722,86:667,87:944,88:667,89:667,90:611,91:278,92:278,93:278,94:469,95:556,96:222,97:556,98:556,99:500,100:556,101:556,102:278,103:556,104:556,105:222,106:222,107:500,108:222,109:833,110:556,111:556,112:556,113:556,114:333,115:500,116:278,117:556,118:500,119:722,120:500,121:500,122:500,123:334,124:260,125:334,126:584}; + var BOLD = {32:278,33:333,34:474,35:556,36:556,37:889,38:722,39:278,40:333,41:333,42:389,43:584,44:278,45:333,46:278,47:278,48:556,49:556,50:556,51:556,52:556,53:556,54:556,55:556,56:556,57:556,58:333,59:333,60:584,61:584,62:584,63:611,64:975,65:722,66:722,67:722,68:722,69:667,70:611,71:778,72:722,73:278,74:556,75:722,76:611,77:833,78:722,79:778,80:667,81:778,82:722,83:667,84:611,85:722,86:667,87:944,88:667,89:667,90:611,91:333,92:278,93:333,94:584,95:556,96:278,97:556,98:611,99:556,100:611,101:556,102:333,103:611,104:611,105:278,106:278,107:556,108:278,109:889,110:611,111:611,112:611,113:611,114:389,115:556,116:333,117:611,118:556,119:778,120:556,121:556,122:500,123:389,124:280,125:389,126:584}; + var FALLBACK = 556; + function widthOf(code, weight) { + var table = weight === "bold" ? BOLD : REGULAR; + var value = table[code]; + return value === undefined ? FALLBACK : value; + } + function measure(text, sizeMm, weight) { + var str = String(text === undefined || text === null ? "" : text); + var total = 0; + for (var i = 0; i < str.length; i++) { + total += widthOf(str.charCodeAt(i), weight); + } + return total / 1000 * sizeMm; + } + root.HelveticaMetrics = { measure: measure, widthOf: widthOf, CAP_HEIGHT: 0.717 }; +})(typeof self !== "undefined" ? self : this); diff --git a/assets/qrcode-core.js b/assets/qrcode-core.js new file mode 100644 index 0000000..fb996a5 --- /dev/null +++ b/assets/qrcode-core.js @@ -0,0 +1,1820 @@ +/* QR Code core - bundel dari paket npm "qrcode" untuk pemakaian offline di browser. */ +var QRCodeCore = (() => { + var __getOwnPropNames = Object.getOwnPropertyNames; + var __commonJS = (cb, mod) => function __require() { + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e) { + throw mod = 0, e; + } + }; + + // node_modules/qrcode/lib/core/utils.js + var require_utils = __commonJS({ + "node_modules/qrcode/lib/core/utils.js"(exports) { + var toSJISFunction; + var CODEWORDS_COUNT = [ + 0, + // Not used + 26, + 44, + 70, + 100, + 134, + 172, + 196, + 242, + 292, + 346, + 404, + 466, + 532, + 581, + 655, + 733, + 815, + 901, + 991, + 1085, + 1156, + 1258, + 1364, + 1474, + 1588, + 1706, + 1828, + 1921, + 2051, + 2185, + 2323, + 2465, + 2611, + 2761, + 2876, + 3034, + 3196, + 3362, + 3532, + 3706 + ]; + exports.getSymbolSize = function getSymbolSize(version) { + if (!version) throw new Error('"version" cannot be null or undefined'); + if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40'); + return version * 4 + 17; + }; + exports.getSymbolTotalCodewords = function getSymbolTotalCodewords(version) { + return CODEWORDS_COUNT[version]; + }; + exports.getBCHDigit = function(data) { + let digit = 0; + while (data !== 0) { + digit++; + data >>>= 1; + } + return digit; + }; + exports.setToSJISFunction = function setToSJISFunction(f) { + if (typeof f !== "function") { + throw new Error('"toSJISFunc" is not a valid function.'); + } + toSJISFunction = f; + }; + exports.isKanjiModeEnabled = function() { + return typeof toSJISFunction !== "undefined"; + }; + exports.toSJIS = function toSJIS(kanji) { + return toSJISFunction(kanji); + }; + } + }); + + // node_modules/qrcode/lib/core/error-correction-level.js + var require_error_correction_level = __commonJS({ + "node_modules/qrcode/lib/core/error-correction-level.js"(exports) { + exports.L = { bit: 1 }; + exports.M = { bit: 0 }; + exports.Q = { bit: 3 }; + exports.H = { bit: 2 }; + function fromString(string) { + if (typeof string !== "string") { + throw new Error("Param is not a string"); + } + const lcStr = string.toLowerCase(); + switch (lcStr) { + case "l": + case "low": + return exports.L; + case "m": + case "medium": + return exports.M; + case "q": + case "quartile": + return exports.Q; + case "h": + case "high": + return exports.H; + default: + throw new Error("Unknown EC Level: " + string); + } + } + exports.isValid = function isValid(level) { + return level && typeof level.bit !== "undefined" && level.bit >= 0 && level.bit < 4; + }; + exports.from = function from(value, defaultValue) { + if (exports.isValid(value)) { + return value; + } + try { + return fromString(value); + } catch (e) { + return defaultValue; + } + }; + } + }); + + // node_modules/qrcode/lib/core/bit-buffer.js + var require_bit_buffer = __commonJS({ + "node_modules/qrcode/lib/core/bit-buffer.js"(exports, module) { + function BitBuffer() { + this.buffer = []; + this.length = 0; + } + BitBuffer.prototype = { + get: function(index) { + const bufIndex = Math.floor(index / 8); + return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) === 1; + }, + put: function(num, length) { + for (let i = 0; i < length; i++) { + this.putBit((num >>> length - i - 1 & 1) === 1); + } + }, + getLengthInBits: function() { + return this.length; + }, + putBit: function(bit) { + const bufIndex = Math.floor(this.length / 8); + if (this.buffer.length <= bufIndex) { + this.buffer.push(0); + } + if (bit) { + this.buffer[bufIndex] |= 128 >>> this.length % 8; + } + this.length++; + } + }; + module.exports = BitBuffer; + } + }); + + // node_modules/qrcode/lib/core/bit-matrix.js + var require_bit_matrix = __commonJS({ + "node_modules/qrcode/lib/core/bit-matrix.js"(exports, module) { + function BitMatrix(size) { + if (!size || size < 1) { + throw new Error("BitMatrix size must be defined and greater than 0"); + } + this.size = size; + this.data = new Uint8Array(size * size); + this.reservedBit = new Uint8Array(size * size); + } + BitMatrix.prototype.set = function(row, col, value, reserved) { + const index = row * this.size + col; + this.data[index] = value; + if (reserved) this.reservedBit[index] = true; + }; + BitMatrix.prototype.get = function(row, col) { + return this.data[row * this.size + col]; + }; + BitMatrix.prototype.xor = function(row, col, value) { + this.data[row * this.size + col] ^= value; + }; + BitMatrix.prototype.isReserved = function(row, col) { + return this.reservedBit[row * this.size + col]; + }; + module.exports = BitMatrix; + } + }); + + // node_modules/qrcode/lib/core/alignment-pattern.js + var require_alignment_pattern = __commonJS({ + "node_modules/qrcode/lib/core/alignment-pattern.js"(exports) { + var getSymbolSize = require_utils().getSymbolSize; + exports.getRowColCoords = function getRowColCoords(version) { + if (version === 1) return []; + const posCount = Math.floor(version / 7) + 2; + const size = getSymbolSize(version); + const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2; + const positions = [size - 7]; + for (let i = 1; i < posCount - 1; i++) { + positions[i] = positions[i - 1] - intervals; + } + positions.push(6); + return positions.reverse(); + }; + exports.getPositions = function getPositions(version) { + const coords = []; + const pos = exports.getRowColCoords(version); + const posLength = pos.length; + for (let i = 0; i < posLength; i++) { + for (let j = 0; j < posLength; j++) { + if (i === 0 && j === 0 || // top-left + i === 0 && j === posLength - 1 || // bottom-left + i === posLength - 1 && j === 0) { + continue; + } + coords.push([pos[i], pos[j]]); + } + } + return coords; + }; + } + }); + + // node_modules/qrcode/lib/core/finder-pattern.js + var require_finder_pattern = __commonJS({ + "node_modules/qrcode/lib/core/finder-pattern.js"(exports) { + var getSymbolSize = require_utils().getSymbolSize; + var FINDER_PATTERN_SIZE = 7; + exports.getPositions = function getPositions(version) { + const size = getSymbolSize(version); + return [ + // top-left + [0, 0], + // top-right + [size - FINDER_PATTERN_SIZE, 0], + // bottom-left + [0, size - FINDER_PATTERN_SIZE] + ]; + }; + } + }); + + // node_modules/qrcode/lib/core/mask-pattern.js + var require_mask_pattern = __commonJS({ + "node_modules/qrcode/lib/core/mask-pattern.js"(exports) { + exports.Patterns = { + PATTERN000: 0, + PATTERN001: 1, + PATTERN010: 2, + PATTERN011: 3, + PATTERN100: 4, + PATTERN101: 5, + PATTERN110: 6, + PATTERN111: 7 + }; + var PenaltyScores = { + N1: 3, + N2: 3, + N3: 40, + N4: 10 + }; + exports.isValid = function isValid(mask) { + return mask != null && mask !== "" && !isNaN(mask) && mask >= 0 && mask <= 7; + }; + exports.from = function from(value) { + return exports.isValid(value) ? parseInt(value, 10) : void 0; + }; + exports.getPenaltyN1 = function getPenaltyN1(data) { + const size = data.size; + let points = 0; + let sameCountCol = 0; + let sameCountRow = 0; + let lastCol = null; + let lastRow = null; + for (let row = 0; row < size; row++) { + sameCountCol = sameCountRow = 0; + lastCol = lastRow = null; + for (let col = 0; col < size; col++) { + let module2 = data.get(row, col); + if (module2 === lastCol) { + sameCountCol++; + } else { + if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); + lastCol = module2; + sameCountCol = 1; + } + module2 = data.get(col, row); + if (module2 === lastRow) { + sameCountRow++; + } else { + if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); + lastRow = module2; + sameCountRow = 1; + } + } + if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); + if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); + } + return points; + }; + exports.getPenaltyN2 = function getPenaltyN2(data) { + const size = data.size; + let points = 0; + for (let row = 0; row < size - 1; row++) { + for (let col = 0; col < size - 1; col++) { + const last = data.get(row, col) + data.get(row, col + 1) + data.get(row + 1, col) + data.get(row + 1, col + 1); + if (last === 4 || last === 0) points++; + } + } + return points * PenaltyScores.N2; + }; + exports.getPenaltyN3 = function getPenaltyN3(data) { + const size = data.size; + let points = 0; + let bitsCol = 0; + let bitsRow = 0; + for (let row = 0; row < size; row++) { + bitsCol = bitsRow = 0; + for (let col = 0; col < size; col++) { + bitsCol = bitsCol << 1 & 2047 | data.get(row, col); + if (col >= 10 && (bitsCol === 1488 || bitsCol === 93)) points++; + bitsRow = bitsRow << 1 & 2047 | data.get(col, row); + if (col >= 10 && (bitsRow === 1488 || bitsRow === 93)) points++; + } + } + return points * PenaltyScores.N3; + }; + exports.getPenaltyN4 = function getPenaltyN4(data) { + let darkCount = 0; + const modulesCount = data.data.length; + for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]; + const k = Math.abs(Math.ceil(darkCount * 100 / modulesCount / 5) - 10); + return k * PenaltyScores.N4; + }; + function getMaskAt(maskPattern, i, j) { + switch (maskPattern) { + case exports.Patterns.PATTERN000: + return (i + j) % 2 === 0; + case exports.Patterns.PATTERN001: + return i % 2 === 0; + case exports.Patterns.PATTERN010: + return j % 3 === 0; + case exports.Patterns.PATTERN011: + return (i + j) % 3 === 0; + case exports.Patterns.PATTERN100: + return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0; + case exports.Patterns.PATTERN101: + return i * j % 2 + i * j % 3 === 0; + case exports.Patterns.PATTERN110: + return (i * j % 2 + i * j % 3) % 2 === 0; + case exports.Patterns.PATTERN111: + return (i * j % 3 + (i + j) % 2) % 2 === 0; + default: + throw new Error("bad maskPattern:" + maskPattern); + } + } + exports.applyMask = function applyMask(pattern, data) { + const size = data.size; + for (let col = 0; col < size; col++) { + for (let row = 0; row < size; row++) { + if (data.isReserved(row, col)) continue; + data.xor(row, col, getMaskAt(pattern, row, col)); + } + } + }; + exports.getBestMask = function getBestMask(data, setupFormatFunc) { + const numPatterns = Object.keys(exports.Patterns).length; + let bestPattern = 0; + let lowerPenalty = Infinity; + for (let p = 0; p < numPatterns; p++) { + setupFormatFunc(p); + exports.applyMask(p, data); + const penalty = exports.getPenaltyN1(data) + exports.getPenaltyN2(data) + exports.getPenaltyN3(data) + exports.getPenaltyN4(data); + exports.applyMask(p, data); + if (penalty < lowerPenalty) { + lowerPenalty = penalty; + bestPattern = p; + } + } + return bestPattern; + }; + } + }); + + // node_modules/qrcode/lib/core/error-correction-code.js + var require_error_correction_code = __commonJS({ + "node_modules/qrcode/lib/core/error-correction-code.js"(exports) { + var ECLevel = require_error_correction_level(); + var EC_BLOCKS_TABLE = [ + // L M Q H + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 1, + 2, + 2, + 4, + 1, + 2, + 4, + 4, + 2, + 4, + 4, + 4, + 2, + 4, + 6, + 5, + 2, + 4, + 6, + 6, + 2, + 5, + 8, + 8, + 4, + 5, + 8, + 8, + 4, + 5, + 8, + 11, + 4, + 8, + 10, + 11, + 4, + 9, + 12, + 16, + 4, + 9, + 16, + 16, + 6, + 10, + 12, + 18, + 6, + 10, + 17, + 16, + 6, + 11, + 16, + 19, + 6, + 13, + 18, + 21, + 7, + 14, + 21, + 25, + 8, + 16, + 20, + 25, + 8, + 17, + 23, + 25, + 9, + 17, + 23, + 34, + 9, + 18, + 25, + 30, + 10, + 20, + 27, + 32, + 12, + 21, + 29, + 35, + 12, + 23, + 34, + 37, + 12, + 25, + 34, + 40, + 13, + 26, + 35, + 42, + 14, + 28, + 38, + 45, + 15, + 29, + 40, + 48, + 16, + 31, + 43, + 51, + 17, + 33, + 45, + 54, + 18, + 35, + 48, + 57, + 19, + 37, + 51, + 60, + 19, + 38, + 53, + 63, + 20, + 40, + 56, + 66, + 21, + 43, + 59, + 70, + 22, + 45, + 62, + 74, + 24, + 47, + 65, + 77, + 25, + 49, + 68, + 81 + ]; + var EC_CODEWORDS_TABLE = [ + // L M Q H + 7, + 10, + 13, + 17, + 10, + 16, + 22, + 28, + 15, + 26, + 36, + 44, + 20, + 36, + 52, + 64, + 26, + 48, + 72, + 88, + 36, + 64, + 96, + 112, + 40, + 72, + 108, + 130, + 48, + 88, + 132, + 156, + 60, + 110, + 160, + 192, + 72, + 130, + 192, + 224, + 80, + 150, + 224, + 264, + 96, + 176, + 260, + 308, + 104, + 198, + 288, + 352, + 120, + 216, + 320, + 384, + 132, + 240, + 360, + 432, + 144, + 280, + 408, + 480, + 168, + 308, + 448, + 532, + 180, + 338, + 504, + 588, + 196, + 364, + 546, + 650, + 224, + 416, + 600, + 700, + 224, + 442, + 644, + 750, + 252, + 476, + 690, + 816, + 270, + 504, + 750, + 900, + 300, + 560, + 810, + 960, + 312, + 588, + 870, + 1050, + 336, + 644, + 952, + 1110, + 360, + 700, + 1020, + 1200, + 390, + 728, + 1050, + 1260, + 420, + 784, + 1140, + 1350, + 450, + 812, + 1200, + 1440, + 480, + 868, + 1290, + 1530, + 510, + 924, + 1350, + 1620, + 540, + 980, + 1440, + 1710, + 570, + 1036, + 1530, + 1800, + 570, + 1064, + 1590, + 1890, + 600, + 1120, + 1680, + 1980, + 630, + 1204, + 1770, + 2100, + 660, + 1260, + 1860, + 2220, + 720, + 1316, + 1950, + 2310, + 750, + 1372, + 2040, + 2430 + ]; + exports.getBlocksCount = function getBlocksCount(version, errorCorrectionLevel) { + switch (errorCorrectionLevel) { + case ECLevel.L: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]; + case ECLevel.M: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]; + case ECLevel.Q: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]; + case ECLevel.H: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]; + default: + return void 0; + } + }; + exports.getTotalCodewordsCount = function getTotalCodewordsCount(version, errorCorrectionLevel) { + switch (errorCorrectionLevel) { + case ECLevel.L: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]; + case ECLevel.M: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]; + case ECLevel.Q: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]; + case ECLevel.H: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]; + default: + return void 0; + } + }; + } + }); + + // node_modules/qrcode/lib/core/galois-field.js + var require_galois_field = __commonJS({ + "node_modules/qrcode/lib/core/galois-field.js"(exports) { + var EXP_TABLE = new Uint8Array(512); + var LOG_TABLE = new Uint8Array(256); + (function initTables() { + let x = 1; + for (let i = 0; i < 255; i++) { + EXP_TABLE[i] = x; + LOG_TABLE[x] = i; + x <<= 1; + if (x & 256) { + x ^= 285; + } + } + for (let i = 255; i < 512; i++) { + EXP_TABLE[i] = EXP_TABLE[i - 255]; + } + })(); + exports.log = function log(n) { + if (n < 1) throw new Error("log(" + n + ")"); + return LOG_TABLE[n]; + }; + exports.exp = function exp(n) { + return EXP_TABLE[n]; + }; + exports.mul = function mul(x, y) { + if (x === 0 || y === 0) return 0; + return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]; + }; + } + }); + + // node_modules/qrcode/lib/core/polynomial.js + var require_polynomial = __commonJS({ + "node_modules/qrcode/lib/core/polynomial.js"(exports) { + var GF = require_galois_field(); + exports.mul = function mul(p1, p2) { + const coeff = new Uint8Array(p1.length + p2.length - 1); + for (let i = 0; i < p1.length; i++) { + for (let j = 0; j < p2.length; j++) { + coeff[i + j] ^= GF.mul(p1[i], p2[j]); + } + } + return coeff; + }; + exports.mod = function mod(divident, divisor) { + let result = new Uint8Array(divident); + while (result.length - divisor.length >= 0) { + const coeff = result[0]; + for (let i = 0; i < divisor.length; i++) { + result[i] ^= GF.mul(divisor[i], coeff); + } + let offset = 0; + while (offset < result.length && result[offset] === 0) offset++; + result = result.slice(offset); + } + return result; + }; + exports.generateECPolynomial = function generateECPolynomial(degree) { + let poly = new Uint8Array([1]); + for (let i = 0; i < degree; i++) { + poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)])); + } + return poly; + }; + } + }); + + // node_modules/qrcode/lib/core/reed-solomon-encoder.js + var require_reed_solomon_encoder = __commonJS({ + "node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module) { + var Polynomial = require_polynomial(); + function ReedSolomonEncoder(degree) { + this.genPoly = void 0; + this.degree = degree; + if (this.degree) this.initialize(this.degree); + } + ReedSolomonEncoder.prototype.initialize = function initialize(degree) { + this.degree = degree; + this.genPoly = Polynomial.generateECPolynomial(this.degree); + }; + ReedSolomonEncoder.prototype.encode = function encode(data) { + if (!this.genPoly) { + throw new Error("Encoder not initialized"); + } + const paddedData = new Uint8Array(data.length + this.degree); + paddedData.set(data); + const remainder = Polynomial.mod(paddedData, this.genPoly); + const start = this.degree - remainder.length; + if (start > 0) { + const buff = new Uint8Array(this.degree); + buff.set(remainder, start); + return buff; + } + return remainder; + }; + module.exports = ReedSolomonEncoder; + } + }); + + // node_modules/qrcode/lib/core/version-check.js + var require_version_check = __commonJS({ + "node_modules/qrcode/lib/core/version-check.js"(exports) { + exports.isValid = function isValid(version) { + return !isNaN(version) && version >= 1 && version <= 40; + }; + } + }); + + // node_modules/qrcode/lib/core/regex.js + var require_regex = __commonJS({ + "node_modules/qrcode/lib/core/regex.js"(exports) { + var numeric = "[0-9]+"; + var alphanumeric = "[A-Z $%*+\\-./:]+"; + var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+"; + kanji = kanji.replace(/u/g, "\\u"); + var byte = "(?:(?![A-Z0-9 $%*+\\-./:]|" + kanji + ")(?:.|[\r\n]))+"; + exports.KANJI = new RegExp(kanji, "g"); + exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"); + exports.BYTE = new RegExp(byte, "g"); + exports.NUMERIC = new RegExp(numeric, "g"); + exports.ALPHANUMERIC = new RegExp(alphanumeric, "g"); + var TEST_KANJI = new RegExp("^" + kanji + "$"); + var TEST_NUMERIC = new RegExp("^" + numeric + "$"); + var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$"); + exports.testKanji = function testKanji(str) { + return TEST_KANJI.test(str); + }; + exports.testNumeric = function testNumeric(str) { + return TEST_NUMERIC.test(str); + }; + exports.testAlphanumeric = function testAlphanumeric(str) { + return TEST_ALPHANUMERIC.test(str); + }; + } + }); + + // node_modules/qrcode/lib/core/mode.js + var require_mode = __commonJS({ + "node_modules/qrcode/lib/core/mode.js"(exports) { + var VersionCheck = require_version_check(); + var Regex = require_regex(); + exports.NUMERIC = { + id: "Numeric", + bit: 1 << 0, + ccBits: [10, 12, 14] + }; + exports.ALPHANUMERIC = { + id: "Alphanumeric", + bit: 1 << 1, + ccBits: [9, 11, 13] + }; + exports.BYTE = { + id: "Byte", + bit: 1 << 2, + ccBits: [8, 16, 16] + }; + exports.KANJI = { + id: "Kanji", + bit: 1 << 3, + ccBits: [8, 10, 12] + }; + exports.MIXED = { + bit: -1 + }; + exports.getCharCountIndicator = function getCharCountIndicator(mode, version) { + if (!mode.ccBits) throw new Error("Invalid mode: " + mode); + if (!VersionCheck.isValid(version)) { + throw new Error("Invalid version: " + version); + } + if (version >= 1 && version < 10) return mode.ccBits[0]; + else if (version < 27) return mode.ccBits[1]; + return mode.ccBits[2]; + }; + exports.getBestModeForData = function getBestModeForData(dataStr) { + if (Regex.testNumeric(dataStr)) return exports.NUMERIC; + else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC; + else if (Regex.testKanji(dataStr)) return exports.KANJI; + else return exports.BYTE; + }; + exports.toString = function toString(mode) { + if (mode && mode.id) return mode.id; + throw new Error("Invalid mode"); + }; + exports.isValid = function isValid(mode) { + return mode && mode.bit && mode.ccBits; + }; + function fromString(string) { + if (typeof string !== "string") { + throw new Error("Param is not a string"); + } + const lcStr = string.toLowerCase(); + switch (lcStr) { + case "numeric": + return exports.NUMERIC; + case "alphanumeric": + return exports.ALPHANUMERIC; + case "kanji": + return exports.KANJI; + case "byte": + return exports.BYTE; + default: + throw new Error("Unknown mode: " + string); + } + } + exports.from = function from(value, defaultValue) { + if (exports.isValid(value)) { + return value; + } + try { + return fromString(value); + } catch (e) { + return defaultValue; + } + }; + } + }); + + // node_modules/qrcode/lib/core/version.js + var require_version = __commonJS({ + "node_modules/qrcode/lib/core/version.js"(exports) { + var Utils = require_utils(); + var ECCode = require_error_correction_code(); + var ECLevel = require_error_correction_level(); + var Mode = require_mode(); + var VersionCheck = require_version_check(); + var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0; + var G18_BCH = Utils.getBCHDigit(G18); + function getBestVersionForDataLength(mode, length, errorCorrectionLevel) { + for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { + if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) { + return currentVersion; + } + } + return void 0; + } + function getReservedBitsCount(mode, version) { + return Mode.getCharCountIndicator(mode, version) + 4; + } + function getTotalBitsFromDataArray(segments, version) { + let totalBits = 0; + segments.forEach(function(data) { + const reservedBits = getReservedBitsCount(data.mode, version); + totalBits += reservedBits + data.getBitsLength(); + }); + return totalBits; + } + function getBestVersionForMixedData(segments, errorCorrectionLevel) { + for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { + const length = getTotalBitsFromDataArray(segments, currentVersion); + if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) { + return currentVersion; + } + } + return void 0; + } + exports.from = function from(value, defaultValue) { + if (VersionCheck.isValid(value)) { + return parseInt(value, 10); + } + return defaultValue; + }; + exports.getCapacity = function getCapacity(version, errorCorrectionLevel, mode) { + if (!VersionCheck.isValid(version)) { + throw new Error("Invalid QR Code version"); + } + if (typeof mode === "undefined") mode = Mode.BYTE; + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; + if (mode === Mode.MIXED) return dataTotalCodewordsBits; + const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version); + switch (mode) { + case Mode.NUMERIC: + return Math.floor(usableBits / 10 * 3); + case Mode.ALPHANUMERIC: + return Math.floor(usableBits / 11 * 2); + case Mode.KANJI: + return Math.floor(usableBits / 13); + case Mode.BYTE: + default: + return Math.floor(usableBits / 8); + } + }; + exports.getBestVersionForData = function getBestVersionForData(data, errorCorrectionLevel) { + let seg; + const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M); + if (Array.isArray(data)) { + if (data.length > 1) { + return getBestVersionForMixedData(data, ecl); + } + if (data.length === 0) { + return 1; + } + seg = data[0]; + } else { + seg = data; + } + return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl); + }; + exports.getEncodedBits = function getEncodedBits(version) { + if (!VersionCheck.isValid(version) || version < 7) { + throw new Error("Invalid QR Code version"); + } + let d = version << 12; + while (Utils.getBCHDigit(d) - G18_BCH >= 0) { + d ^= G18 << Utils.getBCHDigit(d) - G18_BCH; + } + return version << 12 | d; + }; + } + }); + + // node_modules/qrcode/lib/core/format-info.js + var require_format_info = __commonJS({ + "node_modules/qrcode/lib/core/format-info.js"(exports) { + var Utils = require_utils(); + var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0; + var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1; + var G15_BCH = Utils.getBCHDigit(G15); + exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) { + const data = errorCorrectionLevel.bit << 3 | mask; + let d = data << 10; + while (Utils.getBCHDigit(d) - G15_BCH >= 0) { + d ^= G15 << Utils.getBCHDigit(d) - G15_BCH; + } + return (data << 10 | d) ^ G15_MASK; + }; + } + }); + + // node_modules/qrcode/lib/core/numeric-data.js + var require_numeric_data = __commonJS({ + "node_modules/qrcode/lib/core/numeric-data.js"(exports, module) { + var Mode = require_mode(); + function NumericData(data) { + this.mode = Mode.NUMERIC; + this.data = data.toString(); + } + NumericData.getBitsLength = function getBitsLength(length) { + return 10 * Math.floor(length / 3) + (length % 3 ? length % 3 * 3 + 1 : 0); + }; + NumericData.prototype.getLength = function getLength() { + return this.data.length; + }; + NumericData.prototype.getBitsLength = function getBitsLength() { + return NumericData.getBitsLength(this.data.length); + }; + NumericData.prototype.write = function write(bitBuffer) { + let i, group, value; + for (i = 0; i + 3 <= this.data.length; i += 3) { + group = this.data.substr(i, 3); + value = parseInt(group, 10); + bitBuffer.put(value, 10); + } + const remainingNum = this.data.length - i; + if (remainingNum > 0) { + group = this.data.substr(i); + value = parseInt(group, 10); + bitBuffer.put(value, remainingNum * 3 + 1); + } + }; + module.exports = NumericData; + } + }); + + // node_modules/qrcode/lib/core/alphanumeric-data.js + var require_alphanumeric_data = __commonJS({ + "node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module) { + var Mode = require_mode(); + var ALPHA_NUM_CHARS = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + " ", + "$", + "%", + "*", + "+", + "-", + ".", + "/", + ":" + ]; + function AlphanumericData(data) { + this.mode = Mode.ALPHANUMERIC; + this.data = data; + } + AlphanumericData.getBitsLength = function getBitsLength(length) { + return 11 * Math.floor(length / 2) + 6 * (length % 2); + }; + AlphanumericData.prototype.getLength = function getLength() { + return this.data.length; + }; + AlphanumericData.prototype.getBitsLength = function getBitsLength() { + return AlphanumericData.getBitsLength(this.data.length); + }; + AlphanumericData.prototype.write = function write(bitBuffer) { + let i; + for (i = 0; i + 2 <= this.data.length; i += 2) { + let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45; + value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]); + bitBuffer.put(value, 11); + } + if (this.data.length % 2) { + bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6); + } + }; + module.exports = AlphanumericData; + } + }); + + // node_modules/qrcode/lib/core/byte-data.js + var require_byte_data = __commonJS({ + "node_modules/qrcode/lib/core/byte-data.js"(exports, module) { + var Mode = require_mode(); + function ByteData(data) { + this.mode = Mode.BYTE; + if (typeof data === "string") { + this.data = new TextEncoder().encode(data); + } else { + this.data = new Uint8Array(data); + } + } + ByteData.getBitsLength = function getBitsLength(length) { + return length * 8; + }; + ByteData.prototype.getLength = function getLength() { + return this.data.length; + }; + ByteData.prototype.getBitsLength = function getBitsLength() { + return ByteData.getBitsLength(this.data.length); + }; + ByteData.prototype.write = function(bitBuffer) { + for (let i = 0, l = this.data.length; i < l; i++) { + bitBuffer.put(this.data[i], 8); + } + }; + module.exports = ByteData; + } + }); + + // node_modules/qrcode/lib/core/kanji-data.js + var require_kanji_data = __commonJS({ + "node_modules/qrcode/lib/core/kanji-data.js"(exports, module) { + var Mode = require_mode(); + var Utils = require_utils(); + function KanjiData(data) { + this.mode = Mode.KANJI; + this.data = data; + } + KanjiData.getBitsLength = function getBitsLength(length) { + return length * 13; + }; + KanjiData.prototype.getLength = function getLength() { + return this.data.length; + }; + KanjiData.prototype.getBitsLength = function getBitsLength() { + return KanjiData.getBitsLength(this.data.length); + }; + KanjiData.prototype.write = function(bitBuffer) { + let i; + for (i = 0; i < this.data.length; i++) { + let value = Utils.toSJIS(this.data[i]); + if (value >= 33088 && value <= 40956) { + value -= 33088; + } else if (value >= 57408 && value <= 60351) { + value -= 49472; + } else { + throw new Error( + "Invalid SJIS character: " + this.data[i] + "\nMake sure your charset is UTF-8" + ); + } + value = (value >>> 8 & 255) * 192 + (value & 255); + bitBuffer.put(value, 13); + } + }; + module.exports = KanjiData; + } + }); + + // node_modules/dijkstrajs/dijkstra.js + var require_dijkstra = __commonJS({ + "node_modules/dijkstrajs/dijkstra.js"(exports, module) { + "use strict"; + var dijkstra = { + single_source_shortest_paths: function(graph, s, d) { + var predecessors = {}; + var costs = {}; + costs[s] = 0; + var open = dijkstra.PriorityQueue.make(); + open.push(s, 0); + var closest, u, v, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit; + while (!open.empty()) { + closest = open.pop(); + u = closest.value; + cost_of_s_to_u = closest.cost; + adjacent_nodes = graph[u] || {}; + for (v in adjacent_nodes) { + if (adjacent_nodes.hasOwnProperty(v)) { + cost_of_e = adjacent_nodes[v]; + cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e; + cost_of_s_to_v = costs[v]; + first_visit = typeof costs[v] === "undefined"; + if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) { + costs[v] = cost_of_s_to_u_plus_cost_of_e; + open.push(v, cost_of_s_to_u_plus_cost_of_e); + predecessors[v] = u; + } + } + } + } + if (typeof d !== "undefined" && typeof costs[d] === "undefined") { + var msg = ["Could not find a path from ", s, " to ", d, "."].join(""); + throw new Error(msg); + } + return predecessors; + }, + extract_shortest_path_from_predecessor_list: function(predecessors, d) { + var nodes = []; + var u = d; + var predecessor; + while (u) { + nodes.push(u); + predecessor = predecessors[u]; + u = predecessors[u]; + } + nodes.reverse(); + return nodes; + }, + find_path: function(graph, s, d) { + var predecessors = dijkstra.single_source_shortest_paths(graph, s, d); + return dijkstra.extract_shortest_path_from_predecessor_list( + predecessors, + d + ); + }, + /** + * A very naive priority queue implementation. + */ + PriorityQueue: { + make: function(opts) { + var T = dijkstra.PriorityQueue, t = {}, key; + opts = opts || {}; + for (key in T) { + if (T.hasOwnProperty(key)) { + t[key] = T[key]; + } + } + t.queue = []; + t.sorter = opts.sorter || T.default_sorter; + return t; + }, + default_sorter: function(a, b) { + return a.cost - b.cost; + }, + /** + * Add a new item to the queue and ensure the highest priority element + * is at the front of the queue. + */ + push: function(value, cost) { + var item = { value, cost }; + this.queue.push(item); + this.queue.sort(this.sorter); + }, + /** + * Return the highest priority element in the queue. + */ + pop: function() { + return this.queue.shift(); + }, + empty: function() { + return this.queue.length === 0; + } + } + }; + if (typeof module !== "undefined") { + module.exports = dijkstra; + } + } + }); + + // node_modules/qrcode/lib/core/segments.js + var require_segments = __commonJS({ + "node_modules/qrcode/lib/core/segments.js"(exports) { + var Mode = require_mode(); + var NumericData = require_numeric_data(); + var AlphanumericData = require_alphanumeric_data(); + var ByteData = require_byte_data(); + var KanjiData = require_kanji_data(); + var Regex = require_regex(); + var Utils = require_utils(); + var dijkstra = require_dijkstra(); + function getStringByteLength(str) { + return unescape(encodeURIComponent(str)).length; + } + function getSegments(regex, mode, str) { + const segments = []; + let result; + while ((result = regex.exec(str)) !== null) { + segments.push({ + data: result[0], + index: result.index, + mode, + length: result[0].length + }); + } + return segments; + } + function getSegmentsFromString(dataStr) { + const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr); + const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr); + let byteSegs; + let kanjiSegs; + if (Utils.isKanjiModeEnabled()) { + byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr); + kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr); + } else { + byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr); + kanjiSegs = []; + } + const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs); + return segs.sort(function(s1, s2) { + return s1.index - s2.index; + }).map(function(obj) { + return { + data: obj.data, + mode: obj.mode, + length: obj.length + }; + }); + } + function getSegmentBitsLength(length, mode) { + switch (mode) { + case Mode.NUMERIC: + return NumericData.getBitsLength(length); + case Mode.ALPHANUMERIC: + return AlphanumericData.getBitsLength(length); + case Mode.KANJI: + return KanjiData.getBitsLength(length); + case Mode.BYTE: + return ByteData.getBitsLength(length); + } + } + function mergeSegments(segs) { + return segs.reduce(function(acc, curr) { + const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null; + if (prevSeg && prevSeg.mode === curr.mode) { + acc[acc.length - 1].data += curr.data; + return acc; + } + acc.push(curr); + return acc; + }, []); + } + function buildNodes(segs) { + const nodes = []; + for (let i = 0; i < segs.length; i++) { + const seg = segs[i]; + switch (seg.mode) { + case Mode.NUMERIC: + nodes.push([ + seg, + { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length }, + { data: seg.data, mode: Mode.BYTE, length: seg.length } + ]); + break; + case Mode.ALPHANUMERIC: + nodes.push([ + seg, + { data: seg.data, mode: Mode.BYTE, length: seg.length } + ]); + break; + case Mode.KANJI: + nodes.push([ + seg, + { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } + ]); + break; + case Mode.BYTE: + nodes.push([ + { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } + ]); + } + } + return nodes; + } + function buildGraph(nodes, version) { + const table = {}; + const graph = { start: {} }; + let prevNodeIds = ["start"]; + for (let i = 0; i < nodes.length; i++) { + const nodeGroup = nodes[i]; + const currentNodeIds = []; + for (let j = 0; j < nodeGroup.length; j++) { + const node = nodeGroup[j]; + const key = "" + i + j; + currentNodeIds.push(key); + table[key] = { node, lastCount: 0 }; + graph[key] = {}; + for (let n = 0; n < prevNodeIds.length; n++) { + const prevNodeId = prevNodeIds[n]; + if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) { + graph[prevNodeId][key] = getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) - getSegmentBitsLength(table[prevNodeId].lastCount, node.mode); + table[prevNodeId].lastCount += node.length; + } else { + if (table[prevNodeId]) table[prevNodeId].lastCount = node.length; + graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) + 4 + Mode.getCharCountIndicator(node.mode, version); + } + } + } + prevNodeIds = currentNodeIds; + } + for (let n = 0; n < prevNodeIds.length; n++) { + graph[prevNodeIds[n]].end = 0; + } + return { map: graph, table }; + } + function buildSingleSegment(data, modesHint) { + let mode; + const bestMode = Mode.getBestModeForData(data); + mode = Mode.from(modesHint, bestMode); + if (mode !== Mode.BYTE && mode.bit < bestMode.bit) { + throw new Error('"' + data + '" cannot be encoded with mode ' + Mode.toString(mode) + ".\n Suggested mode is: " + Mode.toString(bestMode)); + } + if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) { + mode = Mode.BYTE; + } + switch (mode) { + case Mode.NUMERIC: + return new NumericData(data); + case Mode.ALPHANUMERIC: + return new AlphanumericData(data); + case Mode.KANJI: + return new KanjiData(data); + case Mode.BYTE: + return new ByteData(data); + } + } + exports.fromArray = function fromArray(array) { + return array.reduce(function(acc, seg) { + if (typeof seg === "string") { + acc.push(buildSingleSegment(seg, null)); + } else if (seg.data) { + acc.push(buildSingleSegment(seg.data, seg.mode)); + } + return acc; + }, []); + }; + exports.fromString = function fromString(data, version) { + const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled()); + const nodes = buildNodes(segs); + const graph = buildGraph(nodes, version); + const path = dijkstra.find_path(graph.map, "start", "end"); + const optimizedSegs = []; + for (let i = 1; i < path.length - 1; i++) { + optimizedSegs.push(graph.table[path[i]].node); + } + return exports.fromArray(mergeSegments(optimizedSegs)); + }; + exports.rawSplit = function rawSplit(data) { + return exports.fromArray( + getSegmentsFromString(data, Utils.isKanjiModeEnabled()) + ); + }; + } + }); + + // node_modules/qrcode/lib/core/qrcode.js + var require_qrcode = __commonJS({ + "node_modules/qrcode/lib/core/qrcode.js"(exports) { + var Utils = require_utils(); + var ECLevel = require_error_correction_level(); + var BitBuffer = require_bit_buffer(); + var BitMatrix = require_bit_matrix(); + var AlignmentPattern = require_alignment_pattern(); + var FinderPattern = require_finder_pattern(); + var MaskPattern = require_mask_pattern(); + var ECCode = require_error_correction_code(); + var ReedSolomonEncoder = require_reed_solomon_encoder(); + var Version = require_version(); + var FormatInfo = require_format_info(); + var Mode = require_mode(); + var Segments = require_segments(); + function setupFinderPattern(matrix, version) { + const size = matrix.size; + const pos = FinderPattern.getPositions(version); + for (let i = 0; i < pos.length; i++) { + const row = pos[i][0]; + const col = pos[i][1]; + for (let r = -1; r <= 7; r++) { + if (row + r <= -1 || size <= row + r) continue; + for (let c = -1; c <= 7; c++) { + if (col + c <= -1 || size <= col + c) continue; + if (r >= 0 && r <= 6 && (c === 0 || c === 6) || c >= 0 && c <= 6 && (r === 0 || r === 6) || r >= 2 && r <= 4 && c >= 2 && c <= 4) { + matrix.set(row + r, col + c, true, true); + } else { + matrix.set(row + r, col + c, false, true); + } + } + } + } + } + function setupTimingPattern(matrix) { + const size = matrix.size; + for (let r = 8; r < size - 8; r++) { + const value = r % 2 === 0; + matrix.set(r, 6, value, true); + matrix.set(6, r, value, true); + } + } + function setupAlignmentPattern(matrix, version) { + const pos = AlignmentPattern.getPositions(version); + for (let i = 0; i < pos.length; i++) { + const row = pos[i][0]; + const col = pos[i][1]; + for (let r = -2; r <= 2; r++) { + for (let c = -2; c <= 2; c++) { + if (r === -2 || r === 2 || c === -2 || c === 2 || r === 0 && c === 0) { + matrix.set(row + r, col + c, true, true); + } else { + matrix.set(row + r, col + c, false, true); + } + } + } + } + } + function setupVersionInfo(matrix, version) { + const size = matrix.size; + const bits = Version.getEncodedBits(version); + let row, col, mod; + for (let i = 0; i < 18; i++) { + row = Math.floor(i / 3); + col = i % 3 + size - 8 - 3; + mod = (bits >> i & 1) === 1; + matrix.set(row, col, mod, true); + matrix.set(col, row, mod, true); + } + } + function setupFormatInfo(matrix, errorCorrectionLevel, maskPattern) { + const size = matrix.size; + const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern); + let i, mod; + for (i = 0; i < 15; i++) { + mod = (bits >> i & 1) === 1; + if (i < 6) { + matrix.set(i, 8, mod, true); + } else if (i < 8) { + matrix.set(i + 1, 8, mod, true); + } else { + matrix.set(size - 15 + i, 8, mod, true); + } + if (i < 8) { + matrix.set(8, size - i - 1, mod, true); + } else if (i < 9) { + matrix.set(8, 15 - i - 1 + 1, mod, true); + } else { + matrix.set(8, 15 - i - 1, mod, true); + } + } + matrix.set(size - 8, 8, 1, true); + } + function setupData(matrix, data) { + const size = matrix.size; + let inc = -1; + let row = size - 1; + let bitIndex = 7; + let byteIndex = 0; + for (let col = size - 1; col > 0; col -= 2) { + if (col === 6) col--; + while (true) { + for (let c = 0; c < 2; c++) { + if (!matrix.isReserved(row, col - c)) { + let dark = false; + if (byteIndex < data.length) { + dark = (data[byteIndex] >>> bitIndex & 1) === 1; + } + matrix.set(row, col - c, dark); + bitIndex--; + if (bitIndex === -1) { + byteIndex++; + bitIndex = 7; + } + } + } + row += inc; + if (row < 0 || size <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + } + function createData(version, errorCorrectionLevel, segments) { + const buffer = new BitBuffer(); + segments.forEach(function(data) { + buffer.put(data.mode.bit, 4); + buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version)); + data.write(buffer); + }); + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; + if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) { + buffer.put(0, 4); + } + while (buffer.getLengthInBits() % 8 !== 0) { + buffer.putBit(0); + } + const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8; + for (let i = 0; i < remainingByte; i++) { + buffer.put(i % 2 ? 17 : 236, 8); + } + return createCodewords(buffer, version, errorCorrectionLevel); + } + function createCodewords(bitBuffer, version, errorCorrectionLevel) { + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewords = totalCodewords - ecTotalCodewords; + const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel); + const blocksInGroup2 = totalCodewords % ecTotalBlocks; + const blocksInGroup1 = ecTotalBlocks - blocksInGroup2; + const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks); + const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks); + const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1; + const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1; + const rs = new ReedSolomonEncoder(ecCount); + let offset = 0; + const dcData = new Array(ecTotalBlocks); + const ecData = new Array(ecTotalBlocks); + let maxDataSize = 0; + const buffer = new Uint8Array(bitBuffer.buffer); + for (let b = 0; b < ecTotalBlocks; b++) { + const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2; + dcData[b] = buffer.slice(offset, offset + dataSize); + ecData[b] = rs.encode(dcData[b]); + offset += dataSize; + maxDataSize = Math.max(maxDataSize, dataSize); + } + const data = new Uint8Array(totalCodewords); + let index = 0; + let i, r; + for (i = 0; i < maxDataSize; i++) { + for (r = 0; r < ecTotalBlocks; r++) { + if (i < dcData[r].length) { + data[index++] = dcData[r][i]; + } + } + } + for (i = 0; i < ecCount; i++) { + for (r = 0; r < ecTotalBlocks; r++) { + data[index++] = ecData[r][i]; + } + } + return data; + } + function createSymbol(data, version, errorCorrectionLevel, maskPattern) { + let segments; + if (Array.isArray(data)) { + segments = Segments.fromArray(data); + } else if (typeof data === "string") { + let estimatedVersion = version; + if (!estimatedVersion) { + const rawSegments = Segments.rawSplit(data); + estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel); + } + segments = Segments.fromString(data, estimatedVersion || 40); + } else { + throw new Error("Invalid data"); + } + const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel); + if (!bestVersion) { + throw new Error("The amount of data is too big to be stored in a QR Code"); + } + if (!version) { + version = bestVersion; + } else if (version < bestVersion) { + throw new Error( + "\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + bestVersion + ".\n" + ); + } + const dataBits = createData(version, errorCorrectionLevel, segments); + const moduleCount = Utils.getSymbolSize(version); + const modules = new BitMatrix(moduleCount); + setupFinderPattern(modules, version); + setupTimingPattern(modules); + setupAlignmentPattern(modules, version); + setupFormatInfo(modules, errorCorrectionLevel, 0); + if (version >= 7) { + setupVersionInfo(modules, version); + } + setupData(modules, dataBits); + if (isNaN(maskPattern)) { + maskPattern = MaskPattern.getBestMask( + modules, + setupFormatInfo.bind(null, modules, errorCorrectionLevel) + ); + } + MaskPattern.applyMask(maskPattern, modules); + setupFormatInfo(modules, errorCorrectionLevel, maskPattern); + return { + modules, + version, + errorCorrectionLevel, + maskPattern, + segments + }; + } + exports.create = function create(data, options) { + if (typeof data === "undefined" || data === "") { + throw new Error("No input text"); + } + let errorCorrectionLevel = ECLevel.M; + let version; + let mask; + if (typeof options !== "undefined") { + errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M); + version = Version.from(options.version); + mask = MaskPattern.from(options.maskPattern); + if (options.toSJISFunc) { + Utils.setToSJISFunction(options.toSJISFunc); + } + } + return createSymbol(data, version, errorCorrectionLevel, mask); + }; + } + }); + return require_qrcode(); +})(); diff --git a/data/labels.contoh-10.txt b/data/labels.contoh-10.txt new file mode 100644 index 0000000..b227c8b --- /dev/null +++ b/data/labels.contoh-10.txt @@ -0,0 +1,10 @@ +ONT-191026-3BA3 | 12345678 +ONT-191026-3D0F | 12345679 +ONT-191026-1118 | 12345680 +ONT-191026-4472 | 12345681 +ONT-191026-90AB | 12345682 +ONT-191026-C3D1 | 12345683 +ONT-191026-77E5 | 12345684 +ONT-191026-2F09 | 12345685 +ONT-191026-6B44 | 12345686 +ONT-191026-08D7 | 12345687 diff --git a/data/labels.sample.json b/data/labels.sample.json new file mode 100644 index 0000000..eb0ea76 --- /dev/null +++ b/data/labels.sample.json @@ -0,0 +1,20 @@ +[ + { "code": "ONT-191026-3BA3", "sn": "12345678" }, + { "code": "ONT-191026-3D0F", "sn": "12345679" }, + { "code": "ONT-191026-1118", "sn": "12345680" }, + { "code": "ONT-191026-4472", "sn": "12345681" }, + { "code": "ONT-191026-90AB", "sn": "12345682" }, + { "code": "ONT-191026-C3D1", "sn": "12345683" }, + { "code": "ONT-191026-77E5", "sn": "12345684" }, + { "code": "ONT-191026-2F09", "sn": "12345685" }, + { "code": "ONT-191026-6B44", "sn": "12345686" }, + { "code": "ONT-191026-08D7", "sn": "12345687" }, + { "code": "ONT-191026-E5A2", "sn": "12345688" }, + { "code": "ONT-191026-31BC", "sn": "12345689" }, + { "code": "ONT-191026-9F03", "sn": "12345690" }, + { "code": "ONT-191026-4D68", "sn": "12345691" }, + { "code": "ONT-191026-7A21", "sn": "12345692" }, + { "code": "ONT-191026-B6C0", "sn": "12345693" }, + { "code": "ONT-191026-52E8", "sn": "12345694" }, + { "code": "ONT-191026-9D34", "sn": "12345695" } +] diff --git a/data/labels.sample.txt b/data/labels.sample.txt new file mode 100644 index 0000000..777b0ce --- /dev/null +++ b/data/labels.sample.txt @@ -0,0 +1,18 @@ +ONT-191026-3BA3 | 12345678 +ONT-191026-3D0F | 12345679 +ONT-191026-1118 | 12345680 +ONT-191026-4472 | 12345681 +ONT-191026-90AB | 12345682 +ONT-191026-C3D1 | 12345683 +ONT-191026-77E5 | 12345684 +ONT-191026-2F09 | 12345685 +ONT-191026-6B44 | 12345686 +ONT-191026-08D7 | 12345687 +ONT-191026-E5A2 | 12345688 +ONT-191026-31BC | 12345689 +ONT-191026-9F03 | 12345690 +ONT-191026-4D68 | 12345691 +ONT-191026-7A21 | 12345692 +ONT-191026-B6C0 | 12345693 +ONT-191026-52E8 | 12345694 +ONT-191026-9D34 | 12345695 diff --git a/dist/assets/helvetica-metrics.js b/dist/assets/helvetica-metrics.js new file mode 100644 index 0000000..48a4ec3 --- /dev/null +++ b/dist/assets/helvetica-metrics.js @@ -0,0 +1,21 @@ +/* Metrik lebar glif Helvetica & Helvetica-Bold (dari AFM PDFKit) - untuk pengukuran teks di browser. */ +(function (root) { + "use strict"; + var REGULAR = {32:278,33:278,34:355,35:556,36:556,37:889,38:667,39:222,40:333,41:333,42:389,43:584,44:278,45:333,46:278,47:278,48:556,49:556,50:556,51:556,52:556,53:556,54:556,55:556,56:556,57:556,58:278,59:278,60:584,61:584,62:584,63:556,64:1015,65:667,66:667,67:722,68:722,69:667,70:611,71:778,72:722,73:278,74:500,75:667,76:556,77:833,78:722,79:778,80:667,81:778,82:722,83:667,84:611,85:722,86:667,87:944,88:667,89:667,90:611,91:278,92:278,93:278,94:469,95:556,96:222,97:556,98:556,99:500,100:556,101:556,102:278,103:556,104:556,105:222,106:222,107:500,108:222,109:833,110:556,111:556,112:556,113:556,114:333,115:500,116:278,117:556,118:500,119:722,120:500,121:500,122:500,123:334,124:260,125:334,126:584}; + var BOLD = {32:278,33:333,34:474,35:556,36:556,37:889,38:722,39:278,40:333,41:333,42:389,43:584,44:278,45:333,46:278,47:278,48:556,49:556,50:556,51:556,52:556,53:556,54:556,55:556,56:556,57:556,58:333,59:333,60:584,61:584,62:584,63:611,64:975,65:722,66:722,67:722,68:722,69:667,70:611,71:778,72:722,73:278,74:556,75:722,76:611,77:833,78:722,79:778,80:667,81:778,82:722,83:667,84:611,85:722,86:667,87:944,88:667,89:667,90:611,91:333,92:278,93:333,94:584,95:556,96:278,97:556,98:611,99:556,100:611,101:556,102:333,103:611,104:611,105:278,106:278,107:556,108:278,109:889,110:611,111:611,112:611,113:611,114:389,115:556,116:333,117:611,118:556,119:778,120:556,121:556,122:500,123:389,124:280,125:389,126:584}; + var FALLBACK = 556; + function widthOf(code, weight) { + var table = weight === "bold" ? BOLD : REGULAR; + var value = table[code]; + return value === undefined ? FALLBACK : value; + } + function measure(text, sizeMm, weight) { + var str = String(text === undefined || text === null ? "" : text); + var total = 0; + for (var i = 0; i < str.length; i++) { + total += widthOf(str.charCodeAt(i), weight); + } + return total / 1000 * sizeMm; + } + root.HelveticaMetrics = { measure: measure, widthOf: widthOf, CAP_HEIGHT: 0.717 }; +})(typeof self !== "undefined" ? self : this); diff --git a/dist/assets/qrcode-core.js b/dist/assets/qrcode-core.js new file mode 100644 index 0000000..fb996a5 --- /dev/null +++ b/dist/assets/qrcode-core.js @@ -0,0 +1,1820 @@ +/* QR Code core - bundel dari paket npm "qrcode" untuk pemakaian offline di browser. */ +var QRCodeCore = (() => { + var __getOwnPropNames = Object.getOwnPropertyNames; + var __commonJS = (cb, mod) => function __require() { + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e) { + throw mod = 0, e; + } + }; + + // node_modules/qrcode/lib/core/utils.js + var require_utils = __commonJS({ + "node_modules/qrcode/lib/core/utils.js"(exports) { + var toSJISFunction; + var CODEWORDS_COUNT = [ + 0, + // Not used + 26, + 44, + 70, + 100, + 134, + 172, + 196, + 242, + 292, + 346, + 404, + 466, + 532, + 581, + 655, + 733, + 815, + 901, + 991, + 1085, + 1156, + 1258, + 1364, + 1474, + 1588, + 1706, + 1828, + 1921, + 2051, + 2185, + 2323, + 2465, + 2611, + 2761, + 2876, + 3034, + 3196, + 3362, + 3532, + 3706 + ]; + exports.getSymbolSize = function getSymbolSize(version) { + if (!version) throw new Error('"version" cannot be null or undefined'); + if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40'); + return version * 4 + 17; + }; + exports.getSymbolTotalCodewords = function getSymbolTotalCodewords(version) { + return CODEWORDS_COUNT[version]; + }; + exports.getBCHDigit = function(data) { + let digit = 0; + while (data !== 0) { + digit++; + data >>>= 1; + } + return digit; + }; + exports.setToSJISFunction = function setToSJISFunction(f) { + if (typeof f !== "function") { + throw new Error('"toSJISFunc" is not a valid function.'); + } + toSJISFunction = f; + }; + exports.isKanjiModeEnabled = function() { + return typeof toSJISFunction !== "undefined"; + }; + exports.toSJIS = function toSJIS(kanji) { + return toSJISFunction(kanji); + }; + } + }); + + // node_modules/qrcode/lib/core/error-correction-level.js + var require_error_correction_level = __commonJS({ + "node_modules/qrcode/lib/core/error-correction-level.js"(exports) { + exports.L = { bit: 1 }; + exports.M = { bit: 0 }; + exports.Q = { bit: 3 }; + exports.H = { bit: 2 }; + function fromString(string) { + if (typeof string !== "string") { + throw new Error("Param is not a string"); + } + const lcStr = string.toLowerCase(); + switch (lcStr) { + case "l": + case "low": + return exports.L; + case "m": + case "medium": + return exports.M; + case "q": + case "quartile": + return exports.Q; + case "h": + case "high": + return exports.H; + default: + throw new Error("Unknown EC Level: " + string); + } + } + exports.isValid = function isValid(level) { + return level && typeof level.bit !== "undefined" && level.bit >= 0 && level.bit < 4; + }; + exports.from = function from(value, defaultValue) { + if (exports.isValid(value)) { + return value; + } + try { + return fromString(value); + } catch (e) { + return defaultValue; + } + }; + } + }); + + // node_modules/qrcode/lib/core/bit-buffer.js + var require_bit_buffer = __commonJS({ + "node_modules/qrcode/lib/core/bit-buffer.js"(exports, module) { + function BitBuffer() { + this.buffer = []; + this.length = 0; + } + BitBuffer.prototype = { + get: function(index) { + const bufIndex = Math.floor(index / 8); + return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) === 1; + }, + put: function(num, length) { + for (let i = 0; i < length; i++) { + this.putBit((num >>> length - i - 1 & 1) === 1); + } + }, + getLengthInBits: function() { + return this.length; + }, + putBit: function(bit) { + const bufIndex = Math.floor(this.length / 8); + if (this.buffer.length <= bufIndex) { + this.buffer.push(0); + } + if (bit) { + this.buffer[bufIndex] |= 128 >>> this.length % 8; + } + this.length++; + } + }; + module.exports = BitBuffer; + } + }); + + // node_modules/qrcode/lib/core/bit-matrix.js + var require_bit_matrix = __commonJS({ + "node_modules/qrcode/lib/core/bit-matrix.js"(exports, module) { + function BitMatrix(size) { + if (!size || size < 1) { + throw new Error("BitMatrix size must be defined and greater than 0"); + } + this.size = size; + this.data = new Uint8Array(size * size); + this.reservedBit = new Uint8Array(size * size); + } + BitMatrix.prototype.set = function(row, col, value, reserved) { + const index = row * this.size + col; + this.data[index] = value; + if (reserved) this.reservedBit[index] = true; + }; + BitMatrix.prototype.get = function(row, col) { + return this.data[row * this.size + col]; + }; + BitMatrix.prototype.xor = function(row, col, value) { + this.data[row * this.size + col] ^= value; + }; + BitMatrix.prototype.isReserved = function(row, col) { + return this.reservedBit[row * this.size + col]; + }; + module.exports = BitMatrix; + } + }); + + // node_modules/qrcode/lib/core/alignment-pattern.js + var require_alignment_pattern = __commonJS({ + "node_modules/qrcode/lib/core/alignment-pattern.js"(exports) { + var getSymbolSize = require_utils().getSymbolSize; + exports.getRowColCoords = function getRowColCoords(version) { + if (version === 1) return []; + const posCount = Math.floor(version / 7) + 2; + const size = getSymbolSize(version); + const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2; + const positions = [size - 7]; + for (let i = 1; i < posCount - 1; i++) { + positions[i] = positions[i - 1] - intervals; + } + positions.push(6); + return positions.reverse(); + }; + exports.getPositions = function getPositions(version) { + const coords = []; + const pos = exports.getRowColCoords(version); + const posLength = pos.length; + for (let i = 0; i < posLength; i++) { + for (let j = 0; j < posLength; j++) { + if (i === 0 && j === 0 || // top-left + i === 0 && j === posLength - 1 || // bottom-left + i === posLength - 1 && j === 0) { + continue; + } + coords.push([pos[i], pos[j]]); + } + } + return coords; + }; + } + }); + + // node_modules/qrcode/lib/core/finder-pattern.js + var require_finder_pattern = __commonJS({ + "node_modules/qrcode/lib/core/finder-pattern.js"(exports) { + var getSymbolSize = require_utils().getSymbolSize; + var FINDER_PATTERN_SIZE = 7; + exports.getPositions = function getPositions(version) { + const size = getSymbolSize(version); + return [ + // top-left + [0, 0], + // top-right + [size - FINDER_PATTERN_SIZE, 0], + // bottom-left + [0, size - FINDER_PATTERN_SIZE] + ]; + }; + } + }); + + // node_modules/qrcode/lib/core/mask-pattern.js + var require_mask_pattern = __commonJS({ + "node_modules/qrcode/lib/core/mask-pattern.js"(exports) { + exports.Patterns = { + PATTERN000: 0, + PATTERN001: 1, + PATTERN010: 2, + PATTERN011: 3, + PATTERN100: 4, + PATTERN101: 5, + PATTERN110: 6, + PATTERN111: 7 + }; + var PenaltyScores = { + N1: 3, + N2: 3, + N3: 40, + N4: 10 + }; + exports.isValid = function isValid(mask) { + return mask != null && mask !== "" && !isNaN(mask) && mask >= 0 && mask <= 7; + }; + exports.from = function from(value) { + return exports.isValid(value) ? parseInt(value, 10) : void 0; + }; + exports.getPenaltyN1 = function getPenaltyN1(data) { + const size = data.size; + let points = 0; + let sameCountCol = 0; + let sameCountRow = 0; + let lastCol = null; + let lastRow = null; + for (let row = 0; row < size; row++) { + sameCountCol = sameCountRow = 0; + lastCol = lastRow = null; + for (let col = 0; col < size; col++) { + let module2 = data.get(row, col); + if (module2 === lastCol) { + sameCountCol++; + } else { + if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); + lastCol = module2; + sameCountCol = 1; + } + module2 = data.get(col, row); + if (module2 === lastRow) { + sameCountRow++; + } else { + if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); + lastRow = module2; + sameCountRow = 1; + } + } + if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); + if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); + } + return points; + }; + exports.getPenaltyN2 = function getPenaltyN2(data) { + const size = data.size; + let points = 0; + for (let row = 0; row < size - 1; row++) { + for (let col = 0; col < size - 1; col++) { + const last = data.get(row, col) + data.get(row, col + 1) + data.get(row + 1, col) + data.get(row + 1, col + 1); + if (last === 4 || last === 0) points++; + } + } + return points * PenaltyScores.N2; + }; + exports.getPenaltyN3 = function getPenaltyN3(data) { + const size = data.size; + let points = 0; + let bitsCol = 0; + let bitsRow = 0; + for (let row = 0; row < size; row++) { + bitsCol = bitsRow = 0; + for (let col = 0; col < size; col++) { + bitsCol = bitsCol << 1 & 2047 | data.get(row, col); + if (col >= 10 && (bitsCol === 1488 || bitsCol === 93)) points++; + bitsRow = bitsRow << 1 & 2047 | data.get(col, row); + if (col >= 10 && (bitsRow === 1488 || bitsRow === 93)) points++; + } + } + return points * PenaltyScores.N3; + }; + exports.getPenaltyN4 = function getPenaltyN4(data) { + let darkCount = 0; + const modulesCount = data.data.length; + for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]; + const k = Math.abs(Math.ceil(darkCount * 100 / modulesCount / 5) - 10); + return k * PenaltyScores.N4; + }; + function getMaskAt(maskPattern, i, j) { + switch (maskPattern) { + case exports.Patterns.PATTERN000: + return (i + j) % 2 === 0; + case exports.Patterns.PATTERN001: + return i % 2 === 0; + case exports.Patterns.PATTERN010: + return j % 3 === 0; + case exports.Patterns.PATTERN011: + return (i + j) % 3 === 0; + case exports.Patterns.PATTERN100: + return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0; + case exports.Patterns.PATTERN101: + return i * j % 2 + i * j % 3 === 0; + case exports.Patterns.PATTERN110: + return (i * j % 2 + i * j % 3) % 2 === 0; + case exports.Patterns.PATTERN111: + return (i * j % 3 + (i + j) % 2) % 2 === 0; + default: + throw new Error("bad maskPattern:" + maskPattern); + } + } + exports.applyMask = function applyMask(pattern, data) { + const size = data.size; + for (let col = 0; col < size; col++) { + for (let row = 0; row < size; row++) { + if (data.isReserved(row, col)) continue; + data.xor(row, col, getMaskAt(pattern, row, col)); + } + } + }; + exports.getBestMask = function getBestMask(data, setupFormatFunc) { + const numPatterns = Object.keys(exports.Patterns).length; + let bestPattern = 0; + let lowerPenalty = Infinity; + for (let p = 0; p < numPatterns; p++) { + setupFormatFunc(p); + exports.applyMask(p, data); + const penalty = exports.getPenaltyN1(data) + exports.getPenaltyN2(data) + exports.getPenaltyN3(data) + exports.getPenaltyN4(data); + exports.applyMask(p, data); + if (penalty < lowerPenalty) { + lowerPenalty = penalty; + bestPattern = p; + } + } + return bestPattern; + }; + } + }); + + // node_modules/qrcode/lib/core/error-correction-code.js + var require_error_correction_code = __commonJS({ + "node_modules/qrcode/lib/core/error-correction-code.js"(exports) { + var ECLevel = require_error_correction_level(); + var EC_BLOCKS_TABLE = [ + // L M Q H + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 2, + 1, + 2, + 2, + 4, + 1, + 2, + 4, + 4, + 2, + 4, + 4, + 4, + 2, + 4, + 6, + 5, + 2, + 4, + 6, + 6, + 2, + 5, + 8, + 8, + 4, + 5, + 8, + 8, + 4, + 5, + 8, + 11, + 4, + 8, + 10, + 11, + 4, + 9, + 12, + 16, + 4, + 9, + 16, + 16, + 6, + 10, + 12, + 18, + 6, + 10, + 17, + 16, + 6, + 11, + 16, + 19, + 6, + 13, + 18, + 21, + 7, + 14, + 21, + 25, + 8, + 16, + 20, + 25, + 8, + 17, + 23, + 25, + 9, + 17, + 23, + 34, + 9, + 18, + 25, + 30, + 10, + 20, + 27, + 32, + 12, + 21, + 29, + 35, + 12, + 23, + 34, + 37, + 12, + 25, + 34, + 40, + 13, + 26, + 35, + 42, + 14, + 28, + 38, + 45, + 15, + 29, + 40, + 48, + 16, + 31, + 43, + 51, + 17, + 33, + 45, + 54, + 18, + 35, + 48, + 57, + 19, + 37, + 51, + 60, + 19, + 38, + 53, + 63, + 20, + 40, + 56, + 66, + 21, + 43, + 59, + 70, + 22, + 45, + 62, + 74, + 24, + 47, + 65, + 77, + 25, + 49, + 68, + 81 + ]; + var EC_CODEWORDS_TABLE = [ + // L M Q H + 7, + 10, + 13, + 17, + 10, + 16, + 22, + 28, + 15, + 26, + 36, + 44, + 20, + 36, + 52, + 64, + 26, + 48, + 72, + 88, + 36, + 64, + 96, + 112, + 40, + 72, + 108, + 130, + 48, + 88, + 132, + 156, + 60, + 110, + 160, + 192, + 72, + 130, + 192, + 224, + 80, + 150, + 224, + 264, + 96, + 176, + 260, + 308, + 104, + 198, + 288, + 352, + 120, + 216, + 320, + 384, + 132, + 240, + 360, + 432, + 144, + 280, + 408, + 480, + 168, + 308, + 448, + 532, + 180, + 338, + 504, + 588, + 196, + 364, + 546, + 650, + 224, + 416, + 600, + 700, + 224, + 442, + 644, + 750, + 252, + 476, + 690, + 816, + 270, + 504, + 750, + 900, + 300, + 560, + 810, + 960, + 312, + 588, + 870, + 1050, + 336, + 644, + 952, + 1110, + 360, + 700, + 1020, + 1200, + 390, + 728, + 1050, + 1260, + 420, + 784, + 1140, + 1350, + 450, + 812, + 1200, + 1440, + 480, + 868, + 1290, + 1530, + 510, + 924, + 1350, + 1620, + 540, + 980, + 1440, + 1710, + 570, + 1036, + 1530, + 1800, + 570, + 1064, + 1590, + 1890, + 600, + 1120, + 1680, + 1980, + 630, + 1204, + 1770, + 2100, + 660, + 1260, + 1860, + 2220, + 720, + 1316, + 1950, + 2310, + 750, + 1372, + 2040, + 2430 + ]; + exports.getBlocksCount = function getBlocksCount(version, errorCorrectionLevel) { + switch (errorCorrectionLevel) { + case ECLevel.L: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]; + case ECLevel.M: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]; + case ECLevel.Q: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]; + case ECLevel.H: + return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]; + default: + return void 0; + } + }; + exports.getTotalCodewordsCount = function getTotalCodewordsCount(version, errorCorrectionLevel) { + switch (errorCorrectionLevel) { + case ECLevel.L: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]; + case ECLevel.M: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]; + case ECLevel.Q: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]; + case ECLevel.H: + return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]; + default: + return void 0; + } + }; + } + }); + + // node_modules/qrcode/lib/core/galois-field.js + var require_galois_field = __commonJS({ + "node_modules/qrcode/lib/core/galois-field.js"(exports) { + var EXP_TABLE = new Uint8Array(512); + var LOG_TABLE = new Uint8Array(256); + (function initTables() { + let x = 1; + for (let i = 0; i < 255; i++) { + EXP_TABLE[i] = x; + LOG_TABLE[x] = i; + x <<= 1; + if (x & 256) { + x ^= 285; + } + } + for (let i = 255; i < 512; i++) { + EXP_TABLE[i] = EXP_TABLE[i - 255]; + } + })(); + exports.log = function log(n) { + if (n < 1) throw new Error("log(" + n + ")"); + return LOG_TABLE[n]; + }; + exports.exp = function exp(n) { + return EXP_TABLE[n]; + }; + exports.mul = function mul(x, y) { + if (x === 0 || y === 0) return 0; + return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]; + }; + } + }); + + // node_modules/qrcode/lib/core/polynomial.js + var require_polynomial = __commonJS({ + "node_modules/qrcode/lib/core/polynomial.js"(exports) { + var GF = require_galois_field(); + exports.mul = function mul(p1, p2) { + const coeff = new Uint8Array(p1.length + p2.length - 1); + for (let i = 0; i < p1.length; i++) { + for (let j = 0; j < p2.length; j++) { + coeff[i + j] ^= GF.mul(p1[i], p2[j]); + } + } + return coeff; + }; + exports.mod = function mod(divident, divisor) { + let result = new Uint8Array(divident); + while (result.length - divisor.length >= 0) { + const coeff = result[0]; + for (let i = 0; i < divisor.length; i++) { + result[i] ^= GF.mul(divisor[i], coeff); + } + let offset = 0; + while (offset < result.length && result[offset] === 0) offset++; + result = result.slice(offset); + } + return result; + }; + exports.generateECPolynomial = function generateECPolynomial(degree) { + let poly = new Uint8Array([1]); + for (let i = 0; i < degree; i++) { + poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)])); + } + return poly; + }; + } + }); + + // node_modules/qrcode/lib/core/reed-solomon-encoder.js + var require_reed_solomon_encoder = __commonJS({ + "node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module) { + var Polynomial = require_polynomial(); + function ReedSolomonEncoder(degree) { + this.genPoly = void 0; + this.degree = degree; + if (this.degree) this.initialize(this.degree); + } + ReedSolomonEncoder.prototype.initialize = function initialize(degree) { + this.degree = degree; + this.genPoly = Polynomial.generateECPolynomial(this.degree); + }; + ReedSolomonEncoder.prototype.encode = function encode(data) { + if (!this.genPoly) { + throw new Error("Encoder not initialized"); + } + const paddedData = new Uint8Array(data.length + this.degree); + paddedData.set(data); + const remainder = Polynomial.mod(paddedData, this.genPoly); + const start = this.degree - remainder.length; + if (start > 0) { + const buff = new Uint8Array(this.degree); + buff.set(remainder, start); + return buff; + } + return remainder; + }; + module.exports = ReedSolomonEncoder; + } + }); + + // node_modules/qrcode/lib/core/version-check.js + var require_version_check = __commonJS({ + "node_modules/qrcode/lib/core/version-check.js"(exports) { + exports.isValid = function isValid(version) { + return !isNaN(version) && version >= 1 && version <= 40; + }; + } + }); + + // node_modules/qrcode/lib/core/regex.js + var require_regex = __commonJS({ + "node_modules/qrcode/lib/core/regex.js"(exports) { + var numeric = "[0-9]+"; + var alphanumeric = "[A-Z $%*+\\-./:]+"; + var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+"; + kanji = kanji.replace(/u/g, "\\u"); + var byte = "(?:(?![A-Z0-9 $%*+\\-./:]|" + kanji + ")(?:.|[\r\n]))+"; + exports.KANJI = new RegExp(kanji, "g"); + exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"); + exports.BYTE = new RegExp(byte, "g"); + exports.NUMERIC = new RegExp(numeric, "g"); + exports.ALPHANUMERIC = new RegExp(alphanumeric, "g"); + var TEST_KANJI = new RegExp("^" + kanji + "$"); + var TEST_NUMERIC = new RegExp("^" + numeric + "$"); + var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$"); + exports.testKanji = function testKanji(str) { + return TEST_KANJI.test(str); + }; + exports.testNumeric = function testNumeric(str) { + return TEST_NUMERIC.test(str); + }; + exports.testAlphanumeric = function testAlphanumeric(str) { + return TEST_ALPHANUMERIC.test(str); + }; + } + }); + + // node_modules/qrcode/lib/core/mode.js + var require_mode = __commonJS({ + "node_modules/qrcode/lib/core/mode.js"(exports) { + var VersionCheck = require_version_check(); + var Regex = require_regex(); + exports.NUMERIC = { + id: "Numeric", + bit: 1 << 0, + ccBits: [10, 12, 14] + }; + exports.ALPHANUMERIC = { + id: "Alphanumeric", + bit: 1 << 1, + ccBits: [9, 11, 13] + }; + exports.BYTE = { + id: "Byte", + bit: 1 << 2, + ccBits: [8, 16, 16] + }; + exports.KANJI = { + id: "Kanji", + bit: 1 << 3, + ccBits: [8, 10, 12] + }; + exports.MIXED = { + bit: -1 + }; + exports.getCharCountIndicator = function getCharCountIndicator(mode, version) { + if (!mode.ccBits) throw new Error("Invalid mode: " + mode); + if (!VersionCheck.isValid(version)) { + throw new Error("Invalid version: " + version); + } + if (version >= 1 && version < 10) return mode.ccBits[0]; + else if (version < 27) return mode.ccBits[1]; + return mode.ccBits[2]; + }; + exports.getBestModeForData = function getBestModeForData(dataStr) { + if (Regex.testNumeric(dataStr)) return exports.NUMERIC; + else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC; + else if (Regex.testKanji(dataStr)) return exports.KANJI; + else return exports.BYTE; + }; + exports.toString = function toString(mode) { + if (mode && mode.id) return mode.id; + throw new Error("Invalid mode"); + }; + exports.isValid = function isValid(mode) { + return mode && mode.bit && mode.ccBits; + }; + function fromString(string) { + if (typeof string !== "string") { + throw new Error("Param is not a string"); + } + const lcStr = string.toLowerCase(); + switch (lcStr) { + case "numeric": + return exports.NUMERIC; + case "alphanumeric": + return exports.ALPHANUMERIC; + case "kanji": + return exports.KANJI; + case "byte": + return exports.BYTE; + default: + throw new Error("Unknown mode: " + string); + } + } + exports.from = function from(value, defaultValue) { + if (exports.isValid(value)) { + return value; + } + try { + return fromString(value); + } catch (e) { + return defaultValue; + } + }; + } + }); + + // node_modules/qrcode/lib/core/version.js + var require_version = __commonJS({ + "node_modules/qrcode/lib/core/version.js"(exports) { + var Utils = require_utils(); + var ECCode = require_error_correction_code(); + var ECLevel = require_error_correction_level(); + var Mode = require_mode(); + var VersionCheck = require_version_check(); + var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0; + var G18_BCH = Utils.getBCHDigit(G18); + function getBestVersionForDataLength(mode, length, errorCorrectionLevel) { + for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { + if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) { + return currentVersion; + } + } + return void 0; + } + function getReservedBitsCount(mode, version) { + return Mode.getCharCountIndicator(mode, version) + 4; + } + function getTotalBitsFromDataArray(segments, version) { + let totalBits = 0; + segments.forEach(function(data) { + const reservedBits = getReservedBitsCount(data.mode, version); + totalBits += reservedBits + data.getBitsLength(); + }); + return totalBits; + } + function getBestVersionForMixedData(segments, errorCorrectionLevel) { + for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { + const length = getTotalBitsFromDataArray(segments, currentVersion); + if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) { + return currentVersion; + } + } + return void 0; + } + exports.from = function from(value, defaultValue) { + if (VersionCheck.isValid(value)) { + return parseInt(value, 10); + } + return defaultValue; + }; + exports.getCapacity = function getCapacity(version, errorCorrectionLevel, mode) { + if (!VersionCheck.isValid(version)) { + throw new Error("Invalid QR Code version"); + } + if (typeof mode === "undefined") mode = Mode.BYTE; + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; + if (mode === Mode.MIXED) return dataTotalCodewordsBits; + const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version); + switch (mode) { + case Mode.NUMERIC: + return Math.floor(usableBits / 10 * 3); + case Mode.ALPHANUMERIC: + return Math.floor(usableBits / 11 * 2); + case Mode.KANJI: + return Math.floor(usableBits / 13); + case Mode.BYTE: + default: + return Math.floor(usableBits / 8); + } + }; + exports.getBestVersionForData = function getBestVersionForData(data, errorCorrectionLevel) { + let seg; + const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M); + if (Array.isArray(data)) { + if (data.length > 1) { + return getBestVersionForMixedData(data, ecl); + } + if (data.length === 0) { + return 1; + } + seg = data[0]; + } else { + seg = data; + } + return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl); + }; + exports.getEncodedBits = function getEncodedBits(version) { + if (!VersionCheck.isValid(version) || version < 7) { + throw new Error("Invalid QR Code version"); + } + let d = version << 12; + while (Utils.getBCHDigit(d) - G18_BCH >= 0) { + d ^= G18 << Utils.getBCHDigit(d) - G18_BCH; + } + return version << 12 | d; + }; + } + }); + + // node_modules/qrcode/lib/core/format-info.js + var require_format_info = __commonJS({ + "node_modules/qrcode/lib/core/format-info.js"(exports) { + var Utils = require_utils(); + var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0; + var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1; + var G15_BCH = Utils.getBCHDigit(G15); + exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) { + const data = errorCorrectionLevel.bit << 3 | mask; + let d = data << 10; + while (Utils.getBCHDigit(d) - G15_BCH >= 0) { + d ^= G15 << Utils.getBCHDigit(d) - G15_BCH; + } + return (data << 10 | d) ^ G15_MASK; + }; + } + }); + + // node_modules/qrcode/lib/core/numeric-data.js + var require_numeric_data = __commonJS({ + "node_modules/qrcode/lib/core/numeric-data.js"(exports, module) { + var Mode = require_mode(); + function NumericData(data) { + this.mode = Mode.NUMERIC; + this.data = data.toString(); + } + NumericData.getBitsLength = function getBitsLength(length) { + return 10 * Math.floor(length / 3) + (length % 3 ? length % 3 * 3 + 1 : 0); + }; + NumericData.prototype.getLength = function getLength() { + return this.data.length; + }; + NumericData.prototype.getBitsLength = function getBitsLength() { + return NumericData.getBitsLength(this.data.length); + }; + NumericData.prototype.write = function write(bitBuffer) { + let i, group, value; + for (i = 0; i + 3 <= this.data.length; i += 3) { + group = this.data.substr(i, 3); + value = parseInt(group, 10); + bitBuffer.put(value, 10); + } + const remainingNum = this.data.length - i; + if (remainingNum > 0) { + group = this.data.substr(i); + value = parseInt(group, 10); + bitBuffer.put(value, remainingNum * 3 + 1); + } + }; + module.exports = NumericData; + } + }); + + // node_modules/qrcode/lib/core/alphanumeric-data.js + var require_alphanumeric_data = __commonJS({ + "node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module) { + var Mode = require_mode(); + var ALPHA_NUM_CHARS = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + " ", + "$", + "%", + "*", + "+", + "-", + ".", + "/", + ":" + ]; + function AlphanumericData(data) { + this.mode = Mode.ALPHANUMERIC; + this.data = data; + } + AlphanumericData.getBitsLength = function getBitsLength(length) { + return 11 * Math.floor(length / 2) + 6 * (length % 2); + }; + AlphanumericData.prototype.getLength = function getLength() { + return this.data.length; + }; + AlphanumericData.prototype.getBitsLength = function getBitsLength() { + return AlphanumericData.getBitsLength(this.data.length); + }; + AlphanumericData.prototype.write = function write(bitBuffer) { + let i; + for (i = 0; i + 2 <= this.data.length; i += 2) { + let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45; + value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]); + bitBuffer.put(value, 11); + } + if (this.data.length % 2) { + bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6); + } + }; + module.exports = AlphanumericData; + } + }); + + // node_modules/qrcode/lib/core/byte-data.js + var require_byte_data = __commonJS({ + "node_modules/qrcode/lib/core/byte-data.js"(exports, module) { + var Mode = require_mode(); + function ByteData(data) { + this.mode = Mode.BYTE; + if (typeof data === "string") { + this.data = new TextEncoder().encode(data); + } else { + this.data = new Uint8Array(data); + } + } + ByteData.getBitsLength = function getBitsLength(length) { + return length * 8; + }; + ByteData.prototype.getLength = function getLength() { + return this.data.length; + }; + ByteData.prototype.getBitsLength = function getBitsLength() { + return ByteData.getBitsLength(this.data.length); + }; + ByteData.prototype.write = function(bitBuffer) { + for (let i = 0, l = this.data.length; i < l; i++) { + bitBuffer.put(this.data[i], 8); + } + }; + module.exports = ByteData; + } + }); + + // node_modules/qrcode/lib/core/kanji-data.js + var require_kanji_data = __commonJS({ + "node_modules/qrcode/lib/core/kanji-data.js"(exports, module) { + var Mode = require_mode(); + var Utils = require_utils(); + function KanjiData(data) { + this.mode = Mode.KANJI; + this.data = data; + } + KanjiData.getBitsLength = function getBitsLength(length) { + return length * 13; + }; + KanjiData.prototype.getLength = function getLength() { + return this.data.length; + }; + KanjiData.prototype.getBitsLength = function getBitsLength() { + return KanjiData.getBitsLength(this.data.length); + }; + KanjiData.prototype.write = function(bitBuffer) { + let i; + for (i = 0; i < this.data.length; i++) { + let value = Utils.toSJIS(this.data[i]); + if (value >= 33088 && value <= 40956) { + value -= 33088; + } else if (value >= 57408 && value <= 60351) { + value -= 49472; + } else { + throw new Error( + "Invalid SJIS character: " + this.data[i] + "\nMake sure your charset is UTF-8" + ); + } + value = (value >>> 8 & 255) * 192 + (value & 255); + bitBuffer.put(value, 13); + } + }; + module.exports = KanjiData; + } + }); + + // node_modules/dijkstrajs/dijkstra.js + var require_dijkstra = __commonJS({ + "node_modules/dijkstrajs/dijkstra.js"(exports, module) { + "use strict"; + var dijkstra = { + single_source_shortest_paths: function(graph, s, d) { + var predecessors = {}; + var costs = {}; + costs[s] = 0; + var open = dijkstra.PriorityQueue.make(); + open.push(s, 0); + var closest, u, v, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit; + while (!open.empty()) { + closest = open.pop(); + u = closest.value; + cost_of_s_to_u = closest.cost; + adjacent_nodes = graph[u] || {}; + for (v in adjacent_nodes) { + if (adjacent_nodes.hasOwnProperty(v)) { + cost_of_e = adjacent_nodes[v]; + cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e; + cost_of_s_to_v = costs[v]; + first_visit = typeof costs[v] === "undefined"; + if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) { + costs[v] = cost_of_s_to_u_plus_cost_of_e; + open.push(v, cost_of_s_to_u_plus_cost_of_e); + predecessors[v] = u; + } + } + } + } + if (typeof d !== "undefined" && typeof costs[d] === "undefined") { + var msg = ["Could not find a path from ", s, " to ", d, "."].join(""); + throw new Error(msg); + } + return predecessors; + }, + extract_shortest_path_from_predecessor_list: function(predecessors, d) { + var nodes = []; + var u = d; + var predecessor; + while (u) { + nodes.push(u); + predecessor = predecessors[u]; + u = predecessors[u]; + } + nodes.reverse(); + return nodes; + }, + find_path: function(graph, s, d) { + var predecessors = dijkstra.single_source_shortest_paths(graph, s, d); + return dijkstra.extract_shortest_path_from_predecessor_list( + predecessors, + d + ); + }, + /** + * A very naive priority queue implementation. + */ + PriorityQueue: { + make: function(opts) { + var T = dijkstra.PriorityQueue, t = {}, key; + opts = opts || {}; + for (key in T) { + if (T.hasOwnProperty(key)) { + t[key] = T[key]; + } + } + t.queue = []; + t.sorter = opts.sorter || T.default_sorter; + return t; + }, + default_sorter: function(a, b) { + return a.cost - b.cost; + }, + /** + * Add a new item to the queue and ensure the highest priority element + * is at the front of the queue. + */ + push: function(value, cost) { + var item = { value, cost }; + this.queue.push(item); + this.queue.sort(this.sorter); + }, + /** + * Return the highest priority element in the queue. + */ + pop: function() { + return this.queue.shift(); + }, + empty: function() { + return this.queue.length === 0; + } + } + }; + if (typeof module !== "undefined") { + module.exports = dijkstra; + } + } + }); + + // node_modules/qrcode/lib/core/segments.js + var require_segments = __commonJS({ + "node_modules/qrcode/lib/core/segments.js"(exports) { + var Mode = require_mode(); + var NumericData = require_numeric_data(); + var AlphanumericData = require_alphanumeric_data(); + var ByteData = require_byte_data(); + var KanjiData = require_kanji_data(); + var Regex = require_regex(); + var Utils = require_utils(); + var dijkstra = require_dijkstra(); + function getStringByteLength(str) { + return unescape(encodeURIComponent(str)).length; + } + function getSegments(regex, mode, str) { + const segments = []; + let result; + while ((result = regex.exec(str)) !== null) { + segments.push({ + data: result[0], + index: result.index, + mode, + length: result[0].length + }); + } + return segments; + } + function getSegmentsFromString(dataStr) { + const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr); + const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr); + let byteSegs; + let kanjiSegs; + if (Utils.isKanjiModeEnabled()) { + byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr); + kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr); + } else { + byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr); + kanjiSegs = []; + } + const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs); + return segs.sort(function(s1, s2) { + return s1.index - s2.index; + }).map(function(obj) { + return { + data: obj.data, + mode: obj.mode, + length: obj.length + }; + }); + } + function getSegmentBitsLength(length, mode) { + switch (mode) { + case Mode.NUMERIC: + return NumericData.getBitsLength(length); + case Mode.ALPHANUMERIC: + return AlphanumericData.getBitsLength(length); + case Mode.KANJI: + return KanjiData.getBitsLength(length); + case Mode.BYTE: + return ByteData.getBitsLength(length); + } + } + function mergeSegments(segs) { + return segs.reduce(function(acc, curr) { + const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null; + if (prevSeg && prevSeg.mode === curr.mode) { + acc[acc.length - 1].data += curr.data; + return acc; + } + acc.push(curr); + return acc; + }, []); + } + function buildNodes(segs) { + const nodes = []; + for (let i = 0; i < segs.length; i++) { + const seg = segs[i]; + switch (seg.mode) { + case Mode.NUMERIC: + nodes.push([ + seg, + { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length }, + { data: seg.data, mode: Mode.BYTE, length: seg.length } + ]); + break; + case Mode.ALPHANUMERIC: + nodes.push([ + seg, + { data: seg.data, mode: Mode.BYTE, length: seg.length } + ]); + break; + case Mode.KANJI: + nodes.push([ + seg, + { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } + ]); + break; + case Mode.BYTE: + nodes.push([ + { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } + ]); + } + } + return nodes; + } + function buildGraph(nodes, version) { + const table = {}; + const graph = { start: {} }; + let prevNodeIds = ["start"]; + for (let i = 0; i < nodes.length; i++) { + const nodeGroup = nodes[i]; + const currentNodeIds = []; + for (let j = 0; j < nodeGroup.length; j++) { + const node = nodeGroup[j]; + const key = "" + i + j; + currentNodeIds.push(key); + table[key] = { node, lastCount: 0 }; + graph[key] = {}; + for (let n = 0; n < prevNodeIds.length; n++) { + const prevNodeId = prevNodeIds[n]; + if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) { + graph[prevNodeId][key] = getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) - getSegmentBitsLength(table[prevNodeId].lastCount, node.mode); + table[prevNodeId].lastCount += node.length; + } else { + if (table[prevNodeId]) table[prevNodeId].lastCount = node.length; + graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) + 4 + Mode.getCharCountIndicator(node.mode, version); + } + } + } + prevNodeIds = currentNodeIds; + } + for (let n = 0; n < prevNodeIds.length; n++) { + graph[prevNodeIds[n]].end = 0; + } + return { map: graph, table }; + } + function buildSingleSegment(data, modesHint) { + let mode; + const bestMode = Mode.getBestModeForData(data); + mode = Mode.from(modesHint, bestMode); + if (mode !== Mode.BYTE && mode.bit < bestMode.bit) { + throw new Error('"' + data + '" cannot be encoded with mode ' + Mode.toString(mode) + ".\n Suggested mode is: " + Mode.toString(bestMode)); + } + if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) { + mode = Mode.BYTE; + } + switch (mode) { + case Mode.NUMERIC: + return new NumericData(data); + case Mode.ALPHANUMERIC: + return new AlphanumericData(data); + case Mode.KANJI: + return new KanjiData(data); + case Mode.BYTE: + return new ByteData(data); + } + } + exports.fromArray = function fromArray(array) { + return array.reduce(function(acc, seg) { + if (typeof seg === "string") { + acc.push(buildSingleSegment(seg, null)); + } else if (seg.data) { + acc.push(buildSingleSegment(seg.data, seg.mode)); + } + return acc; + }, []); + }; + exports.fromString = function fromString(data, version) { + const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled()); + const nodes = buildNodes(segs); + const graph = buildGraph(nodes, version); + const path = dijkstra.find_path(graph.map, "start", "end"); + const optimizedSegs = []; + for (let i = 1; i < path.length - 1; i++) { + optimizedSegs.push(graph.table[path[i]].node); + } + return exports.fromArray(mergeSegments(optimizedSegs)); + }; + exports.rawSplit = function rawSplit(data) { + return exports.fromArray( + getSegmentsFromString(data, Utils.isKanjiModeEnabled()) + ); + }; + } + }); + + // node_modules/qrcode/lib/core/qrcode.js + var require_qrcode = __commonJS({ + "node_modules/qrcode/lib/core/qrcode.js"(exports) { + var Utils = require_utils(); + var ECLevel = require_error_correction_level(); + var BitBuffer = require_bit_buffer(); + var BitMatrix = require_bit_matrix(); + var AlignmentPattern = require_alignment_pattern(); + var FinderPattern = require_finder_pattern(); + var MaskPattern = require_mask_pattern(); + var ECCode = require_error_correction_code(); + var ReedSolomonEncoder = require_reed_solomon_encoder(); + var Version = require_version(); + var FormatInfo = require_format_info(); + var Mode = require_mode(); + var Segments = require_segments(); + function setupFinderPattern(matrix, version) { + const size = matrix.size; + const pos = FinderPattern.getPositions(version); + for (let i = 0; i < pos.length; i++) { + const row = pos[i][0]; + const col = pos[i][1]; + for (let r = -1; r <= 7; r++) { + if (row + r <= -1 || size <= row + r) continue; + for (let c = -1; c <= 7; c++) { + if (col + c <= -1 || size <= col + c) continue; + if (r >= 0 && r <= 6 && (c === 0 || c === 6) || c >= 0 && c <= 6 && (r === 0 || r === 6) || r >= 2 && r <= 4 && c >= 2 && c <= 4) { + matrix.set(row + r, col + c, true, true); + } else { + matrix.set(row + r, col + c, false, true); + } + } + } + } + } + function setupTimingPattern(matrix) { + const size = matrix.size; + for (let r = 8; r < size - 8; r++) { + const value = r % 2 === 0; + matrix.set(r, 6, value, true); + matrix.set(6, r, value, true); + } + } + function setupAlignmentPattern(matrix, version) { + const pos = AlignmentPattern.getPositions(version); + for (let i = 0; i < pos.length; i++) { + const row = pos[i][0]; + const col = pos[i][1]; + for (let r = -2; r <= 2; r++) { + for (let c = -2; c <= 2; c++) { + if (r === -2 || r === 2 || c === -2 || c === 2 || r === 0 && c === 0) { + matrix.set(row + r, col + c, true, true); + } else { + matrix.set(row + r, col + c, false, true); + } + } + } + } + } + function setupVersionInfo(matrix, version) { + const size = matrix.size; + const bits = Version.getEncodedBits(version); + let row, col, mod; + for (let i = 0; i < 18; i++) { + row = Math.floor(i / 3); + col = i % 3 + size - 8 - 3; + mod = (bits >> i & 1) === 1; + matrix.set(row, col, mod, true); + matrix.set(col, row, mod, true); + } + } + function setupFormatInfo(matrix, errorCorrectionLevel, maskPattern) { + const size = matrix.size; + const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern); + let i, mod; + for (i = 0; i < 15; i++) { + mod = (bits >> i & 1) === 1; + if (i < 6) { + matrix.set(i, 8, mod, true); + } else if (i < 8) { + matrix.set(i + 1, 8, mod, true); + } else { + matrix.set(size - 15 + i, 8, mod, true); + } + if (i < 8) { + matrix.set(8, size - i - 1, mod, true); + } else if (i < 9) { + matrix.set(8, 15 - i - 1 + 1, mod, true); + } else { + matrix.set(8, 15 - i - 1, mod, true); + } + } + matrix.set(size - 8, 8, 1, true); + } + function setupData(matrix, data) { + const size = matrix.size; + let inc = -1; + let row = size - 1; + let bitIndex = 7; + let byteIndex = 0; + for (let col = size - 1; col > 0; col -= 2) { + if (col === 6) col--; + while (true) { + for (let c = 0; c < 2; c++) { + if (!matrix.isReserved(row, col - c)) { + let dark = false; + if (byteIndex < data.length) { + dark = (data[byteIndex] >>> bitIndex & 1) === 1; + } + matrix.set(row, col - c, dark); + bitIndex--; + if (bitIndex === -1) { + byteIndex++; + bitIndex = 7; + } + } + } + row += inc; + if (row < 0 || size <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + } + function createData(version, errorCorrectionLevel, segments) { + const buffer = new BitBuffer(); + segments.forEach(function(data) { + buffer.put(data.mode.bit, 4); + buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version)); + data.write(buffer); + }); + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; + if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) { + buffer.put(0, 4); + } + while (buffer.getLengthInBits() % 8 !== 0) { + buffer.putBit(0); + } + const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8; + for (let i = 0; i < remainingByte; i++) { + buffer.put(i % 2 ? 17 : 236, 8); + } + return createCodewords(buffer, version, errorCorrectionLevel); + } + function createCodewords(bitBuffer, version, errorCorrectionLevel) { + const totalCodewords = Utils.getSymbolTotalCodewords(version); + const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); + const dataTotalCodewords = totalCodewords - ecTotalCodewords; + const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel); + const blocksInGroup2 = totalCodewords % ecTotalBlocks; + const blocksInGroup1 = ecTotalBlocks - blocksInGroup2; + const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks); + const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks); + const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1; + const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1; + const rs = new ReedSolomonEncoder(ecCount); + let offset = 0; + const dcData = new Array(ecTotalBlocks); + const ecData = new Array(ecTotalBlocks); + let maxDataSize = 0; + const buffer = new Uint8Array(bitBuffer.buffer); + for (let b = 0; b < ecTotalBlocks; b++) { + const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2; + dcData[b] = buffer.slice(offset, offset + dataSize); + ecData[b] = rs.encode(dcData[b]); + offset += dataSize; + maxDataSize = Math.max(maxDataSize, dataSize); + } + const data = new Uint8Array(totalCodewords); + let index = 0; + let i, r; + for (i = 0; i < maxDataSize; i++) { + for (r = 0; r < ecTotalBlocks; r++) { + if (i < dcData[r].length) { + data[index++] = dcData[r][i]; + } + } + } + for (i = 0; i < ecCount; i++) { + for (r = 0; r < ecTotalBlocks; r++) { + data[index++] = ecData[r][i]; + } + } + return data; + } + function createSymbol(data, version, errorCorrectionLevel, maskPattern) { + let segments; + if (Array.isArray(data)) { + segments = Segments.fromArray(data); + } else if (typeof data === "string") { + let estimatedVersion = version; + if (!estimatedVersion) { + const rawSegments = Segments.rawSplit(data); + estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel); + } + segments = Segments.fromString(data, estimatedVersion || 40); + } else { + throw new Error("Invalid data"); + } + const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel); + if (!bestVersion) { + throw new Error("The amount of data is too big to be stored in a QR Code"); + } + if (!version) { + version = bestVersion; + } else if (version < bestVersion) { + throw new Error( + "\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + bestVersion + ".\n" + ); + } + const dataBits = createData(version, errorCorrectionLevel, segments); + const moduleCount = Utils.getSymbolSize(version); + const modules = new BitMatrix(moduleCount); + setupFinderPattern(modules, version); + setupTimingPattern(modules); + setupAlignmentPattern(modules, version); + setupFormatInfo(modules, errorCorrectionLevel, 0); + if (version >= 7) { + setupVersionInfo(modules, version); + } + setupData(modules, dataBits); + if (isNaN(maskPattern)) { + maskPattern = MaskPattern.getBestMask( + modules, + setupFormatInfo.bind(null, modules, errorCorrectionLevel) + ); + } + MaskPattern.applyMask(maskPattern, modules); + setupFormatInfo(modules, errorCorrectionLevel, maskPattern); + return { + modules, + version, + errorCorrectionLevel, + maskPattern, + segments + }; + } + exports.create = function create(data, options) { + if (typeof data === "undefined" || data === "") { + throw new Error("No input text"); + } + let errorCorrectionLevel = ECLevel.M; + let version; + let mask; + if (typeof options !== "undefined") { + errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M); + version = Version.from(options.version); + mask = MaskPattern.from(options.maskPattern); + if (options.toSJISFunc) { + Utils.setToSJISFunction(options.toSJISFunc); + } + } + return createSymbol(data, version, errorCorrectionLevel, mask); + }; + } + }); + return require_qrcode(); +})(); diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..dd438fb --- /dev/null +++ b/dist/index.html @@ -0,0 +1,630 @@ + + + + + +Label QR 3 Kolom 100 x 150 mm - EPPOS RP-4610B + + + + +
+
+ + + Label QR + EPPOS RP-4610B + +
+
+ Vektor + 203 dpi + + 100 × 150 mm +
+
+ +
+
+

Produksi label / EPPOS RP-4610B

+

Label QR
siap tempel.

+

Masukkan kode, periksa halaman, lalu cetak 100%. Teks dan QR rata tengah di setiap label.

+
+
+ Per halaman + 18 + label +
+
+ Grid + 3 × 6 + kolom × baris +
+
+ Media + 100 × 150 + milimeter +
+
+
+ +
+
+
+ 01 +

Data label

+
+ Satu baris
satu QR
+
+ + +
+ + + +
+
+
+ +
+
+
+ INFO +

Panduan

+
+ +
+
+
+ Format input +
+ KODE | SN atau KODE KODE-UNIK | SN — SN opsional. + Contoh: ONT-191026-3BA3 | 12345678 tampil dua baris + ONT-1910 / 26-3BA3. QR tetap memakai kode lengkap + seperti yang diketik; SN tidak ikut dikodekan. +
+
+
+ Pratinjau PDF +
+ Tombol Pratinjau PDF menampilkan file 100 × 150 mm, 3 kolom × 6 baris + (18 label per halaman) di dalam halaman ini. Periksa dulu, lalu tekan + Unduh PDF di dalam pratinjau. +
+
+
+ Pengaturan cetak +
+ Di Chrome Print Preview: Destination Label Printer · Paper size + 100 × 150 mm (Custom) · Pages All · Color mode + Black and White · Scale 100% / Actual Size (jangan “Fit to page”) · + matikan Header/Footer · margin None. Ukuran halaman sudah dikunci di PDF. +
+
+
+ Catatan +
+ PDF presisi tanpa browser: node src/cli.js -i data/labels.sample.txt -o output/labels.pdf.

+ Kalibrasi driver printer (lebar media 100 mm, tinggi label) tetap memengaruhi hasil fisik. +
+
+
+
+ +
+
+
+

02 / Pratinjau

+

Halaman cetak

+
+
+ 18 / halaman + 100 × 150 mm +
+
+
+
+
+

+ + Area putih adalah halaman cetak 100 × 150 mm. Gunakan skala 100% / Actual Size saat mencetak. +

+
+
+ + + + + + + + + + diff --git a/dist/src/data.js b/dist/src/data.js new file mode 100644 index 0000000..a870c1f --- /dev/null +++ b/dist/src/data.js @@ -0,0 +1,168 @@ +/** + * Parsing data label (UMD, tanpa dependensi) sehingga format input yang + * sama dipakai oleh CLI Node maupun aplikasi HTML. + * + * Format baris teks : "KODE BARU | SN" + * - pemisah SN boleh "|" atau TAB + * - "SN: 12345678" juga diterima, label "SN:" dibuang otomatis + * - baris kosong dan baris komentar "#..." dilewati + * - kode gabungan "ONT-191026-3BA3" otomatis ditampilkan + * menjadi dua baris: "ONT-1910" / "26-3BA3" + * + * Format JSON : [{ "code": "ONT-1910", "unique": "26-5BD9", "sn": "12345678" }] + * - kunci alternatif: payload/kode, unique/uniqueCode, sn/serial + */ +(function (root, factory) { + if (typeof module === 'object' && module.exports) { + module.exports = factory(); + } else { + root.LabelData = factory(); + } +})(typeof self !== 'undefined' ? self : this, function () { + 'use strict'; + + function stripQuotes(value) { + return String(value).replace(/^["']/, '').replace(/["']$/, '').trim(); + } + + /** Bersihkan nilai SN: buang prefix "SN:" dan tanda kutip. */ + function normalizeSn(value) { + if (value === undefined || value === null) { return ''; } + var sn = String(value).trim(); + sn = sn.replace(/^SN\s*:\s*/i, ''); + sn = stripQuotes(sn); + return sn; + } + + /** Pecah satu baris menjadi payload (isi QR) dan SN. */ + function parseLine(line) { + var raw = String(line === undefined || line === null ? '' : line); + var text = raw.replace(/^\uFEFF/, '').trim(); + if (!text) { return null; } + if (text.charAt(0) === '#') { return null; } + + var sn = ''; + var cut = text.indexOf('|'); + if (cut >= 0) { + sn = text.slice(cut + 1); + text = text.slice(0, cut); + } else { + var tab = text.indexOf('\t'); + if (tab >= 0) { + sn = text.slice(tab + 1); + text = text.slice(0, tab); + } + } + + var payload = text.trim(); + if (!payload) { return null; } + + return buildItem(payload, normalizeSn(sn), raw); + } + + /** + * Pisahkan payload menjadi kode utama dan kode unik. + * - "ONT-0910 26-5BD9" -> dipecah pada spasi terakhir. + * - "ONT-191026-3BA3" -> kode gabungan 8 karakter + kode unik + * "26-3BA3"; payload QR tetap memakai teks lengkap tanpa spasi. + */ + function splitPayload(payload) { + var text = String(payload || ''); + var cut = text.lastIndexOf(' '); + if (cut > 0) { + return { main: text.slice(0, cut), unique: text.slice(cut + 1) }; + } + var compact = /^([A-Za-z]{3}-\d{4})(\d{2}-[A-Za-z0-9]{4})$/.exec(text); + if (compact) { + return { main: compact[1], unique: compact[2] }; + } + return { main: text, unique: '' }; + } + + function buildItem(payload, sn, source) { + var parts = splitPayload(payload); + return { + payload: payload, + sn: sn || '', + main: parts.main, + unique: parts.unique, + snText: 'SN: -' + (sn ? ' ' + sn : ''), + source: source === undefined ? payload : source + }; + } + + function itemFromObject(raw) { + var code = raw.code || raw.payload || raw.kode || raw.item || ''; + var unique = raw.unique || raw.uniqueCode || raw.kode_unik || raw.serial_code || ''; + var sn = normalizeSn(raw.sn || raw.serial || raw.SN || raw.snCode || ''); + code = String(code).trim(); + if (!code) { return null; } + var payload = unique ? code + ' ' + String(unique).trim() : code; + var item = buildItem(payload, sn, payload); + if (unique) { + item.main = code; + item.unique = String(unique).trim(); + } + return item; + } + + function itemsFromJson(data) { + var list; + if (Array.isArray(data)) { + list = data; + } else if (data && Array.isArray(data.items)) { + list = data.items; + } else if (data && Array.isArray(data.labels)) { + list = data.labels; + } else if (data && Array.isArray(data.data)) { + list = data.data; + } else { + list = [data]; + } + + var items = []; + for (var i = 0; i < list.length; i++) { + var raw = list[i]; + var item = null; + if (typeof raw === 'string' || typeof raw === 'number') { + item = parseLine(String(raw)); + } else if (raw && typeof raw === 'object') { + item = itemFromObject(raw); + } + if (item) { items.push(item); } + } + return items; + } + + /** Parse teks mentah (JSON atau daftar baris) menjadi daftar item label. */ + function parseText(raw) { + var text = String(raw === undefined || raw === null ? '' : raw); + var trimmed = text.replace(/^\uFEFF/, '').trim(); + if (!trimmed) { return []; } + + var first = trimmed.charAt(0); + if (first === '[' || first === '{') { + try { + return itemsFromJson(JSON.parse(trimmed)); + } catch (err) { + throw new Error('Input JSON tidak valid: ' + err.message); + } + } + + var lines = text.split(/\r?\n/); + var items = []; + for (var i = 0; i < lines.length; i++) { + var item = parseLine(lines[i]); + if (item) { items.push(item); } + } + return items; + } + + return { + parseText: parseText, + parseLine: parseLine, + splitPayload: splitPayload, + normalizeSn: normalizeSn, + buildItem: buildItem + }; +}); diff --git a/dist/src/layout.js b/dist/src/layout.js new file mode 100644 index 0000000..93a1e41 --- /dev/null +++ b/dist/src/layout.js @@ -0,0 +1,391 @@ +/** + * Layout engine bersama untuk label QR 3 kolom. + * + * Semua perhitungan memakai satuan milimeter sebagai acuan desain. + * Konversi ke point PDF memakai rumus 1 mm = 72 / 25.4 pt. + * + * Modul ini sengaja dibuat tanpa dependensi (UMD) supaya file yang sama + * dipakai oleh: + * - src/pdf.js (generator PDF, Node) + * - file HTML (preview + cetak langsung dari browser) + */ +(function (root, factory) { + if (typeof module === 'object' && module.exports) { + module.exports = factory(); + } else { + root.LabelLayout = factory(); + } +})(typeof self !== 'undefined' ? self : this, function () { + 'use strict'; + + var MM_TO_PT = 72 / 25.4; + var PT_TO_MM = 25.4 / 72; + // Ruang aman 1% saat menghitung lebar teks, supaya pembulatan lebar font + // tidak menyebabkan teks terpecah atau terpotong. + var WIDTH_TOLERANCE = 0.99; + // Toleransi absolut kecil untuk kasus teks yang pas di batas (mis. hasil + // interpolasi ukuran font). Tanpa ini, pembulatan float bisa membuat + // wrapText menganggap teks tidak muat lalu memecahnya. + var WIDTH_EPSILON_MM = 0.001; + // Jumlah baris bawaan untuk mode sheet (tinggi sel mengisi halaman). + var DEFAULT_ROWS = 4; + + var DEFAULT_CONFIG = { + // Format 18 label: halaman 100 x 150 mm, 3 kolom x 6 baris. + // Tinggi sel mengisi halaman: (150 - 2*2.5 - 5*5) / 6 = 20 mm. + pageWidthMm: 100, + pageHeightMm: 150, + columns: 3, + // Jumlah baris per halaman. 0 = hitung otomatis dari tinggi label. + rows: 6, + // Tinggi fisik satu label (roll label EPPOS RP-4610B). + // 0 / null = tinggi sel label ikut mengisi tinggi halaman (baris dibagi rata), + // diisi = tinggi sel dipatok dan baris disusun dari atas ke bawah. + labelHeightMm: 0, + marginXMm: 2.5, + marginYMm: 2.5, + gapXMm: 4.5, + gapYMm: 5, + paddingMm: 1.0, + innerGapMm: 1.0, + // Ruang kosong di sisi kanan setiap sel label. + rightGapMm: 0, + qrSizeMm: 13.5, + // 2 modul di dalam kotak QR + padding sel sudah memberi quiet zone cukup. + quietZoneModules: 2, + errorCorrectionLevel: 'M', + mainFontMm: 2.5, + uniqueFontMm: 2.3, + snFontMm: 1.7, + // Jarak tambahan sebelum baris SN (seperti gambar referensi). + snGapMm: 3.5, + minFontMm: 1.2, + lineHeightRatio: 1.3, + // 'center' = teks dan QR rata tengah di dalam sel label. + // 'top' = teks dan QR rata atas (opsional). + verticalAlign: 'center', + guides: false + }; + + function mergeConfig(config) { + var merged = {}; + var key; + for (key in DEFAULT_CONFIG) { + if (Object.prototype.hasOwnProperty.call(DEFAULT_CONFIG, key)) { + merged[key] = DEFAULT_CONFIG[key]; + } + } + if (config) { + for (key in config) { + if (Object.prototype.hasOwnProperty.call(config, key) && + config[key] !== undefined && config[key] !== null) { + merged[key] = config[key]; + } + } + } + return merged; + } + + /** + * Hitung grid halaman: lebar sel, tinggi sel, jumlah baris dan kolom. + * Bila labelHeightMm diisi, baris disusun dari atas dan sisa halaman + * dibiarkan kosong. Bila 0/null, baris dibagi rata memenuhi halaman. + */ + function computeGrid(config) { + var c = mergeConfig(config); + var columns = Math.max(1, Math.round(c.columns)); + var usableWidthMm = c.pageWidthMm - 2 * c.marginXMm - c.gapXMm * (columns - 1); + if (usableWidthMm <= 0) { + throw new Error('Lebar halaman tidak cukup untuk ' + columns + ' kolom.'); + } + var cellWidthMm = usableWidthMm / columns; + + var rows; + var cellHeightMm; + var offsetYMm; + + if (c.labelHeightMm) { + // Tinggi label dipatok: baris disusun dari atas ke bawah, sisa ruang + // dibiarkan kosong di bawah (format referensi). + cellHeightMm = c.labelHeightMm; + var maxRows = Math.max(1, Math.floor( + (c.pageHeightMm - 2 * c.marginYMm + c.gapYMm) / (cellHeightMm + c.gapYMm) + )); + // rows = 0 berarti hitung otomatis dari tinggi halaman. + rows = (!c.rows) + ? maxRows + : Math.min(Math.max(1, Math.round(c.rows)), maxRows); + offsetYMm = c.marginYMm; + } else { + rows = Math.max(1, Math.round(c.rows === null || c.rows === undefined ? DEFAULT_ROWS : c.rows)); + cellHeightMm = (c.pageHeightMm - 2 * c.marginYMm - c.gapYMm * (rows - 1)) / rows; + if (cellHeightMm <= 0) { + throw new Error('Tinggi halaman tidak cukup untuk ' + rows + ' baris.'); + } + offsetYMm = c.marginYMm; + } + + return { + config: c, + columns: columns, + rows: rows, + cellWidthMm: cellWidthMm, + cellHeightMm: cellHeightMm, + offsetYMm: offsetYMm, + perPage: columns * rows + }; + } + + /** Kotak label (sel) untuk index label ke-n (0 = label pertama). */ + function labelBox(grid, index) { + var perPage = grid.perPage; + var pageIndex = Math.floor(index / perPage); + var pos = index % perPage; + var row = Math.floor(pos / grid.columns); + var col = pos % grid.columns; + var c = grid.config; + return { + index: index, + pageIndex: pageIndex, + row: row, + col: col, + xMm: c.marginXMm + col * (grid.cellWidthMm + c.gapXMm), + yMm: grid.offsetYMm + row * (grid.cellHeightMm + c.gapYMm), + widthMm: grid.cellWidthMm, + heightMm: grid.cellHeightMm + }; + } + + /** + * Tempatkan kotak berukuran widthMm x heightMm tepat di tengah area. + * Origin kiri-atas dipakai sama oleh PDFKit dan CSS browser. + */ + function centerBox(area, widthMm, heightMm) { + return { + xMm: area.xMm + (area.widthMm - widthMm) / 2, + yMm: area.yMm + (area.heightMm - heightMm) / 2, + widthMm: widthMm, + heightMm: heightMm + }; + } + + /** Area teks (kiri) dan area QR (kanan) di dalam sebuah sel label. */ + function contentBoxes(grid, box) { + var c = grid.config; + var pad = c.paddingMm; + var content = { + xMm: box.xMm + pad, + yMm: box.yMm + pad, + widthMm: box.widthMm - 2 * pad - c.rightGapMm, + heightMm: box.heightMm - 2 * pad + }; + var qrSizeMm = Math.min(c.qrSizeMm, content.widthMm, content.heightMm); + + // Area barcode adalah slot di sisi kanan area konten. QR selalu + // dihitung dari pusat area ini, bukan dari tepi kanan label. + var barcodeArea = { + xMm: content.xMm + content.widthMm - qrSizeMm, + yMm: content.yMm, + widthMm: qrSizeMm, + heightMm: content.heightMm + }; + if (c.verticalAlign === 'top') { + barcodeArea.heightMm = qrSizeMm; + } + var qrBox = centerBox(barcodeArea, qrSizeMm, qrSizeMm); + + var textBox = { + xMm: content.xMm, + yMm: content.yMm, + widthMm: content.widthMm - qrSizeMm - c.innerGapMm, + heightMm: content.heightMm + }; + if (textBox.widthMm <= 0) { + textBox.widthMm = Math.max(1, content.widthMm * 0.45); + } + return { + content: content, + barcodeArea: barcodeArea, + textBox: textBox, + qrBox: qrBox + }; + } + + /** + * Turunkan ukuran font agar teks muat pada lebar maksimum. + * Lebar teks berskala linear terhadap ukuran font, jadi interpolasi linear tepat. + */ + function fitFontSize(measure, text, desiredMm, maxWidthMm, minMm) { + if (!text) { return desiredMm; } + var widthMm = measure(text, desiredMm); + if (!isFinite(widthMm) || widthMm <= 0) { return desiredMm; } + if (widthMm <= maxWidthMm * WIDTH_TOLERANCE) { return desiredMm; } + return Math.max(minMm, desiredMm * (maxWidthMm * WIDTH_TOLERANCE / widthMm)); + } + + /** Apakah teks muat pada lebar maksimum (dengan toleransi pembulatan). */ + function fits(measure, text, sizeMm, maxWidthMm) { + return measure(text, sizeMm) <= maxWidthMm * WIDTH_TOLERANCE + WIDTH_EPSILON_MM; + } + + /** Pecah teks panjang menjadi beberapa baris tanpa memotong karakter. */ + function wrapText(measure, text, sizeMm, maxWidthMm) { + if (!text) { return []; } + if (fits(measure, text, sizeMm, maxWidthMm)) { return [text]; } + + var words = String(text).split(/\s+/); + var lines = []; + var current = ''; + + function pushCurrent() { + if (current) { lines.push(current); current = ''; } + } + + for (var i = 0; i < words.length; i++) { + var word = words[i]; + if (!word) { continue; } + if (!fits(measure, word, sizeMm, maxWidthMm)) { + pushCurrent(); + var chunk = ''; + for (var j = 0; j < word.length; j++) { + if (chunk && !fits(measure, chunk + word.charAt(j), sizeMm, maxWidthMm)) { + lines.push(chunk); + chunk = ''; + } + chunk += word.charAt(j); + } + current = chunk; + continue; + } + var candidate = current ? current + ' ' + word : word; + if (fits(measure, candidate, sizeMm, maxWidthMm)) { + current = candidate; + } else { + pushCurrent(); + current = word; + } + } + pushCurrent(); + return lines.length ? lines : [text]; + } + + /** + * Susun blok teks (kode utama, kode unik, SN) di dalam textBox. + * `measure(text, sizeMm, weight)` harus mengembalikan lebar teks dalam mm. + */ + function composeText(item, textBox, config, measure) { + var c = mergeConfig(config); + var parts = []; + if (item.main) { + parts.push({ text: String(item.main), desiredMm: c.mainFontMm, weight: 'bold' }); + } + if (item.unique) { + parts.push({ text: String(item.unique), desiredMm: c.uniqueFontMm, weight: 'bold' }); + } + var snText = item.snText !== undefined && item.snText !== null + ? String(item.snText) + : 'SN: -' + (item.sn ? ' ' + item.sn : ''); + if (snText) { + parts.push({ + text: snText, + desiredMm: c.snFontMm, + weight: 'normal', + gapBeforeMm: c.snGapMm + }); + } + + var i; + var p; + for (i = 0; i < parts.length; i++) { + p = parts[i]; + p.sizeMm = fitFontSize(measure, p.text, p.desiredMm, textBox.widthMm, c.minFontMm); + p.lines = wrapText(measure, p.text, p.sizeMm, textBox.widthMm); + } + + function totalHeightMm(list) { + var total = 0; + for (var k = 0; k < list.length; k++) { + total += (list[k].gapBeforeMm || 0) + + list[k].lines.length * list[k].sizeMm * c.lineHeightRatio; + } + return total; + } + + var guard = 0; + while (totalHeightMm(parts) > textBox.heightMm && guard < 16) { + var currentHeight = totalHeightMm(parts); + var scale = (textBox.heightMm / currentHeight) * 0.98; + for (i = 0; i < parts.length; i++) { + p = parts[i]; + p.sizeMm = Math.max(c.minFontMm, p.sizeMm * scale); + p.lines = wrapText(measure, p.text, p.sizeMm, textBox.widthMm); + } + guard++; + } + + var blockHeightMm = totalHeightMm(parts); + var cursorMm = c.verticalAlign === 'top' + ? textBox.yMm + : textBox.yMm + Math.max(0, (textBox.heightMm - blockHeightMm) / 2); + var blocks = []; + for (i = 0; i < parts.length; i++) { + p = parts[i]; + cursorMm += p.gapBeforeMm || 0; + for (var li = 0; li < p.lines.length; li++) { + blocks.push({ + text: p.lines[li], + sizeMm: p.sizeMm, + weight: p.weight, + xMm: textBox.xMm, + yMm: cursorMm, + heightMm: p.sizeMm * c.lineHeightRatio + }); + cursorMm += p.sizeMm * c.lineHeightRatio; + } + } + return { blocks: blocks, heightMm: blockHeightMm }; + } + + /** + * Buat objek layout lengkap: grid + kotak per label. + */ + function create(config) { + var grid = computeGrid(config); + return { + config: grid.config, + grid: grid, + page: { + widthMm: grid.config.pageWidthMm, + heightMm: grid.config.pageHeightMm, + widthPt: grid.config.pageWidthMm * MM_TO_PT, + heightPt: grid.config.pageHeightMm * MM_TO_PT + }, + perPage: grid.perPage, + labelBox: function (index) { return labelBox(grid, index); }, + contentBoxes: function (index) { return contentBoxes(grid, labelBox(grid, index)); } + }; + } + + /** Jumlah halaman yang dibutuhkan untuk N label. */ + function pageCount(layout, itemCount) { + if (!itemCount) { return 0; } + return Math.ceil(itemCount / layout.perPage); + } + + return { + MM_TO_PT: MM_TO_PT, + PT_TO_MM: PT_TO_MM, + DEFAULT_CONFIG: DEFAULT_CONFIG, + mergeConfig: mergeConfig, + computeGrid: computeGrid, + labelBox: labelBox, + centerBox: centerBox, + contentBoxes: contentBoxes, + fitFontSize: fitFontSize, + fits: fits, + wrapText: wrapText, + composeText: composeText, + create: create, + pageCount: pageCount + }; +}); diff --git a/dist/src/svg.js b/dist/src/svg.js new file mode 100644 index 0000000..4410ed2 --- /dev/null +++ b/dist/src/svg.js @@ -0,0 +1,52 @@ +/** + * Pembuat SVG untuk QR Code dari matriks modul (UMD, tanpa dependensi). + * + * QR digambar sebagai path vektor (bukan raster) supaya modul tetap tajam + * baik di layar maupun ketika halaman dicetak pada skala 100%. + */ +(function (root, factory) { + if (typeof module === 'object' && module.exports) { + module.exports = factory(); + } else { + root.LabelSvg = factory(); + } +})(typeof self !== 'undefined' ? self : this, function () { + 'use strict'; + + /** + * @param {{size:number, get:function(number,number):boolean}} matrix + * @param {{quietZone?:number, sizeMm?:number, background?:string, foreground?:string, id?:string}} options + */ + function matrixToSvg(matrix, options) { + var opts = options || {}; + var quiet = opts.quietZone === undefined ? 4 : opts.quietZone; + var total = matrix.size + quiet * 2; + var bg = opts.background || '#ffffff'; + var fg = opts.foreground || '#000000'; + var sizeAttr = opts.sizeMm ? ' width="' + opts.sizeMm + 'mm" height="' + opts.sizeMm + 'mm"' : ''; + var idAttr = opts.id ? ' id="' + opts.id + '"' : ''; + var parts = []; + + for (var r = 0; r < matrix.size; r++) { + var c = 0; + while (c < matrix.size) { + if (matrix.get(r, c)) { + var start = c; + while (c < matrix.size && matrix.get(r, c)) { c++; } + var w = c - start; + parts.push('M' + (quiet + start) + ' ' + (quiet + r) + 'h' + w + 'v1h-' + w + 'z'); + } else { + c++; + } + } + } + + return '' + + '' + + '' + + ''; + } + + return { matrixToSvg: matrixToSvg }; +}); diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild new file mode 100644 index 0000000..63bb6d4 --- /dev/null +++ b/node_modules/.bin/esbuild @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@" +else + exec node "$basedir/../esbuild/bin/esbuild" "$@" +fi diff --git a/node_modules/.bin/esbuild.cmd b/node_modules/.bin/esbuild.cmd new file mode 100644 index 0000000..cc920c5 --- /dev/null +++ b/node_modules/.bin/esbuild.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %* diff --git a/node_modules/.bin/esbuild.ps1 b/node_modules/.bin/esbuild.ps1 new file mode 100644 index 0000000..81ffbf9 --- /dev/null +++ b/node_modules/.bin/esbuild.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/qrcode b/node_modules/.bin/qrcode new file mode 100644 index 0000000..453e8b6 --- /dev/null +++ b/node_modules/.bin/qrcode @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../qrcode/bin/qrcode" "$@" +else + exec node "$basedir/../qrcode/bin/qrcode" "$@" +fi diff --git a/node_modules/.bin/qrcode.cmd b/node_modules/.bin/qrcode.cmd new file mode 100644 index 0000000..ed5bb2c --- /dev/null +++ b/node_modules/.bin/qrcode.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\qrcode\bin\qrcode" %* diff --git a/node_modules/.bin/qrcode.ps1 b/node_modules/.bin/qrcode.ps1 new file mode 100644 index 0000000..98abf38 --- /dev/null +++ b/node_modules/.bin/qrcode.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../qrcode/bin/qrcode" $args + } else { + & "$basedir/node$exe" "$basedir/../qrcode/bin/qrcode" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../qrcode/bin/qrcode" $args + } else { + & "node$exe" "$basedir/../qrcode/bin/qrcode" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..841dd27 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,615 @@ +{ + "name": "generate-qr-code", + "version": "1.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@pdf-lib/standard-fonts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz", + "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "^1.0.6" + } + }, + "node_modules/@pdf-lib/upng": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz", + "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "^1.0.10" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.23", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz", + "integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/brotli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", + "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", + "license": "MIT", + "dependencies": { + "base64-js": "^1.1.2" + } + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "deprecated": "Active development of CryptoJS has been discontinued. This library is no longer maintained.", + "license": "MIT" + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dfa": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", + "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==", + "license": "MIT" + }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fontkit": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fontkit/-/fontkit-2.0.4.tgz", + "integrity": "sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g==", + "license": "MIT", + "dependencies": { + "@swc/helpers": "^0.5.12", + "brotli": "^1.3.2", + "clone": "^2.1.2", + "dfa": "^1.2.0", + "fast-deep-equal": "^3.1.3", + "restructure": "^3.0.0", + "tiny-inflate": "^1.0.3", + "unicode-properties": "^1.4.0", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jpeg-exif": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/jpeg-exif/-/jpeg-exif-1.1.4.tgz", + "integrity": "sha512-a+bKEcCjtuW5WTdgeXFzswSrdqi0jk4XlEtZlx5A94wCoBpFjfFTbo/Tra5SpNCl/YFZPvcV1dJc+TAYeg6ROQ==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "license": "MIT" + }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/linebreak": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.1.0.tgz", + "integrity": "sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ==", + "license": "MIT", + "dependencies": { + "base64-js": "0.0.8", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/linebreak/node_modules/base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mupdf": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/mupdf/-/mupdf-1.28.1.tgz", + "integrity": "sha512-Gi11Ow2G1SlrXKJNZBL1eAIGFVih5+4ZKqjptamTVaj/5hnlrcVrVbyb7lHE2lfFKdxZPyv9ZtfOOq7XgjzEig==", + "dev": true, + "license": "AGPL-3.0-or-later" + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pdf-lib": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/pdf-lib/-/pdf-lib-1.17.1.tgz", + "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pdf-lib/standard-fonts": "^1.0.0", + "@pdf-lib/upng": "^1.0.1", + "pako": "^1.0.11", + "tslib": "^1.11.1" + } + }, + "node_modules/pdfkit": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.17.2.tgz", + "integrity": "sha512-UnwF5fXy08f0dnp4jchFYAROKMNTaPqb/xgR8GtCzIcqoTnbOqtp3bwKvO4688oHI6vzEEs8Q6vqqEnC5IUELw==", + "license": "MIT", + "dependencies": { + "crypto-js": "^4.2.0", + "fontkit": "^2.0.4", + "jpeg-exif": "^1.1.4", + "linebreak": "^1.1.0", + "png-js": "^1.0.0" + } + }, + "node_modules/png-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.1.0.tgz", + "integrity": "sha512-PM/uYGzGdNSzqeOgly68+6wKQDL1SY0a/N+OEa/+br6LnHWOAJB0Npiamnodfq3jd2LS/i2fMeOKSAILjA+m5Q==", + "dependencies": { + "browserify-zlib": "^0.2.0" + } + }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "node_modules/restructure": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/restructure/-/restructure-3.0.2.tgz", + "integrity": "sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw==", + "license": "MIT" + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/unicode-properties": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", + "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/unicode-trie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", + "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "license": "MIT", + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/unicode-trie/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "license": "MIT" + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/node_modules/@esbuild/win32-x64/README.md b/node_modules/@esbuild/win32-x64/README.md new file mode 100644 index 0000000..a99ee7c --- /dev/null +++ b/node_modules/@esbuild/win32-x64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/win32-x64/esbuild.exe b/node_modules/@esbuild/win32-x64/esbuild.exe new file mode 100644 index 0000000..d87697b Binary files /dev/null and b/node_modules/@esbuild/win32-x64/esbuild.exe differ diff --git a/node_modules/@esbuild/win32-x64/package.json b/node_modules/@esbuild/win32-x64/package.json new file mode 100644 index 0000000..5baf905 --- /dev/null +++ b/node_modules/@esbuild/win32-x64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/win32-x64", + "version": "0.28.2", + "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "win32" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@pdf-lib/standard-fonts/LICENSE.md b/node_modules/@pdf-lib/standard-fonts/LICENSE.md new file mode 100644 index 0000000..08fbc43 --- /dev/null +++ b/node_modules/@pdf-lib/standard-fonts/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Andrew Dillon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@pdf-lib/standard-fonts/README.md b/node_modules/@pdf-lib/standard-fonts/README.md new file mode 100644 index 0000000..6249f73 --- /dev/null +++ b/node_modules/@pdf-lib/standard-fonts/README.md @@ -0,0 +1,83 @@ +

+ standard-fonts + +
+ + + + NPM Version + + + + + Prettier Badge + +

+ +> Collection of metrics and encodings for the standard 14 PDF fonts + +This project is a fork of [`afm`](https://github.com/chbrown/afm) and was created for use in [`pdf-lib`](https://github.com/Hopding/pdf-lib). This forks exists for two primary reasons: + +1. The original project did not include mappings from Unicode to WinAnsi/ZapfDingbats/Symbol encodings. +2. The font metrics included in the original project were uncompressed (not ideal for usage in `pdf-lib`). + +## Usage +```js +import { Font, FontNames, Encodings } from '@pdf-lib/standard-fonts'; + +const codePoint = '∑'.charCodeAt(0); + +const glyph = Encodings.Symbol.encodeUnicodeCodePoint(codePoint); +glyph // => { code: 229, name: 'summation' } + +const font = Font.load(FontNames.Symbol); +const width = font.getWidthOfGlyph(glyph.name); +width // => 713 +``` + +## Installation +### NPM Module +To install the latest stable version: +```bash +# With npm +npm install --save @pdf-lib/standard-fonts + +# With yarn +yarn add @pdf-lib/standard-fonts +``` +This assumes you're using [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/lang/en/) as your package manager. + +### UMD Module +You can also download `@pdf-lib/standard-fonts` as a UMD module from [unpkg](https://unpkg.com/#/). The UMD builds have been compiled to ES5, so they should work [in any modern browser](https://caniuse.com/#feat=es5). UMD builds are useful if you aren't using a package manager or module bundler. For example, you can use them directly in the ` \ No newline at end of file diff --git a/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.js b/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000..67ba5c5 --- /dev/null +++ b/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.js @@ -0,0 +1,402 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; + +export function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; + +export function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +}; + +export function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +export function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +export function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +export function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} + +export function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + +} + +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +export function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} + +export function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; +} + +export default { + __extends: __extends, + __assign: __assign, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __esDecorate: __esDecorate, + __runInitializers: __runInitializers, + __propKey: __propKey, + __setFunctionName: __setFunctionName, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __createBinding: __createBinding, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __spreadArrays: __spreadArrays, + __spreadArray: __spreadArray, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet, + __classPrivateFieldSet: __classPrivateFieldSet, + __classPrivateFieldIn: __classPrivateFieldIn, + __addDisposableResource: __addDisposableResource, + __disposeResources: __disposeResources, + __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, +}; diff --git a/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.mjs b/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.mjs new file mode 100644 index 0000000..c17990a --- /dev/null +++ b/node_modules/@swc/helpers/node_modules/tslib/tslib.es6.mjs @@ -0,0 +1,401 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; + +export function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; + +export function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +}; + +export function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +export function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +export function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + +export function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} + +export function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +} + +var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}; + +export function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} + +export function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; +} + +export default { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension, +}; diff --git a/node_modules/@swc/helpers/node_modules/tslib/tslib.html b/node_modules/@swc/helpers/node_modules/tslib/tslib.html new file mode 100644 index 0000000..44c9ba5 --- /dev/null +++ b/node_modules/@swc/helpers/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@swc/helpers/node_modules/tslib/tslib.js b/node_modules/@swc/helpers/node_modules/tslib/tslib.js new file mode 100644 index 0000000..b6509f7 --- /dev/null +++ b/node_modules/@swc/helpers/node_modules/tslib/tslib.js @@ -0,0 +1,484 @@ +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +var __rewriteRelativeImportExtension; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; + + __rewriteRelativeImportExtension = function (path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); + exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); +}); + +0 && (module.exports = { + __extends: __extends, + __assign: __assign, + __rest: __rest, + __decorate: __decorate, + __param: __param, + __esDecorate: __esDecorate, + __runInitializers: __runInitializers, + __propKey: __propKey, + __setFunctionName: __setFunctionName, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __exportStar: __exportStar, + __createBinding: __createBinding, + __values: __values, + __read: __read, + __spread: __spread, + __spreadArrays: __spreadArrays, + __spreadArray: __spreadArray, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet, + __classPrivateFieldSet: __classPrivateFieldSet, + __classPrivateFieldIn: __classPrivateFieldIn, + __addDisposableResource: __addDisposableResource, + __disposeResources: __disposeResources, + __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, +}); diff --git a/node_modules/@swc/helpers/package.json b/node_modules/@swc/helpers/package.json new file mode 100644 index 0000000..4143eed --- /dev/null +++ b/node_modules/@swc/helpers/package.json @@ -0,0 +1,705 @@ +{ + "name": "@swc/helpers", + "version": "0.5.23", + "description": "External helpers for the swc project.", + "module": "esm/index.js", + "main": "cjs/index.cjs", + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git", + "directory": "packages/helpers" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "keywords": [ + "swc", + "helpers" + ], + "author": "강동윤 ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + }, + "homepage": "https://swc.rs", + "type": "module", + "devDependencies": { + "@ast-grep/napi": "^0.40.3", + "dprint": "^0.35.3", + "zx": "^7.2.1" + }, + "dependencies": { + "tslib": "^2.8.0" + }, + "exports": { + "./package.json": "./package.json", + "./esm/*": "./esm/*", + "./cjs/*": "./cjs/*", + "./src/*": "./src/*", + ".": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + }, + "./_": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + }, + "./_/_apply_decorated_descriptor": { + "module-sync": "./esm/_apply_decorated_descriptor.js", + "webpack": "./esm/_apply_decorated_descriptor.js", + "import": "./esm/_apply_decorated_descriptor.js", + "default": "./cjs/_apply_decorated_descriptor.cjs" + }, + "./_/_apply_decs_2203_r": { + "module-sync": "./esm/_apply_decs_2203_r.js", + "webpack": "./esm/_apply_decs_2203_r.js", + "import": "./esm/_apply_decs_2203_r.js", + "default": "./cjs/_apply_decs_2203_r.cjs" + }, + "./_/_apply_decs_2311": { + "module-sync": "./esm/_apply_decs_2311.js", + "webpack": "./esm/_apply_decs_2311.js", + "import": "./esm/_apply_decs_2311.js", + "default": "./cjs/_apply_decs_2311.cjs" + }, + "./_/_array_like_to_array": { + "module-sync": "./esm/_array_like_to_array.js", + "webpack": "./esm/_array_like_to_array.js", + "import": "./esm/_array_like_to_array.js", + "default": "./cjs/_array_like_to_array.cjs" + }, + "./_/_array_with_holes": { + "module-sync": "./esm/_array_with_holes.js", + "webpack": "./esm/_array_with_holes.js", + "import": "./esm/_array_with_holes.js", + "default": "./cjs/_array_with_holes.cjs" + }, + "./_/_array_without_holes": { + "module-sync": "./esm/_array_without_holes.js", + "webpack": "./esm/_array_without_holes.js", + "import": "./esm/_array_without_holes.js", + "default": "./cjs/_array_without_holes.cjs" + }, + "./_/_assert_this_initialized": { + "module-sync": "./esm/_assert_this_initialized.js", + "webpack": "./esm/_assert_this_initialized.js", + "import": "./esm/_assert_this_initialized.js", + "default": "./cjs/_assert_this_initialized.cjs" + }, + "./_/_async_generator": { + "module-sync": "./esm/_async_generator.js", + "webpack": "./esm/_async_generator.js", + "import": "./esm/_async_generator.js", + "default": "./cjs/_async_generator.cjs" + }, + "./_/_async_generator_delegate": { + "module-sync": "./esm/_async_generator_delegate.js", + "webpack": "./esm/_async_generator_delegate.js", + "import": "./esm/_async_generator_delegate.js", + "default": "./cjs/_async_generator_delegate.cjs" + }, + "./_/_async_iterator": { + "module-sync": "./esm/_async_iterator.js", + "webpack": "./esm/_async_iterator.js", + "import": "./esm/_async_iterator.js", + "default": "./cjs/_async_iterator.cjs" + }, + "./_/_async_to_generator": { + "module-sync": "./esm/_async_to_generator.js", + "webpack": "./esm/_async_to_generator.js", + "import": "./esm/_async_to_generator.js", + "default": "./cjs/_async_to_generator.cjs" + }, + "./_/_await_async_generator": { + "module-sync": "./esm/_await_async_generator.js", + "webpack": "./esm/_await_async_generator.js", + "import": "./esm/_await_async_generator.js", + "default": "./cjs/_await_async_generator.cjs" + }, + "./_/_await_value": { + "module-sync": "./esm/_await_value.js", + "webpack": "./esm/_await_value.js", + "import": "./esm/_await_value.js", + "default": "./cjs/_await_value.cjs" + }, + "./_/_call_super": { + "module-sync": "./esm/_call_super.js", + "webpack": "./esm/_call_super.js", + "import": "./esm/_call_super.js", + "default": "./cjs/_call_super.cjs" + }, + "./_/_check_private_redeclaration": { + "module-sync": "./esm/_check_private_redeclaration.js", + "webpack": "./esm/_check_private_redeclaration.js", + "import": "./esm/_check_private_redeclaration.js", + "default": "./cjs/_check_private_redeclaration.cjs" + }, + "./_/_class_apply_descriptor_destructure": { + "module-sync": "./esm/_class_apply_descriptor_destructure.js", + "webpack": "./esm/_class_apply_descriptor_destructure.js", + "import": "./esm/_class_apply_descriptor_destructure.js", + "default": "./cjs/_class_apply_descriptor_destructure.cjs" + }, + "./_/_class_apply_descriptor_get": { + "module-sync": "./esm/_class_apply_descriptor_get.js", + "webpack": "./esm/_class_apply_descriptor_get.js", + "import": "./esm/_class_apply_descriptor_get.js", + "default": "./cjs/_class_apply_descriptor_get.cjs" + }, + "./_/_class_apply_descriptor_set": { + "module-sync": "./esm/_class_apply_descriptor_set.js", + "webpack": "./esm/_class_apply_descriptor_set.js", + "import": "./esm/_class_apply_descriptor_set.js", + "default": "./cjs/_class_apply_descriptor_set.cjs" + }, + "./_/_class_apply_descriptor_update": { + "module-sync": "./esm/_class_apply_descriptor_update.js", + "webpack": "./esm/_class_apply_descriptor_update.js", + "import": "./esm/_class_apply_descriptor_update.js", + "default": "./cjs/_class_apply_descriptor_update.cjs" + }, + "./_/_class_call_check": { + "module-sync": "./esm/_class_call_check.js", + "webpack": "./esm/_class_call_check.js", + "import": "./esm/_class_call_check.js", + "default": "./cjs/_class_call_check.cjs" + }, + "./_/_class_check_private_static_access": { + "module-sync": "./esm/_class_check_private_static_access.js", + "webpack": "./esm/_class_check_private_static_access.js", + "import": "./esm/_class_check_private_static_access.js", + "default": "./cjs/_class_check_private_static_access.cjs" + }, + "./_/_class_check_private_static_field_descriptor": { + "module-sync": "./esm/_class_check_private_static_field_descriptor.js", + "webpack": "./esm/_class_check_private_static_field_descriptor.js", + "import": "./esm/_class_check_private_static_field_descriptor.js", + "default": "./cjs/_class_check_private_static_field_descriptor.cjs" + }, + "./_/_class_extract_field_descriptor": { + "module-sync": "./esm/_class_extract_field_descriptor.js", + "webpack": "./esm/_class_extract_field_descriptor.js", + "import": "./esm/_class_extract_field_descriptor.js", + "default": "./cjs/_class_extract_field_descriptor.cjs" + }, + "./_/_class_name_tdz_error": { + "module-sync": "./esm/_class_name_tdz_error.js", + "webpack": "./esm/_class_name_tdz_error.js", + "import": "./esm/_class_name_tdz_error.js", + "default": "./cjs/_class_name_tdz_error.cjs" + }, + "./_/_class_private_field_destructure": { + "module-sync": "./esm/_class_private_field_destructure.js", + "webpack": "./esm/_class_private_field_destructure.js", + "import": "./esm/_class_private_field_destructure.js", + "default": "./cjs/_class_private_field_destructure.cjs" + }, + "./_/_class_private_field_get": { + "module-sync": "./esm/_class_private_field_get.js", + "webpack": "./esm/_class_private_field_get.js", + "import": "./esm/_class_private_field_get.js", + "default": "./cjs/_class_private_field_get.cjs" + }, + "./_/_class_private_field_init": { + "module-sync": "./esm/_class_private_field_init.js", + "webpack": "./esm/_class_private_field_init.js", + "import": "./esm/_class_private_field_init.js", + "default": "./cjs/_class_private_field_init.cjs" + }, + "./_/_class_private_field_loose_base": { + "module-sync": "./esm/_class_private_field_loose_base.js", + "webpack": "./esm/_class_private_field_loose_base.js", + "import": "./esm/_class_private_field_loose_base.js", + "default": "./cjs/_class_private_field_loose_base.cjs" + }, + "./_/_class_private_field_loose_key": { + "module-sync": "./esm/_class_private_field_loose_key.js", + "webpack": "./esm/_class_private_field_loose_key.js", + "import": "./esm/_class_private_field_loose_key.js", + "default": "./cjs/_class_private_field_loose_key.cjs" + }, + "./_/_class_private_field_set": { + "module-sync": "./esm/_class_private_field_set.js", + "webpack": "./esm/_class_private_field_set.js", + "import": "./esm/_class_private_field_set.js", + "default": "./cjs/_class_private_field_set.cjs" + }, + "./_/_class_private_field_update": { + "module-sync": "./esm/_class_private_field_update.js", + "webpack": "./esm/_class_private_field_update.js", + "import": "./esm/_class_private_field_update.js", + "default": "./cjs/_class_private_field_update.cjs" + }, + "./_/_class_private_method_get": { + "module-sync": "./esm/_class_private_method_get.js", + "webpack": "./esm/_class_private_method_get.js", + "import": "./esm/_class_private_method_get.js", + "default": "./cjs/_class_private_method_get.cjs" + }, + "./_/_class_private_method_init": { + "module-sync": "./esm/_class_private_method_init.js", + "webpack": "./esm/_class_private_method_init.js", + "import": "./esm/_class_private_method_init.js", + "default": "./cjs/_class_private_method_init.cjs" + }, + "./_/_class_private_method_set": { + "module-sync": "./esm/_class_private_method_set.js", + "webpack": "./esm/_class_private_method_set.js", + "import": "./esm/_class_private_method_set.js", + "default": "./cjs/_class_private_method_set.cjs" + }, + "./_/_class_static_private_field_destructure": { + "module-sync": "./esm/_class_static_private_field_destructure.js", + "webpack": "./esm/_class_static_private_field_destructure.js", + "import": "./esm/_class_static_private_field_destructure.js", + "default": "./cjs/_class_static_private_field_destructure.cjs" + }, + "./_/_class_static_private_field_spec_get": { + "module-sync": "./esm/_class_static_private_field_spec_get.js", + "webpack": "./esm/_class_static_private_field_spec_get.js", + "import": "./esm/_class_static_private_field_spec_get.js", + "default": "./cjs/_class_static_private_field_spec_get.cjs" + }, + "./_/_class_static_private_field_spec_set": { + "module-sync": "./esm/_class_static_private_field_spec_set.js", + "webpack": "./esm/_class_static_private_field_spec_set.js", + "import": "./esm/_class_static_private_field_spec_set.js", + "default": "./cjs/_class_static_private_field_spec_set.cjs" + }, + "./_/_class_static_private_field_update": { + "module-sync": "./esm/_class_static_private_field_update.js", + "webpack": "./esm/_class_static_private_field_update.js", + "import": "./esm/_class_static_private_field_update.js", + "default": "./cjs/_class_static_private_field_update.cjs" + }, + "./_/_class_static_private_method_get": { + "module-sync": "./esm/_class_static_private_method_get.js", + "webpack": "./esm/_class_static_private_method_get.js", + "import": "./esm/_class_static_private_method_get.js", + "default": "./cjs/_class_static_private_method_get.cjs" + }, + "./_/_construct": { + "module-sync": "./esm/_construct.js", + "webpack": "./esm/_construct.js", + "import": "./esm/_construct.js", + "default": "./cjs/_construct.cjs" + }, + "./_/_create_class": { + "module-sync": "./esm/_create_class.js", + "webpack": "./esm/_create_class.js", + "import": "./esm/_create_class.js", + "default": "./cjs/_create_class.cjs" + }, + "./_/_create_for_of_iterator_helper_loose": { + "module-sync": "./esm/_create_for_of_iterator_helper_loose.js", + "webpack": "./esm/_create_for_of_iterator_helper_loose.js", + "import": "./esm/_create_for_of_iterator_helper_loose.js", + "default": "./cjs/_create_for_of_iterator_helper_loose.cjs" + }, + "./_/_create_super": { + "module-sync": "./esm/_create_super.js", + "webpack": "./esm/_create_super.js", + "import": "./esm/_create_super.js", + "default": "./cjs/_create_super.cjs" + }, + "./_/_decorate": { + "module-sync": "./esm/_decorate.js", + "webpack": "./esm/_decorate.js", + "import": "./esm/_decorate.js", + "default": "./cjs/_decorate.cjs" + }, + "./_/_defaults": { + "module-sync": "./esm/_defaults.js", + "webpack": "./esm/_defaults.js", + "import": "./esm/_defaults.js", + "default": "./cjs/_defaults.cjs" + }, + "./_/_define_enumerable_properties": { + "module-sync": "./esm/_define_enumerable_properties.js", + "webpack": "./esm/_define_enumerable_properties.js", + "import": "./esm/_define_enumerable_properties.js", + "default": "./cjs/_define_enumerable_properties.cjs" + }, + "./_/_define_property": { + "module-sync": "./esm/_define_property.js", + "webpack": "./esm/_define_property.js", + "import": "./esm/_define_property.js", + "default": "./cjs/_define_property.cjs" + }, + "./_/_dispose": { + "module-sync": "./esm/_dispose.js", + "webpack": "./esm/_dispose.js", + "import": "./esm/_dispose.js", + "default": "./cjs/_dispose.cjs" + }, + "./_/_export_star": { + "module-sync": "./esm/_export_star.js", + "webpack": "./esm/_export_star.js", + "import": "./esm/_export_star.js", + "default": "./cjs/_export_star.cjs" + }, + "./_/_extends": { + "module-sync": "./esm/_extends.js", + "webpack": "./esm/_extends.js", + "import": "./esm/_extends.js", + "default": "./cjs/_extends.cjs" + }, + "./_/_get": { + "module-sync": "./esm/_get.js", + "webpack": "./esm/_get.js", + "import": "./esm/_get.js", + "default": "./cjs/_get.cjs" + }, + "./_/_get_prototype_of": { + "module-sync": "./esm/_get_prototype_of.js", + "webpack": "./esm/_get_prototype_of.js", + "import": "./esm/_get_prototype_of.js", + "default": "./cjs/_get_prototype_of.cjs" + }, + "./_/_identity": { + "module-sync": "./esm/_identity.js", + "webpack": "./esm/_identity.js", + "import": "./esm/_identity.js", + "default": "./cjs/_identity.cjs" + }, + "./_/_inherits": { + "module-sync": "./esm/_inherits.js", + "webpack": "./esm/_inherits.js", + "import": "./esm/_inherits.js", + "default": "./cjs/_inherits.cjs" + }, + "./_/_inherits_loose": { + "module-sync": "./esm/_inherits_loose.js", + "webpack": "./esm/_inherits_loose.js", + "import": "./esm/_inherits_loose.js", + "default": "./cjs/_inherits_loose.cjs" + }, + "./_/_initializer_define_property": { + "module-sync": "./esm/_initializer_define_property.js", + "webpack": "./esm/_initializer_define_property.js", + "import": "./esm/_initializer_define_property.js", + "default": "./cjs/_initializer_define_property.cjs" + }, + "./_/_initializer_warning_helper": { + "module-sync": "./esm/_initializer_warning_helper.js", + "webpack": "./esm/_initializer_warning_helper.js", + "import": "./esm/_initializer_warning_helper.js", + "default": "./cjs/_initializer_warning_helper.cjs" + }, + "./_/_instanceof": { + "module-sync": "./esm/_instanceof.js", + "webpack": "./esm/_instanceof.js", + "import": "./esm/_instanceof.js", + "default": "./cjs/_instanceof.cjs" + }, + "./_/_interop_require_default": { + "module-sync": "./esm/_interop_require_default.js", + "webpack": "./esm/_interop_require_default.js", + "import": "./esm/_interop_require_default.js", + "default": "./cjs/_interop_require_default.cjs" + }, + "./_/_interop_require_wildcard": { + "module-sync": "./esm/_interop_require_wildcard.js", + "webpack": "./esm/_interop_require_wildcard.js", + "import": "./esm/_interop_require_wildcard.js", + "default": "./cjs/_interop_require_wildcard.cjs" + }, + "./_/_is_native_function": { + "module-sync": "./esm/_is_native_function.js", + "webpack": "./esm/_is_native_function.js", + "import": "./esm/_is_native_function.js", + "default": "./cjs/_is_native_function.cjs" + }, + "./_/_is_native_reflect_construct": { + "module-sync": "./esm/_is_native_reflect_construct.js", + "webpack": "./esm/_is_native_reflect_construct.js", + "import": "./esm/_is_native_reflect_construct.js", + "default": "./cjs/_is_native_reflect_construct.cjs" + }, + "./_/_iterable_to_array": { + "module-sync": "./esm/_iterable_to_array.js", + "webpack": "./esm/_iterable_to_array.js", + "import": "./esm/_iterable_to_array.js", + "default": "./cjs/_iterable_to_array.cjs" + }, + "./_/_iterable_to_array_limit": { + "module-sync": "./esm/_iterable_to_array_limit.js", + "webpack": "./esm/_iterable_to_array_limit.js", + "import": "./esm/_iterable_to_array_limit.js", + "default": "./cjs/_iterable_to_array_limit.cjs" + }, + "./_/_iterable_to_array_limit_loose": { + "module-sync": "./esm/_iterable_to_array_limit_loose.js", + "webpack": "./esm/_iterable_to_array_limit_loose.js", + "import": "./esm/_iterable_to_array_limit_loose.js", + "default": "./cjs/_iterable_to_array_limit_loose.cjs" + }, + "./_/_jsx": { + "module-sync": "./esm/_jsx.js", + "webpack": "./esm/_jsx.js", + "import": "./esm/_jsx.js", + "default": "./cjs/_jsx.cjs" + }, + "./_/_new_arrow_check": { + "module-sync": "./esm/_new_arrow_check.js", + "webpack": "./esm/_new_arrow_check.js", + "import": "./esm/_new_arrow_check.js", + "default": "./cjs/_new_arrow_check.cjs" + }, + "./_/_non_iterable_rest": { + "module-sync": "./esm/_non_iterable_rest.js", + "webpack": "./esm/_non_iterable_rest.js", + "import": "./esm/_non_iterable_rest.js", + "default": "./cjs/_non_iterable_rest.cjs" + }, + "./_/_non_iterable_spread": { + "module-sync": "./esm/_non_iterable_spread.js", + "webpack": "./esm/_non_iterable_spread.js", + "import": "./esm/_non_iterable_spread.js", + "default": "./cjs/_non_iterable_spread.cjs" + }, + "./_/_object_destructuring_empty": { + "module-sync": "./esm/_object_destructuring_empty.js", + "webpack": "./esm/_object_destructuring_empty.js", + "import": "./esm/_object_destructuring_empty.js", + "default": "./cjs/_object_destructuring_empty.cjs" + }, + "./_/_object_spread": { + "module-sync": "./esm/_object_spread.js", + "webpack": "./esm/_object_spread.js", + "import": "./esm/_object_spread.js", + "default": "./cjs/_object_spread.cjs" + }, + "./_/_object_spread_props": { + "module-sync": "./esm/_object_spread_props.js", + "webpack": "./esm/_object_spread_props.js", + "import": "./esm/_object_spread_props.js", + "default": "./cjs/_object_spread_props.cjs" + }, + "./_/_object_without_properties": { + "module-sync": "./esm/_object_without_properties.js", + "webpack": "./esm/_object_without_properties.js", + "import": "./esm/_object_without_properties.js", + "default": "./cjs/_object_without_properties.cjs" + }, + "./_/_object_without_properties_loose": { + "module-sync": "./esm/_object_without_properties_loose.js", + "webpack": "./esm/_object_without_properties_loose.js", + "import": "./esm/_object_without_properties_loose.js", + "default": "./cjs/_object_without_properties_loose.cjs" + }, + "./_/_overload_yield": { + "module-sync": "./esm/_overload_yield.js", + "webpack": "./esm/_overload_yield.js", + "import": "./esm/_overload_yield.js", + "default": "./cjs/_overload_yield.cjs" + }, + "./_/_possible_constructor_return": { + "module-sync": "./esm/_possible_constructor_return.js", + "webpack": "./esm/_possible_constructor_return.js", + "import": "./esm/_possible_constructor_return.js", + "default": "./cjs/_possible_constructor_return.cjs" + }, + "./_/_read_only_error": { + "module-sync": "./esm/_read_only_error.js", + "webpack": "./esm/_read_only_error.js", + "import": "./esm/_read_only_error.js", + "default": "./cjs/_read_only_error.cjs" + }, + "./_/_set": { + "module-sync": "./esm/_set.js", + "webpack": "./esm/_set.js", + "import": "./esm/_set.js", + "default": "./cjs/_set.cjs" + }, + "./_/_set_prototype_of": { + "module-sync": "./esm/_set_prototype_of.js", + "webpack": "./esm/_set_prototype_of.js", + "import": "./esm/_set_prototype_of.js", + "default": "./cjs/_set_prototype_of.cjs" + }, + "./_/_skip_first_generator_next": { + "module-sync": "./esm/_skip_first_generator_next.js", + "webpack": "./esm/_skip_first_generator_next.js", + "import": "./esm/_skip_first_generator_next.js", + "default": "./cjs/_skip_first_generator_next.cjs" + }, + "./_/_sliced_to_array": { + "module-sync": "./esm/_sliced_to_array.js", + "webpack": "./esm/_sliced_to_array.js", + "import": "./esm/_sliced_to_array.js", + "default": "./cjs/_sliced_to_array.cjs" + }, + "./_/_sliced_to_array_loose": { + "module-sync": "./esm/_sliced_to_array_loose.js", + "webpack": "./esm/_sliced_to_array_loose.js", + "import": "./esm/_sliced_to_array_loose.js", + "default": "./cjs/_sliced_to_array_loose.cjs" + }, + "./_/_super_prop_base": { + "module-sync": "./esm/_super_prop_base.js", + "webpack": "./esm/_super_prop_base.js", + "import": "./esm/_super_prop_base.js", + "default": "./cjs/_super_prop_base.cjs" + }, + "./_/_tagged_template_literal": { + "module-sync": "./esm/_tagged_template_literal.js", + "webpack": "./esm/_tagged_template_literal.js", + "import": "./esm/_tagged_template_literal.js", + "default": "./cjs/_tagged_template_literal.cjs" + }, + "./_/_tagged_template_literal_loose": { + "module-sync": "./esm/_tagged_template_literal_loose.js", + "webpack": "./esm/_tagged_template_literal_loose.js", + "import": "./esm/_tagged_template_literal_loose.js", + "default": "./cjs/_tagged_template_literal_loose.cjs" + }, + "./_/_throw": { + "module-sync": "./esm/_throw.js", + "webpack": "./esm/_throw.js", + "import": "./esm/_throw.js", + "default": "./cjs/_throw.cjs" + }, + "./_/_to_array": { + "module-sync": "./esm/_to_array.js", + "webpack": "./esm/_to_array.js", + "import": "./esm/_to_array.js", + "default": "./cjs/_to_array.cjs" + }, + "./_/_to_consumable_array": { + "module-sync": "./esm/_to_consumable_array.js", + "webpack": "./esm/_to_consumable_array.js", + "import": "./esm/_to_consumable_array.js", + "default": "./cjs/_to_consumable_array.cjs" + }, + "./_/_to_primitive": { + "module-sync": "./esm/_to_primitive.js", + "webpack": "./esm/_to_primitive.js", + "import": "./esm/_to_primitive.js", + "default": "./cjs/_to_primitive.cjs" + }, + "./_/_to_property_key": { + "module-sync": "./esm/_to_property_key.js", + "webpack": "./esm/_to_property_key.js", + "import": "./esm/_to_property_key.js", + "default": "./cjs/_to_property_key.cjs" + }, + "./_/_ts_add_disposable_resource": { + "module-sync": "./esm/_ts_add_disposable_resource.js", + "webpack": "./esm/_ts_add_disposable_resource.js", + "import": "./esm/_ts_add_disposable_resource.js", + "default": "./cjs/_ts_add_disposable_resource.cjs" + }, + "./_/_ts_decorate": { + "module-sync": "./esm/_ts_decorate.js", + "webpack": "./esm/_ts_decorate.js", + "import": "./esm/_ts_decorate.js", + "default": "./cjs/_ts_decorate.cjs" + }, + "./_/_ts_dispose_resources": { + "module-sync": "./esm/_ts_dispose_resources.js", + "webpack": "./esm/_ts_dispose_resources.js", + "import": "./esm/_ts_dispose_resources.js", + "default": "./cjs/_ts_dispose_resources.cjs" + }, + "./_/_ts_generator": { + "module-sync": "./esm/_ts_generator.js", + "webpack": "./esm/_ts_generator.js", + "import": "./esm/_ts_generator.js", + "default": "./cjs/_ts_generator.cjs" + }, + "./_/_ts_metadata": { + "module-sync": "./esm/_ts_metadata.js", + "webpack": "./esm/_ts_metadata.js", + "import": "./esm/_ts_metadata.js", + "default": "./cjs/_ts_metadata.cjs" + }, + "./_/_ts_param": { + "module-sync": "./esm/_ts_param.js", + "webpack": "./esm/_ts_param.js", + "import": "./esm/_ts_param.js", + "default": "./cjs/_ts_param.cjs" + }, + "./_/_ts_rewrite_relative_import_extension": { + "module-sync": "./esm/_ts_rewrite_relative_import_extension.js", + "webpack": "./esm/_ts_rewrite_relative_import_extension.js", + "import": "./esm/_ts_rewrite_relative_import_extension.js", + "default": "./cjs/_ts_rewrite_relative_import_extension.cjs" + }, + "./_/_ts_values": { + "module-sync": "./esm/_ts_values.js", + "webpack": "./esm/_ts_values.js", + "import": "./esm/_ts_values.js", + "default": "./cjs/_ts_values.cjs" + }, + "./_/_type_of": { + "module-sync": "./esm/_type_of.js", + "webpack": "./esm/_type_of.js", + "import": "./esm/_type_of.js", + "default": "./cjs/_type_of.cjs" + }, + "./_/_unsupported_iterable_to_array": { + "module-sync": "./esm/_unsupported_iterable_to_array.js", + "webpack": "./esm/_unsupported_iterable_to_array.js", + "import": "./esm/_unsupported_iterable_to_array.js", + "default": "./cjs/_unsupported_iterable_to_array.cjs" + }, + "./_/_update": { + "module-sync": "./esm/_update.js", + "webpack": "./esm/_update.js", + "import": "./esm/_update.js", + "default": "./cjs/_update.cjs" + }, + "./_/_using": { + "module-sync": "./esm/_using.js", + "webpack": "./esm/_using.js", + "import": "./esm/_using.js", + "default": "./cjs/_using.cjs" + }, + "./_/_using_ctx": { + "module-sync": "./esm/_using_ctx.js", + "webpack": "./esm/_using_ctx.js", + "import": "./esm/_using_ctx.js", + "default": "./cjs/_using_ctx.cjs" + }, + "./_/_wrap_async_generator": { + "module-sync": "./esm/_wrap_async_generator.js", + "webpack": "./esm/_wrap_async_generator.js", + "import": "./esm/_wrap_async_generator.js", + "default": "./cjs/_wrap_async_generator.cjs" + }, + "./_/_wrap_native_super": { + "module-sync": "./esm/_wrap_native_super.js", + "webpack": "./esm/_wrap_native_super.js", + "import": "./esm/_wrap_native_super.js", + "default": "./cjs/_wrap_native_super.cjs" + }, + "./_/_wrap_reg_exp": { + "module-sync": "./esm/_wrap_reg_exp.js", + "webpack": "./esm/_wrap_reg_exp.js", + "import": "./esm/_wrap_reg_exp.js", + "default": "./cjs/_wrap_reg_exp.cjs" + }, + "./_/_write_only_error": { + "module-sync": "./esm/_write_only_error.js", + "webpack": "./esm/_write_only_error.js", + "import": "./esm/_write_only_error.js", + "default": "./cjs/_write_only_error.cjs" + }, + "./_/index": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + } + }, + "scripts": { + "build": "zx ./scripts/build.js" + } +} \ No newline at end of file diff --git a/node_modules/@swc/helpers/scripts/ast_grep.js b/node_modules/@swc/helpers/scripts/ast_grep.js new file mode 100644 index 0000000..a7fea0a --- /dev/null +++ b/node_modules/@swc/helpers/scripts/ast_grep.js @@ -0,0 +1,218 @@ +import { parseFiles } from "@ast-grep/napi"; +import { chalk, fs, path } from "zx"; +import { errors } from "./errors.js"; +import { root } from "./utils.js"; + +/** + * @typedef {import("@ast-grep/napi").SgNode} SgNode + */ + +/** + * Prepend text to a node + * @param {SgNode} node + * @param {string} text + * @returns {import("@ast-grep/napi").Edit} + */ +function prepend(node, text) { + const index = node.range().start.index; + return { + startPos: index, + endPos: index, + insertedText: text, + }; +} + +export function ast_grep() { + const task_queue = []; + + const task = parseFiles([root("esm")], (err, tree) => { + const filename = path.basename(tree.filename(), ".js"); + if (filename === "index") { + return; + } + + const root_node = tree.root(); + const edits = []; + + edits.push(prepend(root_node, `"use strict";\n\n`)); + + // We have forked _ts_generator from tslib + if (filename.startsWith("_ts") && filename !== "_ts_generator") { + const match = root_node.find(`export { $NAME as _ } from "tslib"`); + if (match) { + const name = match.getMatch("NAME").text(); + edits.push( + match.replace(`exports._ = require("tslib").${name};`), + ); + task_queue.push( + fs.writeFile(root("cjs", `${filename}.cjs`), root_node.commitEdits(edits), { + encoding: "utf-8", + }), + ); + } else { + report_noexport(tree.filename()); + } + return; + } + + // rewrite export named function + const match = root_node.find({ + rule: { + kind: "export_statement", + pattern: "export { $FUNC as _ }", + }, + }); + + if (match) { + const func = match.getMatch("FUNC"); + const func_name = func.text(); + if (func_name !== filename) { + report_export_mismatch(tree.filename(), match); + } + + edits.push( + match.replace(`exports._ = ${func_name};`), + ); + + // since we match the { export x as _ } pattern, + // we need to find the assignment expression from the root + root_node + .findAll({ + rule: { + pattern: func_name, + kind: "identifier", + inside: { kind: "assignment_expression", field: "left" }, + }, + }) + .forEach((node) => { + edits.push( + prepend(node, `exports._ = `), + ); + }); + } else { + report_noexport(tree.filename()); + } + + // rewrite import + root_node + .findAll({ rule: { pattern: `import { _ as $BINDING } from "$SOURCE"` } }) + .forEach((match) => { + const import_binding = match.getMatch("BINDING").text(); + const import_source = match.getMatch("SOURCE").text(); + + const import_basename = path.basename(import_source, ".js"); + + if (import_binding !== import_basename) { + report_import_mismatch(tree.filename(), match); + } + + edits.push( + match.replace(`var ${import_binding} = require("./${import_binding}.cjs");`), + ); + + root_node + .findAll({ + rule: { + pattern: import_binding, + kind: "identifier", + inside: { + not: { + kind: "import_specifier", + }, + }, + }, + }) + .forEach((node) => { + edits.push( + node.replace(`${node.text()}._`), + ); + }); + }); + + task_queue.push( + fs.writeFile(root("cjs", `${filename}.cjs`), root_node.commitEdits(edits), { + encoding: "utf-8", + }), + ); + }); + + task_queue.push(task); + + return task_queue; +} + +/** + * @param {string} filename + * @param {SgNode} match + */ +function report_export_mismatch(filename, match) { + const func = match.getMatch("FUNC"); + const func_range = func.range(); + + const text = match.text().split("\n"); + const offset = func_range.start.line - match.range().start.line; + + text.splice( + offset + 1, + text.length, + chalk.red( + [ + " ".repeat(func_range.start.column), + "^".repeat(func_range.end.column - func_range.start.column), + ] + .join(""), + ), + ); + + errors.push( + [ + `${chalk.bold.red("error")}: mismatch exported function name.`, + "", + `${chalk.blue("-->")} ${filename}:${func_range.start.line + 1}:${func_range.start.column + 1}`, + "", + ...text, + "", + `${chalk.bold("note:")} The exported name should be the same as the filename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + * @param {SgNode} match + */ +function report_import_mismatch(filename, match) { + const binding_range = match.getMatch("BINDING").range(); + const source_range = match.getMatch("SOURCE").range(); + + errors.push( + [ + `${chalk.bold.red("error")}: mismatch imported binding name.`, + "", + `${chalk.blue("-->")} ${filename}:${match.range().start.line + 1}`, + "", + match.text(), + [ + " ".repeat(binding_range.start.column), + chalk.red("^".repeat(binding_range.end.column - binding_range.start.column)), + " ".repeat(source_range.start.column - binding_range.end.column), + chalk.blue("-".repeat(source_range.end.column - source_range.start.column)), + ] + .join(""), + `${chalk.bold("note:")} The imported binding name should be the same as the import source basename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + */ +function report_noexport(filename) { + errors.push( + [`${chalk.bold.red("error")}: exported name not found`, `${chalk.blue("-->")} ${filename}`].join("\n"), + ); +} diff --git a/node_modules/@swc/helpers/scripts/build.js b/node_modules/@swc/helpers/scripts/build.js new file mode 100644 index 0000000..32005a8 --- /dev/null +++ b/node_modules/@swc/helpers/scripts/build.js @@ -0,0 +1,133 @@ +#!/usr/bin/env zx + +import { $, fs, glob } from "zx"; +import { ast_grep } from "./ast_grep.js"; +import { errors } from "./errors.js"; +import { root } from "./utils.js"; + +// clear generated content +await Promise.all([ + fs.remove(root("cjs")), + fs.remove(root("_")), + fs.remove(root("src")), +]); + +let modules = await glob("*.js", { cwd: root("esm") }); + +const task_queue = []; + +const NO_MODIFY = [ + "/* This file is automatically generated and should not be manually edited. */", + "/* To modify this file, please run the `npm run build` command instead. */", +]; + +// generate index.js +const indexESM = [...NO_MODIFY, ""]; + +const indexCJS = [`"use strict";`, "", ...NO_MODIFY, ""]; + +const cjs_export_list = []; +const cjs_module_lexer = []; + +const main_package_json = fs.readJSONSync(root("package.json")); + +main_package_json.exports = { + "./package.json": "./package.json", + "./esm/*": "./esm/*", + "./cjs/*": "./cjs/*", + "./src/*": "./src/*", + ".": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, + "./_": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, +}; + +modules.forEach((p) => { + const importBinding = p.slice(0, -3); + + main_package_json.exports[`./_/${importBinding}`] = { + "module-sync": `./esm/${importBinding}.js`, + webpack: `./esm/${importBinding}.js`, + import: `./esm/${importBinding}.js`, + default: `./cjs/${importBinding}.cjs`, + }; + + const alias_package = { + main: `../../cjs/${importBinding}.cjs`, + module: `../../esm/${importBinding}.js`, + }; + task_queue.push( + fs.outputJSON(root("_", importBinding, "package.json"), alias_package, { + encoding: "utf-8", + spaces: 4, + }), + ); + + if (importBinding === "index") { + return; + } + + task_queue.push( + fs.outputFile(root("src", `${importBinding}.mjs`), re_export_esm(importBinding), { + encoding: "utf-8", + }), + ); + + indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`); + + cjs_module_lexer.push(`${importBinding}: null,`); + cjs_export_list.push(`get ${importBinding}() { + return require("./${importBinding}.cjs")._; + },`); +}); + +indexCJS.push( + `0 && (module.exports = {`, + "/* @Annotate_start: the CommonJS named exports for ESM import in node */", + ...cjs_module_lexer, + "/* @Annotate_end */", + `});`, + `module.exports = {`, + ...cjs_export_list, + `};`, +); + +task_queue.push( + fs.outputJSON(root("package.json"), main_package_json, { spaces: 4 }), + fs.outputFile(root("esm", "index.js"), indexESM.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("cjs", "index.cjs"), indexCJS.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("src", "index.mjs"), `export * from "../esm/index.js"`, { + encoding: "utf-8", + }), +); + +task_queue.push(...ast_grep()); + +await Promise.all(task_queue); + +if (errors.length > 0) { + errors.forEach((e) => { + console.error(e); + }); + process.exitCode = 1; +} else { + $.cwd = root("."); + await $`dprint fmt`; + await $`dprint fmt "scripts/*.js" -c scripts/.dprint.json`; +} + +function re_export_esm(importBinding) { + return `export { _ as default } from "../esm/${importBinding}.js"`; +} diff --git a/node_modules/@swc/helpers/scripts/errors.js b/node_modules/@swc/helpers/scripts/errors.js new file mode 100644 index 0000000..b5b3c15 --- /dev/null +++ b/node_modules/@swc/helpers/scripts/errors.js @@ -0,0 +1 @@ +export const errors = []; diff --git a/node_modules/@swc/helpers/scripts/utils.js b/node_modules/@swc/helpers/scripts/utils.js new file mode 100644 index 0000000..479b100 --- /dev/null +++ b/node_modules/@swc/helpers/scripts/utils.js @@ -0,0 +1,3 @@ +export function root(...p) { + return path.resolve(__dirname, "..", ...p); +} diff --git a/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs b/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs new file mode 100644 index 0000000..e4839a1 --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decorated_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs b/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs new file mode 100644 index 0000000..c10cb56 --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2203_r.js"; diff --git a/node_modules/@swc/helpers/src/_apply_decs_2311.mjs b/node_modules/@swc/helpers/src/_apply_decs_2311.mjs new file mode 100644 index 0000000..b9aec56 --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decs_2311.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2311.js"; diff --git a/node_modules/@swc/helpers/src/_array_like_to_array.mjs b/node_modules/@swc/helpers/src/_array_like_to_array.mjs new file mode 100644 index 0000000..7691b32 --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_like_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_like_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_array_with_holes.mjs b/node_modules/@swc/helpers/src/_array_with_holes.mjs new file mode 100644 index 0000000..1a62299 --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_with_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_with_holes.js"; diff --git a/node_modules/@swc/helpers/src/_array_without_holes.mjs b/node_modules/@swc/helpers/src/_array_without_holes.mjs new file mode 100644 index 0000000..ee2f265 --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_without_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_without_holes.js"; diff --git a/node_modules/@swc/helpers/src/_assert_this_initialized.mjs b/node_modules/@swc/helpers/src/_assert_this_initialized.mjs new file mode 100644 index 0000000..3677253 --- /dev/null +++ b/node_modules/@swc/helpers/src/_assert_this_initialized.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_assert_this_initialized.js"; diff --git a/node_modules/@swc/helpers/src/_async_generator.mjs b/node_modules/@swc/helpers/src/_async_generator.mjs new file mode 100644 index 0000000..b3ced53 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_async_generator_delegate.mjs b/node_modules/@swc/helpers/src/_async_generator_delegate.mjs new file mode 100644 index 0000000..29dd8b2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_generator_delegate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator_delegate.js"; diff --git a/node_modules/@swc/helpers/src/_async_iterator.mjs b/node_modules/@swc/helpers/src/_async_iterator.mjs new file mode 100644 index 0000000..d130032 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_iterator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_iterator.js"; diff --git a/node_modules/@swc/helpers/src/_async_to_generator.mjs b/node_modules/@swc/helpers/src/_async_to_generator.mjs new file mode 100644 index 0000000..18adef5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_to_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_to_generator.js"; diff --git a/node_modules/@swc/helpers/src/_await_async_generator.mjs b/node_modules/@swc/helpers/src/_await_async_generator.mjs new file mode 100644 index 0000000..da13a9f --- /dev/null +++ b/node_modules/@swc/helpers/src/_await_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_await_value.mjs b/node_modules/@swc/helpers/src/_await_value.mjs new file mode 100644 index 0000000..3c24161 --- /dev/null +++ b/node_modules/@swc/helpers/src/_await_value.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_value.js"; diff --git a/node_modules/@swc/helpers/src/_call_super.mjs b/node_modules/@swc/helpers/src/_call_super.mjs new file mode 100644 index 0000000..da60716 --- /dev/null +++ b/node_modules/@swc/helpers/src/_call_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_call_super.js"; diff --git a/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs b/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs new file mode 100644 index 0000000..7d78cfe --- /dev/null +++ b/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_check_private_redeclaration.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs new file mode 100644 index 0000000..b606b53 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs new file mode 100644 index 0000000..f888b6b --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs new file mode 100644 index 0000000..fb00679 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs new file mode 100644 index 0000000..e7a9915 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_call_check.mjs b/node_modules/@swc/helpers/src/_class_call_check.mjs new file mode 100644 index 0000000..220c3c8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_call_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_call_check.js"; diff --git a/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs b/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs new file mode 100644 index 0000000..a52a4d8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_access.js"; diff --git a/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs b/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs new file mode 100644 index 0000000..cb8a623 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_field_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs b/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs new file mode 100644 index 0000000..7586ce8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_extract_field_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs b/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs new file mode 100644 index 0000000..c211d7f --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_name_tdz_error.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs b/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs new file mode 100644 index 0000000..b06b763 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_get.mjs b/node_modules/@swc/helpers/src/_class_private_field_get.mjs new file mode 100644 index 0000000..1f8854a --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_init.mjs b/node_modules/@swc/helpers/src/_class_private_field_init.mjs new file mode 100644 index 0000000..48d4d17 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_init.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs b/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs new file mode 100644 index 0000000..a10b033 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_base.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs b/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs new file mode 100644 index 0000000..6e80fd9 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_key.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_set.mjs b/node_modules/@swc/helpers/src/_class_private_field_set.mjs new file mode 100644 index 0000000..cb54a1b --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_update.mjs b/node_modules/@swc/helpers/src/_class_private_field_update.mjs new file mode 100644 index 0000000..c5f0c63 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_get.mjs b/node_modules/@swc/helpers/src/_class_private_method_get.mjs new file mode 100644 index 0000000..9f5248a --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_init.mjs b/node_modules/@swc/helpers/src/_class_private_method_init.mjs new file mode 100644 index 0000000..afce453 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_init.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_set.mjs b/node_modules/@swc/helpers/src/_class_private_method_set.mjs new file mode 100644 index 0000000..327252d --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs new file mode 100644 index 0000000..c35376d --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs new file mode 100644 index 0000000..0cc7854 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs new file mode 100644 index 0000000..208cf97 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs new file mode 100644 index 0000000..87e0438 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs b/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs new file mode 100644 index 0000000..2241a1a --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_method_get.js"; diff --git a/node_modules/@swc/helpers/src/_construct.mjs b/node_modules/@swc/helpers/src/_construct.mjs new file mode 100644 index 0000000..54acb64 --- /dev/null +++ b/node_modules/@swc/helpers/src/_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_construct.js"; diff --git a/node_modules/@swc/helpers/src/_create_class.mjs b/node_modules/@swc/helpers/src/_create_class.mjs new file mode 100644 index 0000000..78c2af2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_class.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_class.js"; diff --git a/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs b/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs new file mode 100644 index 0000000..303e056 --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_for_of_iterator_helper_loose.js"; diff --git a/node_modules/@swc/helpers/src/_create_super.mjs b/node_modules/@swc/helpers/src/_create_super.mjs new file mode 100644 index 0000000..44a06bf --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_super.js"; diff --git a/node_modules/@swc/helpers/src/_decorate.mjs b/node_modules/@swc/helpers/src/_decorate.mjs new file mode 100644 index 0000000..0878991 --- /dev/null +++ b/node_modules/@swc/helpers/src/_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_decorate.js"; diff --git a/node_modules/@swc/helpers/src/_defaults.mjs b/node_modules/@swc/helpers/src/_defaults.mjs new file mode 100644 index 0000000..624e684 --- /dev/null +++ b/node_modules/@swc/helpers/src/_defaults.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_defaults.js"; diff --git a/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs b/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs new file mode 100644 index 0000000..b6a87fc --- /dev/null +++ b/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_enumerable_properties.js"; diff --git a/node_modules/@swc/helpers/src/_define_property.mjs b/node_modules/@swc/helpers/src/_define_property.mjs new file mode 100644 index 0000000..b60b2c8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_property.js"; diff --git a/node_modules/@swc/helpers/src/_dispose.mjs b/node_modules/@swc/helpers/src/_dispose.mjs new file mode 100644 index 0000000..2f217e8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_dispose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_dispose.js"; diff --git a/node_modules/@swc/helpers/src/_export_star.mjs b/node_modules/@swc/helpers/src/_export_star.mjs new file mode 100644 index 0000000..c7011c2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_export_star.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_export_star.js"; diff --git a/node_modules/@swc/helpers/src/_extends.mjs b/node_modules/@swc/helpers/src/_extends.mjs new file mode 100644 index 0000000..804a28b --- /dev/null +++ b/node_modules/@swc/helpers/src/_extends.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_extends.js"; diff --git a/node_modules/@swc/helpers/src/_get.mjs b/node_modules/@swc/helpers/src/_get.mjs new file mode 100644 index 0000000..fae4b22 --- /dev/null +++ b/node_modules/@swc/helpers/src/_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get.js"; diff --git a/node_modules/@swc/helpers/src/_get_prototype_of.mjs b/node_modules/@swc/helpers/src/_get_prototype_of.mjs new file mode 100644 index 0000000..57e820c --- /dev/null +++ b/node_modules/@swc/helpers/src/_get_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get_prototype_of.js"; diff --git a/node_modules/@swc/helpers/src/_identity.mjs b/node_modules/@swc/helpers/src/_identity.mjs new file mode 100644 index 0000000..5ab4a08 --- /dev/null +++ b/node_modules/@swc/helpers/src/_identity.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_identity.js"; diff --git a/node_modules/@swc/helpers/src/_inherits.mjs b/node_modules/@swc/helpers/src/_inherits.mjs new file mode 100644 index 0000000..d5e3767 --- /dev/null +++ b/node_modules/@swc/helpers/src/_inherits.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits.js"; diff --git a/node_modules/@swc/helpers/src/_inherits_loose.mjs b/node_modules/@swc/helpers/src/_inherits_loose.mjs new file mode 100644 index 0000000..4f5187d --- /dev/null +++ b/node_modules/@swc/helpers/src/_inherits_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits_loose.js"; diff --git a/node_modules/@swc/helpers/src/_initializer_define_property.mjs b/node_modules/@swc/helpers/src/_initializer_define_property.mjs new file mode 100644 index 0000000..fa0a3b8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_initializer_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_define_property.js"; diff --git a/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs b/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs new file mode 100644 index 0000000..f9251ab --- /dev/null +++ b/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_warning_helper.js"; diff --git a/node_modules/@swc/helpers/src/_instanceof.mjs b/node_modules/@swc/helpers/src/_instanceof.mjs new file mode 100644 index 0000000..609f786 --- /dev/null +++ b/node_modules/@swc/helpers/src/_instanceof.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_instanceof.js"; diff --git a/node_modules/@swc/helpers/src/_interop_require_default.mjs b/node_modules/@swc/helpers/src/_interop_require_default.mjs new file mode 100644 index 0000000..454ce71 --- /dev/null +++ b/node_modules/@swc/helpers/src/_interop_require_default.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_default.js"; diff --git a/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs b/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs new file mode 100644 index 0000000..07f7a7e --- /dev/null +++ b/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_wildcard.js"; diff --git a/node_modules/@swc/helpers/src/_is_native_function.mjs b/node_modules/@swc/helpers/src/_is_native_function.mjs new file mode 100644 index 0000000..8bacb3a --- /dev/null +++ b/node_modules/@swc/helpers/src/_is_native_function.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_function.js"; diff --git a/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs b/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs new file mode 100644 index 0000000..7c0394d --- /dev/null +++ b/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_reflect_construct.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array.mjs b/node_modules/@swc/helpers/src/_iterable_to_array.mjs new file mode 100644 index 0000000..4baf94a --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs b/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs new file mode 100644 index 0000000..45f70f5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs b/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs new file mode 100644 index 0000000..400a9e0 --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit_loose.js"; diff --git a/node_modules/@swc/helpers/src/_jsx.mjs b/node_modules/@swc/helpers/src/_jsx.mjs new file mode 100644 index 0000000..8b0646a --- /dev/null +++ b/node_modules/@swc/helpers/src/_jsx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_jsx.js"; diff --git a/node_modules/@swc/helpers/src/_new_arrow_check.mjs b/node_modules/@swc/helpers/src/_new_arrow_check.mjs new file mode 100644 index 0000000..e694d15 --- /dev/null +++ b/node_modules/@swc/helpers/src/_new_arrow_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_new_arrow_check.js"; diff --git a/node_modules/@swc/helpers/src/_non_iterable_rest.mjs b/node_modules/@swc/helpers/src/_non_iterable_rest.mjs new file mode 100644 index 0000000..8321807 --- /dev/null +++ b/node_modules/@swc/helpers/src/_non_iterable_rest.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_rest.js"; diff --git a/node_modules/@swc/helpers/src/_non_iterable_spread.mjs b/node_modules/@swc/helpers/src/_non_iterable_spread.mjs new file mode 100644 index 0000000..12993f1 --- /dev/null +++ b/node_modules/@swc/helpers/src/_non_iterable_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_spread.js"; diff --git a/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs b/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs new file mode 100644 index 0000000..b8aed9c --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_destructuring_empty.js"; diff --git a/node_modules/@swc/helpers/src/_object_spread.mjs b/node_modules/@swc/helpers/src/_object_spread.mjs new file mode 100644 index 0000000..9b536f5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread.js"; diff --git a/node_modules/@swc/helpers/src/_object_spread_props.mjs b/node_modules/@swc/helpers/src/_object_spread_props.mjs new file mode 100644 index 0000000..799de3f --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_spread_props.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread_props.js"; diff --git a/node_modules/@swc/helpers/src/_object_without_properties.mjs b/node_modules/@swc/helpers/src/_object_without_properties.mjs new file mode 100644 index 0000000..f0ce12c --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_without_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties.js"; diff --git a/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs b/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs new file mode 100644 index 0000000..f6f2669 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties_loose.js"; diff --git a/node_modules/@swc/helpers/src/_overload_yield.mjs b/node_modules/@swc/helpers/src/_overload_yield.mjs new file mode 100644 index 0000000..d854c35 --- /dev/null +++ b/node_modules/@swc/helpers/src/_overload_yield.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_overload_yield.js"; diff --git a/node_modules/@swc/helpers/src/_possible_constructor_return.mjs b/node_modules/@swc/helpers/src/_possible_constructor_return.mjs new file mode 100644 index 0000000..ee9657d --- /dev/null +++ b/node_modules/@swc/helpers/src/_possible_constructor_return.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_possible_constructor_return.js"; diff --git a/node_modules/@swc/helpers/src/_read_only_error.mjs b/node_modules/@swc/helpers/src/_read_only_error.mjs new file mode 100644 index 0000000..3e95329 --- /dev/null +++ b/node_modules/@swc/helpers/src/_read_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_read_only_error.js"; diff --git a/node_modules/@swc/helpers/src/_set.mjs b/node_modules/@swc/helpers/src/_set.mjs new file mode 100644 index 0000000..5cc0337 --- /dev/null +++ b/node_modules/@swc/helpers/src/_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set.js"; diff --git a/node_modules/@swc/helpers/src/_set_prototype_of.mjs b/node_modules/@swc/helpers/src/_set_prototype_of.mjs new file mode 100644 index 0000000..f244856 --- /dev/null +++ b/node_modules/@swc/helpers/src/_set_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set_prototype_of.js"; diff --git a/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs b/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs new file mode 100644 index 0000000..f437b3c --- /dev/null +++ b/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_skip_first_generator_next.js"; diff --git a/node_modules/@swc/helpers/src/_sliced_to_array.mjs b/node_modules/@swc/helpers/src/_sliced_to_array.mjs new file mode 100644 index 0000000..34f9723 --- /dev/null +++ b/node_modules/@swc/helpers/src/_sliced_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs b/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs new file mode 100644 index 0000000..116211b --- /dev/null +++ b/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array_loose.js"; diff --git a/node_modules/@swc/helpers/src/_super_prop_base.mjs b/node_modules/@swc/helpers/src/_super_prop_base.mjs new file mode 100644 index 0000000..25a1b4b --- /dev/null +++ b/node_modules/@swc/helpers/src/_super_prop_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_super_prop_base.js"; diff --git a/node_modules/@swc/helpers/src/_tagged_template_literal.mjs b/node_modules/@swc/helpers/src/_tagged_template_literal.mjs new file mode 100644 index 0000000..ea78872 --- /dev/null +++ b/node_modules/@swc/helpers/src/_tagged_template_literal.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal.js"; diff --git a/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs b/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs new file mode 100644 index 0000000..f65c3bb --- /dev/null +++ b/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal_loose.js"; diff --git a/node_modules/@swc/helpers/src/_throw.mjs b/node_modules/@swc/helpers/src/_throw.mjs new file mode 100644 index 0000000..a0b50e0 --- /dev/null +++ b/node_modules/@swc/helpers/src/_throw.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_throw.js"; diff --git a/node_modules/@swc/helpers/src/_to_array.mjs b/node_modules/@swc/helpers/src/_to_array.mjs new file mode 100644 index 0000000..d42cba5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_to_consumable_array.mjs b/node_modules/@swc/helpers/src/_to_consumable_array.mjs new file mode 100644 index 0000000..e23f2eb --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_consumable_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_consumable_array.js"; diff --git a/node_modules/@swc/helpers/src/_to_primitive.mjs b/node_modules/@swc/helpers/src/_to_primitive.mjs new file mode 100644 index 0000000..0d4a248 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_primitive.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_primitive.js"; diff --git a/node_modules/@swc/helpers/src/_to_property_key.mjs b/node_modules/@swc/helpers/src/_to_property_key.mjs new file mode 100644 index 0000000..7b76707 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_property_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_property_key.js"; diff --git a/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs b/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs new file mode 100644 index 0000000..b059656 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_add_disposable_resource.js"; diff --git a/node_modules/@swc/helpers/src/_ts_decorate.mjs b/node_modules/@swc/helpers/src/_ts_decorate.mjs new file mode 100644 index 0000000..2d7763f --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_decorate.js"; diff --git a/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs b/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs new file mode 100644 index 0000000..ba5ec13 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_dispose_resources.js"; diff --git a/node_modules/@swc/helpers/src/_ts_generator.mjs b/node_modules/@swc/helpers/src/_ts_generator.mjs new file mode 100644 index 0000000..f595f6d --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_generator.js"; diff --git a/node_modules/@swc/helpers/src/_ts_metadata.mjs b/node_modules/@swc/helpers/src/_ts_metadata.mjs new file mode 100644 index 0000000..424457e --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_metadata.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_metadata.js"; diff --git a/node_modules/@swc/helpers/src/_ts_param.mjs b/node_modules/@swc/helpers/src/_ts_param.mjs new file mode 100644 index 0000000..1806317 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_param.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_param.js"; diff --git a/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs b/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs new file mode 100644 index 0000000..d135817 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_rewrite_relative_import_extension.js"; diff --git a/node_modules/@swc/helpers/src/_ts_values.mjs b/node_modules/@swc/helpers/src/_ts_values.mjs new file mode 100644 index 0000000..126c783 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_values.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_values.js"; diff --git a/node_modules/@swc/helpers/src/_type_of.mjs b/node_modules/@swc/helpers/src/_type_of.mjs new file mode 100644 index 0000000..4f8a936 --- /dev/null +++ b/node_modules/@swc/helpers/src/_type_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_type_of.js"; diff --git a/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs b/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs new file mode 100644 index 0000000..9e42222 --- /dev/null +++ b/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_unsupported_iterable_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_update.mjs b/node_modules/@swc/helpers/src/_update.mjs new file mode 100644 index 0000000..6adb4a4 --- /dev/null +++ b/node_modules/@swc/helpers/src/_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_update.js"; diff --git a/node_modules/@swc/helpers/src/_using.mjs b/node_modules/@swc/helpers/src/_using.mjs new file mode 100644 index 0000000..f716815 --- /dev/null +++ b/node_modules/@swc/helpers/src/_using.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using.js"; diff --git a/node_modules/@swc/helpers/src/_using_ctx.mjs b/node_modules/@swc/helpers/src/_using_ctx.mjs new file mode 100644 index 0000000..87e8097 --- /dev/null +++ b/node_modules/@swc/helpers/src/_using_ctx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using_ctx.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_async_generator.mjs b/node_modules/@swc/helpers/src/_wrap_async_generator.mjs new file mode 100644 index 0000000..44acb1a --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_native_super.mjs b/node_modules/@swc/helpers/src/_wrap_native_super.mjs new file mode 100644 index 0000000..266f5d3 --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_native_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_native_super.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs b/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs new file mode 100644 index 0000000..772afe9 --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_reg_exp.js"; diff --git a/node_modules/@swc/helpers/src/_write_only_error.mjs b/node_modules/@swc/helpers/src/_write_only_error.mjs new file mode 100644 index 0000000..68c8af2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_write_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_write_only_error.js"; diff --git a/node_modules/@swc/helpers/src/index.mjs b/node_modules/@swc/helpers/src/index.mjs new file mode 100644 index 0000000..d0d0812 --- /dev/null +++ b/node_modules/@swc/helpers/src/index.mjs @@ -0,0 +1 @@ +export * from "../esm/index.js"; diff --git a/node_modules/ansi-regex/index.d.ts b/node_modules/ansi-regex/index.d.ts new file mode 100644 index 0000000..2dbf6af --- /dev/null +++ b/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,37 @@ +declare namespace ansiRegex { + interface Options { + /** + Match only the first ANSI escape. + + @default false + */ + onlyFirst: boolean; + } +} + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +declare function ansiRegex(options?: ansiRegex.Options): RegExp; + +export = ansiRegex; diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..616ff83 --- /dev/null +++ b/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..017f531 --- /dev/null +++ b/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..4d848bc --- /dev/null +++ b/node_modules/ansi-regex/readme.md @@ -0,0 +1,78 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`
+Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/ansi-styles/index.d.ts b/node_modules/ansi-styles/index.d.ts new file mode 100644 index 0000000..44a907e --- /dev/null +++ b/node_modules/ansi-styles/index.d.ts @@ -0,0 +1,345 @@ +declare type CSSColor = + | 'aliceblue' + | 'antiquewhite' + | 'aqua' + | 'aquamarine' + | 'azure' + | 'beige' + | 'bisque' + | 'black' + | 'blanchedalmond' + | 'blue' + | 'blueviolet' + | 'brown' + | 'burlywood' + | 'cadetblue' + | 'chartreuse' + | 'chocolate' + | 'coral' + | 'cornflowerblue' + | 'cornsilk' + | 'crimson' + | 'cyan' + | 'darkblue' + | 'darkcyan' + | 'darkgoldenrod' + | 'darkgray' + | 'darkgreen' + | 'darkgrey' + | 'darkkhaki' + | 'darkmagenta' + | 'darkolivegreen' + | 'darkorange' + | 'darkorchid' + | 'darkred' + | 'darksalmon' + | 'darkseagreen' + | 'darkslateblue' + | 'darkslategray' + | 'darkslategrey' + | 'darkturquoise' + | 'darkviolet' + | 'deeppink' + | 'deepskyblue' + | 'dimgray' + | 'dimgrey' + | 'dodgerblue' + | 'firebrick' + | 'floralwhite' + | 'forestgreen' + | 'fuchsia' + | 'gainsboro' + | 'ghostwhite' + | 'gold' + | 'goldenrod' + | 'gray' + | 'green' + | 'greenyellow' + | 'grey' + | 'honeydew' + | 'hotpink' + | 'indianred' + | 'indigo' + | 'ivory' + | 'khaki' + | 'lavender' + | 'lavenderblush' + | 'lawngreen' + | 'lemonchiffon' + | 'lightblue' + | 'lightcoral' + | 'lightcyan' + | 'lightgoldenrodyellow' + | 'lightgray' + | 'lightgreen' + | 'lightgrey' + | 'lightpink' + | 'lightsalmon' + | 'lightseagreen' + | 'lightskyblue' + | 'lightslategray' + | 'lightslategrey' + | 'lightsteelblue' + | 'lightyellow' + | 'lime' + | 'limegreen' + | 'linen' + | 'magenta' + | 'maroon' + | 'mediumaquamarine' + | 'mediumblue' + | 'mediumorchid' + | 'mediumpurple' + | 'mediumseagreen' + | 'mediumslateblue' + | 'mediumspringgreen' + | 'mediumturquoise' + | 'mediumvioletred' + | 'midnightblue' + | 'mintcream' + | 'mistyrose' + | 'moccasin' + | 'navajowhite' + | 'navy' + | 'oldlace' + | 'olive' + | 'olivedrab' + | 'orange' + | 'orangered' + | 'orchid' + | 'palegoldenrod' + | 'palegreen' + | 'paleturquoise' + | 'palevioletred' + | 'papayawhip' + | 'peachpuff' + | 'peru' + | 'pink' + | 'plum' + | 'powderblue' + | 'purple' + | 'rebeccapurple' + | 'red' + | 'rosybrown' + | 'royalblue' + | 'saddlebrown' + | 'salmon' + | 'sandybrown' + | 'seagreen' + | 'seashell' + | 'sienna' + | 'silver' + | 'skyblue' + | 'slateblue' + | 'slategray' + | 'slategrey' + | 'snow' + | 'springgreen' + | 'steelblue' + | 'tan' + | 'teal' + | 'thistle' + | 'tomato' + | 'turquoise' + | 'violet' + | 'wheat' + | 'white' + | 'whitesmoke' + | 'yellow' + | 'yellowgreen'; + +declare namespace ansiStyles { + interface ColorConvert { + /** + The RGB color space. + + @param red - (`0`-`255`) + @param green - (`0`-`255`) + @param blue - (`0`-`255`) + */ + rgb(red: number, green: number, blue: number): string; + + /** + The RGB HEX color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hex(hex: string): string; + + /** + @param keyword - A CSS color name. + */ + keyword(keyword: CSSColor): string; + + /** + The HSL color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param lightness - (`0`-`100`) + */ + hsl(hue: number, saturation: number, lightness: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param value - (`0`-`100`) + */ + hsv(hue: number, saturation: number, value: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param whiteness - (`0`-`100`) + @param blackness - (`0`-`100`) + */ + hwb(hue: number, whiteness: number, blackness: number): string; + + /** + Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. + */ + ansi(ansi: number): string; + + /** + Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(ansi: number): string; + } + + interface CSPair { + /** + The ANSI terminal control sequence for starting this style. + */ + readonly open: string; + + /** + The ANSI terminal control sequence for ending this style. + */ + readonly close: string; + } + + interface ColorBase { + readonly ansi: ColorConvert; + readonly ansi256: ColorConvert; + readonly ansi16m: ColorConvert; + + /** + The ANSI terminal control sequence for ending this color. + */ + readonly close: string; + } + + interface Modifier { + /** + Resets the current color chain. + */ + readonly reset: CSPair; + + /** + Make text bold. + */ + readonly bold: CSPair; + + /** + Emitting only a small amount of light. + */ + readonly dim: CSPair; + + /** + Make text italic. (Not widely supported) + */ + readonly italic: CSPair; + + /** + Make text underline. (Not widely supported) + */ + readonly underline: CSPair; + + /** + Inverse background and foreground colors. + */ + readonly inverse: CSPair; + + /** + Prints the text, but makes it invisible. + */ + readonly hidden: CSPair; + + /** + Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: CSPair; + } + + interface ForegroundColor { + readonly black: CSPair; + readonly red: CSPair; + readonly green: CSPair; + readonly yellow: CSPair; + readonly blue: CSPair; + readonly cyan: CSPair; + readonly magenta: CSPair; + readonly white: CSPair; + + /** + Alias for `blackBright`. + */ + readonly gray: CSPair; + + /** + Alias for `blackBright`. + */ + readonly grey: CSPair; + + readonly blackBright: CSPair; + readonly redBright: CSPair; + readonly greenBright: CSPair; + readonly yellowBright: CSPair; + readonly blueBright: CSPair; + readonly cyanBright: CSPair; + readonly magentaBright: CSPair; + readonly whiteBright: CSPair; + } + + interface BackgroundColor { + readonly bgBlack: CSPair; + readonly bgRed: CSPair; + readonly bgGreen: CSPair; + readonly bgYellow: CSPair; + readonly bgBlue: CSPair; + readonly bgCyan: CSPair; + readonly bgMagenta: CSPair; + readonly bgWhite: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGray: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGrey: CSPair; + + readonly bgBlackBright: CSPair; + readonly bgRedBright: CSPair; + readonly bgGreenBright: CSPair; + readonly bgYellowBright: CSPair; + readonly bgBlueBright: CSPair; + readonly bgCyanBright: CSPair; + readonly bgMagentaBright: CSPair; + readonly bgWhiteBright: CSPair; + } +} + +declare const ansiStyles: { + readonly modifier: ansiStyles.Modifier; + readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; + readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; + readonly codes: ReadonlyMap; +} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; + +export = ansiStyles; diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..5d82581 --- /dev/null +++ b/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..7539328 --- /dev/null +++ b/node_modules/ansi-styles/package.json @@ -0,0 +1,56 @@ +{ + "name": "ansi-styles", + "version": "4.3.0", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "color-convert": "^2.0.1" + }, + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..24883de --- /dev/null +++ b/node_modules/ansi-styles/readme.md @@ -0,0 +1,152 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + +## Install + +``` +$ npm install ansi-styles +``` + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +The following color spaces from `color-convert` are supported: + +- `rgb` +- `hex` +- `keyword` +- `hsl` +- `hsv` +- `hwb` +- `ansi` +- `ansi256` + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +## For enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/base64-js/LICENSE b/node_modules/base64-js/LICENSE new file mode 100644 index 0000000..6d52b8a --- /dev/null +++ b/node_modules/base64-js/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jameson Little + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/base64-js/README.md b/node_modules/base64-js/README.md new file mode 100644 index 0000000..b42a48f --- /dev/null +++ b/node_modules/base64-js/README.md @@ -0,0 +1,34 @@ +base64-js +========= + +`base64-js` does basic base64 encoding/decoding in pure JS. + +[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) + +Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. + +Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. + +## install + +With [npm](https://npmjs.org) do: + +`npm install base64-js` and `var base64js = require('base64-js')` + +For use in web browsers do: + +`` + +[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) + +## methods + +`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/node_modules/base64-js/base64js.min.js b/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000..908ac83 --- /dev/null +++ b/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json new file mode 100644 index 0000000..c3972e3 --- /dev/null +++ b/node_modules/base64-js/package.json @@ -0,0 +1,47 @@ +{ + "name": "base64-js", + "description": "Base64 encoding/decoding in pure JS", + "version": "1.5.1", + "author": "T. Jameson Little ", + "typings": "index.d.ts", + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "devDependencies": { + "babel-minify": "^0.5.1", + "benchmark": "^2.1.4", + "browserify": "^16.3.0", + "standard": "*", + "tape": "4.x" + }, + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | minify > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/brotli/build/encode.js b/node_modules/brotli/build/encode.js new file mode 100644 index 0000000..ff35302 --- /dev/null +++ b/node_modules/brotli/build/encode.js @@ -0,0 +1,57 @@ +var b={},aa=require("../decompress"),ba=require("base64-js");b.readBinary=function(){var a=ba.toByteArray(require("../build/mem.js"));return aa(a)};b||(b=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var g={},m;for(m in b)b.hasOwnProperty(m)&&(g[m]=b[m]);var t="object"===typeof window,u="function"===typeof importScripts,v="object"===typeof process&&"function"===typeof require&&!t&&!u,x=!t&&!v&&!u; +if(v){b.print||(b.print=function(a){process.stdout.write(a+"\n")});b.printErr||(b.printErr=function(a){process.stderr.write(a+"\n")});var ca=require("fs"),da=require("path");b.read=function(a,c){a=da.normalize(a);var d=ca.readFileSync(a);d||a==da.resolve(a)||(a=path.join(__dirname,"..","src",a),d=ca.readFileSync(a));d&&!c&&(d=d.toString());return d};b.readBinary=function(a){a=b.read(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};b.load=function(a){ea(read(a))};b.thisProgram||(b.thisProgram= +1 0) var gc = undefined");else if(t||u)b.read=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},"undefined"!=typeof arguments&&(b.arguments=arguments),"undefined"!== +typeof console?(b.print||(b.print=function(a){console.log(a)}),b.printErr||(b.printErr=function(a){console.log(a)})):b.print||(b.print=function(){}),u&&(b.load=importScripts),"undefined"===typeof b.setWindowTitle&&(b.setWindowTitle=function(a){document.title=a});else throw"Unknown runtime environment. Where are we?";function ea(a){eval.call(null,a)}!b.load&&b.read&&(b.load=function(a){ea(b.read(a))});b.print||(b.print=function(){});b.printErr||(b.printErr=b.print);b.arguments||(b.arguments=[]); +b.thisProgram||(b.thisProgram="./this.program");b.print=b.print;b.A=b.printErr;b.preRun=[];b.postRun=[];for(m in g)g.hasOwnProperty(m)&&(b[m]=g[m]); +var A={P:function(a){fa=a},N:function(){return fa},G:function(){return z},F:function(a){z=a},D:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?A.o:"i"===a[0]?(a=parseInt(a.substr(1)),assert(0===a%8),a/8):0}},M:function(a){return Math.max(A.D(a),A.o)},R:16,ea:function(a,c){"double"===c||"i64"===c?a&7&&(assert(4===(a&7)),a+=4):assert(0===(a&3));return a},Y:function(a, +c,d){return d||"i64"!=a&&"double"!=a?a?Math.min(c||(a?A.M(a):0),A.o):Math.min(c,8):8},r:function(a,c,d){return d&&d.length?(d.splice||(d=Array.prototype.slice.call(d)),d.splice(0,0,c),b["dynCall_"+a].apply(null,d)):b["dynCall_"+a].call(null,c)},k:[],H:function(a){for(var c=0;c=D)E("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+ +D+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 "),a=!0;return a?(C=c,0):c},p:function(a,c){return Math.ceil(a/(c?c:16))*(c?c:16)},da:function(a,c,d){return d?+(a>>>0)+4294967296*+(c>>>0):+(a>>>0)+4294967296*+(c|0)},C:8,o:4,S:0};A.addFunction=A.H; +A.removeFunction=A.O;var F=!1,G,H,fa;function assert(a,c){a||E("Assertion failed: "+c)}(function(){var a={stackSave:function(){A.G()},stackRestore:function(){A.F()},arrayToC:function(a){for(var c=A.n(a.length),d=c,k=0;k>0]=a[k];return c},stringToC:function(a){var c=0;null!==a&&void 0!==a&&0!==a&&(c=A.n((a.length<<2)+1),ga(a,c));return c}},c=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,d;for(d in a)a.hasOwnProperty(d)&&a[d].toString().match(c).slice(1)})(); +function ha(a){var c;c="i32";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":return I[a>>0];case "i8":return I[a>>0];case "i16":return J[a>>1];case "i32":return K[a>>2];case "i64":return K[a>>2];case "float":return L[a>>2];case "double":return N[a>>3];default:E("invalid type for setValue: "+c)}return null} +function O(a,c,d){var e,h,l;"number"===typeof a?(h=!0,l=a):(h=!1,l=a.length);var k="string"===typeof c?c:null;d=4==d?e:[ia,A.n,A.Q,A.g][void 0===d?2:d](Math.max(l,k?1:c.length));if(h){e=d;assert(0==(d&3));for(a=d+(l&-4);e>2]=0;for(a=d+l;e>0]=0;return d}if("i8"===k)return a.subarray||a.slice?P.set(a,d):P.set(new Uint8Array(a),d),d;e=0;for(var f,M;e>0]=r;break;case "i8":I[w>>0]=r;break;case "i16":J[w>>1]=r;break;case "i32":K[w>>2]=r;break;case "i64":H=[r>>>0,(G=r,1<=+ja(G)?0>>0:~~+ma((G-+(~~G>>>0))/4294967296)>>>0:0)];K[w>>2]=H[0];K[w+4>>2]=H[1];break;case "float":L[w>>2]=r;break;case "double":N[w>>3]=r;break;default:E("invalid type for setValue: "+q)}M!==h&&(f=A.D(h),M=h);e+=f}}return d} +function Q(a){var c;if(0===c||!a)return"";for(var d=0,e,h=0;;){e=P[a+h>>0];d|=e;if(0==e&&!c)break;h++;if(c&&h==c)break}c||(c=h);e="";if(128>d){for(;0"):l=p;a:for(;fR?2*R:R+16777216;R!==D&&(D=R); +assert("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"JS engine does not provide full typed array support");var buffer;buffer=new ArrayBuffer(D);I=new Int8Array(buffer);J=new Int16Array(buffer);K=new Int32Array(buffer);P=new Uint8Array(buffer);ta=new Uint16Array(buffer);ua=new Uint32Array(buffer);L=new Float32Array(buffer);N=new Float64Array(buffer);K[0]=255;assert(255===P[0]&&0===P[3],"Typed arrays 2 must be run on a little-endian system"); +b.HEAP=void 0;b.buffer=buffer;b.HEAP8=I;b.HEAP16=J;b.HEAP32=K;b.HEAPU8=P;b.HEAPU16=ta;b.HEAPU32=ua;b.HEAPF32=L;b.HEAPF64=N;function S(a){for(;0=h&&(h=65536+((h&1023)<<10)|a.charCodeAt(++e)&1023);127>=h?++d:d=2047>=h?d+2:65535>=h?d+3:2097151>=h?d+4:67108863>=h?d+5:d+6}d=Array(d+1);var l=d.length,e=0;if(0=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++k)&1023);if(127>=f){if(e>=l)break;d[e++]=f}else{if(2047>=f){if(e+1>=l)break;d[e++]=192|f>>6}else{if(65535>=f){if(e+2>=l)break;d[e++]= +224|f>>12}else{if(2097151>=f){if(e+3>=l)break;d[e++]=240|f>>18}else{if(67108863>=f){if(e+4>=l)break;d[e++]=248|f>>24}else{if(e+5>=l)break;d[e++]=252|f>>30;d[e++]=128|f>>24&63}d[e++]=128|f>>18&63}d[e++]=128|f>>12&63}d[e++]=128|f>>6&63}d[e++]=128|f&63}}d[e]=0;e=e-h}else e=0;c&&(d.length=e);return d}function ga(a,c){for(var d=Ga(a,void 0),e=0;e>0]=d[e],e+=1} +Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,c){var d=a&65535,e=c&65535;return d*e+((a>>>16)*e+d*(c>>>16)<<16)|0});Math.ba=Math.imul;Math.clz32||(Math.clz32=function(a){a=a>>>0;for(var c=0;32>c;c++)if(a&1<<31-c)return c;return 32});Math.V=Math.clz32;var ja=Math.abs,ma=Math.ceil,la=Math.floor,ka=Math.min,U=0,Ha=null,V=null;b.preloadedImages={};b.preloadedAudios={};var W=null,va=8,B=va+407936;Ba.push();var W="encode.js.mem",Ia=A.p(O(12,"i8",2),8);assert(0==Ia%8);b._i64Subtract=Ja; +function Ka(a){b.___errno_location&&(K[b.___errno_location()>>2]=a);return a}b._memset=La;b._bitshift64Lshr=Ma;b._bitshift64Shl=Na;b._memcpy=Oa;b._i64Add=Pa;function X(a){X.L||(C=sa(),X.L=!0,assert(A.g),X.K=A.g,A.g=function(){E("cannot dynamically allocate, sbrk now has control")});var c=C;return 0==a||X.K(a)?c:4294967295}b._memmove=Qa;function Ra(a){b.exit(a)}wa=z=A.p(B);xa=wa+za;ya=C=A.p(xa);assert(ya>2]=c);return c},_emscripten_memcpy_big:function(a,c,d){P.set(P.subarray(c,c+d),a);return a},_llvm_trap:function(){E("trap!")},_exit:function(a){Ra(a)},___assert_fail:function(a,c,d,e){F=!0;throw"Assertion failed: "+Q(a)+", at: "+[c?Q(c):"unknown filename",d,e?Q(e):"unknown function"]+" at "+qa();},STACKTOP:z,STACK_MAX:xa,tempDoublePtr:Ia,ABORT:F,cttz_i8:Sa};// EMSCRIPTEN_START_ASM + +var Y=(function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=global.Math.floor;var N=global.Math.abs;var O=global.Math.sqrt;var P=global.Math.pow;var Q=global.Math.cos;var R=global.Math.sin;var S=global.Math.tan;var T=global.Math.acos;var U=global.Math.asin;var V=global.Math.atan;var W=global.Math.atan2;var X=global.Math.exp;var Y=global.Math.log;var Z=global.Math.ceil;var _=global.Math.imul;var $=global.Math.min;var aa=global.Math.clz32;var ba=env.abort;var ca=env.assert;var da=env.invoke_vii;var ea=env.invoke_iii;var fa=env.__exit;var ga=env._pthread_self;var ha=env._abort;var ia=env.___setErrNo;var ja=env._sysconf;var ka=env._sbrk;var la=env._time;var ma=env._emscripten_memcpy_big;var na=env._llvm_trap;var oa=env._exit;var pa=env.___assert_fail;var qa=0.0; +// EMSCRIPTEN_START_FUNCS +function $a(e,f,g,h,j,k,l,m){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0;G=i;i=i+16|0;F=G;c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;c[F+12>>2]=0;E=0;D=0;while(1){if(!g)break;n=c[f+(D<<2)>>2]|0;if(!n)o=E;else{if(E>>>0<4)c[F+(E<<2)>>2]=D;o=E+1|0;g=g-n|0}E=o;D=D+1|0}if(E>>>0<2){n=c[l>>2]|0;p=m+(n>>>3)|0;g=d[p>>0]|0;n=cc(1,0,n&7|0)|0;o=C;n=g|n;g=p;a[g>>0]=n;a[g+1>>0]=n>>8;a[g+2>>0]=n>>16;a[g+3>>0]=n>>24;p=p+4|0;a[p>>0]=o;a[p+1>>0]=o>>8;a[p+2>>0]=o>>16;a[p+3>>0]=o>>24;p=(c[l>>2]|0)+4|0;c[l>>2]=p;o=c[F>>2]|0;g=m+(p>>>3)|0;n=d[g>>0]|0;m=bc(o|0,0,h|0)|0;if(!((m|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(h>>>0>=57)pa(406267,406218,55,406251);D=cc(o|0,0,p&7|0)|0;F=C;D=n|D;m=g;E=m;a[E>>0]=D;a[E+1>>0]=D>>8;a[E+2>>0]=D>>16;a[E+3>>0]=D>>24;m=m+4|0;a[m>>0]=F;a[m+1>>0]=F>>8;a[m+2>>0]=F>>16;a[m+3>>0]=F>>24;c[l>>2]=(c[l>>2]|0)+h;a[j+o>>0]=0;b[k+(o<<1)>>1]=0;i=G;return}ac(j|0,0,D|0)|0;y=e+8|0;z=sa[c[e>>2]&1](c[y>>2]|0,D<<4|8)|0;A=z;if(!z)oa(1);B=1;while(1){g=D;n=A;a:while(1){do{if(!g)break a;g=g+-1|0;o=c[f+(g<<2)>>2]|0}while((o|0)==0);p=g&65535;if(o>>>0>>0){c[n>>2]=B;b[n+4>>1]=-1;b[n+6>>1]=p}else{c[n>>2]=o;b[n+4>>1]=-1;b[n+6>>1]=p}n=n+8|0}x=n-A|0;w=x>>3;v=w+1|0;b:do if(w>>>0<13){s=1;while(1){if(s>>>0>=w>>>0)break b;r=z+(s<<3)|0;q=c[r>>2]|0;r=c[r+4>>2]|0;p=s;while(1){g=p;p=p+-1|0;o=z+(p<<3)|0;if(!(cb(q,c[o>>2]|0)|0))break;t=c[o+4>>2]|0;u=z+(g<<3)|0;c[u>>2]=c[o>>2];c[u+4>>2]=t;if(!p){g=0;break}}u=z+(g<<3)|0;c[u>>2]=q;c[u+4>>2]=r;s=s+1|0}}else{t=w>>>0<57?2:0;while(1){if((t|0)>=6)break b;g=c[19428+(t<<2)>>2]|0;u=g;while(1){if(u>>>0>=w>>>0)break;p=z+(u<<3)|0;o=c[p>>2]|0;p=c[p+4>>2]|0;s=u;while(1){if(s>>>0>>0)break;q=s-g|0;r=z+(q<<3)|0;if(!(cb(o,c[r>>2]|0)|0))break;I=r;H=c[I+4>>2]|0;r=z+(s<<3)|0;c[r>>2]=c[I>>2];c[r+4>>2]=H;s=q}I=z+(s<<3)|0;c[I>>2]=o;c[I+4>>2]=p;u=u+1|0}t=t+1|0}}while(0);u=n;o=n;c[o>>2]=-1;c[o+4>>2]=-1;o=u+8|0;c[o>>2]=-1;c[o+4>>2]=-1;o=0;p=v;u=u+16|0;t=w;while(1){if((t|0)<=1)break;n=c[z+(o<<3)>>2]|0;g=c[z+(p<<3)>>2]|0;if(n>>>0>g>>>0){s=p+1|0;g=c[z+(s<<3)>>2]|0;r=o;q=p}else{r=o+1|0;n=c[z+(r<<3)>>2]|0;s=p;q=o}if(n>>>0>g>>>0){o=r;p=s+1|0;n=s}else{g=n;o=r+1|0;p=s;n=r}c[u+-8>>2]=(c[z+(q<<3)>>2]|0)+g;b[u+-4>>1]=q;b[u+-2>>1]=n;I=u;c[I>>2]=-1;c[I+4>>2]=-1;u=u+8|0;t=t+-1|0}if(Gb((x>>2)+-1|0,z,j,14)|0)break;B=B<<1}ra[c[e+4>>2]&1](c[y>>2]|0,z);Jb(j,D,k);x=c[l>>2]|0;v=m+(x>>>3)|0;w=d[v>>0]|0;x=x&7;if(E>>>0>=5){I=cc(1431655764,255,x|0)|0;n=C;I=w|I;g=v;t=g;a[t>>0]=I;a[t+1>>0]=I>>8;a[t+2>>0]=I>>16;a[t+3>>0]=I>>24;g=g+4|0;a[g>>0]=n;a[g+1>>0]=n>>8;a[g+2>>0]=n>>16;a[g+3>>0]=n>>24;g=(c[l>>2]|0)+40|0;c[l>>2]=g;n=0;t=8;c:while(1){while(1){if(n>>>0>=D>>>0){g=114;break c}u=a[j+n>>0]|0;s=1;o=n;while(1){o=o+1|0;if(o>>>0>=D>>>0)break;if((a[j+o>>0]|0)!=u<<24>>24)break;s=s+1|0}n=n+s|0;if(u<<24>>24)break;r=c[11564+(s<<2)>>2]|0;p=8+(s<<3)|0;o=c[p>>2]|0;p=c[p+4>>2]|0;q=m+(g>>>3)|0;I=bc(o|0,p|0,r|0)|0;if(!((I|0)==0&(C|0)==0)){g=99;break c}I=d[q>>0]|0;e=cc(o|0,p|0,g&7|0)|0;H=C;e=I|e;I=q;k=I;a[k>>0]=e;a[k+1>>0]=e>>8;a[k+2>>0]=e>>16;a[k+3>>0]=e>>24;I=I+4|0;a[I>>0]=H;a[I+1>>0]=H>>8;a[I+2>>0]=H>>16;a[I+3>>0]=H>>24;I=(c[l>>2]|0)+r|0;c[l>>2]=I;g=I}if(t<<24>>24==u<<24>>24)o=s;else{p=u&255;o=a[404394+p>>0]|0;p=c[14380+(p<<2)>>2]|0;q=m+(g>>>3)|0;I=bc(p|0,0,o&255|0)|0;if(!((I|0)==0&(C|0)==0)){g=103;break}H=d[q>>0]|0;k=cc(p|0,0,g&7|0)|0;I=C;k=H|k;g=q;H=g;a[H>>0]=k;a[H+1>>0]=k>>8;a[H+2>>0]=k>>16;a[H+3>>0]=k>>24;g=g+4|0;a[g>>0]=I;a[g+1>>0]=I>>8;a[g+2>>0]=I>>16;a[g+3>>0]=I>>24;g=(c[l>>2]|0)+(o&255)|0;c[l>>2]=g;o=s+-1|0}if(o>>>0>=3){q=o+-3|0;o=c[14452+(q<<2)>>2]|0;q=5640+(q<<3)|0;p=c[q>>2]|0;q=c[q+4>>2]|0;r=m+(g>>>3)|0;I=bc(p|0,q|0,o|0)|0;if(!((I|0)==0&(C|0)==0)){g=112;break}I=d[r>>0]|0;H=cc(p|0,q|0,g&7|0)|0;t=C;H=I|H;g=r;I=g;a[I>>0]=H;a[I+1>>0]=H>>8;a[I+2>>0]=H>>16;a[I+3>>0]=H>>24;g=g+4|0;a[g>>0]=t;a[g+1>>0]=t>>8;a[g+2>>0]=t>>16;a[g+3>>0]=t>>24;g=(c[l>>2]|0)+o|0;c[l>>2]=g;t=u;continue}t=u&255;s=404394+t|0;t=14380+(t<<2)|0;while(1){if(!o){t=u;continue c}p=a[s>>0]|0;q=c[t>>2]|0;r=m+(g>>>3)|0;I=bc(q|0,0,p&255|0)|0;if(!((I|0)==0&(C|0)==0)){g=109;break c}I=d[r>>0]|0;e=cc(q|0,0,g&7|0)|0;H=C;e=I|e;I=r;k=I;a[k>>0]=e;a[k+1>>0]=e>>8;a[k+2>>0]=e>>16;a[k+3>>0]=e>>24;I=I+4|0;a[I>>0]=H;a[I+1>>0]=H>>8;a[I+2>>0]=H>>16;a[I+3>>0]=H>>24;I=(c[l>>2]|0)+(p&255)|0;c[l>>2]=I;g=I;o=o+-1|0}}if((g|0)==99)pa(406196,406218,54,406251);else if((g|0)==103)pa(406196,406218,54,406251);else if((g|0)==109)pa(406196,406218,54,406251);else if((g|0)==112)pa(406196,406218,54,406251);else if((g|0)==114){i=G;return}}I=cc(1,0,x|0)|0;n=C;I=w|I;g=v;o=g;a[o>>0]=I;a[o+1>>0]=I>>8;a[o+2>>0]=I>>16;a[o+3>>0]=I>>24;g=g+4|0;a[g>>0]=n;a[g+1>>0]=n>>8;a[g+2>>0]=n>>16;a[g+3>>0]=n>>24;g=(c[l>>2]|0)+2|0;c[l>>2]=g;n=E+-1|0;o=m+(g>>>3)|0;if(!((n&-4|0)==0&0==0))pa(406196,406218,54,406251);t=d[o>>0]|0;I=cc(n|0,0,g&7|0)|0;p=C;I=t|I;t=o;r=t;a[r>>0]=I;a[r+1>>0]=I>>8;a[r+2>>0]=I>>16;a[r+3>>0]=I>>24;t=t+4|0;a[t>>0]=p;a[t+1>>0]=p>>8;a[t+2>>0]=p>>16;a[t+3>>0]=p>>24;t=(c[l>>2]|0)+2|0;c[l>>2]=t;p=E+-1|0;r=0;while(1){if((r|0)==(E|0))break;q=F+(r<<2)|0;g=r;while(1){s=g+1|0;if((g|0)==(p|0))break;g=F+(s<<2)|0;n=c[g>>2]|0;o=c[q>>2]|0;if((d[j+n>>0]|0)>=(d[j+o>>0]|0)){g=s;continue}c[g>>2]=o;c[q>>2]=n;g=s}r=r+1|0}switch(E|0){case 2:{g=c[F>>2]|0;n=m+(t>>>3)|0;o=d[n>>0]|0;if(!((bc(g|0,0,h|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(h>>>0>=57)pa(406267,406218,55,406251);I=cc(g|0,0,t&7|0)|0;g=C;I=o|I;o=n;n=o;a[n>>0]=I;a[n+1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406196,406218,54,406251);I=d[g>>0]|0;F=cc(n|0,0,o&7|0)|0;H=C;F=I|F;I=g;m=I;a[m>>0]=F;a[m+1>>0]=F>>8;a[m+2>>0]=F>>16;a[m+3>>0]=F>>24;I=I+4|0;a[I>>0]=H;a[I+1>>0]=H>>8;a[I+2>>0]=H>>16;a[I+3>>0]=H>>24;c[l>>2]=(c[l>>2]|0)+h;i=G;return}default:{p=c[F>>2]|0;g=m+(t>>>3)|0;n=d[g>>0]|0;if(!((bc(p|0,0,h|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(h>>>0>=57)pa(406267,406218,55,406251);I=cc(p|0,0,t&7|0)|0;o=C;I=n|I;n=g;a[n>>0]=I;a[n+1>>0]=I>>8;a[n+2>>0]=I>>16;a[n+3>>0]=I>>24;g=g+4|0;a[g>>0]=o;a[g+1>>0]=o>>8;a[g+2>>0]=o>>16;a[g+3>>0]=o>>24;g=(c[l>>2]|0)+h|0;c[l>>2]=g;n=c[F+4>>2]|0;o=m+(g>>>3)|0;if(!((bc(n|0,0,h|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);H=d[o>>0]|0;I=cc(n|0,0,g&7|0)|0;n=C;I=H|I;g=o;o=g;a[o>>0]=I;a[o+1>>0]=I>>8;a[o+2>>0]=I>>16;a[o+3>>0]=I>>24;g=g+4|0;a[g>>0]=n;a[g+1>>0]=n>>8;a[g+2>>0]=n>>16;a[g+3>>0]=n>>24;g=(c[l>>2]|0)+h|0;c[l>>2]=g;n=c[F+8>>2]|0;o=m+(g>>>3)|0;if(!((bc(n|0,0,h|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);H=d[o>>0]|0;I=cc(n|0,0,g&7|0)|0;g=C;I=H|I;n=o;a[n>>0]=I;a[n+1>>0]=I>>8;a[n+2>>0]=I>>16;a[n+3>>0]=I>>24;o=o+4|0;a[o>>0]=g;a[o+1>>0]=g>>8;a[o+2>>0]=g>>16;a[o+3>>0]=g>>24;o=(c[l>>2]|0)+h|0;c[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>2]|0)+4|0;c[s>>2]=u;g=(o&-4|0)==0&0==0;n=0;while(1){if(n>>>0>=(c[r>>2]|0)>>>0)break;v=t+(u>>>3)|0;w=d[v>>0]|0;if(!g){x=16;break}F=cc(o|0,0,u&7|0)|0;H=C;F=w|F;I=v;G=I;a[G>>0]=F;a[G+1>>0]=F>>8;a[G+2>>0]=F>>16;a[G+3>>0]=F>>24;I=I+4|0;a[I>>0]=H;a[I+1>>0]=H>>8;a[I+2>>0]=H>>16;a[I+3>>0]=H>>24;I=(c[s>>2]|0)+2|0;c[s>>2]=I;u=I;n=n+1|0}if((x|0)==16)pa(406196,406218,54,406251);I=r+76|0;g=c[I>>2]|0;v=r+92|0;u=c[v>>2]|0;if(!g)fb(u,6,y,s,t);else gb(b,c[r+72>>2]|0,g,u,y,s,t);H=r+84|0;g=c[H>>2]|0;m=r+108|0;u=c[m>>2]|0;if(!g)fb(u,2,y,s,t);else gb(b,c[r+80>>2]|0,g,u,y,s,t);w=c[r+88>>2]|0;v=c[v>>2]|0;n=c[S>>2]|0;g=_(v,n)|0;u=sa[c[b>>2]&1](c[P>>2]|0,g)|0;if(!u)oa(1);c[N>>2]=u;g=sa[c[b>>2]&1](c[P>>2]|0,g<<1)|0;if(!g)oa(1);c[O>>2]=g;g=w;u=0;while(1){if((u|0)==(v|0))break;G=_(u,n)|0;kb(g+(u*1040|0)|0,n,y,(c[N>>2]|0)+G|0,(c[O>>2]|0)+(G<<1)|0,s,t);u=u+1|0}v=c[r+96>>2]|0;w=c[r+100>>2]|0;n=c[Q>>2]|0;g=_(w,n)|0;u=sa[c[b>>2]&1](c[P>>2]|0,g)|0;if(!u)oa(1);c[L>>2]=u;g=sa[c[b>>2]&1](c[P>>2]|0,g<<1)|0;if(!g)oa(1);c[M>>2]=g;g=v;u=0;while(1){if((u|0)==(w|0))break;G=_(u,n)|0;kb(g+(u*2832|0)|0,n,y,(c[L>>2]|0)+G|0,(c[M>>2]|0)+(G<<1)|0,s,t);u=u+1|0}v=c[r+104>>2]|0;w=c[m>>2]|0;n=c[R>>2]|0;g=_(w,n)|0;u=sa[c[b>>2]&1](c[P>>2]|0,g)|0;if(!u)oa(1);c[J>>2]=u;g=sa[c[b>>2]&1](c[P>>2]|0,g<<1)|0;if(!g)oa(1);c[K>>2]=g;g=v;u=0;while(1){if((u|0)==(w|0))break;G=_(u,n)|0;kb(g+(u*2096|0)|0,n,y,(c[J>>2]|0)+G|0,(c[K>>2]|0)+(G<<1)|0,s,t);u=u+1|0}G=b+4|0;ra[c[G>>2]&1](c[P>>2]|0,y);F=r+80|0;E=r+72|0;u=j;g=k;D=0;a:while(1){if(D>>>0>=q>>>0){x=87;break}b=c[p+(D<<4)>>2]|0;n=c[p+(D<<4)+4>>2]|0;B=c[p+(D<<4)+8>>2]|0;k=c[p+(D<<4)+12>>2]|0;j=k&65535;A=k>>>16;z=k&65535;hb(Q,z,s,t);r=n&16777215;n=r^n>>>24;do if(b>>>0<6)w=b;else{if(b>>>0<130){y=b+-2|0;w=((aa(y|0)|0)^31)+-1|0;w=(w<<1)+(y>>>w)+2|0;break}if(b>>>0<2114){w=((aa(b+-66|0)|0)^31)+10|0;break}if(b>>>0<6210){w=21;break}w=b>>>0<22594?22:23}while(0);do if(n>>>0<10)v=n+65534|0;else{if(n>>>0<134){y=n+-6|0;v=((aa(y|0)|0)^31)+-1|0;v=(v<<1)+(y>>>v)+4|0;break}if(n>>>0>=2118){v=23;break}v=((aa(n+-70|0)|0)^31)+12|0}while(0);w=w&65535;x=c[17268+(w<<2)>>2]|0;w=b-(c[18788+(w<<2)>>2]|0)|0;m=v&65535;n=cc(n-(c[17364+(m<<2)>>2]|0)|0,0,x|0)|0;v=C;w=n|w;n=x+(c[17460+(m<<2)>>2]|0)|0;m=c[s>>2]|0;x=t+(m>>>3)|0;y=d[x>>0]|0;U=bc(w|0,v|0,n|0)|0;if(!((U|0)==0&(C|0)==0)){x=61;break}if(n>>>0>=57){x=63;break}w=cc(w|0,v|0,m&7|0)|0;m=C;w=y|w;U=x;y=U;a[y>>0]=w;a[y+1>>0]=w>>8;a[y+2>>0]=w>>16;a[y+3>>0]=w>>24;U=U+4|0;a[U>>0]=m;a[U+1>>0]=m>>8;a[U+2>>0]=m>>16;a[U+3>>0]=m>>24;c[s>>2]=(c[s>>2]|0)+n;b:do if(!(c[I>>2]|0)){v=f;w=b;while(1){if(!w)break b;hb(S,d[e+(v&h)>>0]|0,s,t);v=v+1|0;w=w+-1|0}}else{v=f;w=b;while(1){if(!w)break b;switch(o|0){case 0:{g=u&63;break}case 1:{g=(u&255)>>>2;break}case 2:{g=a[406969+(u&255)>>0]|a[406969+(g&255|256)>>0];break}case 3:{g=((d[407481+(u&255)>>0]|0)<<3)+(d[407481+(g&255)>>0]|0)&255;break}default:g=0}U=a[e+(v&h)>>0]|0;ib(S,U&255,g&255,c[E>>2]|0,s,t,6);g=u;u=U;v=v+1|0;w=w+-1|0}}while(0);y=f+b+r|0;do if(r){g=a[e+(y+-2&h)>>0]|0;u=a[e+(y+-1&h)>>0]|0;if((j&65535)<=127)break;m=B>>>24;x=B&16777215;if(!(c[H>>2]|0))hb(R,A,s,t);else{v=k&7;switch(z>>>6|0){case 7:case 4:case 2:case 0:{v=v>>>0<3?v:3;break}default:v=3}ib(R,A,v,c[F>>2]|0,s,t,2)}v=c[s>>2]|0;w=t+(v>>>3)|0;n=d[w>>0]|0;U=bc(x|0,0,m|0)|0;if(!((U|0)==0&(C|0)==0)){x=82;break a}if(B>>>0>=956301312){x=84;break a}z=cc(x|0,0,v&7|0)|0;B=C;z=n|z;U=w;A=U;a[A>>0]=z;a[A+1>>0]=z>>8;a[A+2>>0]=z>>16;a[A+3>>0]=z>>24;U=U+4|0;a[U>>0]=B;a[U+1>>0]=B>>8;a[U+2>>0]=B>>16;a[U+3>>0]=B>>24;c[s>>2]=(c[s>>2]|0)+m}while(0);f=y;D=D+1|0}if((x|0)==61)pa(406196,406218,54,406251);else if((x|0)==63)pa(406267,406218,55,406251);else if((x|0)==82)pa(406196,406218,54,406251);else if((x|0)==84)pa(406267,406218,55,406251);else if((x|0)==87){ra[c[G>>2]&1](c[P>>2]|0,c[J>>2]|0);c[J>>2]=0;ra[c[G>>2]&1](c[P>>2]|0,c[K>>2]|0);c[K>>2]=0;ra[c[G>>2]&1](c[P>>2]|0,c[L>>2]|0);c[L>>2]=0;ra[c[G>>2]&1](c[P>>2]|0,c[M>>2]|0);c[M>>2]=0;ra[c[G>>2]&1](c[P>>2]|0,c[N>>2]|0);c[N>>2]=0;ra[c[G>>2]&1](c[P>>2]|0,c[O>>2]|0);c[O>>2]=0;if(!l){i=T;return}U=(c[s>>2]|0)+7|0;c[s>>2]=U&-8;a[t+(U>>>3)>>0]=0;i=T;return}}function bb(b,e,f,g,h,j,k){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=i;i=i+32|0;r=t+8|0;q=t+16|0;l=t;s=f&g;f=k+((c[j>>2]|0)>>>3)|0;n=d[f>>0]|0;m=f;a[m>>0]=n;a[m+1>>0]=n>>8;a[m+2>>0]=n>>16;a[m+3>>0]=n>>24;f=f+4|0;a[f>>0]=0;a[f+1>>0]=0;a[f+2>>0]=0;a[f+3>>0]=0;c[j>>2]=(c[j>>2]|0)+1;mb(h,r,q,l);f=c[l>>2]|0;l=c[l+4>>2]|0;m=c[j>>2]|0;n=k+(m>>>3)|0;o=d[n>>0]|0;if(!(l>>>0<0|(l|0)==0&f>>>0<4))pa(406196,406218,54,406251);f=cc(f|0,l|0,m&7|0)|0;l=C;f=o|f;p=n;o=p;a[o>>0]=f;a[o+1>>0]=f>>8;a[o+2>>0]=f>>16;a[o+3>>0]=f>>24;p=p+4|0;a[p>>0]=l;a[p+1>>0]=l>>8;a[p+2>>0]=l>>16;a[p+3>>0]=l>>24;p=(c[j>>2]|0)+2|0;c[j>>2]=p;o=c[q>>2]|0;l=r;f=c[l>>2]|0;l=c[l+4>>2]|0;m=k+(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=m;l=c[n>>2]|0;e=o;h=c[e>>2]|0;e=c[e+4>>2]|0;j=g+(m>>>3)|0;k=d[j>>0]|0;o=bc(h|0,e|0,l|0)|0;if(!((o|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(l>>>0>=57)pa(406267,406218,55,406251);m=cc(h|0,e|0,m&7|0)|0;o=C;m=k|m;h=j;n=h;a[n>>0]=m;a[n+1>>0]=m>>8;a[n+2>>0]=m>>16;a[n+3>>0]=m>>24;h=h+4|0;a[h>>0]=o;a[h+1>>0]=o>>8;a[h+2>>0]=o>>16;a[h+3>>0]=o>>24;h=(c[f>>2]|0)+l|0;c[f>>2]=h;if(b){i=p;return}g=g+(h>>>3)|0;o=d[g>>0]|0;b=g;a[b>>0]=o;a[b+1>>0]=o>>8;a[b+2>>0]=o>>16;a[b+3>>0]=o>>24;g=g+4|0;a[g>>0]=0;a[g+1>>0]=0;a[g+2>>0]=0;a[g+3>>0]=0;c[f>>2]=(c[f>>2]|0)+1;i=p;return}function eb(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=i;i=i+1136|0;u=v+104|0;t=v;j=c[b+8>>2]|0;m=c[b+12>>2]|0;r=c[b+16>>2]|0;s=c[b+4>>2]|0;ac(u|0,0,(s<<2)+8|0)|0;k=t;l=k+104|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0));p=0;q=1;k=0;while(1){if((p|0)==(r|0))break;o=d[j+p>>0]|0;if((o|0)==(q+1|0))k=1;else k=(o|0)==(k|0)?0:o+2|0;if(p){n=u+(k<<2)|0;c[n>>2]=(c[n>>2]|0)+1}k=c[m+(p<<2)>>2]|0;if(k>>>0>176)n=k>>>0>752?20:14;else n=k>>>0>40?7:0;while(1){if(n>>>0>=25)break;l=n+1|0;if(k>>>0<(c[17556+(l<<3)>>2]|0)>>>0)break;else n=l}k=t+(n<<2)|0;c[k>>2]=(c[k>>2]|0)+1;k=q;p=p+1|0;q=o}nb(s+-1|0,g,h);if(s>>>0<=1){i=v;return}r=b+20|0;kb(u,s+2|0,f,b+28|0,b+286|0,g,h);kb(t,26,f,b+802|0,b+828|0,g,h);k=c[m>>2]|0;u=d[j>>0]|0;c[b+24>>2]=c[r>>2];c[r>>2]=u;if(k>>>0>176)l=k>>>0>752?20:14;else l=k>>>0>40?7:0;while(1){if(l>>>0>=25)break;j=l+1|0;if(k>>>0<(c[17556+(j<<3)>>2]|0)>>>0)break;else l=j}p=c[17556+(l<<3)+4>>2]|0;o=k-(c[17556+(l<<3)>>2]|0)|0;n=a[b+802+l>>0]|0;j=e[b+828+(l<<1)>>1]|0;k=c[g>>2]|0;l=h+(k>>>3)|0;m=d[l>>0]|0;b=bc(j|0,0,n&255|0)|0;if(!((b|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((n&255)>=57)pa(406267,406218,55,406251);b=cc(j|0,0,k&7|0)|0;j=C;b=m|b;k=l;a[k>>0]=b;a[k+1>>0]=b>>8;a[k+2>>0]=b>>16;a[k+3>>0]=b>>24;l=l+4|0;a[l>>0]=j;a[l+1>>0]=j>>8;a[l+2>>0]=j>>16;a[l+3>>0]=j>>24;l=(c[g>>2]|0)+(n&255)|0;c[g>>2]=l;j=h+(l>>>3)|0;k=d[j>>0]|0;h=bc(o|0,0,p|0)|0;if(!((h|0)==0&(C|0)==0))pa(406196,406218,54,406251);f=cc(o|0,0,l&7|0)|0;b=C;f=k|f;h=j;u=h;a[u>>0]=f;a[u+1>>0]=f>>8;a[u+2>>0]=f>>16;a[u+3>>0]=f>>24;h=h+4|0;a[h>>0]=b;a[h+1>>0]=b>>8;a[h+2>>0]=b>>16;a[h+3>>0]=b>>24;c[g>>2]=(c[g>>2]|0)+p;i=v;return}function fb(b,f,g,h,j){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=i;i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=m>>24;k=(c[h>>2]|0)+(k&255)|0;c[h>>2]=k;l=a[p>>0]|0;m=e[g>>1]|0;n=j+(k>>>3)|0;o=d[n>>0]|0;y=bc(m|0,0,l&255|0)|0;if(!((y|0)==0&(C|0)==0)){k=14;break}if((l&255)>=57){k=16;break}k=cc(m|0,0,k&7|0)|0;m=C;o=o|k;k=n;y=k;a[y>>0]=o;a[y+1>>0]=o>>8;a[y+2>>0]=o>>16;a[y+3>>0]=o>>24;k=k+4|0;a[k>>0]=m;a[k+1>>0]=m>>8;a[k+2>>0]=m>>16;a[k+3>>0]=m>>24;k=(c[h>>2]|0)+(l&255)|0;c[h>>2]=k;l=j+(k>>>3)|0;m=d[l>>0]|0;if(!q){k=18;break}if(!r){k=20;break}y=cc(u|0,0,k&7|0)|0;o=C;m=m|y;y=l;n=y;a[n>>0]=m;a[n+1>>0]=m>>8;a[n+2>>0]=m>>16;a[n+3>>0]=m>>24;y=y+4|0;a[y>>0]=o;a[y+1>>0]=o>>8;a[y+2>>0]=o>>16;a[y+3>>0]=o>>24;c[h>>2]=(c[h>>2]|0)+t;s=s+1|0}if((k|0)==10)pa(406196,406218,54,406251);else if((k|0)==12)pa(406267,406218,55,406251);else if((k|0)==14)pa(406196,406218,54,406251);else if((k|0)==16)pa(406267,406218,55,406251);else if((k|0)==18)pa(406196,406218,54,406251);else if((k|0)==20)pa(406267,406218,55,406251);else if((k|0)==22){w=c[h>>2]|0;y=j+(w>>>3)|0;b=d[y>>0]|0;w=cc(1,0,w&7|0)|0;j=C;w=b|w;b=y;a[b>>0]=w;a[b+1>>0]=w>>8;a[b+2>>0]=w>>16;a[b+3>>0]=w>>24;y=y+4|0;a[y>>0]=j;a[y+1>>0]=j>>8;a[y+2>>0]=j>>16;a[y+3>>0]=j>>24;c[h>>2]=(c[h>>2]|0)+1;i=x;return}}function gb(b,f,g,h,j,k,l){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;B=i;i=i+2160|0;r=B+1088|0;v=B;A=B+1888|0;z=B+1344|0;nb(h+-1|0,k,l);if((h|0)==1){i=B;return}x=b+8|0;y=sa[c[b>>2]&1](c[x>>2]|0,g<<2)|0;if(!y)oa(1);a:do if(!g)w=y;else{m=c[f>>2]|0;n=1;while(1){if((n|0)==(g|0))break;u=c[f+(n<<2)>>2]|0;m=u>>>0>m>>>0?u:m;n=n+1|0}if(m>>>0<256)o=0;else pa(405316,404333,616,405333);while(1){if(o>>>0>m>>>0)break;a[r+o>>0]=o;o=o+1|0}p=m+1|0;q=0;b:while(1){if(q>>>0>=g>>>0){w=y;break a}m=c[f+(q<<2)>>2]&255;o=0;while(1){if(o>>>0>=p>>>0)break b;if((a[r+o>>0]|0)==m<<24>>24)break;o=o+1|0}c[y+(q<<2)>>2]=o;n=a[r+o>>0]|0;m=o;while(1){if(!m)break;u=m+-1|0;a[r+m>>0]=a[r+u>>0]|0;m=u}a[r>>0]=n;q=q+1|0}pa(405354,404333,624,405333)}while(0);c[r>>2]=0;m=0;o=0;while(1){if(m>>>0>=g>>>0)break;while(1){if(m>>>0>=g>>>0){n=0;break}if(!(c[w+(m<<2)>>2]|0)){n=0;break}u=m+1|0;c[r>>2]=u;m=u}while(1){if(m>>>0>=g>>>0)break;if(c[w+(m<<2)>>2]|0)break;u=m+1|0;c[r>>2]=u;m=u;n=n+1|0}o=n>>>0>o>>>0?n:o}if(!o)u=0;else{u=(aa(o|0)|0)^31;u=u>>>0<6?u:6}c[r>>2]=0;p=2<>>0>=g>>>0)break;if(s>>>0>o>>>0){t=38;break}m=c[w+(o<<2)>>2]|0;c:do if(!m){m=o;n=1;while(1){m=m+1|0;if(m>>>0>=g>>>0)break;if(c[w+(m<<2)>>2]|0)break;n=n+1|0}c[r>>2]=o+n;m=s;while(1){if(!n)break c;if(n>>>0

>>0)break;c[w+(m<<2)>>2]=q;m=m+1|0;n=n-f|0}s=(aa(n|0)|0)^31;c[w+(m<<2)>>2]=s|n-(1<>2]=m+u;c[r>>2]=(c[r>>2]|0)+1;m=s+1|0}while(0);o=c[r>>2]|0;s=m}if((t|0)==38)pa(405282,404333,656,405297);ac(v|0,0,1088)|0;m=0;while(1){if((m|0)==(s|0))break;t=v+((c[w+(m<<2)>>2]&511)<<2)|0;c[t>>2]=(c[t>>2]|0)+1;m=m+1|0}t=(u|0)!=0;f=c[k>>2]|0;m=l+(f>>>3)|0;g=d[m>>0]|0;f=cc(t&1|0,0,f&7|0)|0;r=C;f=g|f;g=m;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;m=m+4|0;a[m>>0]=r;a[m+1>>0]=r>>8;a[m+2>>0]=r>>16;a[m+3>>0]=r>>24;m=(c[k>>2]|0)+1|0;c[k>>2]=m;do if(t){n=u+-1|0;o=l+(m>>>3)|0;p=d[o>>0]|0;if((n&-16|0)==0&0==0){f=cc(n|0,0,m&7|0)|0;r=C;f=p|f;t=o;g=t;a[g>>0]=f;a[g+1>>0]=f>>8;a[g+2>>0]=f>>16;a[g+3>>0]=f>>24;t=t+4|0;a[t>>0]=r;a[t+1>>0]=r>>8;a[t+2>>0]=r>>16;a[t+3>>0]=r>>24;c[k>>2]=(c[k>>2]|0)+4;break}else pa(406196,406218,54,406251)}while(0);kb(v,u+h|0,j,A,z,k,l);r=0;while(1){if(r>>>0>=s>>>0){t=70;break}g=c[w+(r<<2)>>2]|0;f=g&511;g=g>>>9;m=a[A+f>>0]|0;n=e[z+(f<<1)>>1]|0;o=c[k>>2]|0;p=l+(o>>>3)|0;q=d[p>>0]|0;j=bc(n|0,0,m&255|0)|0;if(!((j|0)==0&(C|0)==0)){t=60;break}if((m&255)>=57){t=62;break}t=cc(n|0,0,o&7|0)|0;h=C;t=q|t;j=p;v=j;a[v>>0]=t;a[v+1>>0]=t>>8;a[v+2>>0]=t>>16;a[v+3>>0]=t>>24;j=j+4|0;a[j>>0]=h;a[j+1>>0]=h>>8;a[j+2>>0]=h>>16;a[j+3>>0]=h>>24;m=(c[k>>2]|0)+(m&255)|0;c[k>>2]=m;if(!((f|0)==0|f>>>0>u>>>0)){n=l+(m>>>3)|0;o=d[n>>0]|0;j=bc(g|0,0,f|0)|0;if(!((j|0)==0&(C|0)==0)){t=65;break}if(f>>>0>=57){t=67;break}t=cc(g|0,0,m&7|0)|0;h=C;t=o|t;j=n;v=j;a[v>>0]=t;a[v+1>>0]=t>>8;a[v+2>>0]=t>>16;a[v+3>>0]=t>>24;j=j+4|0;a[j>>0]=h;a[j+1>>0]=h>>8;a[j+2>>0]=h>>16;a[j+3>>0]=h>>24;c[k>>2]=(c[k>>2]|0)+f}r=r+1|0}if((t|0)==60)pa(406196,406218,54,406251);else if((t|0)==62)pa(406267,406218,55,406251);else if((t|0)==65)pa(406196,406218,54,406251);else if((t|0)==67)pa(406267,406218,55,406251);else if((t|0)==70){w=c[k>>2]|0;l=l+(w>>>3)|0;z=d[l>>0]|0;w=cc(1,0,w&7|0)|0;A=C;w=z|w;z=l;a[z>>0]=w;a[z+1>>0]=w>>8;a[z+2>>0]=w>>16;a[z+3>>0]=w>>24;l=l+4|0;a[l>>0]=A;a[l+1>>0]=A>>8;a[l+2>>0]=A>>16;a[l+3>>0]=A>>24;c[k>>2]=(c[k>>2]|0)+1;ra[c[b+4>>2]&1](c[x>>2]|0,y);i=B;return}}function hb(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=b+884|0;i=c[s>>2]|0;do if(!i){p=b+880|0;j=(c[p>>2]|0)+1|0;c[p>>2]=j;p=c[(c[b+12>>2]|0)+(j<<2)>>2]|0;j=a[(c[b+8>>2]|0)+j>>0]|0;c[s>>2]=p;j=j&255;q=b+888|0;c[q>>2]=_(j,c[b>>2]|0)|0;k=b+20|0;l=c[k>>2]|0;i=b+24|0;if((j|0)==(l+1|0))m=1;else m=(j|0)==(c[i>>2]|0)?0:j+2|0;c[i>>2]=l;c[k>>2]=j;n=a[b+28+m>>0]|0;i=e[b+286+(m<<1)>>1]|0;j=c[g>>2]|0;k=h+(j>>>3)|0;l=d[k>>0]|0;o=bc(i|0,0,n&255|0)|0;if(!((o|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((n&255)>=57)pa(406267,406218,55,406251);j=cc(i|0,0,j&7|0)|0;m=C;j=l|j;o=k;l=o;a[l>>0]=j;a[l+1>>0]=j>>8;a[l+2>>0]=j>>16;a[l+3>>0]=j>>24;o=o+4|0;a[o>>0]=m;a[o+1>>0]=m>>8;a[o+2>>0]=m>>16;a[o+3>>0]=m>>24;c[g>>2]=(c[g>>2]|0)+(n&255);if(p>>>0>176)j=p>>>0>752?20:14;else j=p>>>0>40?7:0;while(1){if(j>>>0>=25)break;i=j+1|0;if(p>>>0<(c[17556+(i<<3)>>2]|0)>>>0)break;else j=i}o=c[17556+(j<<3)+4>>2]|0;n=p-(c[17556+(j<<3)>>2]|0)|0;m=a[b+802+j>>0]|0;i=e[b+828+(j<<1)>>1]|0;j=c[g>>2]|0;k=h+(j>>>3)|0;l=d[k>>0]|0;p=bc(i|0,0,m&255|0)|0;if(!((p|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((m&255)>=57)pa(406267,406218,55,406251);p=cc(i|0,0,j&7|0)|0;i=C;p=l|p;j=k;k=j;a[k>>0]=p;a[k+1>>0]=p>>8;a[k+2>>0]=p>>16;a[k+3>>0]=p>>24;j=j+4|0;a[j>>0]=i;a[j+1>>0]=i>>8;a[j+2>>0]=i>>16;a[j+3>>0]=i>>24;j=(c[g>>2]|0)+(m&255)|0;c[g>>2]=j;k=h+(j>>>3)|0;i=d[k>>0]|0;p=bc(n|0,0,o|0)|0;if((p|0)==0&(C|0)==0){n=cc(n|0,0,j&7|0)|0;t=C;n=i|n;r=k;p=r;a[p>>0]=n;a[p+1>>0]=n>>8;a[p+2>>0]=n>>16;a[p+3>>0]=n>>24;r=r+4|0;a[r>>0]=t;a[r+1>>0]=t>>8;a[r+2>>0]=t>>16;a[r+3>>0]=t>>24;c[g>>2]=(c[g>>2]|0)+o;r=q;t=c[s>>2]|0;break}else pa(406196,406218,54,406251)}else{r=b+888|0;t=i}while(0);c[s>>2]=t+-1;k=(c[r>>2]|0)+f|0;m=a[(c[b+892>>2]|0)+k>>0]|0;k=e[(c[b+896>>2]|0)+(k<<1)>>1]|0;l=c[g>>2]|0;i=h+(l>>>3)|0;j=d[i>>0]|0;h=bc(k|0,0,m&255|0)|0;if(!((h|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((m&255)<57){t=cc(k|0,0,l&7|0)|0;b=C;t=j|t;h=i;f=h;a[f>>0]=t;a[f+1>>0]=t>>8;a[f+2>>0]=t>>16;a[f+3>>0]=t>>24;h=h+4|0;a[h>>0]=b;a[h+1>>0]=b>>8;a[h+2>>0]=b>>16;a[h+3>>0]=b>>24;c[g>>2]=(c[g>>2]|0)+(m&255);return}else pa(406267,406218,55,406251)}function ib(b,f,g,h,i,j,k){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=b+884|0;l=c[u>>2]|0;do if(!l){r=b+880|0;n=(c[r>>2]|0)+1|0;c[r>>2]=n;r=c[(c[b+12>>2]|0)+(n<<2)>>2]|0;n=a[(c[b+8>>2]|0)+n>>0]|0;c[u>>2]=r;n=n&255;s=b+888|0;c[s>>2]=n<>2]|0;l=b+24|0;if((n|0)==(m+1|0))o=1;else o=(n|0)==(c[l>>2]|0)?0:n+2|0;c[l>>2]=m;c[k>>2]=n;p=a[b+28+o>>0]|0;l=e[b+286+(o<<1)>>1]|0;k=c[i>>2]|0;m=j+(k>>>3)|0;n=d[m>>0]|0;q=bc(l|0,0,p&255|0)|0;if(!((q|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((p&255)>=57)pa(406267,406218,55,406251);k=cc(l|0,0,k&7|0)|0;o=C;k=n|k;q=m;n=q;a[n>>0]=k;a[n+1>>0]=k>>8;a[n+2>>0]=k>>16;a[n+3>>0]=k>>24;q=q+4|0;a[q>>0]=o;a[q+1>>0]=o>>8;a[q+2>>0]=o>>16;a[q+3>>0]=o>>24;c[i>>2]=(c[i>>2]|0)+(p&255);if(r>>>0>176)k=r>>>0>752?20:14;else k=r>>>0>40?7:0;while(1){if(k>>>0>=25)break;l=k+1|0;if(r>>>0<(c[17556+(l<<3)>>2]|0)>>>0)break;else k=l}q=c[17556+(k<<3)+4>>2]|0;p=r-(c[17556+(k<<3)>>2]|0)|0;o=a[b+802+k>>0]|0;l=e[b+828+(k<<1)>>1]|0;k=c[i>>2]|0;m=j+(k>>>3)|0;n=d[m>>0]|0;r=bc(l|0,0,o&255|0)|0;if(!((r|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((o&255)>=57)pa(406267,406218,55,406251);r=cc(l|0,0,k&7|0)|0;k=C;r=n|r;l=m;m=l;a[m>>0]=r;a[m+1>>0]=r>>8;a[m+2>>0]=r>>16;a[m+3>>0]=r>>24;l=l+4|0;a[l>>0]=k;a[l+1>>0]=k>>8;a[l+2>>0]=k>>16;a[l+3>>0]=k>>24;l=(c[i>>2]|0)+(o&255)|0;c[i>>2]=l;k=j+(l>>>3)|0;m=d[k>>0]|0;r=bc(p|0,0,q|0)|0;if((r|0)==0&(C|0)==0){p=cc(p|0,0,l&7|0)|0;v=C;p=m|p;t=k;r=t;a[r>>0]=p;a[r+1>>0]=p>>8;a[r+2>>0]=p>>16;a[r+3>>0]=p>>24;t=t+4|0;a[t>>0]=v;a[t+1>>0]=v>>8;a[t+2>>0]=v>>16;a[t+3>>0]=v>>24;c[i>>2]=(c[i>>2]|0)+q;t=s;v=c[u>>2]|0;break}else pa(406196,406218,54,406251)}else{t=b+888|0;v=l}while(0);c[u>>2]=v+-1;m=(_(c[h+((c[t>>2]|0)+g<<2)>>2]|0,c[b>>2]|0)|0)+f|0;o=a[(c[b+892>>2]|0)+m>>0]|0;m=e[(c[b+896>>2]|0)+(m<<1)>>1]|0;n=c[i>>2]|0;l=j+(n>>>3)|0;k=d[l>>0]|0;j=bc(m|0,0,o&255|0)|0;if(!((j|0)==0&(C|0)==0))pa(406196,406218,54,406251);if((o&255)<57){h=cc(m|0,0,n&7|0)|0;b=C;h=k|h;j=l;f=j;a[f>>0]=h;a[f+1>>0]=h>>8;a[f+2>>0]=h>>16;a[f+3>>0]=h>>24;j=j+4|0;a[j>>0]=b;a[j+1>>0]=b>>8;a[j+2>>0]=b>>16;a[j+3>>0]=b>>24;c[i>>2]=(c[i>>2]|0)+(o&255);return}else pa(406267,406218,55,406251)}function jb(a,b,e,f,g,h,i,j){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;r=i+2816|0;s=h+1024|0;t=j+2080|0;q=0;while(1){if((q|0)==(g|0))break;o=c[f+(q<<4)>>2]|0;k=c[f+(q<<4)+4>>2]|0;l=c[f+(q<<4)+12>>2]|0;p=l&65535;n=l>>>16;l=i+((l&65535)<<2)|0;c[l>>2]=(c[l>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1;l=b;m=o;while(1){if(!m)break;u=h+((d[a+(l&e)>>0]|0)<<2)|0;c[u>>2]=(c[u>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+1;l=l+1|0;m=m+-1|0}k=k&16777215;if((k|0)!=0&(p&65535)>127){u=j+(n<<2)|0;c[u>>2]=(c[u>>2]|0)+1;c[t>>2]=(c[t>>2]|0)+1}b=b+o+k|0;q=q+1|0}return}function kb(e,f,g,h,j,k,l){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=i;i=i+16|0;q=s;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0;p=0;n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m>>>3)|0;f=d[e>>0]|0;if(!((n&-4|0)==0&0==0))pa(406196,406218,54,406251);g=cc(n|0,0,m&7|0)|0;j=C;g=f|g;f=e;o=f;a[o>>0]=g;a[o+1>>0]=g>>8;a[o+2>>0]=g>>16;a[o+3>>0]=g>>24;f=f+4|0;a[f>>0]=j;a[f+1>>0]=j>>8;a[f+2>>0]=j>>16;a[f+3>>0]=j>>24;c[k>>2]=(c[k>>2]|0)+2;f=p+-1|0;j=0;while(1){if((j|0)==(p|0))break;g=q+(j<<2)|0;m=j;while(1){o=m+1|0;if((m|0)==(f|0))break;m=q+(o<<2)|0;n=c[m>>2]|0;e=c[g>>2]|0;if((d[h+n>>0]|0)>=(d[h+e>>0]|0)){m=o;continue}c[m>>2]=e;c[g>>2]=n;m=o}j=j+1|0}switch(p|0){case 2:{m=c[q>>2]|0;n=c[k>>2]|0;e=l+(n>>>3)|0;f=d[e>>0]|0;if(!((bc(m|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(r>>>0>=57)pa(406267,406218,55,406251);n=cc(m|0,0,n&7|0)|0;m=C;n=f|n;f=e;e=f;a[e>>0]=n;a[e+1>>0]=n>>8;a[e+2>>0]=n>>16;a[e+3>>0]=n>>24;f=f+4|0;a[f>>0]=m;a[f+1>>0]=m>>8;a[f+2>>0]=m>>16;a[f+3>>0]=m>>24;f=(c[k>>2]|0)+r|0;c[k>>2]=f;e=c[q+4>>2]|0;m=l+(f>>>3)|0;n=d[m>>0]|0;if(!((bc(e|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);p=cc(e|0,0,f&7|0)|0;q=C;p=n|p;l=m;h=l;a[h>>0]=p;a[h+1>>0]=p>>8;a[h+2>>0]=p>>16;a[h+3>>0]=p>>24;l=l+4|0;a[l>>0]=q;a[l+1>>0]=q>>8;a[l+2>>0]=q>>16;a[l+3>>0]=q>>24;c[k>>2]=(c[k>>2]|0)+r;i=s;return}case 3:{m=c[q>>2]|0;n=c[k>>2]|0;e=l+(n>>>3)|0;f=d[e>>0]|0;if(!((bc(m|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(r>>>0>=57)pa(406267,406218,55,406251);m=cc(m|0,0,n&7|0)|0;n=C;f=f|m;m=e;e=m;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+3>>0]=f>>24;m=m+4|0;a[m>>0]=n;a[m+1>>0]=n>>8;a[m+2>>0]=n>>16;a[m+3>>0]=n>>24;m=(c[k>>2]|0)+r|0;c[k>>2]=m;n=c[q+4>>2]|0;e=l+(m>>>3)|0;f=d[e>>0]|0;if(!((bc(n|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);n=cc(n|0,0,m&7|0)|0;m=C;n=f|n;f=e;e=f;a[e>>0]=n;a[e+1>>0]=n>>8;a[e+2>>0]=n>>16;a[e+3>>0]=n>>24;f=f+4|0;a[f>>0]=m;a[f+1>>0]=m>>8;a[f+2>>0]=m>>16;a[f+3>>0]=m>>24;f=(c[k>>2]|0)+r|0;c[k>>2]=f;e=c[q+8>>2]|0;m=l+(f>>>3)|0;n=d[m>>0]|0;if(!((bc(e|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);p=cc(e|0,0,f&7|0)|0;q=C;p=n|p;l=m;h=l;a[h>>0]=p;a[h+1>>0]=p>>8;a[h+2>>0]=p>>16;a[h+3>>0]=p>>24;l=l+4|0;a[l>>0]=q;a[l+1>>0]=q>>8;a[l+2>>0]=q>>16;a[l+3>>0]=q>>24;c[k>>2]=(c[k>>2]|0)+r;i=s;return}default:{m=c[q>>2]|0;n=c[k>>2]|0;e=l+(n>>>3)|0;f=d[e>>0]|0;if(!((bc(m|0,0,r|0)|0)==0&(C|0)==0))pa(406196,406218,54,406251);if(r>>>0>=57)pa(406267,406218,55,406251);m=cc(m|0,0,n&7|0)|0;n=C;f=f|m;m=e;e=m;a[e>>0]=f;a[e+1>>0]=f>>8;a[e+2>>0]=f>>16;a[e+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0]=h>>16;a[q+3>>0]=h>>24;r=r+4|0;a[r>>0]=l;a[r+1>>0]=l>>8;a[r+2>>0]=l>>16;a[r+3>>0]=l>>24;c[k>>2]=(c[k>>2]|0)+1;i=s;return}}}function lb(b,f,g,h,i,j,k,l,m,n,o,p,q){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0;E=0;a:while(1){if(E>>>0>=i>>>0){f=42;break}y=c[h+(E<<4)>>2]|0;w=c[h+(E<<4)+4>>2]|0;D=c[h+(E<<4)+8>>2]|0;s=c[h+(E<<4)+12>>2]|0;A=s&65535;B=s>>>16;s=s&65535;r=a[l+s>>0]|0;s=e[m+(s<<1)>>1]|0;t=c[p>>2]|0;u=q+(t>>>3)|0;v=d[u>>0]|0;z=bc(s|0,0,r&255|0)|0;if(!((z|0)==0&(C|0)==0)){f=4;break}if((r&255)>=57){f=6;break}x=cc(s|0,0,t&7|0)|0;z=C;v=v|x;x=u;t=x;a[t>>0]=v;a[t+1>>0]=v>>8;a[t+2>>0]=v>>16;a[t+3>>0]=v>>24;x=x+4|0;a[x>>0]=z;a[x+1>>0]=z>>8;a[x+2>>0]=z>>16;a[x+3>>0]=z>>24;x=(c[p>>2]|0)+(r&255)|0;c[p>>2]=x;z=w&16777215;t=z^w>>>24;do if(y>>>0>=6){if(y>>>0<130){w=y+-2|0;s=((aa(w|0)|0)^31)+-1|0;s=(s<<1)+(w>>>s)+2|0;break}if(y>>>0<2114){s=((aa(y+-66|0)|0)^31)+10|0;break}if(y>>>0<6210)s=21;else s=y>>>0<22594?22:23}else s=y;while(0);do if(t>>>0>=10){if(t>>>0<134){w=t+-6|0;r=((aa(w|0)|0)^31)+-1|0;r=(r<<1)+(w>>>r)+4|0;break}if(t>>>0<2118)r=((aa(t+-70|0)|0)^31)+12|0;else r=23}else r=t+65534|0;while(0);s=s&65535;v=c[17268+(s<<2)>>2]|0;s=y-(c[18788+(s<<2)>>2]|0)|0;u=r&65535;t=cc(t-(c[17364+(u<<2)>>2]|0)|0,0,v|0)|0;r=C;s=t|s;t=v+(c[17460+(u<<2)>>2]|0)|0;u=q+(x>>>3)|0;v=d[u>>0]|0;w=bc(s|0,r|0,t|0)|0;if(!((w|0)==0&(C|0)==0)){f=21;break}if(t>>>0>=57){f=23;break}s=cc(s|0,r|0,x&7|0)|0;w=C;s=v|s;x=u;v=x;a[v>>0]=s;a[v+1>>0]=s>>8;a[v+2>>0]=s>>16;a[v+3>>0]=s>>24;x=x+4|0;a[x>>0]=w;a[x+1>>0]=w>>8;a[x+2>>0]=w>>16;a[x+3>>0]=w>>24;x=(c[p>>2]|0)+t|0;c[p>>2]=x;v=y;while(1){if(!v)break;s=d[b+(f&g)>>0]|0;r=a[j+s>>0]|0;s=e[k+(s<<1)>>1]|0;t=q+(x>>>3)|0;u=d[t>>0]|0;y=bc(s|0,0,r&255|0)|0;if(!((y|0)==0&(C|0)==0)){f=27;break a}if((r&255)>=57){f=29;break a}s=cc(s|0,0,x&7|0)|0;w=C;s=u|s;y=t;u=y;a[u>>0]=s;a[u+1>>0]=s>>8;a[u+2>>0]=s>>16;a[u+3>>0]=s>>24;y=y+4|0;a[y>>0]=w;a[y+1>>0]=w>>8;a[y+2>>0]=w>>16;a[y+3>>0]=w>>24;y=(c[p>>2]|0)+(r&255)|0;c[p>>2]=y;x=y;f=f+1|0;v=v+-1|0}f=f+z|0;if((z|0)!=0&(A&65535)>127){v=D>>>24;w=D&16777215;u=a[n+B>>0]|0;r=e[o+(B<<1)>>1]|0;s=q+(x>>>3)|0;t=d[s>>0]|0;B=bc(r|0,0,u&255|0)|0;if(!((B|0)==0&(C|0)==0)){f=33;break}if((u&255)>=57){f=35;break}r=cc(r|0,0,x&7|0)|0;B=C;t=t|r;r=s;s=r;a[s>>0]=t;a[s+1>>0]=t>>8;a[s+2>>0]=t>>16;a[s+3>>0]=t>>24;r=r+4|0;a[r>>0]=B;a[r+1>>0]=B>>8;a[r+2>>0]=B>>16;a[r+3>>0]=B>>24;r=(c[p>>2]|0)+(u&255)|0;c[p>>2]=r;s=q+(r>>>3)|0;t=d[s>>0]|0;B=bc(w|0,0,v|0)|0;if(!((B|0)==0&(C|0)==0)){f=37;break}if(D>>>0>=956301312){f=39;break}z=cc(w|0,0,r&7|0)|0;B=C;z=t|z;D=s;A=D;a[A>>0]=z;a[A+1>>0]=z>>8;a[A+2>>0]=z>>16;a[A+3>>0]=z>>24;D=D+4|0;a[D>>0]=B;a[D+1>>0]=B>>8;a[D+2>>0]=B>>16;a[D+3>>0]=B>>24;c[p>>2]=(c[p>>2]|0)+v}E=E+1|0}switch(f|0){case 4:{pa(406196,406218,54,406251);break}case 6:{pa(406267,406218,55,406251);break}case 21:{pa(406196,406218,54,406251);break}case 23:{pa(406267,406218,55,406251);break}case 27:{pa(406196,406218,54,406251);break}case 29:{pa(406267,406218,55,406251);break}case 33:{pa(406196,406218,54,406251);break}case 35:{pa(406267,406218,55,406251);break}case 37:{pa(406196,406218,54,406251);break}case 39:{pa(406267,406218,55,406251);break}case 42:return}}function mb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((a|0)!=1){i=(aa(a+-1|0)|0)^31;j=i+1|0;if(!a)pa(405225,404333,86,405236);else{g=j>>>0<16?4:(i+4|0)>>>2;k=j}if(a>>>0<16777217){h=g;l=k}else pa(405253,404333,87,405236);if(l>>>0<25)f=h;else pa(405273,404333,88,405236)}else f=4;c[e>>2]=f+-4;c[e+4>>2]=0;c[d>>2]=f<<2;d=b;c[d>>2]=a+-1;c[d+4>>2]=0;return}function nb(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;if(!b){k=f+((c[e>>2]|0)>>>3)|0;b=d[k>>0]|0;f=k;a[f>>0]=b;a[f+1>>0]=b>>8;a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e|0)){i=w;return}u=e>>>0>>0;v=u?d:e;u=u?e:d;d=c[b+(u<<2)>>2]|0;e=c[b+(v<<2)>>2]|0;b=d+e|0;s=+(d>>>0);if(d>>>0<256)r=+g[19516+(d<<2)>>2];else r=+Xb(s);q=+(e>>>0);if(e>>>0<256)p=+g[19516+(e<<2)>>2];else p=+Xb(q);n=+(b>>>0);if(b>>>0<256)m=+g[19516+(b<<2)>>2];else m=+Xb(n);l=+h[a+(u*1040|0)+1032>>3];o=+h[a+(v*1040|0)+1032>>3];n=(s*r+q*p-n*m)*.5-l-o;if(c[a+(u*1040|0)+1024>>2]|0){d=c[a+(v*1040|0)+1024>>2]|0;if(d){if(c[k>>2]|0){l=+h[j+16>>3];if(l<0.0)m=0.0;else m=l}else m=1.e+99;dc(t|0,a+(u*1040|0)|0,1040)|0;b=t+1024|0;c[b>>2]=(c[b>>2]|0)+d;d=0;while(1){if((d|0)==256)break;b=t+(d<<2)|0;c[b>>2]=(c[b>>2]|0)+(c[a+(v*1040|0)+(d<<2)>>2]|0);d=d+1|0}l=+Wa(t);if(!(l>2]|0;do if(d){n=+h[j+16>>3];if(n!=m){if(!(n>m))break}else if(((c[j+4>>2]|0)-(c[j>>2]|0)|0)>>>0<=(v-u|0)>>>0)break;if(d>>>0>>0){f=j+(d*24|0)|0;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[f+8>>2]=c[j+8>>2];c[f+12>>2]=c[j+12>>2];c[f+16>>2]=c[j+16>>2];c[f+20>>2]=c[j+20>>2];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=u;c[j+4>>2]=v;h[j+8>>3]=l;h[j+16>>3]=m;i=w;return}while(0);if(d>>>0>=f>>>0){i=w;return}c[j+(d*24|0)>>2]=u;c[j+(d*24|0)+4>>2]=v;h[j+(d*24|0)+8>>3]=l;h[j+(d*24|0)+16>>3]=m;c[k>>2]=(c[k>>2]|0)+1;i=w;return}function pb(a,b,d,e,f,g,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;F=i;i=i+32|0;E=F+24|0;D=F;c[E>>2]=0;m=g+-1|0;o=0;while(1){if((o|0)==(g|0))break;n=e+(o<<2)|0;q=o;while(1){p=q+1|0;if((q|0)==(m|0))break;ob(a,b,c[n>>2]|0,c[e+(p<<2)>>2]|0,l,f,E);q=p}o=o+1|0}x=f+16|0;y=f+4|0;z=f+8|0;m=g;v=0.0;w=1;a:while(1){u=m;while(1){m=m+-1|0;if(u>>>0<=w>>>0)break a;if(+h[x>>3]>=v){m=u;v=1.e+99;w=k;continue a}t=c[f>>2]|0;g=c[y>>2]|0;n=a+(t*1040|0)+1024|0;c[n>>2]=(c[n>>2]|0)+(c[a+(g*1040|0)+1024>>2]|0);n=0;while(1){if((n|0)==256)break;q=a+(t*1040|0)+(n<<2)|0;c[q>>2]=(c[q>>2]|0)+(c[a+(g*1040|0)+(n<<2)>>2]|0);n=n+1|0}h[a+(t*1040|0)+1032>>3]=+h[z>>3];o=b+(t<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[b+(g<<2)>>2]|0);o=0;while(1){if((o|0)==(j|0)){o=0;break}n=d+(o<<2)|0;if((c[n>>2]|0)==(g|0))c[n>>2]=t;o=o+1|0}while(1){if(u>>>0<=o>>>0)break;n=e+(o<<2)|0;if((c[n>>2]|0)==(g|0)){A=22;break}o=o+1|0}if((A|0)==22){A=0;fc(n|0,e+(o+1<<2)|0,(u-o<<2)+-4|0)|0}p=c[E>>2]|0;n=0;q=0;while(1){if((q|0)==(p|0))break;o=f+(q*24|0)|0;if(((c[o>>2]|0)!=(t|0)?(B=c[f+(q*24|0)+4>>2]|0,(B|0)!=(t|0)):0)?(C=c[o>>2]|0,!((C|0)==(g|0)|(B|0)==(g|0))):0){r=+h[x>>3];s=+h[f+(q*24|0)+16>>3];if(r!=s)if(r>s)A=32;else A=33;else if(((c[y>>2]|0)-(c[f>>2]|0)|0)>>>0>(B-C|0)>>>0)A=32;else A=33;if((A|0)==32){A=0;c[D>>2]=c[f>>2];c[D+4>>2]=c[f+4>>2];c[D+8>>2]=c[f+8>>2];c[D+12>>2]=c[f+12>>2];c[D+16>>2]=c[f+16>>2];c[D+20>>2]=c[f+20>>2];c[f>>2]=c[o>>2];c[f+4>>2]=c[o+4>>2];c[f+8>>2]=c[o+8>>2];c[f+12>>2]=c[o+12>>2];c[f+16>>2]=c[o+16>>2];c[f+20>>2]=c[o+20>>2];o=f+(n*24|0)|0;c[o>>2]=c[D>>2];c[o+4>>2]=c[D+4>>2];c[o+8>>2]=c[D+8>>2];c[o+12>>2]=c[D+12>>2];c[o+16>>2]=c[D+16>>2];c[o+20>>2]=c[D+20>>2]}else if((A|0)==33){A=0;G=f+(n*24|0)|0;c[G>>2]=c[o>>2];c[G+4>>2]=c[o+4>>2];c[G+8>>2]=c[o+8>>2];c[G+12>>2]=c[o+12>>2];c[G+16>>2]=c[o+16>>2];c[G+20>>2]=c[o+20>>2]}n=n+1|0}q=q+1|0}c[E>>2]=n;n=0;while(1){if((n|0)==(m|0))break;ob(a,b,t,c[e+(n<<2)>>2]|0,l,f,E);n=n+1|0}u=u+-1|0}}i=F;return u|0}function qb(a,b,d,e,f,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;k=k|0;var l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0;w=i;i=i+2832|0;t=w;if((d|0)==(e|0)){i=w;return}u=e>>>0>>0;v=u?d:e;u=u?e:d;d=c[b+(u<<2)>>2]|0;e=c[b+(v<<2)>>2]|0;b=d+e|0;s=+(d>>>0);if(d>>>0<256)r=+g[19516+(d<<2)>>2];else r=+Xb(s);q=+(e>>>0);if(e>>>0<256)p=+g[19516+(e<<2)>>2];else p=+Xb(q);n=+(b>>>0);if(b>>>0<256)m=+g[19516+(b<<2)>>2];else m=+Xb(n);l=+h[a+(u*2832|0)+2824>>3];o=+h[a+(v*2832|0)+2824>>3];n=(s*r+q*p-n*m)*.5-l-o;if(c[a+(u*2832|0)+2816>>2]|0){d=c[a+(v*2832|0)+2816>>2]|0;if(d){if(c[k>>2]|0){l=+h[j+16>>3];if(l<0.0)m=0.0;else m=l}else m=1.e+99;dc(t|0,a+(u*2832|0)|0,2832)|0;b=t+2816|0;c[b>>2]=(c[b>>2]|0)+d;d=0;while(1){if((d|0)==704)break;b=t+(d<<2)|0;c[b>>2]=(c[b>>2]|0)+(c[a+(v*2832|0)+(d<<2)>>2]|0);d=d+1|0}l=+Xa(t);if(!(l>2]|0;do if(d){n=+h[j+16>>3];if(n!=m){if(!(n>m))break}else if(((c[j+4>>2]|0)-(c[j>>2]|0)|0)>>>0<=(v-u|0)>>>0)break;if(d>>>0>>0){f=j+(d*24|0)|0;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[f+8>>2]=c[j+8>>2];c[f+12>>2]=c[j+12>>2];c[f+16>>2]=c[j+16>>2];c[f+20>>2]=c[j+20>>2];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=u;c[j+4>>2]=v;h[j+8>>3]=l;h[j+16>>3]=m;i=w;return}while(0);if(d>>>0>=f>>>0){i=w;return}c[j+(d*24|0)>>2]=u;c[j+(d*24|0)+4>>2]=v;h[j+(d*24|0)+8>>3]=l;h[j+(d*24|0)+16>>3]=m;c[k>>2]=(c[k>>2]|0)+1;i=w;return}function rb(a,b,d,e,f,g,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;F=i;i=i+32|0;E=F+24|0;D=F;c[E>>2]=0;m=g+-1|0;o=0;while(1){if((o|0)==(g|0))break;n=e+(o<<2)|0;q=o;while(1){p=q+1|0;if((q|0)==(m|0))break;qb(a,b,c[n>>2]|0,c[e+(p<<2)>>2]|0,l,f,E);q=p}o=o+1|0}x=f+16|0;y=f+4|0;z=f+8|0;m=g;v=0.0;w=1;a:while(1){u=m;while(1){m=m+-1|0;if(u>>>0<=w>>>0)break a;if(+h[x>>3]>=v){m=u;v=1.e+99;w=k;continue a}t=c[f>>2]|0;g=c[y>>2]|0;n=a+(t*2832|0)+2816|0;c[n>>2]=(c[n>>2]|0)+(c[a+(g*2832|0)+2816>>2]|0);n=0;while(1){if((n|0)==704)break;q=a+(t*2832|0)+(n<<2)|0;c[q>>2]=(c[q>>2]|0)+(c[a+(g*2832|0)+(n<<2)>>2]|0);n=n+1|0}h[a+(t*2832|0)+2824>>3]=+h[z>>3];o=b+(t<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[b+(g<<2)>>2]|0);o=0;while(1){if((o|0)==(j|0)){o=0;break}n=d+(o<<2)|0;if((c[n>>2]|0)==(g|0))c[n>>2]=t;o=o+1|0}while(1){if(u>>>0<=o>>>0)break;n=e+(o<<2)|0;if((c[n>>2]|0)==(g|0)){A=22;break}o=o+1|0}if((A|0)==22){A=0;fc(n|0,e+(o+1<<2)|0,(u-o<<2)+-4|0)|0}p=c[E>>2]|0;n=0;q=0;while(1){if((q|0)==(p|0))break;o=f+(q*24|0)|0;if(((c[o>>2]|0)!=(t|0)?(B=c[f+(q*24|0)+4>>2]|0,(B|0)!=(t|0)):0)?(C=c[o>>2]|0,!((C|0)==(g|0)|(B|0)==(g|0))):0){r=+h[x>>3];s=+h[f+(q*24|0)+16>>3];if(r!=s)if(r>s)A=32;else A=33;else if(((c[y>>2]|0)-(c[f>>2]|0)|0)>>>0>(B-C|0)>>>0)A=32;else A=33;if((A|0)==32){A=0;c[D>>2]=c[f>>2];c[D+4>>2]=c[f+4>>2];c[D+8>>2]=c[f+8>>2];c[D+12>>2]=c[f+12>>2];c[D+16>>2]=c[f+16>>2];c[D+20>>2]=c[f+20>>2];c[f>>2]=c[o>>2];c[f+4>>2]=c[o+4>>2];c[f+8>>2]=c[o+8>>2];c[f+12>>2]=c[o+12>>2];c[f+16>>2]=c[o+16>>2];c[f+20>>2]=c[o+20>>2];o=f+(n*24|0)|0;c[o>>2]=c[D>>2];c[o+4>>2]=c[D+4>>2];c[o+8>>2]=c[D+8>>2];c[o+12>>2]=c[D+12>>2];c[o+16>>2]=c[D+16>>2];c[o+20>>2]=c[D+20>>2]}else if((A|0)==33){A=0;G=f+(n*24|0)|0;c[G>>2]=c[o>>2];c[G+4>>2]=c[o+4>>2];c[G+8>>2]=c[o+8>>2];c[G+12>>2]=c[o+12>>2];c[G+16>>2]=c[o+16>>2];c[G+20>>2]=c[o+20>>2]}n=n+1|0}q=q+1|0}c[E>>2]=n;n=0;while(1){if((n|0)==(m|0))break;qb(a,b,t,c[e+(n<<2)>>2]|0,l,f,E);n=n+1|0}u=u+-1|0}}i=F;return u|0}function sb(a,b,d,e,f,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;j=j|0;k=k|0;var l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0;w=i;i=i+2096|0;t=w;if((d|0)==(e|0)){i=w;return}u=e>>>0>>0;v=u?d:e;u=u?e:d;d=c[b+(u<<2)>>2]|0;e=c[b+(v<<2)>>2]|0;b=d+e|0;s=+(d>>>0);if(d>>>0<256)r=+g[19516+(d<<2)>>2];else r=+Xb(s);q=+(e>>>0);if(e>>>0<256)p=+g[19516+(e<<2)>>2];else p=+Xb(q);n=+(b>>>0);if(b>>>0<256)m=+g[19516+(b<<2)>>2];else m=+Xb(n);l=+h[a+(u*2096|0)+2088>>3];o=+h[a+(v*2096|0)+2088>>3];n=(s*r+q*p-n*m)*.5-l-o;if(c[a+(u*2096|0)+2080>>2]|0){d=c[a+(v*2096|0)+2080>>2]|0;if(d){if(c[k>>2]|0){l=+h[j+16>>3];if(l<0.0)m=0.0;else m=l}else m=1.e+99;dc(t|0,a+(u*2096|0)|0,2096)|0;b=t+2080|0;c[b>>2]=(c[b>>2]|0)+d;d=0;while(1){if((d|0)==520)break;b=t+(d<<2)|0;c[b>>2]=(c[b>>2]|0)+(c[a+(v*2096|0)+(d<<2)>>2]|0);d=d+1|0}l=+Ya(t);if(!(l>2]|0;do if(d){n=+h[j+16>>3];if(n!=m){if(!(n>m))break}else if(((c[j+4>>2]|0)-(c[j>>2]|0)|0)>>>0<=(v-u|0)>>>0)break;if(d>>>0>>0){f=j+(d*24|0)|0;c[f>>2]=c[j>>2];c[f+4>>2]=c[j+4>>2];c[f+8>>2]=c[j+8>>2];c[f+12>>2]=c[j+12>>2];c[f+16>>2]=c[j+16>>2];c[f+20>>2]=c[j+20>>2];c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=u;c[j+4>>2]=v;h[j+8>>3]=l;h[j+16>>3]=m;i=w;return}while(0);if(d>>>0>=f>>>0){i=w;return}c[j+(d*24|0)>>2]=u;c[j+(d*24|0)+4>>2]=v;h[j+(d*24|0)+8>>3]=l;h[j+(d*24|0)+16>>3]=m;c[k>>2]=(c[k>>2]|0)+1;i=w;return}function tb(a,b,d,e,f,g,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;F=i;i=i+32|0;E=F+24|0;D=F;c[E>>2]=0;m=g+-1|0;o=0;while(1){if((o|0)==(g|0))break;n=e+(o<<2)|0;q=o;while(1){p=q+1|0;if((q|0)==(m|0))break;sb(a,b,c[n>>2]|0,c[e+(p<<2)>>2]|0,l,f,E);q=p}o=o+1|0}x=f+16|0;y=f+4|0;z=f+8|0;m=g;v=0.0;w=1;a:while(1){u=m;while(1){m=m+-1|0;if(u>>>0<=w>>>0)break a;if(+h[x>>3]>=v){m=u;v=1.e+99;w=k;continue a}t=c[f>>2]|0;g=c[y>>2]|0;n=a+(t*2096|0)+2080|0;c[n>>2]=(c[n>>2]|0)+(c[a+(g*2096|0)+2080>>2]|0);n=0;while(1){if((n|0)==520)break;q=a+(t*2096|0)+(n<<2)|0;c[q>>2]=(c[q>>2]|0)+(c[a+(g*2096|0)+(n<<2)>>2]|0);n=n+1|0}h[a+(t*2096|0)+2088>>3]=+h[z>>3];o=b+(t<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[b+(g<<2)>>2]|0);o=0;while(1){if((o|0)==(j|0)){o=0;break}n=d+(o<<2)|0;if((c[n>>2]|0)==(g|0))c[n>>2]=t;o=o+1|0}while(1){if(u>>>0<=o>>>0)break;n=e+(o<<2)|0;if((c[n>>2]|0)==(g|0)){A=22;break}o=o+1|0}if((A|0)==22){A=0;fc(n|0,e+(o+1<<2)|0,(u-o<<2)+-4|0)|0}p=c[E>>2]|0;n=0;q=0;while(1){if((q|0)==(p|0))break;o=f+(q*24|0)|0;if(((c[o>>2]|0)!=(t|0)?(B=c[f+(q*24|0)+4>>2]|0,(B|0)!=(t|0)):0)?(C=c[o>>2]|0,!((C|0)==(g|0)|(B|0)==(g|0))):0){r=+h[x>>3];s=+h[f+(q*24|0)+16>>3];if(r!=s)if(r>s)A=32;else A=33;else if(((c[y>>2]|0)-(c[f>>2]|0)|0)>>>0>(B-C|0)>>>0)A=32;else A=33;if((A|0)==32){A=0;c[D>>2]=c[f>>2];c[D+4>>2]=c[f+4>>2];c[D+8>>2]=c[f+8>>2];c[D+12>>2]=c[f+12>>2];c[D+16>>2]=c[f+16>>2];c[D+20>>2]=c[f+20>>2];c[f>>2]=c[o>>2];c[f+4>>2]=c[o+4>>2];c[f+8>>2]=c[o+8>>2];c[f+12>>2]=c[o+12>>2];c[f+16>>2]=c[o+16>>2];c[f+20>>2]=c[o+20>>2];o=f+(n*24|0)|0;c[o>>2]=c[D>>2];c[o+4>>2]=c[D+4>>2];c[o+8>>2]=c[D+8>>2];c[o+12>>2]=c[D+12>>2];c[o+16>>2]=c[D+16>>2];c[o+20>>2]=c[D+20>>2]}else if((A|0)==33){A=0;G=f+(n*24|0)|0;c[G>>2]=c[o>>2];c[G+4>>2]=c[o+4>>2];c[G+8>>2]=c[o+8>>2];c[G+12>>2]=c[o+12>>2];c[G+16>>2]=c[o+16>>2];c[G+20>>2]=c[o+20>>2]}n=n+1|0}q=q+1|0}c[E>>2]=n;n=0;while(1){if((n|0)==(m|0))break;sb(a,b,t,c[e+(n<<2)>>2]|0,l,f,E);n=n+1|0}u=u+-1|0}}i=F;return u|0}function ub(b,f,h,j,k,l,m,n,o,p,q,r){b=b|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;xa=i;i=i+2304|0;ta=xa+512|0;sa=xa;va=xa+2048|0;ua=xa+1536|0;w=f;A=h>>>0<98304?h:98304;B=c[q>>2]|0;ra=64-((aa(l|0)|0)^31)|0;if(!l)pa(405532,405401,464,405439);if(l>>>0>=2147483649)pa(405605,405401,465,405439);s=l+-1|0;if(s&l)pa(405630,405401,467,405439);qa=bc(16777215,-1,ra|0)|0;if((s|0)!=(qa|0))pa(405667,405401,469,405439);if(!h){if(!j)pa(405466,405401,472,405439);b=r+(B>>>3)|0;k=d[b>>0]|0;va=cc(1,0,B&7|0)|0;wa=C;va=k|va;k=b;a[k>>0]=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;a[ba>>0]=ca;a[ba+1>>0]=ca>>8;a[ba+2>>0]=ca>>16;a[ba+3>>0]=ca>>24;_=_+4|0;a[_>>0]=$;a[_+1>>0]=$>>8;a[_+2>>0]=$>>16;a[_+3>>0]=$>>24;c[q>>2]=(c[q>>2]|0)+v;_=f;$=m+61|0;ba=n+122|0;ca=sa+84|0;da=m+64|0;ea=n+128|0;fa=sa+256|0;ga=m+39|0;ha=n+78|0;ia=sa+188|0;ja=sa+256|0;ka=m+62|0;la=n+124|0;ma=sa+88|0;na=m+63|0;oa=n+126|0;qa=sa+92|0;l=h;s=w;u=A;t=x;a:while(1){X=B+3|0;Y=t>>>0>980;T=s;V=u;v=s;W=u;b:while(1){dc(sa|0,17764,512)|0;U=T;t=U+V|0;Z=t;c:do if(V>>>0>15){w=V+-5|0;S=l+-16|0;S=U+(w>>>0>>0?w:S)|0;w=U+1|0;h=w;u=h;h=h+4|0;u=d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24;h=d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24;M=-1;while(1){u=lc(u|0,h|0,-1124073472,1979815)|0;u=bc(u|0,C|0,ra|0)|0;K=v;if(K>>>0>=w>>>0){wa=24;break a}G=0-M|0;Q=w;F=32;while(1){H=Q;h=F;F=F+1|0;R=Q;P=R;R=R+4|0;R=lc(d[P>>0]|d[P+1>>0]<<8|d[P+2>>0]<<16|d[P+3>>0]<<24|0,d[R>>0]|d[R+1>>0]<<8|d[R+2>>0]<<16|d[R+3>>0]<<24|0,-1124073472,1979815)|0;R=bc(R|0,C|0,ra|0)|0;if((u|0)!=(R|0)){wa=26;break a}x=Q+(h>>>5)|0;if(x>>>0>S>>>0)break c;A=x;h=A;A=A+4|0;A=lc(d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0,d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0,-1124073472,1979815)|0;A=bc(A|0,C|0,ra|0)|0;h=Q+G|0;if((d[Q>>0]|d[Q+1>>0]<<8|d[Q+2>>0]<<16|d[Q+3>>0]<<24|0)==(d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)?((G|0)<0?(a[Q+4>>0]|0)==(a[Q+(4-M)>>0]|0):0):0){wa=30;break}u=k+(u<<2)|0;w=c[u>>2]|0;h=f+w|0;if((w|0)<0){wa=32;break a}if(h>>>0>=Q>>>0){wa=34;break a}c[u>>2]=H-_;if((d[Q>>0]|d[Q+1>>0]<<8|d[Q+2>>0]<<16|d[Q+3>>0]<<24|0)!=(d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)){u=A;Q=x;continue}if((a[Q+4>>0]|0)==(a[f+(w+4)>>0]|0))break;else{u=A;Q=x}}if((wa|0)==30){wa=0;c[k+(u<<2)>>2]=H-_}x=h;R=U+(V+-4)|0;u=0;w=Q+5|0;while(1){if(w>>>0>R>>>0){P=u;u=w;break}P=h+(u+5)|0;if((d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24|0)!=(d[P>>0]|d[P+1>>0]<<8|d[P+2>>0]<<16|d[P+3>>0]<<24|0)){P=u;u=w;break}u=u+4|0;w=w+4|0}while(1){if(u>>>0>=t>>>0)break;if((a[h+(P+5)>>0]|0)!=(a[u>>0]|0))break;P=P+1|0;u=u+1|0}L=P+5|0;I=H-x|0;J=H-v|0;N=Q+L|0;O=N;d:do if(L){x=L;A=Q;while(1){u=a[A>>0]|0;w=a[h>>0]|0;if(u<<24>>24!=w<<24>>24)break;x=x+-1|0;if(!x)break d;else{A=A+1|0;h=h+1|0}}if(u<<24>>24!=w<<24>>24){wa=48;break a}}while(0);do if(J>>>0>=6210){if(!(((v-s|0)*50|0)>>>0>J>>>0|Y^1)){wa=84;break b}if(J>>>0<22594){u=a[ka>>0]|0;v=e[la>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;H=bc(v|0,0,u&255|0)|0;if(!((H|0)==0&(C|0)==0)){wa=87;break a}if((u&255)>=57){wa=89;break a}H=cc(v|0,0,h&7|0)|0;h=C;H=x|H;v=w;w=v;a[w>>0]=H;a[w+1>>0]=H>>8;a[w+2>>0]=H>>16;a[w+3>>0]=H>>24;v=v+4|0;a[v>>0]=h;a[v+1>>0]=h>>8;a[v+2>>0]=h>>16;a[v+3>>0]=h>>24;u=(c[q>>2]|0)+(u&255)|0;c[q>>2]=u;v=J+-6210|0;h=r+(u>>>3)|0;w=d[h>>0]|0;if(!((v&-16384|0)==0&0==0)){wa=91;break a}F=cc(v|0,0,u&7|0)|0;H=C;F=w|F;A=h;G=A;a[G>>0]=F;a[G+1>>0]=F>>8;a[G+2>>0]=F>>16;a[G+3>>0]=F>>24;A=A+4|0;a[A>>0]=H;a[A+1>>0]=H>>8;a[A+2>>0]=H>>16;a[A+3>>0]=H>>24;c[q>>2]=(c[q>>2]|0)+14;c[ma>>2]=(c[ma>>2]|0)+1;A=0;break}else{u=a[na>>0]|0;v=e[oa>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;H=bc(v|0,0,u&255|0)|0;if(!((H|0)==0&(C|0)==0)){wa=94;break a}if((u&255)>=57){wa=96;break a}H=cc(v|0,0,h&7|0)|0;h=C;H=x|H;v=w;w=v;a[w>>0]=H;a[w+1>>0]=H>>8;a[w+2>>0]=H>>16;a[w+3>>0]=H>>24;v=v+4|0;a[v>>0]=h;a[v+1>>0]=h>>8;a[v+2>>0]=h>>16;a[v+3>>0]=h>>24;u=(c[q>>2]|0)+(u&255)|0;c[q>>2]=u;v=J+-22594|0;h=r+(u>>>3)|0;w=d[h>>0]|0;if(!((v&-16777216|0)==0&0==0)){wa=98;break a}F=cc(v|0,0,u&7|0)|0;H=C;F=w|F;A=h;G=A;a[G>>0]=F;a[G+1>>0]=F>>8;a[G+2>>0]=F>>16;a[G+3>>0]=F>>24;A=A+4|0;a[A>>0]=H;a[A+1>>0]=H>>8;a[A+2>>0]=H>>16;a[A+3>>0]=H>>24;c[q>>2]=(c[q>>2]|0)+24;c[qa>>2]=(c[qa>>2]|0)+1;A=0;break}}else{if(J>>>0<6){u=J+40|0;v=a[m+u>>0]|0;h=e[n+(u<<1)>>1]|0;w=c[q>>2]|0;x=r+(w>>>3)|0;A=d[x>>0]|0;H=bc(h|0,0,v&255|0)|0;if(!((H|0)==0&(C|0)==0)){wa=52;break a}if((v&255)>=57){wa=54;break a}F=cc(h|0,0,w&7|0)|0;H=C;F=A|F;A=x;G=A;a[G>>0]=F;a[G+1>>0]=F>>8;a[G+2>>0]=F>>16;a[G+3>>0]=F>>24;A=A+4|0;a[A>>0]=H;a[A+1>>0]=H>>8;a[A+2>>0]=H>>16;a[A+3>>0]=H>>24;c[q>>2]=(c[q>>2]|0)+(v&255);A=sa+(u<<2)|0;c[A>>2]=(c[A>>2]|0)+1;A=0;break}if(J>>>0<130){A=J+-2|0;G=((aa(A|0)|0)^31)+-1|0;F=A>>>G;H=(G<<1)+F+42|0;u=a[m+H>>0]|0;v=e[n+(H<<1)>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;ya=bc(v|0,0,u&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=58;break a}if((u&255)>=57){wa=60;break a}ya=cc(v|0,0,h&7|0)|0;v=C;ya=x|ya;h=w;a[h>>0]=ya;a[h+1>>0]=ya>>8;a[h+2>>0]=ya>>16;a[h+3>>0]=ya>>24;w=w+4|0;a[w>>0]=v;a[w+1>>0]=v>>8;a[w+2>>0]=v>>16;a[w+3>>0]=v>>24;w=(c[q>>2]|0)+(u&255)|0;c[q>>2]=w;u=A-(F<>>3)|0;h=d[v>>0]|0;ya=bc(u|0,0,G|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=62;break a}if(G>>>0>=57){wa=64;break a}x=cc(u|0,0,w&7|0)|0;ya=C;x=h|x;A=v;F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a[h+1>>0]=ya>>8;a[h+2>>0]=ya>>16;a[h+3>>0]=ya>>24;w=w+4|0;a[w>>0]=v;a[w+1>>0]=v>>8;a[w+2>>0]=v>>16;a[w+3>>0]=v>>24;w=(c[q>>2]|0)+(u&255)|0;c[q>>2]=w;u=A-(1<>>3)|0;h=d[v>>0]|0;ya=bc(u|0,0,F|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=72;break a}if(F>>>0>=57){wa=74;break a}x=cc(u|0,0,w&7|0)|0;ya=C;x=h|x;A=v;H=A;a[H>>0]=x;a[H+1>>0]=x>>8;a[H+2>>0]=x>>16;a[H+3>>0]=x>>24;A=A+4|0;a[A>>0]=ya;a[A+1>>0]=ya>>8;a[A+2>>0]=ya>>16;a[A+3>>0]=ya>>24;c[q>>2]=(c[q>>2]|0)+F;A=sa+(G<<2)|0;c[A>>2]=(c[A>>2]|0)+1;A=0}while(0);while(1){if(A>>>0>=J>>>0)break;v=d[K+A>>0]|0;u=a[va+v>>0]|0;v=e[ua+(v<<1)>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;ya=bc(v|0,0,u&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=102;break a}if((u&255)>=57){wa=104;break a}F=cc(v|0,0,h&7|0)|0;H=C;F=x|F;ya=w;G=ya;a[G>>0]=F;a[G+1>>0]=F>>8;a[G+2>>0]=F>>16;a[G+3>>0]=F>>24;ya=ya+4|0;a[ya>>0]=H;a[ya+1>>0]=H>>8;a[ya+2>>0]=H>>16;a[ya+3>>0]=H>>24;c[q>>2]=(c[q>>2]|0)+(u&255);A=A+1|0}if((I|0)==(M|0)){u=a[da>>0]|0;v=e[ea>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;ya=bc(v|0,0,u&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=108;break a}if((u&255)>=57){wa=110;break a}J=cc(v|0,0,h&7|0)|0;ya=C;J=x|J;I=w;K=I;a[K>>0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a=164;break a}ya=cc(v|0,0,h&7|0)|0;h=C;ya=x|ya;v=w;w=v;a[w>>0]=ya;a[w+1>>0]=ya>>8;a[w+2>>0]=ya>>16;a[w+3>>0]=ya>>24;v=v+4|0;a[v>>0]=h;a[v+1>>0]=h>>8;a[v+2>>0]=h>>16;a[v+3>>0]=h>>24;u=(c[q>>2]|0)+(u&255)|0;c[q>>2]=u;v=P+-2115|0;h=r+(u>>>3)|0;w=d[h>>0]|0;if(!((v&-16777216|0)==0&0==0)){wa=166;break a}u=cc(v|0,0,u&7|0)|0;v=C;w=w|u;u=h;h=u;a[h>>0]=w;a[h+1>>0]=w>>8;a[h+2>>0]=w>>16;a[h+3>>0]=w>>24;u=u+4|0;a[u>>0]=v;a[u+1>>0]=v>>8;a[u+2>>0]=v>>16;a[u+3>>0]=v>>24;u=(c[q>>2]|0)+24|0;c[q>>2]=u;v=a[da>>0]|0;h=e[ea>>1]|0;w=r+(u>>>3)|0;x=d[w>>0]|0;ya=bc(h|0,0,v&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=168;break a}if((v&255)>=57){wa=170;break a}K=cc(h|0,0,u&7|0)|0;M=C;K=x|K;ya=w;L=ya;a[L>>0]=K;a[L+1>>0]=K>>8;a[L+2>>0]=K>>16;a[L+3>>0]=K>>24;ya=ya+4|0;a[ya>>0]=M;a[ya+1>>0]=M>>8;a[ya+2>>0]=M>>16;a[ya+3>>0]=M>>24;c[q>>2]=(c[q>>2]|0)+(v&255);c[ia>>2]=(c[ia>>2]|0)+1;c[ja>>2]=(c[ja>>2]|0)+1;break}A=P+-67|0;F=(aa(A|0)|0)^31;G=F+28|0;u=a[m+G>>0]|0;v=e[n+(G<<1)>>1]|0;h=c[q>>2]|0;w=r+(h>>>3)|0;x=d[w>>0]|0;ya=bc(v|0,0,u&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=149;break a}if((u&255)>=57){wa=151;break a}ya=cc(v|0,0,h&7|0)|0;v=C;ya=x|ya;h=w;a[h>>0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c(x|0,C|0,-1124073472,1979815)|0;x=bc(x|0,C|0,ra|0)|0;A=N-_|0;c[k+(Q<<2)>>2]=A+-3;Q=bc(ya|0,v|0,8)|0;Q=lc(Q|0,C|0,-1124073472,1979815)|0;Q=bc(Q|0,C|0,ra|0)|0;c[k+(Q<<2)>>2]=A+-2;v=bc(ya|0,v|0,16)|0;v=lc(v|0,C|0,-1124073472,1979815)|0;v=bc(v|0,C|0,ra|0)|0;c[k+(v<<2)>>2]=A+-1;x=k+(x<<2)|0;v=c[x>>2]|0;c[x>>2]=A;x=I;A=O;while(1){H=f+v|0;ya=A;u=A;if((d[ya>>0]|d[ya+1>>0]<<8|d[ya+2>>0]<<16|d[ya+3>>0]<<24|0)!=(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24|0))break;if((a[u+4>>0]|0)!=(a[f+(v+4)>>0]|0))break;w=v+5|0;v=0;h=u+5|0;while(1){if(h>>>0>R>>>0)break;ya=f+(w+v)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[ya>>0]|d[ya+1>>0]<<8|d[ya+2>>0]<<16|d[ya+3>>0]<<24|0))break;v=v+4|0;h=h+4|0}while(1){if(h>>>0>=t>>>0)break;if((a[f+(w+v)>>0]|0)!=(a[h>>0]|0))break;v=v+1|0;h=h+1|0}G=v+5|0;K=u+G|0;M=K;L=A-H|0;do if(!G)wa=189;else{A=G;F=u;x=H;while(1){h=a[F>>0]|0;w=a[x>>0]|0;if(h<<24>>24!=w<<24>>24){wa=186;break}A=A+-1|0;if(!A)break;else{F=F+1|0;x=x+1|0}}if((wa|0)==186?(wa=0,h<<24>>24!=w<<24>>24):0){wa=187;break a}if(G>>>0<10){wa=189;break}if(G>>>0<134){G=v+-1|0;I=((aa(G|0)|0)^31)+-1|0;H=G>>>I;J=(I<<1)+H+20|0;h=a[m+J>>0]|0;w=e[n+(J<<1)>>1]|0;x=c[q>>2]|0;A=r+(x>>>3)|0;F=d[A>>0]|0;ya=bc(w|0,0,h&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=196;break a}if((h&255)>=57){wa=198;break a}ya=cc(w|0,0,x&7|0)|0;w=C;ya=F|ya;x=A;a[x>>0]=ya;a[x+1>>0]=ya>>8;a[x+2>>0]=ya>>16;a[x+3>>0]=ya>>24;A=A+4|0;a[A>>0]=w;a[A+1>>0]=w>>8;a[A+2>>0]=w>>16;a[A+3>>0]=w>>24;A=(c[q>>2]|0)+(h&255)|0;c[q>>2]=A;h=G-(H<>>3)|0;x=d[w>>0]|0;ya=bc(h|0,0,I|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=200;break a}if(I>>>0>=57){wa=202;break a}O=cc(h|0,0,A&7|0)|0;Q=C;O=x|O;ya=w;P=ya;a[P>>0]=O;a[P+1>>0]=O>>8;a[P+2>>0]=O>>16;a[P+3>>0]=O>>24;ya=ya+4|0;a[ya>>0]=Q;a[ya+1>>0]=Q>>8;a[ya+2>>0]=Q>>16;a[ya+3>>0]=Q>>24;c[q>>2]=(c[q>>2]|0)+I;ya=sa+(J<<2)|0;c[ya>>2]=(c[ya>>2]|0)+1;break}if(G>>>0>=2118){h=a[ga>>0]|0;w=e[ha>>1]|0;x=c[q>>2]|0;A=r+(x>>>3)|0;F=d[A>>0]|0;ya=bc(w|0,0,h&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=215;break a}if((h&255)>=57){wa=217;break a}ya=cc(w|0,0,x&7|0)|0;x=C;ya=F|ya;w=A;A=w;a[A>>0]=ya;a[A+1>>0]=ya>>8;a[A+2>>0]=ya>>16;a[A+3>>0]=ya>>24;w=w+4|0;a[w>>0]=x;a[w+1>>0]=x>>8;a[w+2>>0]=x>>16;a[w+3>>0]=x>>24;h=(c[q>>2]|0)+(h&255)|0;c[q>>2]=h;w=v+-2113|0;x=r+(h>>>3)|0;A=d[x>>0]|0;if(!((w&-16777216|0)==0&0==0)){wa=219;break a}O=cc(w|0,0,h&7|0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>0]|d[ya+1>>0]<<8|d[ya+2>>0]<<16|d[ya+3>>0]<<24;v=v+4|0;v=d[v>>0]|d[v+1>>0]<<8|d[v+2>>0]<<16|d[v+3>>0]<<24;Q=lc(ya|0,v|0,-1124073472,1979815)|0;Q=bc(Q|0,C|0,ra|0)|0;x=bc(ya|0,v|0,24)|0;x=lc(x|0,C|0,-1124073472,1979815)|0;x=bc(x|0,C|0,ra|0)|0;A=K-_|0;c[k+(Q<<2)>>2]=A+-3;Q=bc(ya|0,v|0,8)|0;Q=lc(Q|0,C|0,-1124073472,1979815)|0;Q=bc(Q|0,C|0,ra|0)|0;c[k+(Q<<2)>>2]=A+-2;v=bc(ya|0,v|0,16)|0;v=lc(v|0,C|0,-1124073472,1979815)|0;v=bc(v|0,C|0,ra|0)|0;c[k+(v<<2)>>2]=A+-1;x=k+(x<<2)|0;v=c[x>>2]|0;c[x>>2]=A;x=L;A=M}w=u+1|0;h=w;u=h;h=h+4|0;u=d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24;h=d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24;M=x;v=A}}while(0);G=v;if(G>>>0>t>>>0){wa=233;break a}h=l-V|0;w=h>>>0<65536?h:65536;if((l|0)==(V|0)){l=0;wa=254;break}x=W+w|0;if(x>>>0>=1048577){l=h;wa=254;break}ac(ta|0,0,1024)|0;l=0;while(1){if(l>>>0>=w>>>0)break;ya=ta+(d[U+(V+l)>>0]<<2)|0;c[ya>>2]=(c[ya>>2]|0)+1;l=l+43|0}ya=w+42|0;l=(ya>>>0)/43|0;if(ya>>>0<11008){z=+(l>>>0);y=+g[19516+(l<<2)>>2]}else{y=+(l>>>0);z=y;y=+Xb(y)}E=(y+.5)*z+200.0;u=0;while(1){if((u|0)==256)break;l=c[ta+(u<<2)>>2]|0;z=+(l>>>0);D=+(d[va+u>>0]|0);if(l>>>0<256)y=+g[19516+(l<<2)>>2];else y=+Xb(z);E=E-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(!((ya|0)==0&(C|0)==0)){wa=314;break a}if((s&255)>=57){wa=316;break a}W=cc(t|0,0,u&7|0)|0;Y=C;W=h|W;ya=v;X=ya;a[X>>0]=W;a[X+1>>0]=W>>8;a[X+2>>0]=W>>16;a[X+3>>0]=W>>24;ya=ya+4|0;a[ya>>0]=Y;a[ya+1>>0]=Y>>8;a[ya+2>>0]=Y>>16;a[ya+3>>0]=Y>>24;c[q>>2]=(c[q>>2]|0)+(s&255);w=w+1|0}}do if(F>>>0<6){s=F+40|0;t=a[m+s>>0]|0;u=e[n+(s<<1)>>1]|0;v=c[q>>2]|0;h=r+(v>>>3)|0;w=d[h>>0]|0;ya=bc(u|0,0,t&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=258;break a}if((t&255)>=57){wa=260;break a}X=cc(u|0,0,v&7|0)|0;ya=C;X=w|X;w=h;Y=w;a[Y>>0]=X;a[Y+1>>0]=X>>8;a[Y+2>>0]=X>>16;a[Y+3>>0]=X>>24;w=w+4|0;a[w>>0]=ya;a[w+1>>0]=ya>>8;a[w+2>>0]=ya>>16;a[w+3>>0]=ya>>24;c[q>>2]=(c[q>>2]|0)+(t&255);w=sa+(s<<2)|0;c[w>>2]=(c[w>>2]|0)+1;w=0}else{if(F>>>0<130){w=F+-2|0;A=((aa(w|0)|0)^31)+-1|0;x=w>>>A;B=(A<<1)+x+42|0;s=a[m+B>>0]|0;t=e[n+(B<<1)>>1]|0;u=c[q>>2]|0;v=r+(u>>>3)|0;h=d[v>>0]|0;ya=bc(t|0,0,s&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=264;break a}if((s&255)>=57){wa=266;break a}ya=cc(t|0,0,u&7|0)|0;t=C;ya=h|ya;u=v;a[u>>0]=ya;a[u+1>>0]=ya>>8;a[u+2>>0]=ya>>16;a[u+3>>0]=ya>>24;v=v+4|0;a[v>>0]=t;a[v+1>>0]=t>>8;a[v+2>>0]=t>>16;a[v+3>>0]=t>>24;v=(c[q>>2]|0)+(s&255)|0;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>>2]|0;v=r+(u>>>3)|0;h=d[v>>0]|0;ya=bc(t|0,0,s&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=274;break a}if((s&255)>=57){wa=276;break a}ya=cc(t|0,0,u&7|0)|0;t=C;ya=h|ya;u=v;a[u>>0]=ya;a[u+1>>0]=ya>>8;a[u+2>>0]=ya>>16;a[u+3>>0]=ya>>24;v=v+4|0;a[v>>0]=t;a[v+1>>0]=t>>8;a[v+2>>0]=t>>16;a[v+3>>0]=t>>24;v=(c[q>>2]|0)+(s&255)|0;c[q>>2]=v;s=w-(1<>>3)|0;u=d[t>>0]|0;ya=bc(s|0,0,x|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=278;break a}if(x>>>0>=57){wa=280;break a}X=cc(s|0,0,v&7|0)|0;ya=C;X=u|X;w=t;Y=w;a[Y>>0]=X;a[Y+1>>0]=X>>8;a[Y+2>>0]=X>>16;a[Y+3>>0]=X>>24;w=w+4|0;a[w>>0]=ya;a[w+1>>0]=ya>>8;a[w+2>>0]=ya>>16;a[w+3>>0]=ya>>24;c[q>>2]=(c[q>>2]|0)+x;w=sa+(A<<2)|0;c[w>>2]=(c[w>>2]|0)+1;w=0}while(0);while(1){if(w>>>0>=F>>>0){s=Z;break e}t=d[G+w>>0]|0;s=a[va+t>>0]|0;t=e[ua+(t<<1)>>1]|0;u=c[q>>2]|0;v=r+(u>>>3)|0;h=d[v>>0]|0;ya=bc(t|0,0,s&255|0)|0;if(!((ya|0)==0&(C|0)==0)){wa=291;break a}if((s&255)>=57){wa=293;break a}W=cc(t|0,0,u&7|0)|0;Y=C;W=h|W;ya=v;X=ya;a[X>>0]=W;a[X+1>>0]=W>>8;a[X+2>>0]=W>>16;a[X+3>>0]=W>>24;ya=ya+4|0;a[ya>>0]=Y;a[ya+1>>0]=Y>>8;a[ya+2>>0]=Y>>16;a[ya+3>>0]=Y>>24;c[q>>2]=(c[q>>2]|0)+(s&255);w=w+1|0}}else s=Z}while(0);if(!l){wa=320;break}u=l>>>0<98304?l:98304;B=c[q>>2]|0;vb(u,0,q,r);t=r+((c[q>>2]|0)>>>3)|0;Z=d[t>>0]|0;ya=t;a[ya>>0]=Z;a[ya+1>>0]=Z>>8;a[ya+2>>0]=Z>>16;a[ya+3>>0]=Z>>24;t=t+4|0;a[t>>0]=0;a[t+1>>0]=0;a[t+2>>0]=0;a[t+3>>0]=0;c[q>>2]=(c[q>>2]|0)+13;t=wb(b,s,u,va,ua,q,r)|0;xb(sa,m,n,q,r)}switch(wa|0){case 24:{pa(405740,405401,539,405439);break}case 26:{pa(405474,405401,544,405439);break}case 32:{pa(405779,405401,559,405439);break}case 34:{pa(405800,405401,560,405439);break}case 48:{pa(405815,405401,579,405439);break}case 52:{pa(406196,406218,54,406251);break}case 54:{pa(406267,406218,55,406251);break}case 58:{pa(406196,406218,54,406251);break}case 60:{pa(406267,406218,55,406251);break}case 62:{pa(406196,406218,54,406251);break}case 64:{pa(406267,406218,55,406251);break}case 68:{pa(406196,406218,54,406251);break}case 70:{pa(406267,406218,55,406251);break}case 72:{pa(406196,406218,54,406251);break}case 74:{pa(406267,406218,55,406251);break}case 77:{pa(406196,406218,54,406251);break}case 79:{pa(406267,406218,55,406251);break}case 81:{pa(406196,406218,54,406251);break}case 87:{pa(406196,406218,54,406251);break}case 89:{pa(406267,406218,55,406251);break}case 91:{pa(406196,406218,54,406251);break}case 94:{pa(406196,406218,54,406251);break}case 96:{pa(406267,406218,55,406251);break}case 98:{pa(406196,406218,54,406251);break}case 102:{pa(406196,406218,54,406251);break}case 104:{pa(406267,406218,55,406251);break}case 108:{pa(406196,406218,54,406251);break}case 110:{pa(406267,406218,55,406251);break}case 113:{pa(406196,406218,54,406251);break}case 115:{pa(406267,406218,55,406251);break}case 117:{pa(406196,406218,54,406251);break}case 119:{pa(406267,406218,55,406251);break}case 123:{pa(406196,406218,54,406251);break}case 125:{pa(406267,406218,55,406251);break}case 129:{pa(406196,406218,54,406251);break}case 131:{pa(406267,406218,55,406251);break}case 133:{pa(406196,406218,54,406251);break}case 135:{pa(406267,406218,55,406251);break}case 139:{pa(406196,406218,54,406251);break}case 141:{pa(406267,406218,55,406251);break}case 143:{pa(406196,406218,54,406251);break}case 145:{pa(406267,406218,55,406251);break}case 149:{pa(406196,406218,54,406251);break}case 151:{pa(406267,406218,55,406251);break}case 153:{pa(406196,406218,54,406251);break}case 155:{pa(406267,406218,55,406251);break}case 157:{pa(406196,406218,54,406251);break}case 159:{pa(406267,406218,55,406251);break}case 162:{pa(406196,406218,54,406251);break}case 164:{pa(406267,406218,55,406251);break}case 166:{pa(406196,406218,54,406251);break}case 168:{pa(406196,406218,54,406251);break}case 170:{pa(406267,406218,55,406251);break}case 187:{pa(405815,405401,638,405439);break}case 190:{pa(406196,406218,54,406251);break}case 192:{pa(406267,406218,55,406251);break}case 196:{pa(406196,406218,54,406251);break}case 198:{pa(406267,406218,55,406251);break}case 200:{pa(406196,406218,54,406251);break}case 202:{pa(406267,406218,55,406251);break}case 206:{pa(406196,406218,54,406251);break}case 208:{pa(406267,406218,55,406251);break}case 210:{pa(406196,406218,54,406251);break}case 212:{pa(406267,406218,55,406251);break}case 215:{pa(406196,406218,54,406251);break}case 217:{pa(406267,406218,55,406251);break}case 219:{pa(406196,406218,54,406251);break}case 222:{pa(406196,406218,54,406251);break}case 224:{pa(406267,406218,55,406251);break}case 226:{pa(406196,406218,54,406251);break}case 228:{pa(406267,406218,55,406251);break}case 233:{pa(405853,405401,671,405439);break}case 250:{pa(405503,405401,681,405439);break}case 258:{pa(406196,406218,54,406251);break}case 260:{pa(406267,406218,55,406251);break}case 264:{pa(406196,406218,54,406251);break}case 266:{pa(406267,406218,55,406251);break}case 268:{pa(406196,406218,54,406251);break}case 270:{pa(406267,406218,55,406251);break}case 274:{pa(406196,406218,54,406251);break}case 276:{pa(406267,406218,55,406251);break}case 278:{pa(406196,406218,54,406251);break}case 280:{pa(406267,406218,55,406251);break}case 283:{pa(406196,406218,54,406251);break}case 285:{pa(406267,406218,55,406251);break}case 287:{pa(406196,406218,54,406251);break}case 291:{pa(406196,406218,54,406251);break}case 293:{pa(406267,406218,55,406251);break}case 299:{pa(406196,406218,54,406251);break}case 301:{pa(406267,406218,55,406251);break}case 303:{pa(406196,406218,54,406251);break}case 306:{pa(406196,406218,54,406251);break}case 308:{pa(406267,406218,55,406251);break}case 310:{pa(406196,406218,54,406251);break}case 314:{pa(406196,406218,54,406251);break}case 316:{pa(406267,406218,55,406251);break}case 320:if(j){b=c[q>>2]|0;wa=r+(b>>>3)|0;k=d[wa>>0]|0;b=cc(1,0,b&7|0)|0;ya=C;b=k|b;k=wa;a[k>>0]=b;a[k+1>>0]=b>>8;a[k+2>>0]=b>>16;a[k+3>>0]=b>>24;wa=wa+4|0;a[wa>>0]=ya;a[wa+1>>0]=ya>>8;a[wa+2>>0]=ya>>16;a[wa+3>>0]=ya>>24;wa=(c[q>>2]|0)+1|0;c[q>>2]=wa;ya=r+(wa>>>3)|0;k=d[ya>>0]|0;r=cc(1,0,wa&7|0)|0;wa=C;r=k|r;k=ya;a[k>>0]=r;a[k+1>>0]=r>>8;a[k+2>>0]=r>>16;a[k+3>>0]=r>>24;ya=ya+4|0;a[ya>>0]=wa;a[ya+1>>0]=wa>>8;a[ya+2>>0]=wa>>16;a[ya+3>>0]=wa>>24;c[q>>2]=(c[q>>2]|0)+8&-8;i=xa;return}else{a[p>>0]=0;c[o>>2]=0;xb(sa,m,n,o,p);i=xa;return}}}function vb(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;h=g+((c[f>>2]|0)>>>3)|0;j=d[h>>0]|0;i=h;a[i>>0]=j;a[i+1>>0]=j>>8;a[i+2>>0]=j>>16;a[i+3>>0]=j>>24;h=h+4|0;a[h>>0]=0;a[h+1>>0]=0;a[h+2>>0]=0;a[h+3>>0]=0;h=(c[f>>2]|0)+1|0;c[f>>2]=h;i=g+(h>>>3)|0;j=d[i>>0]|0;if(b>>>0<65537){k=i;h=k;a[h>>0]=j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>2]|0)+20|0;c[f>>2]=k;e=e&1;b=k>>>3;g=g+b|0;b=a[g>>0]|0;b=b&255;k=k&7;k=cc(e|0,0,k|0)|0;e=C;k=b|k;b=g;a[b>>0]=k;a[b+1>>0]=k>>8;a[b+2>>0]=k>>16;a[b+3>>0]=k>>24;g=g+4|0;a[g>>0]=e;a[g+1>>0]=e>>8;a[g+2>>0]=e>>16;a[g+3>>0]=e>>24;g=c[f>>2]|0;g=g+1|0;c[f>>2]=g;return}}function wb(a,b,e,f,g,h,j){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;n=i;i=i+1024|0;m=n;ac(m|0,0,1024)|0;a:do if(e>>>0<32768){k=0;while(1){if((k|0)==(e|0)){k=0;break}l=m+((d[b+k>>0]|0)<<2)|0;c[l>>2]=(c[l>>2]|0)+1;k=k+1|0}while(1){if((k|0)==256){l=e;break a}b=m+(k<<2)|0;o=c[b>>2]|0;l=(o>>>0<11?o:11)<<1;c[b>>2]=o+l;e=e+l|0;k=k+1|0}}else{k=0;while(1){if(k>>>0>=e>>>0)break;o=m+((d[b+k>>0]|0)<<2)|0;c[o>>2]=(c[o>>2]|0)+1;k=k+29|0}e=((e+28|0)>>>0)/29|0;k=0;while(1){if((k|0)==256){l=e;break a}l=m+(k<<2)|0;b=c[l>>2]|0;o=(b>>>0<11?b:11)<<1|1;c[l>>2]=b+o;e=e+o|0;k=k+1|0}}while(0);$a(a,m,l,8,f,g,h,j);e=0;b=0;while(1){if((b|0)==256)break;k=c[m+(b<<2)>>2]|0;if(k)e=e+(_(k,d[f+b>>0]|0)|0)|0;b=b+1|0}i=n;return ((e*125|0)>>>0)/(l>>>0)|0|0}function xb(e,f,g,h,j){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=i;i=i+1872|0;r=s+704|0;q=s;o=s+1736|0;ac(q|0,0,704)|0;Hb(e,64,15,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<24;t=d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24;L=-1;x=Ga;while(1){s=lc(s|0,t|0,-1480785920,7733)|0;s=bc(s|0,C|0,Ha|0)|0;J=o;if(J>>>0>=A>>>0){Ua=15;break a}F=0-L|0;K=A;D=32;while(1){G=K;t=D;D=D+1|0;M=K;I=M;M=M+4|0;M=lc(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24|0,d[M>>0]|d[M+1>>0]<<8|d[M+2>>0]<<16|d[M+3>>0]<<24|0,-1480785920,7733)|0;M=bc(M|0,C|0,Ha|0)|0;if((s|0)!=(M|0)){Ua=17;break a}A=K+(t>>>5)|0;if(A>>>0>N>>>0)break b;B=A;t=B;B=B+4|0;B=lc(d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0,d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24|0,-1480785920,7733)|0;B=bc(B|0,C|0,Ha|0)|0;t=K+F|0;if(((d[K>>0]|d[K+1>>0]<<8|d[K+2>>0]<<16|d[K+3>>0]<<24|0)==(d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)?(a[K+4>>0]|0)==(a[K+(4-L)>>0]|0):0)?((F|0)<0?(a[K+5>>0]|0)==(a[K+(5-L)>>0]|0):0):0){Ua=22;break}s=n+(s<<2)|0;y=c[s>>2]|0;t=h+y|0;if((y|0)<0){Ua=24;break a}if(t>>>0>=K>>>0){Ua=26;break a}c[s>>2]=G-T;if((d[K>>0]|d[K+1>>0]<<8|d[K+2>>0]<<16|d[K+3>>0]<<24|0)!=(d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)){s=B;K=A;continue}if((a[K+4>>0]|0)!=(a[h+(y+4)>>0]|0)){s=B;K=A;continue}if((a[K+5>>0]|0)==(a[h+(y+5)>>0]|0))break;else{s=B;K=A}}if((Ua|0)==22){Ua=0;c[n+(s<<2)>>2]=G-T}A=t;M=O+(P+-4)|0;s=0;y=K+6|0;while(1){if(y>>>0>M>>>0){I=s;s=y;break}I=t+(s+6)|0;if((d[y>>0]|d[y+1>>0]<<8|d[y+2>>0]<<16|d[y+3>>0]<<24|0)!=(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24|0)){I=s;s=y;break}s=s+4|0;y=y+4|0}while(1){if(s>>>0>=Q>>>0)break;if((a[t+(I+6)>>0]|0)!=(a[s>>0]|0))break;I=I+1|0;s=s+1|0}H=I+6|0;y=G-A|0;F=G-o|0;G=K+H|0;o=G;c:do if(H){B=H;D=K;while(1){s=a[D>>0]|0;A=a[t>>0]|0;if(s<<24>>24!=A<<24>>24)break;B=B+-1|0;if(!B)break c;else{D=D+1|0;t=t+1|0}}if(s<<24>>24!=A<<24>>24){Ua=41;break a}}while(0);do if(F>>>0>=6){if(F>>>0<130){A=F+-2|0;D=((aa(A|0)|0)^31)+-1|0;B=A>>>D;c[c[Pa>>2]>>2]=(D<<1)+B+2|A-(B<>>0<2114){B=F+-66|0;D=(aa(B|0)|0)^31;c[c[Pa>>2]>>2]=D+10|B-(1<>>0<6210){c[c[Pa>>2]>>2]=(F<<8)+-541184|21;break}s=F<<8;if(F>>>0<22594){c[c[Pa>>2]>>2]=s+-1589760|22;break}else{c[c[Pa>>2]>>2]=s+-5784064|23;break}}else c[c[Pa>>2]>>2]=F;while(0);c[Pa>>2]=(c[Pa>>2]|0)+4;dc(x|0,J|0,F|0)|0;x=x+F|0;if((y|0)==(L|0)){c[c[Pa>>2]>>2]=64;s=c[Pa>>2]|0;y=L}else{J=y+3|0;s=((aa(J|0)|0)^31)+-1|0;L=J>>>s&1;c[c[Pa>>2]>>2]=((s<<1)+-2|L)+80|J-((L|2)<>2]|0}s=s+4|0;c[Pa>>2]=s;do if(H>>>0>=12){if(H>>>0<72){H=I+-2|0;L=((aa(H|0)|0)^31)+-1|0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I|0,C|0,Ha|0)|0;c[n+(I<<2)>>2]=J+-2;t=bc(K|0,t|0,8)|0;t=lc(t|0,C|0,-1480785920,7733)|0;t=bc(t|0,C|0,Ha|0)|0;c[n+(t<<2)>>2]=J+-1;L=n+(L<<2)|0;t=c[L>>2]|0;c[L>>2]=J;while(1){B=h+t|0;L=o;s=o;if((d[L>>0]|d[L+1>>0]<<8|d[L+2>>0]<<16|d[L+3>>0]<<24|0)!=(d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24|0))break;if((a[s+4>>0]|0)!=(a[h+(t+4)>>0]|0))break;if((a[s+5>>0]|0)!=(a[h+(t+5)>>0]|0))break;A=t+6|0;t=0;y=s+6|0;while(1){if(y>>>0>M>>>0)break;L=h+(A+t)|0;if((d[y>>0]|d[y+1>>0]<<8|d[y+2>>0]<<16|d[y+3>>0]<<24|0)!=(d[L>>0]|d[L+1>>0]<<8|d[L+2>>0]<<16|d[L+3>>0]<<24|0))break;t=t+4|0;y=y+4|0}while(1){if(y>>>0>=Q>>>0)break;if((a[h+(A+t)>>0]|0)!=(a[y>>0]|0))break;t=t+1|0;y=y+1|0}G=t+6|0;H=s+G|0;I=H;y=o-B|0;do if(G){D=G;F=s;while(1){o=a[F>>0]|0;A=a[B>>0]|0;if(o<<24>>24!=A<<24>>24){Ua=80;break}D=D+-1|0;if(!D)break;else{F=F+1|0;B=B+1|0}}if((Ua|0)==80?(Ua=0,o<<24>>24!=A<<24>>24):0){Ua=81;break a}if(G>>>0<10){Ua=83;break}if(G>>>0<134){L=((aa(t|0)|0)^31)+-1|0;K=t>>>L;c[c[Pa>>2]>>2]=(L<<1)+K+44|t-(K<>>0<2118){K=t+-64|0;L=(aa(K|0)|0)^31;c[c[Pa>>2]>>2]=L+52|K-(1<>2]>>2]=(G<<8)+-542208|63;break}}else Ua=83;while(0);if((Ua|0)==83){Ua=0;c[c[Pa>>2]>>2]=t+44}L=(c[Pa>>2]|0)+4|0;c[Pa>>2]=L;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(t>>>0>>0){o=Q-o|0;do if(o>>>0>=6){if(o>>>0<130){L=o+-2|0;N=((aa(L|0)|0)^31)+-1|0;M=L>>>N;c[c[Pa>>2]>>2]=(N<<1)+M+2|L-(M<>>0<2114){M=o+-66|0;N=(aa(M|0)|0)^31;c[c[Pa>>2]>>2]=N+10|M-(1<>>0<6210){c[c[Pa>>2]>>2]=(o<<8)+-541184|21;break}s=o<<8;if(o>>>0<22594){c[c[Pa>>2]>>2]=s+-1589760|22;break}else{c[c[Pa>>2]>>2]=s+-5784064|23;break}}else c[c[Pa>>2]>>2]=o;while(0);c[Pa>>2]=(c[Pa>>2]|0)+4;dc(x|0,t|0,o|0)|0;x=x+o|0}A=x-U|0;r=+(P>>>0);if(!(+(A>>>0)>>0>=P>>>0){o=R;r=0.0;y=0;break}N=Sa+(d[O+o>>0]<<2)|0;c[N>>2]=(c[N>>2]|0)+1;o=o+43|0}while(1){if(o>>>0>=Da>>>0)break;s=c[o>>2]|0;u=+(s>>>0);if(s>>>0<256)z=+g[19516+(s<<2)>>2];else z=+Xb(u);t=c[o+4>>2]|0;v=+(t>>>0);if(t>>>0<256)w=+g[19516+(t<<2)>>2];else w=+Xb(v);o=o+8|0;r=r-u*z-v*w;y=y+s+t|0}z=E/43.0;v=+(y>>>0);if(!y)w=v;else{if(y>>>0<256)u=+g[19516+(y<<2)>>2];else u=+Xb(v);w=v;r=r+v*u}if(!((r>2]|0)+7|0;c[p>>2]=N&-8;dc(q+(N>>>3)|0,O|0,P|0)|0;O=(c[p>>2]|0)+(P<<3)|0;c[p>>2]=O;a[q+(O>>>3)>>0]=0}else Ua=126}else Ua=126;if((Ua|0)==126){Ua=0;G=(c[Pa>>2]|0)-V>>2;zb(P,0,p,q);s=q+((c[p>>2]|0)>>>3)|0;O=d[s>>0]|0;t=s;a[t>>0]=O;a[t+1>>0]=O>>8;a[t+2>>0]=O>>16;a[t+3>>0]=O>>24;s=s+4|0;a[s>>0]=0;a[s+1>>0]=0;a[s+2>>0]=0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Ra+x>>0]|0;x=e[Qa+(x<<1)>>1]|0;y=q+(s>>>3)|0;A=d[y>>0]|0;O=bc(x|0,0,t&255|0)|0;if(!((O|0)==0&(C|0)==0)){Ua=147;break a}if((t&255)>=57){Ua=149;break a}L=cc(x|0,0,s&7|0)|0;N=C;L=A|L;O=y;M=O;a[M>>0]=L;a[M+1>>0]=L>>8;a[M+2>>0]=L>>16;a[M+3>>0]=L>>24;O=O+4|0;a[O>>0]=N;a[O+1>>0]=N>>8;a[O+2>>0]=N>>16;a[O+3>>0]=N>>24;O=(c[p>>2]|0)+(t&255)|0;c[p>>2]=O;o=o+1|0;s=O;B=B+1|0}}while(0);F=F+1|0}}j=j-P|0;O=Q}switch(Ua|0){case 4:{pa(405532,405543,251,405590);break}case 6:{pa(405605,405543,252,405590);break}case 8:{pa(405630,405543,254,405590);break}case 10:{pa(405667,405543,256,405590);break}case 15:{pa(405740,405543,289,405590);break}case 17:{pa(405755,405543,295,405590);break}case 24:{pa(405779,405543,309,405590);break}case 26:{pa(405800,405543,310,405590);break}case 41:{pa(405815,405543,329,405590);break}case 81:{pa(405815,405543,378,405590);break}case 93:{pa(405853,405543,415,405590);break}case 138:{pa(406196,406218,54,406251);break}case 140:{pa(406267,406218,55,406251);break}case 142:{pa(406196,406218,54,406251);break}case 147:{pa(406196,406218,54,406251);break}case 149:{pa(406267,406218,55,406251);break}case 155:{if(!k){i=Va;return}f=c[p>>2]|0;Ta=q+(f>>>3)|0;n=d[Ta>>0]|0;f=cc(1,0,f&7|0)|0;Ua=C;f=n|f;n=Ta;a[n>>0]=f;a[n+1>>0]=f>>8;a[n+2>>0]=f>>16;a[n+3>>0]=f>>24;Ta=Ta+4|0;a[Ta>>0]=Ua;a[Ta+1>>0]=Ua>>8;a[Ta+2>>0]=Ua>>16;a[Ta+3>>0]=Ua>>24;Ta=(c[p>>2]|0)+1|0;c[p>>2]=Ta;Ua=q+(Ta>>>3)|0;n=d[Ua>>0]|0;q=cc(1,0,Ta&7|0)|0;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,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0;fb=i;i=i+16|0;db=fb+8|0;eb=fb+4|0;$a=fb;if(!(Bb(e)|0)){k=0;i=fb;return k|0}bb=e+5232|0;if((c[bb>>2]|0)!=0?(c[f>>2]|0)!=0:0){k=0;i=fb;return k|0}cb=e+4|0;l=c[cb>>2]|0;if(l>>>0<2){M=1<>2];o=c[f>>2]|0;o=o>>>0>>0?o:M;o=o>>>0>131072?131072:o;N=e+16|0;a:do switch(l|0){case 0:{p=0;n=0;L=0;K=0;ab=20;break}case 1:{n=e+5208|0;ab=c[n>>2]|0;l=ab;b:do if(!ab){do if((o|0)==131072){l=e+24|0;m=sa[c[N>>2]&1](c[l>>2]|0,524288)|0;if(!m)oa(1);c[n>>2]=m;l=sa[c[N>>2]&1](c[l>>2]|0,131072)|0;if(l){c[e+5212>>2]=l;l=c[n>>2]|0;if(!l)break;else{p=l;break b}}else oa(1)}while(0);l=e+24|0;m=sa[c[N>>2]&1](c[l>>2]|0,o<<2)|0;if(!m)oa(1);l=sa[c[N>>2]&1](c[l>>2]|0,o)|0;if(!l)oa(1);else{p=m;n=l;L=m;K=l;ab=20;break a}}else p=l;while(0);n=c[e+5212>>2]|0;L=0;K=0;ab=20;break}default:O=0}while(0);do if((ab|0)==20){v=e+193|0;w=e+5220|0;x=e+196|0;y=e+200|0;z=e+20|0;A=e+24|0;B=e+192|0;D=e+4308|0;E=e+4436|0;F=e+5204|0;G=e+4692|0;H=e+5216|0;I=e+5224|0;J=(k|0)==0;c:while(1){l=c[bb>>2]|0;while(1){if((l|0)==1?(a[v>>0]|0)!=0:0){ab=24;break}m=c[w>>2]|0;if(m)break;if(l){ab=49;break c}u=c[f>>2]|0;s=M>>>0>>0?M:u;u=(u|0)==(s|0)?1:0;l=(s<<1)+502|0;c[db>>2]=d[v>>0];if(l>>>0>(c[h>>2]|0)>>>0){m=c[y>>2]|0;if((c[x>>2]|0)>>>0>>0){ra[c[z>>2]&1](c[A>>2]|0,m);c[y>>2]=0;m=sa[c[N>>2]&1](c[A>>2]|0,l)|0;if(!m){ab=34;break c}c[y>>2]=m;c[x>>2]=l;t=0}else t=0}else{t=1;m=c[j>>2]|0}a[m>>0]=a[B>>0]|0;l=Cb(e,c[cb>>2]|0,s,eb)|0;o=c[g>>2]|0;q=u<<24>>24!=0;r=c[eb>>2]|0;if(!(c[cb>>2]|0))ub(N,o,s,q,l,r,D,E,F,G,db,m);else yb(N,o,s,q,p,n,l,r,db,m);c[g>>2]=(c[g>>2]|0)+s;c[f>>2]=(c[f>>2]|0)-s;o=c[db>>2]|0;q=o>>>3;if(t<<24>>24){l=c[h>>2]|0;if(q>>>0>l>>>0){ab=41;break c}if(!((o&7|0)==0|q>>>0>>0)){ab=43;break c}c[j>>2]=(c[j>>2]|0)+q;c[h>>2]=(c[h>>2]|0)-q;l=(c[I>>2]|0)+q|0;c[I>>2]=l;if(!J)c[k>>2]=l}else{c[H>>2]=m;c[w>>2]=q}a[B>>0]=a[m+((c[db>>2]|0)>>>3)>>0]|0;a[v>>0]=c[db>>2]&7;if(!(u<<24>>24))continue c;c[bb>>2]=2;l=2}if((ab|0)==24){ab=0;Eb(e);continue}l=c[h>>2]|0;if(!l){ab=49;break}l=m>>>0>>0?m:l;dc(c[j>>2]|0,c[H>>2]|0,l|0)|0;c[j>>2]=(c[j>>2]|0)+l;c[h>>2]=(c[h>>2]|0)-l;c[H>>2]=(c[H>>2]|0)+l;c[w>>2]=(c[w>>2]|0)-l;l=(c[I>>2]|0)+l|0;c[I>>2]=l;if(J)continue;c[k>>2]=l}if((ab|0)==34)oa(1);else if((ab|0)==41)pa(406280,406053,1436,406308);else if((ab|0)==43)pa(406340,406053,1437,406308);else if((ab|0)==49){ra[c[z>>2]&1](c[A>>2]|0,L);ra[c[z>>2]&1](c[A>>2]|0,K);if((c[bb>>2]|0)!=1){O=1;break}if(c[w>>2]|0){O=1;break}c[bb>>2]=0;c[H>>2]=0;O=1;break}}while(0);k=O;i=fb;return k|0}Xa=e+80|0;Ya=e+152|0;x=e+12|0;y=e+193|0;z=e+5220|0;A=e+5216|0;B=e+16|0;D=e+116|0;E=e+92|0;F=e+5236|0;G=e+5208|0;H=e+24|0;I=e+5212|0;J=e+196|0;K=e+200|0;L=e+20|0;M=e+24|0;N=e+192|0;O=e+4308|0;P=e+4436|0;Q=e+5204|0;R=e+4692|0;S=e+128|0;T=e+120|0;U=e+124|0;V=e+20|0;W=e+160|0;X=e+136|0;Y=e+132|0;Z=e+4|0;_=e+72|0;$=e+8|0;ba=e+144|0;ca=e+28|0;da=e+32|0;ea=e+36|0;fa=e+40|0;ga=e+44|0;ha=e+48|0;ia=e+52|0;ja=e+56|0;ka=e+60|0;la=e+64|0;ma=e+68|0;na=e+8|0;qa=e+194|0;ta=e+195|0;ua=e+176|0;va=e+176|0;wa=e+160|0;xa=e+8|0;ya=e+5224|0;za=(k|0)==0;Aa=e+108|0;Ba=e+96|0;Ca=e+112|0;Da=e+104|0;Ea=e+116|0;Fa=e+116|0;Ga=e+92|0;Ua=e+104|0;Va=e+100|0;Wa=e+88|0;d:while(1){m=Xa;l=Ya;l=$b(c[m>>2]|0,c[m+4>>2]|0,c[l>>2]|0,c[l+4>>2]|0)|0;m=C;if(Bb(e)|0)n=1<>2];else n=0;if((m>>>0<0|(m|0)==0&l>>>0>>0?(Za=n-l|0,(Za|0)!=0):0)?(_a=c[f>>2]|0,(_a|0)!=0):0){p=Za>>>0<_a>>>0?Za:_a;o=c[g>>2]|0;if(Bb(e)|0){l=c[Aa>>2]|0;if((l|0)==0?p>>>0<(c[Ba>>2]|0)>>>0:0){c[Aa>>2]=p;l=sa[c[B>>2]&1](c[H>>2]|0,p+9|0)|0;if(!l){ab=62;break}m=c[Ca>>2]|0;if(m){dc(l|0,m|0,(c[Da>>2]|0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>0]|0;l=(c[Aa>>2]|0)+p|0;c[Aa>>2]=l;if(l>>>0>1073741824)c[Aa>>2]=l&1073741823|1073741824}ab=Xa;ab=ec(c[ab>>2]|0,c[ab+4>>2]|0,p|0,0)|0;l=Xa;c[l>>2]=ab;c[l+4>>2]=C;l=c[Aa>>2]|0;if(l>>>0<=(c[Ga>>2]|0)>>>0){ab=(c[Fa>>2]|0)+l|0;a[ab>>0]=0;a[ab+1>>0]=0;a[ab+2>>0]=0;a[ab+3>>0]=0;a[ab+4>>0]=0;a[ab+5>>0]=0;a[ab+6>>0]=0}}c[g>>2]=(c[g>>2]|0)+p;c[f>>2]=(c[f>>2]|0)-p;continue}l=c[bb>>2]|0;n=(l|0)==1;if(n?(a[y>>0]|0)!=0:0){Eb(e);continue}m=c[z>>2]|0;o=(m|0)==0;if(!o){l=c[h>>2]|0;if(!l){ab=234;break}l=m>>>0>>0?m:l;dc(c[j>>2]|0,c[A>>2]|0,l|0)|0;c[j>>2]=(c[j>>2]|0)+l;c[h>>2]=(c[h>>2]|0)-l;c[A>>2]=(c[A>>2]|0)+l;c[z>>2]=(c[z>>2]|0)-l;l=(c[ya>>2]|0)+l|0;c[ya>>2]=l;if(za)continue;c[k>>2]=l;continue}if(l){ab=234;break}w=(c[f>>2]|0)==0?1:0;o=Xa;n=c[o>>2]|0;o=c[o+4>>2]|0;q=Ya;p=c[q>>2]|0;q=c[q+4>>2]|0;s=$b(n|0,o|0,p|0,q|0)|0;l=C;if(q>>>0>0|(q|0)==0&p>>>0>3221225471){r=bc(p|0,q|0,30)|0;r=p&1073741823|((r&1^1)<<30)+1073741824}else r=p;if(!(Bb(e)|0)){ab=231;break}u=c[D>>2]|0;v=c[E>>2]|0;if(a[F>>0]&1){ab=231;break}t=w<<24>>24==0;if(!t)a[F>>0]=1;if(Bb(e)|0)m=1<>2];else m=0;if(l>>>0>0|(l|0)==0&s>>>0>m>>>0){ab=231;break}l=c[cb>>2]|0;if((l|0)==1)if(!(c[G>>2]|0)){l=sa[c[B>>2]&1](c[H>>2]|0,524288)|0;if(!l){ab=108;break}c[G>>2]=l;l=sa[c[B>>2]&1](c[H>>2]|0,131072)|0;if(!l){ab=110;break}c[I>>2]=l;l=c[cb>>2]|0;ab=112}else ab=114;else ab=112;e:do if((ab|0)==112){ab=0;if((l|0)!=0?(l|0)!=1:0){m=c[S>>2]|0;l=m+(s>>>1)+1|0;if(l>>>0>(c[T>>2]|0)>>>0){l=l+((s>>>2)+16)|0;c[T>>2]=l;l=sa[c[B>>2]&1](c[H>>2]|0,l<<4)|0;if(!l){ab=127;break d}m=c[U>>2]|0;if(m){dc(l|0,m|0,c[S>>2]<<4|0)|0;ra[c[V>>2]&1](c[H>>2]|0,c[U>>2]|0);c[U>>2]=0}c[U>>2]=l;m=c[S>>2]|0}else l=c[U>>2]|0;m=l+(m<<4)|0;l=c[Z>>2]|0;f:do switch(l|0){case 10:{Ha(B,s,r,w<<24>>24!=0,u,v,e,c[_>>2]|0,W,X,m,S,Y);break}case 11:{Ia(B,s,r,w<<24>>24!=0,u,v,e,c[_>>2]|0,W,X,m,S,Y);break}default:{if((l|0)>9)break f;do if((l|0)<5)ab=139;else{if((c[xa>>2]|0)>=17){ab=139;break}if((l|0)<7)break;l=(l|0)<9?41:42;ab=139}while(0);g:do if((ab|0)==139){ab=0;do switch(l|0){case 40:break g;case 2:{Ja(B,s,r,w<<24>>24!=0,u,v,e,c[ca>>2]|0,W,X,m,S,Y);break f}case 3:{Ka(B,s,r,w<<24>>24!=0,u,v,e,c[da>>2]|0,W,X,m,S,Y);break f}case 4:{La(B,s,r,w<<24>>24!=0,u,v,e,c[ea>>2]|0,W,X,m,S,Y);break f}case 5:{Ma(B,s,r,w<<24>>24!=0,u,v,e,c[fa>>2]|0,W,X,m,S,Y);break f}case 6:{Na(B,s,r,w<<24>>24!=0,u,v,e,c[ga>>2]|0,W,X,m,S,Y);break f}case 7:{Oa(B,s,r,w<<24>>24!=0,u,v,e,c[ha>>2]|0,W,X,m,S,Y);break f}case 8:{Pa(B,s,r,w<<24>>24!=0,u,v,e,c[ia>>2]|0,W,X,m,S,Y);break f}case 9:{Qa(B,s,r,w<<24>>24!=0,u,v,e,c[ja>>2]|0,W,X,m,S,Y);break f}case 41:{Sa(B,s,r,w<<24>>24!=0,u,v,e,c[la>>2]|0,W,X,m,S,Y);break f}case 42:{Ta(B,s,r,w<<24>>24!=0,u,v,e,c[ma>>2]|0,W,X,m,S,Y);break f}default:break f}while(0)}while(0);Ra(B,s,r,w<<24>>24!=0,u,v,e,c[ka>>2]|0,W,X,m,S,Y)}}while(0);n=c[$>>2]|0;m=c[x>>2]|0;m=((n|0)>(m|0)?n:m)+1|0;m=1<<((m|0)<24?m:24);n=m>>>3;s=Xa;o=ba;o=$b(c[s>>2]|0,c[s+4>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0;if(Bb(e)|0)q=1<>2];else q=0;l=c[cb>>2]|0;if((l|0)<4)p=((c[Y>>2]|0)+(c[S>>2]|0)|0)>>>0>12286;else p=0;do if(!(t^1|p|(o+q|0)>>>0>m>>>0)){if((c[Y>>2]|0)>>>0>=n>>>0)break;if((c[S>>2]|0)>>>0>=n>>>0)break;n=Ya;m=c[n>>2]|0;n=c[n+4>>2]|0;if(n>>>0>0|(n|0)==0&m>>>0>3221225471){v=bc(m|0,n|0,30)|0;m=m&1073741823|((v&1^1)<<30)+1073741824}o=Xa;n=c[o>>2]|0;o=c[o+4>>2]|0;if(o>>>0>0|(o|0)==0&n>>>0>3221225471){p=bc(n|0,o|0,30)|0;p=n&1073741823|((p&1^1)<<30)+1073741824}else p=n;v=Ya;c[v>>2]=n;c[v+4>>2]=o;h:do if(p>>>0>>0){i:do if((l|0)<=9){do if((l|0)<5)ab=168;else{if((c[na>>2]|0)>=17){ab=168;break}if((l|0)<7)break;l=(l|0)<9?41:42;ab=168}while(0);j:do if((ab|0)==168){ab=0;do switch(l|0){case 10:break i;case 40:break j;case 2:{v=c[ca>>2]|0;a[v+262148>>0]=1;c[v+262152>>2]=0;c[v+262156>>2]=0;break h}case 3:{v=c[da>>2]|0;a[v+262152>>0]=1;c[v+262156>>2]=0;c[v+262160>>2]=0;break h}case 4:{v=c[ea>>2]|0;a[v+524304>>0]=1;c[v+524308>>2]=0;c[v+524312>>2]=0;break h}case 5:{v=c[fa>>2]|0;a[v+1081344>>0]=1;c[v+1081348>>2]=0;c[v+1081352>>2]=0;break h}case 6:{v=c[ga>>2]|0;a[v+2129920>>0]=1;c[v+2129924>>2]=0;c[v+2129928>>2]=0;break h}case 7:{v=c[ha>>2]|0;a[v+8454144>>0]=1;c[v+8454148>>2]=0;c[v+8454152>>2]=0;break h}case 8:{v=c[ia>>2]|0;a[v+16842752>>0]=1;c[v+16842756>>2]=0;c[v+16842760>>2]=0;break h}case 9:{v=c[ja>>2]|0;a[v+33619968>>0]=1;c[v+33619972>>2]=0;c[v+33619976>>2]=0;break h}case 41:{v=c[la>>2]|0;a[v+524290>>0]=1;c[v+524292>>2]=0;c[v+524296>>2]=0;break h}case 42:{v=c[ma>>2]|0;a[v+1311744>>0]=1;c[v+1311748>>2]=0;c[v+1311752>>2]=0;break h}default:break h}while(0)}while(0);v=c[ka>>2]|0;a[v+524290>>0]=1;c[v+524292>>2]=0;c[v+524296>>2]=0;break h}while(0);a[(c[_>>2]|0)+524304>>0]=1}while(0);c[z>>2]=0;break e}while(0);l=c[X>>2]|0;if(l){m=c[S>>2]|0;c[S>>2]=m+1;s=c[U>>2]|0;c[s+(m<<4)>>2]=l;c[s+(m<<4)+4>>2]=67108864;c[s+(m<<4)+8>>2]=0;b[s+(m<<4)+14>>1]=16;m=s+(m<<4)+12|0;do if(l>>>0>=6){if(l>>>0<130){s=l+-2|0;l=((aa(s|0)|0)^31)+-1|0;l=(l<<1)+(s>>>l)+2|0;break}if(l>>>0<2114){l=((aa(l+-66|0)|0)^31)+10|0;break}if(l>>>0<6210){l=21;break}l=l>>>0<22594?22:23}while(0);s=l&65535;b[m>>1]=b[88156+((s>>>3)*3<<1)>>1]|(s<<3&56|2)&65535;c[Y>>2]=(c[Y>>2]|0)+(c[X>>2]|0);c[X>>2]=0}m=Xa;l=c[m>>2]|0;m=c[m+4>>2]|0;o=ba;n=c[o>>2]|0;o=c[o+4>>2]|0;if(t&((l|0)==(n|0)&(m|0)==(o|0))){c[z>>2]=0;break}if(m>>>0>>0|(m|0)==(o|0)&l>>>0>>0){ab=194;break d}if(!(m>>>0>o>>>0|(m|0)==(o|0)&l>>>0>n>>>0|t^1)){ab=196;break d}n=$b(l|0,m|0,n|0,o|0)|0;t=C;if(!(t>>>0<0|(t|0)==0&n>>>0<16777217)){ab=198;break d}l=(n<<1)+502|0;if((c[J>>2]|0)>>>0>>0){ra[c[L>>2]&1](c[M>>2]|0,c[K>>2]|0);c[K>>2]=0;t=sa[c[B>>2]&1](c[M>>2]|0,l)|0;m=t;if(!t){ab=202;break d}c[K>>2]=m;c[J>>2]=l}else m=c[K>>2]|0;c[$a>>2]=d[y>>0];p=m;a[p>>0]=a[N>>0]|0;q=u;o=ba;Db(B,q,v,c[o>>2]|0,c[o+4>>2]|0,n,w<<24>>24!=0,e,a[qa>>0]|0,a[ta>>0]|0,c[Y>>2]|0,c[S>>2]|0,c[U>>2]|0,ua,W,$a,p);a[N>>0]=a[p+((c[$a>>2]|0)>>>3)>>0]|0;a[y>>0]=c[$a>>2]&7;p=Xa;o=c[p>>2]|0;p=c[p+4>>2]|0;n=ba;c[n>>2]=o;c[n+4>>2]=p;n=Ya;l=c[n>>2]|0;n=c[n+4>>2]|0;if(n>>>0>0|(n|0)==0&l>>>0>3221225471){u=bc(l|0,n|0,30)|0;l=l&1073741823|((u&1^1)<<30)+1073741824}if(p>>>0>0|(p|0)==0&o>>>0>3221225471){n=bc(o|0,p|0,30)|0;n=o&1073741823|((n&1^1)<<30)+1073741824}else n=o;u=Ya;c[u>>2]=o;c[u+4>>2]=p;k:do if(n>>>0>>0){l=c[cb>>2]|0;l:do if((l|0)<=9){do if((l|0)<5)ab=214;else{if((c[na>>2]|0)>=17){ab=214;break}if((l|0)<7)break;l=(l|0)<9?41:42;ab=214}while(0);m:do if((ab|0)==214){ab=0;do switch(l|0){case 10:break l;case 40:break m;case 2:{u=c[ca>>2]|0;a[u+262148>>0]=1;c[u+262152>>2]=0;c[u+262156>>2]=0;break k}case 3:{u=c[da>>2]|0;a[u+262152>>0]=1;c[u+262156>>2]=0;c[u+262160>>2]=0;break k}case 4:{u=c[ea>>2]|0;a[u+524304>>0]=1;c[u+524308>>2]=0;c[u+524312>>2]=0;break k}case 5:{u=c[fa>>2]|0;a[u+1081344>>0]=1;c[u+1081348>>2]=0;c[u+1081352>>2]=0;break k}case 6:{u=c[ga>>2]|0;a[u+2129920>>0]=1;c[u+2129924>>2]=0;c[u+2129928>>2]=0;break k}case 7:{u=c[ha>>2]|0;a[u+8454144>>0]=1;c[u+8454148>>2]=0;c[u+8454152>>2]=0;break k}case 8:{u=c[ia>>2]|0;a[u+16842752>>0]=1;c[u+16842756>>2]=0;c[u+16842760>>2]=0;break k}case 9:{u=c[ja>>2]|0;a[u+33619968>>0]=1;c[u+33619972>>2]=0;c[u+33619976>>2]=0;break k}case 41:{u=c[la>>2]|0;a[u+524290>>0]=1;c[u+524292>>2]=0;c[u+524296>>2]=0;break k}case 42:{u=c[ma>>2]|0;a[u+1311744>>0]=1;c[u+1311748>>2]=0;c[u+1311752>>2]=0;break k}default:break k}while(0)}while(0);u=c[ka>>2]|0;a[u+524290>>0]=1;c[u+524292>>2]=0;c[u+524296>>2]=0;break k}while(0);a[(c[_>>2]|0)+524304>>0]=1}while(0);n=ba;l=c[n>>2]|0;n=c[n+4>>2]|0;do if(!((l|0)==0&(n|0)==0)){a[qa>>0]=a[q+(l+-1&v)>>0]|0;if(!(n>>>0>0|(n|0)==0&l>>>0>1))break;u=ec(l|0,n|0,-2,0)|0;a[ta>>0]=a[q+(u&v)>>0]|0}while(0);c[S>>2]=0;c[Y>>2]=0;c[va>>2]=c[wa>>2];c[va+4>>2]=c[wa+4>>2];c[va+8>>2]=c[wa+8>>2];c[va+12>>2]=c[wa+12>>2];c[A>>2]=m;c[z>>2]=(c[$a>>2]|0)>>>3}else ab=114}while(0);do if((ab|0)==114){c[db>>2]=d[y>>0];if(!((n|0)==(p|0)&(o|0)==(q|0)^1|t^1)){c[z>>2]=0;break}m=(s<<1)+502|0;l=c[K>>2]|0;if((c[J>>2]|0)>>>0>>0){ra[c[L>>2]&1](c[M>>2]|0,l);c[K>>2]=0;l=sa[c[B>>2]&1](c[M>>2]|0,m)|0;if(!l){ab=118;break d}c[K>>2]=l;c[J>>2]=m;n=l}else n=l;a[n>>0]=a[N>>0]|0;o=Cb(e,c[cb>>2]|0,s,eb)|0;l=u+(r&v)|0;m=w<<24>>24!=0;if(!(c[cb>>2]|0))ub(B,l,s,m,o,c[eb>>2]|0,O,P,Q,R,db,n);else yb(B,l,s,m,c[G>>2]|0,c[I>>2]|0,o,c[eb>>2]|0,db,n);a[N>>0]=a[n+((c[db>>2]|0)>>>3)>>0]|0;a[y>>0]=c[db>>2]&7;u=Xa;v=c[u+4>>2]|0;ab=Ya;c[ab>>2]=c[u>>2];c[ab+4>>2]=v;c[A>>2]=n;c[z>>2]=(c[db>>2]|0)>>>3}while(0);if(!(w<<24>>24))continue;c[bb>>2]=2}switch(ab|0){case 62:{oa(1);break}case 71:{oa(1);break}case 108:{oa(1);break}case 110:{oa(1);break}case 118:{oa(1);break}case 127:{oa(1);break}case 194:{pa(406017,406053,906,406080);break}case 196:{pa(406103,406053,907,406080);break}case 198:{pa(406149,406053,908,406080);break}case 202:{oa(1);break}case 231:{k=0;i=fb;return k|0}case 234:{if(n^1|o^1){k=1;i=fb;return k|0}c[bb>>2]=0;c[A>>2]=0;k=1;i=fb;return k|0}}return 0}function Bb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=b+5237|0;if(a[k>>0]&1)return 1;e=c[b+4>>2]|0;if((e|0)>=0)if((e|0)>11)h=11;else i=4;else{e=0;i=4}if((i|0)==4)h=e;c[b+4>>2]=h;e=b+8|0;f=c[e>>2]|0;if((f|0)>=10){if((f|0)>24){c[e>>2]=24;f=24}}else{c[e>>2]=10;f=10}g=b+12|0;e=c[g>>2]|0;i=(h|0)==0;do if(h>>>0>=2)if((h|0)<4)e=14;else{if(!e){if(!((h|0)>8&(f|0)>16)){e=16;break}e=(f|0)>18?18:f;break}if((e|0)>=16){if((e|0)>24){e=24;break}}else e=16}else e=f;while(0);c[g>>2]=e;g=1<<((f|0)>(e|0)?f:e)+1;c[b+88>>2]=g;c[b+92>>2]=g+-1;e=1<>2]=e;c[b+100>>2]=g+e;e=b+192|0;g=b+193|0;a:do switch(f|0){case 16:{a[e>>0]=0;a[g>>0]=1;break}case 17:{a[e>>0]=1;a[g>>0]=7;break}default:if((f|0)>17){a[e>>0]=(f<<1)+222|1;a[g>>0]=4;break a}else{a[e>>0]=(f<<4)+128|1;a[g>>0]=7;break a}}while(0);b:do if(i){g=b+4436|0;h=b+4692|0;i=b+5204|0;d=b+4308|0;e=406473;f=d+128|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));dc(g|0,88174,256)|0;d=h;e=406601;f=d+57|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));c[i>>2]=448}else{e=b+16|0;g=b+28|0;c:do if((h|0)>9){f=g;i=65}else{do if((h|0)>=5&(f|0)<17)if((h|0)<7){f=g;i=56;break}else{h=(h|0)<9?41:42;i=31;break}else i=31;while(0);d:do if((i|0)==31){f=g;e:do switch(h|0){case 10:{i=65;break c}case 40:{i=56;break d}case 2:{d=sa[c[e>>2]&1](c[b+24>>2]|0,262160)|0;if(!d)oa(1);else{c[g>>2]=d;d=f;i=69;break e}break}case 3:{d=sa[c[e>>2]&1](c[b+24>>2]|0,262164)|0;if(!d)oa(1);else{c[b+32>>2]=d;d=f;i=70;break e}break}case 4:{d=sa[c[e>>2]&1](c[b+24>>2]|0,524316)|0;if(!d)oa(1);else{c[b+36>>2]=d;d=f;i=71;break e}break}case 5:{d=sa[c[e>>2]&1](c[b+24>>2]|0,1081356)|0;if(!d)oa(1);else{c[b+40>>2]=d;d=f;i=72;break e}break}case 6:{d=sa[c[e>>2]&1](c[b+24>>2]|0,2129932)|0;if(!d)oa(1);else{c[b+44>>2]=d;d=f;i=73;break e}break}case 7:{d=sa[c[e>>2]&1](c[b+24>>2]|0,8454156)|0;if(!d)oa(1);else{c[b+48>>2]=d;d=f;i=74;break e}break}case 8:{d=sa[c[e>>2]&1](c[b+24>>2]|0,16842764)|0;if(!d)oa(1);else{c[b+52>>2]=d;d=f;i=75;break e}break}case 9:{d=sa[c[e>>2]&1](c[b+24>>2]|0,33619980)|0;if(!d)oa(1);else{c[b+56>>2]=d;d=f;i=76;break e}break}case 41:{d=sa[c[e>>2]&1](c[b+24>>2]|0,524304)|0;if(!d)oa(1);else{c[b+64>>2]=d;d=f;i=78;break e}break}case 42:{d=sa[c[e>>2]&1](c[b+24>>2]|0,1311760)|0;if(!d)oa(1);else{c[b+68>>2]=d;d=f;i=79;break e}break}default:{d=f;switch(h|0){case 10:break c;case 40:{j=d;break d}case 2:{i=69;break}case 3:{i=70;break}case 4:{i=71;break}case 5:{i=72;break}case 6:{i=73;break}case 7:{i=74;break}case 8:{i=75;break}case 9:{i=76;break}case 41:{i=78;break}case 42:{i=79;break}default:break b}}}while(0);switch(i|0){case 69:{b=c[d>>2]|0;a[b+262148>>0]=1;c[b+262152>>2]=0;c[b+262156>>2]=0;break b}case 70:{b=c[d+4>>2]|0;a[b+262152>>0]=1;c[b+262156>>2]=0;c[b+262160>>2]=0;break b}case 71:{b=c[d+8>>2]|0;a[b+524304>>0]=1;c[b+524308>>2]=0;c[b+524312>>2]=0;break b}case 72:{b=c[d+12>>2]|0;a[b+1081344>>0]=1;c[b+1081348>>2]=0;c[b+1081352>>2]=0;break b}case 73:{b=c[d+16>>2]|0;a[b+2129920>>0]=1;c[b+2129924>>2]=0;c[b+2129928>>2]=0;break b}case 74:{b=c[d+20>>2]|0;a[b+8454144>>0]=1;c[b+8454148>>2]=0;c[b+8454152>>2]=0;break b}case 75:{b=c[d+24>>2]|0;a[b+16842752>>0]=1;c[b+16842756>>2]=0;c[b+16842760>>2]=0;break b}case 76:{b=c[d+28>>2]|0;a[b+33619968>>0]=1;c[b+33619972>>2]=0;c[b+33619976>>2]=0;break b}case 78:{b=c[d+36>>2]|0;a[b+524290>>0]=1;c[b+524292>>2]=0;c[b+524296>>2]=0;break b}case 79:{b=c[d+40>>2]|0;a[b+1311744>>0]=1;c[b+1311748>>2]=0;c[b+1311752>>2]=0;break b}}}while(0);do if((i|0)==56){d=sa[c[e>>2]&1](c[b+24>>2]|0,524304)|0;if(!d)oa(1);else{c[b+60>>2]=d;j=f;break}}while(0);b=c[j+32>>2]|0;a[b+524290>>0]=1;c[b+524292>>2]=0;c[b+524296>>2]=0;break b}while(0);do if((i|0)==65){e=sa[c[e>>2]&1](c[b+24>>2]|0,524308)|0;if(!e)oa(1);else{c[f+44>>2]=e;d=c[f+44>>2]|0;c[d+524292>>2]=0;c[d+524300>>2]=0;a[d+524304>>0]=1;d=f;break}}while(0);a[(c[d+44>>2]|0)+524304>>0]=1}while(0);a[k>>0]=1;return 1}function Cb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;b=(b|0)==0?32768:131072;f=256;while(1){if(!(f>>>0>>0&f>>>0>>0))break;f=f<<1}do if(f>>>0>=1025){b=a+4304|0;if(f>>>0<=(c[b>>2]|0)>>>0){g=c[a+4300>>2]|0;break}c[b>>2]=f;d=a+4300|0;b=a+24|0;ra[c[a+20>>2]&1](c[b>>2]|0,c[d>>2]|0);c[d>>2]=0;a=sa[c[a+16>>2]&1](c[b>>2]|0,f<<2)|0;b=a;if(!a)oa(1);else{c[d>>2]=b;g=b;break}}else g=a+204|0;while(0);c[e>>2]=f;ac(g|0,0,f<<2|0)|0;return g|0} +function Pa(f,g,h,j,k,l,m,n,o,p,q,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3>>0]<<24,506832829)|0)>>>17;ga=n+(ha<<1)|0;c[n+65536+((e[ga>>1]&127|ha<<7)<<2)>>2]=ia;b[ga>>1]=(b[ga>>1]|0)+1<<16>>16;ga=h+-1|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ia=n+(ha<<1)|0;c[n+65536+((e[ia>>1]&127|ha<<7)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16}P=oa+4|0;Q=oa+8|0;R=oa+12|0;S=oa+4|0;T=oa+8|0;U=oa+12|0;V=n+16842760|0;W=n+16842756|0;X=ja<<2;Y=na+-4|0;Z=na+-3|0;$=pa+12|0;ba=pa+4|0;ca=pa+8|0;da=pa+4|0;ea=pa+8|0;fa=pa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=v;a:while(1){M=O;N=u+X|0;b:while(1){L=na-m|0;if((m+4|0)>>>0>=na>>>0)break a;J=m>>>0>>0?m:ma;c[oa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;g=c[oa>>2]|0;c[oa>>2]=0;c[S>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;y=4240;j=0;x=0;while(1){if((x|0)==10)break;w=(c[o+(c[11372+(x<<2)>>2]<<2)>>2]|0)+(c[11436+(x<<2)>>2]|0)|0;t=m-w|0;do if(((!(t>>>0>=m>>>0|w>>>0>J>>>0)?(ra=t&l,sa=K+g|0,sa>>>0<=l>>>0):0)?(ta=ra+g|0,ta>>>0<=l>>>0):0)?(a[k+sa>>0]|0)==(a[k+ta>>0]|0):0){v=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;D=t;E=k+(ra+v)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;v=v+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(ra+v)>>0]|0)!=(a[t>>0]|0))break;v=v+1|0;t=t+1|0}if(v>>>0<=2?!((v|0)==2&x>>>0<2):0){t=y;break}t=(v*540|0)+(c[11500+(x<<2)>>2]|0)|0;if(y>>>0>>0){c[oa>>2]=v;c[T>>2]=w;c[U>>2]=t;g=v;j=1}else t=y}else t=y;while(0);y=t;x=x+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<7;D=n+(D<<1)|0;E=b[D>>1]|0;t=E&65535;E=(E&65535)>128?t+-128|0:0;c:while(1){B=K+g|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(t>>>0<=E>>>0)break c;t=t+-1|0;h=c[n+65536+((C|t&127)<<2)>>2]|0;z=m-h|0;if(z>>>0>J>>>0)break c;x=h&l;if(A)continue;h=x+g|0;if(h>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+h>>0]|0)){w=0;h=F}else continue;while(1){v=h;if(v>>>0>H>>>0)break;Ia=h;Ha=k+(x+w)|0;if((d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0)!=(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0))break;w=w+4|0;h=v+4|0}while(1){if(h>>>0>=G>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}if(w>>>0<=3)continue;h=(w*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(y>>>0>>0)break}c[oa>>2]=w;c[T>>2]=z;c[U>>2]=h;g=w;y=h;j=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&127)<<2)>>2]=m;b[D>>1]=Ia+1<<16>>16;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ia=b[21084+(w<<1)>>1]|0;t=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(ua=t&31,va=t>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=L>>>0):0){g=wa+ua|0;v=280811+g|0;g=280811+(g+-4)|0;h=0;t=280811+wa|0;while(1){if(t>>>0>g>>>0)break;Ia=k+(K+h)|0;if((d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;t=t+4|0}while(1){if(t>>>0>=v>>>0)break;if((a[k+(K+h)>>0]|0)!=(a[t>>0]|0))break;h=h+1|0;t=t+1|0}if(!((h+10|0)>>>0<=ua>>>0|(h|0)==0)?(xa=J+va+1+(d[407930+(ua-h)>>0]<>0])|0,ya=(h*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[U>>2]|0)>>>0):0){c[oa>>2]=h;c[S>>2]=ua^h;c[T>>2]=xa;c[U>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){M=0;x=f;break}f=f+1|0;t=m+1|0;if(t>>>0<=u>>>0){m=t;continue}if(t>>>0>N>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=t;while(1){if(m>>>0>=j>>>0)continue b;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>17;Ia=n+(Ha<<1)|0;c[n+65536+((e[Ia>>1]&127|Ha<<7)<<2)>>2]=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0){j=w;break}j=(u*540|0)+(c[11500+(v<<2)>>2]|0)|0;if(w>>>0>>0){c[pa>>2]=u;c[ea>>2]=h;c[fa>>2]=j;t=u;f=1}else j=w}else j=w;while(0);w=j;v=v+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<7;D=n+(D<<1)|0;E=b[D>>1]|0;j=E&65535;E=(E&65535)>128?j+-128|0:0;d:while(1){B=K+t|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(j>>>0<=E>>>0)break d;j=j+-1|0;g=c[n+65536+((C|j&127)<<2)>>2]|0;z=y-g|0;if(z>>>0>J>>>0)break d;v=g&l;if(A)continue;g=v+t|0;if(g>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+g>>0]|0)){h=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ha=g;Ia=k+(v+h)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(v+h)>>0]|0)!=(a[g>>0]|0))break;h=h+1|0;g=g+1|0}if(h>>>0<=3)continue;g=(h*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(w>>>0>>0)break}c[pa>>2]=h;c[ea>>2]=z;c[fa>>2]=g;t=h;w=g;f=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&127)<<2)>>2]=y;b[D>>1]=Ia+1<<16>>16;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;h=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ia=b[21084+(h<<1)>>1]|0;j=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(Ca=j&31,Da=j>>>5,Ea=(c[11272+(Ca<<2)>>2]|0)+(_(Ca,Da)|0)|0,Ca>>>0<=L>>>0):0){t=Ea+Ca|0;u=280811+t|0;t=280811+(t+-4)|0;g=0;j=280811+Ea|0;while(1){if(j>>>0>t>>>0)break;Ia=k+(K+g)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;g=g+4|0;j=j+4|0}while(1){if(j>>>0>=u>>>0)break;if((a[k+(K+g)>>0]|0)!=(a[j>>0]|0))break;g=g+1|0;j=j+1|0}if(!((g+10|0)>>>0<=Ca>>>0|(g|0)==0)?(Fa=J+Da+1+(d[407930+(Ca-g)>>0]<>0])|0,Ga=(g*540|0)+3840+(_((aa(Fa|0)|0)^31,-120)|0)|0,Ga>>>0>=(c[fa>>2]|0)>>>0):0){c[pa>>2]=g;c[da>>2]=Ca^g;c[ea>>2]=Fa;c[fa>>2]=Ga;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;h=h+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[oa>>2]=c[pa>>2];c[oa+4>>2]=c[pa+4>>2];c[oa+8>>2]=c[pa+8>>2];c[oa+12>>2]=c[pa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[oa>>2]|0;u=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:ma)>>>0){g=f+3|0;Ia=c[o>>2]|0;j=g-Ia|0;t=c[ia>>2]|0;g=g-t|0;if((f|0)==(Ia|0))f=0;else{f:do if((f|0)!=(t|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(g>>>0<7){f=266017486>>>(g<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[oa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ia=c[P>>2]|0;j=m^Ia;c[O>>2]=x;c[O+4>>2]=m|Ia<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ia=((aa(N|0)|0)^31)+-1|0;Ha=N>>>Ia&1;f=((Ia<<1)+65534|Ha)+16&65535;b[m>>1]=f;m=Ia<<24|N-((Ha|2)<>2]=m;h=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ia=x+-2|0;g=((aa(Ia|0)|0)^31)+-1|0;g=(g<<1)+(Ia>>>g)+2&65535;break}if(x>>>0<2114){g=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)g=21;else g=x>>>0<22594?22:23}else g=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ia=j+-6|0;f=((aa(Ia|0)|0)^31)+-1|0;f=(f<<1)+(Ia>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=g&65535;t=m&7|j<<3&56;if(h&(g&65535)<8&(f&65535)<16)f=((f&65535)<8?t:t|64)&65535;else f=b[88156+((m>>>3)+((j>>>3)*3|0)<<1)>>1]|t&65535;b[v>>1]=f;c[s>>2]=(c[s>>2]|0)+x;f=y+(c[oa>>2]|0)|0;f=f>>>0>>0?f:la;m=y+2|0;while(1){if(m>>>0>=f>>>0)break;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<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0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ia=n+(ha<<1)|0;c[n+65536+((e[ia>>1]&255|ha<<8)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16;ia=h+-2|0;ha=k+(ia&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ga=n+(ha<<1)|0;c[n+65536+((e[ga>>1]&255|ha<<8)<<2)>>2]=ia;b[ga>>1]=(b[ga>>1]|0)+1<<16>>16;ga=h+-1|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ia=n+(ha<<1)|0;c[n+65536+((e[ia>>1]&255|ha<<8)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16}P=oa+4|0;Q=oa+8|0;R=oa+12|0;S=oa+4|0;T=oa+8|0;U=oa+12|0;V=n+33619976|0;W=n+33619972|0;X=ja<<2;Y=na+-4|0;Z=na+-3|0;$=pa+12|0;ba=pa+4|0;ca=pa+8|0;da=pa+4|0;ea=pa+8|0;fa=pa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=v;a:while(1){M=O;N=u+X|0;b:while(1){L=na-m|0;if((m+4|0)>>>0>=na>>>0)break a;J=m>>>0>>0?m:ma;c[oa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;g=c[oa>>2]|0;c[oa>>2]=0;c[S>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;y=4240;j=0;x=0;while(1){if((x|0)==16)break;w=(c[o+(c[11372+(x<<2)>>2]<<2)>>2]|0)+(c[11436+(x<<2)>>2]|0)|0;t=m-w|0;do if(((!(t>>>0>=m>>>0|w>>>0>J>>>0)?(ra=t&l,sa=K+g|0,sa>>>0<=l>>>0):0)?(ta=ra+g|0,ta>>>0<=l>>>0):0)?(a[k+sa>>0]|0)==(a[k+ta>>0]|0):0){v=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;D=t;E=k+(ra+v)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;v=v+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(ra+v)>>0]|0)!=(a[t>>0]|0))break;v=v+1|0;t=t+1|0}if(v>>>0<=2?!((v|0)==2&x>>>0<2):0){t=y;break}t=(v*540|0)+(c[11500+(x<<2)>>2]|0)|0;if(y>>>0>>0){c[oa>>2]=v;c[T>>2]=w;c[U>>2]=t;g=v;j=1}else t=y}else t=y;while(0);y=t;x=x+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<8;D=n+(D<<1)|0;E=b[D>>1]|0;t=E&65535;E=(E&65535)>256?t+-256|0:0;c:while(1){B=K+g|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(t>>>0<=E>>>0)break c;t=t+-1|0;h=c[n+65536+((C|t&255)<<2)>>2]|0;z=m-h|0;if(z>>>0>J>>>0)break c;x=h&l;if(A)continue;h=x+g|0;if(h>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+h>>0]|0)){w=0;h=F}else continue;while(1){v=h;if(v>>>0>H>>>0)break;Ia=h;Ha=k+(x+w)|0;if((d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0)!=(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0))break;w=w+4|0;h=v+4|0}while(1){if(h>>>0>=G>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}if(w>>>0<=3)continue;h=(w*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(y>>>0>>0)break}c[oa>>2]=w;c[T>>2]=z;c[U>>2]=h;g=w;y=h;j=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&255)<<2)>>2]=m;b[D>>1]=Ia+1<<16>>16;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ia=b[21084+(w<<1)>>1]|0;t=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(ua=t&31,va=t>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=L>>>0):0){g=wa+ua|0;v=280811+g|0;g=280811+(g+-4)|0;h=0;t=280811+wa|0;while(1){if(t>>>0>g>>>0)break;Ia=k+(K+h)|0;if((d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;t=t+4|0}while(1){if(t>>>0>=v>>>0)break;if((a[k+(K+h)>>0]|0)!=(a[t>>0]|0))break;h=h+1|0;t=t+1|0}if(!((h+10|0)>>>0<=ua>>>0|(h|0)==0)?(xa=J+va+1+(d[407930+(ua-h)>>0]<>0])|0,ya=(h*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[U>>2]|0)>>>0):0){c[oa>>2]=h;c[S>>2]=ua^h;c[T>>2]=xa;c[U>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){M=0;x=f;break}f=f+1|0;t=m+1|0;if(t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]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;u=u+4|0;j=g+4|0}while(1){if(j>>>0>=G>>>0)break;if((a[k+(za+u)>>0]|0)!=(a[j>>0]|0))break;u=u+1|0;j=j+1|0}if(u>>>0<=2?!((u|0)==2&v>>>0<2):0){j=w;break}j=(u*540|0)+(c[11500+(v<<2)>>2]|0)|0;if(w>>>0>>0){c[pa>>2]=u;c[ea>>2]=h;c[fa>>2]=j;t=u;f=1}else j=w}else j=w;while(0);w=j;v=v+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<8;D=n+(D<<1)|0;E=b[D>>1]|0;j=E&65535;E=(E&65535)>256?j+-256|0:0;d:while(1){B=K+t|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(j>>>0<=E>>>0)break d;j=j+-1|0;g=c[n+65536+((C|j&255)<<2)>>2]|0;z=y-g|0;if(z>>>0>J>>>0)break d;v=g&l;if(A)continue;g=v+t|0;if(g>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+g>>0]|0)){h=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ha=g;Ia=k+(v+h)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(v+h)>>0]|0)!=(a[g>>0]|0))break;h=h+1|0;g=g+1|0}if(h>>>0<=3)continue;g=(h*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(w>>>0>>0)break}c[pa>>2]=h;c[ea>>2]=z;c[fa>>2]=g;t=h;w=g;f=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&255)<<2)>>2]=y;b[D>>1]=Ia+1<<16>>16;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;h=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ia=b[21084+(h<<1)>>1]|0;j=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(Ca=j&31,Da=j>>>5,Ea=(c[11272+(Ca<<2)>>2]|0)+(_(Ca,Da)|0)|0,Ca>>>0<=L>>>0):0){t=Ea+Ca|0;u=280811+t|0;t=280811+(t+-4)|0;g=0;j=280811+Ea|0;while(1){if(j>>>0>t>>>0)break;Ia=k+(K+g)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;g=g+4|0;j=j+4|0}while(1){if(j>>>0>=u>>>0)break;if((a[k+(K+g)>>0]|0)!=(a[j>>0]|0))break;g=g+1|0;j=j+1|0}if(!((g+10|0)>>>0<=Ca>>>0|(g|0)==0)?(Fa=J+Da+1+(d[407930+(Ca-g)>>0]<>0])|0,Ga=(g*540|0)+3840+(_((aa(Fa|0)|0)^31,-120)|0)|0,Ga>>>0>=(c[fa>>2]|0)>>>0):0){c[pa>>2]=g;c[da>>2]=Ca^g;c[ea>>2]=Fa;c[fa>>2]=Ga;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;h=h+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[oa>>2]=c[pa>>2];c[oa+4>>2]=c[pa+4>>2];c[oa+8>>2]=c[pa+8>>2];c[oa+12>>2]=c[pa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[oa>>2]|0;u=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:ma)>>>0){g=f+3|0;Ia=c[o>>2]|0;j=g-Ia|0;t=c[ia>>2]|0;g=g-t|0;if((f|0)==(Ia|0))f=0;else{f:do if((f|0)!=(t|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(g>>>0<7){f=266017486>>>(g<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[oa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ia=c[P>>2]|0;j=m^Ia;c[O>>2]=x;c[O+4>>2]=m|Ia<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ia=((aa(N|0)|0)^31)+-1|0;Ha=N>>>Ia&1;f=((Ia<<1)+65534|Ha)+16&65535;b[m>>1]=f;m=Ia<<24|N-((Ha|2)<>2]=m;h=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ia=x+-2|0;g=((aa(Ia|0)|0)^31)+-1|0;g=(g<<1)+(Ia>>>g)+2&65535;break}if(x>>>0<2114){g=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)g=21;else g=x>>>0<22594?22:23}else g=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ia=j+-6|0;f=((aa(Ia|0)|0)^31)+-1|0;f=(f<<1)+(Ia>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=g&65535;t=m&7|j<<3&56;if(h&(g&65535)<8&(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;ia=k+f|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;c[n+(ia<<2)>>2]=-858993460;b[n+131072+(ia<<1)>>1]=-13108;f=f+1|0}ac(n+196608|0,0,65536)|0;b[n+524288>>1]=0;if(g){a[n+524290>>0]=0;ra=8}}else{f=n+524290|0;if(!(a[f>>0]&1))ra=8;else{ac(n|0,-52,131072)|0;b[n+524288>>1]=0;a[f>>0]=0;ac(n+131072|0,0,131072)|0;ra=8}}if((ra|0)==8?g>>>0>2&h>>>0>2:0){da=h+-3|0;ga=k+(da&l)|0;ga=(_(d[ga>>0]|d[ga+1>>0]<<8|d[ga+2>>0]<<16|d[ga+3>>0]<<24,506832829)|0)>>>17;ea=n+524288|0;fa=b[ea>>1]|0;b[ea>>1]=fa+1<<16>>16;ha=fa&65535;ia=n+(ga<<2)|0;ca=da-(c[ia>>2]|0)|0;a[(da&65535)+(n+196608)>>0]=ga;b[n+262144+(ha<<2)>>1]=ca>>>0>65535?65535:ca;ga=n+131072+(ga<<1)|0;b[n+262144+(ha<<2)+2>>1]=b[ga>>1]|0;c[ia>>2]=da;b[ga>>1]=fa;ga=h+-2|0;fa=k+(ga&l)|0;fa=(_(d[fa>>0]|d[fa+1>>0]<<8|d[fa+2>>0]<<16|d[fa+3>>0]<<24,506832829)|0)>>>17;ia=b[ea>>1]|0;b[ea>>1]=ia+1<<16>>16;da=ia&65535;ha=n+(fa<<2)|0;ca=ga-(c[ha>>2]|0)|0;a[(ga&65535)+(n+196608)>>0]=fa;b[n+262144+(da<<2)>>1]=ca>>>0>65535?65535:ca;fa=n+131072+(fa<<1)|0;b[n+262144+(da<<2)+2>>1]=b[fa>>1]|0;c[ha>>2]=ga;b[fa>>1]=ia;fa=h+-1|0;ia=k+(fa&l)|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;ha=b[ea>>1]|0;b[ea>>1]=ha+1<<16>>16;ea=ha&65535;ga=n+(ia<<2)|0;da=fa-(c[ga>>2]|0)|0;a[(fa&65535)+(n+196608)>>0]=ia;b[n+262144+(ea<<2)>>1]=da>>>0>65535?65535:da;ia=n+131072+(ia<<1)|0;b[n+262144+(ea<<2)+2>>1]=b[ia>>1]|0;c[ga>>2]=fa;b[ia>>1]=ha}O=pa+4|0;P=pa+8|0;Q=pa+12|0;R=pa+4|0;S=pa+8|0;T=pa+12|0;U=n+524288|0;V=n+524296|0;W=n+524292|0;X=ja<<2;Y=oa+-4|0;Z=oa+-3|0;$=qa+12|0;ba=qa+4|0;ca=qa+8|0;da=qa+4|0;ea=qa+8|0;fa=qa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;N=q;f=u;a:while(1){L=N;M=t+X|0;b:while(1){K=oa-m|0;if((m+4|0)>>>0>=oa>>>0)break a;I=m>>>0>>0?m:na;c[pa>>2]=0;c[O>>2]=0;c[P>>2]=0;c[Q>>2]=4240;J=m&l;z=c[pa>>2]|0;H=k+J|0;B=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;y=B&255;c[pa>>2]=0;c[R>>2]=0;G=J+K|0;F=k+G|0;E=H;G=k+(G+-4)|0;h=4240;j=0;A=0;while(1){if((A|0)==4)break;x=(c[o+(c[11372+(A<<2)>>2]<<2)>>2]|0)+(c[11436+(A<<2)>>2]|0)|0;g=m-x|0;if(!A)if(g>>>0>=m>>>0|x>>>0>I>>>0)g=z;else ra=17;else if((g>>>0>>0?(a[(g&65535)+(n+196608)>>0]|0)==y<<24>>24:0)^1|x>>>0>I>>>0)g=z;else ra=17;if((ra|0)==17){ra=0;w=g&l;g=0;u=E;while(1){v=u;if(v>>>0>G>>>0)break;C=u;D=k+(w+g)|0;if((d[C>>0]|d[C+1>>0]<<8|d[C+2>>0]<<16|d[C+3>>0]<<24|0)!=(d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0))break;g=g+4|0;u=v+4|0}while(1){if(u>>>0>=F>>>0)break;if((a[k+(w+g)>>0]|0)!=(a[u>>0]|0))break;g=g+1|0;u=u+1|0}if(g>>>0>1?(ta=(g*540|0)+(c[11500+(A<<2)>>2]|0)|0,h>>>0>>0):0){c[pa>>2]=g;c[S>>2]=x;c[T>>2]=ta;h=ta;j=1}else g=z}z=g;A=A+1|0}w=0;u=m-(c[n+(B<<2)>>2]|0)|0;v=c[ka>>2]|0;g=e[n+131072+(B<<1)>>1]|0;c:while(1){D=J+z|0;C=D>>>0>l>>>0;D=k+D|0;x=w;y=u;A=v;B=g;while(1){w=A;A=A+-1|0;if(!w)break c;x=x+y|0;if(x>>>0>I>>>0)break c;w=m-x&l;y=B;B=e[n+262144+(B<<2)+2>>1]|0;y=e[n+262144+(y<<2)>>1]|0;if(C)continue;g=w+z|0;if(g>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+g>>0]|0)){v=0;g=E}else continue;while(1){u=g;if(u>>>0>G>>>0)break;Ga=g;Fa=k+(w+v)|0;if((d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0)!=(d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0))break;v=v+4|0;g=u+4|0}while(1){if(g>>>0>=F>>>0)break;if((a[k+(w+v)>>0]|0)!=(a[g>>0]|0))break;v=v+1|0;g=g+1|0}if(v>>>0<=3)continue;g=(v*540|0)+3840+(_((aa(x|0)|0)^31,-120)|0)|0;if(h>>>0>>0)break}c[pa>>2]=v;c[S>>2]=x;c[T>>2]=g;w=x;z=v;h=g;u=y;v=A;j=1;g=B}Ga=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;F=Fa&65535;G=n+(Ga<<2)|0;E=m-(c[G>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(F<<2)>>1]=E>>>0>65535?65535:E;Ga=n+131072+(Ga<<1)|0;b[n+262144+(F<<2)+2>>1]=b[Ga>>1]|0;c[G>>2]=m;b[Ga>>1]=Fa;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ga=b[21084+(w<<1)>>1]|0;g=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(ua=g&31,va=g>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=K>>>0):0){h=wa+ua|0;v=280811+h|0;h=280811+(h+-4)|0;u=0;g=280811+wa|0;while(1){if(g>>>0>h>>>0)break;Ga=k+(J+u)|0;if((d[g>>0]|d[g+1>>0]<<8|d[g+2>>0]<<16|d[g+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;u=u+4|0;g=g+4|0}while(1){if(g>>>0>=v>>>0)break;if((a[k+(J+u)>>0]|0)!=(a[g>>0]|0))break;u=u+1|0;g=g+1|0}if(!((u+10|0)>>>0<=ua>>>0|(u|0)==0)?(xa=I+va+1+(d[407930+(ua-u)>>0]<>0])|0,ya=(u*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[T>>2]|0)>>>0):0){c[pa>>2]=u;c[R>>2]=ua^u;c[S>>2]=xa;c[T>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){L=0;x=f;break}f=f+1|0;g=m+1|0;if(g>>>0<=t>>>0){m=g;continue}if(g>>>0>M>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;J=Fa&65535;K=n+(Ga<<2)|0;I=m-(c[K>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(J<<2)>>1]=I>>>0>65535?65535:I;Ga=n+131072+(Ga<<1)|0;b[n+262144+(J<<2)+2>>1]=b[Ga>>1]|0;c[K>>2]=m;b[Ga>>1]=Fa;m=m+4|0;f=f+4|0}}else{j=m+9|0;j=j>>>0>>0?j:Z;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;J=Fa&65535;K=n+(Ga<<2)|0;I=m-(c[K>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(J<<2)>>1]=I>>>0>65535?65535:I;Ga=n+131072+(Ga<<1)|0;b[n+262144+(J<<2)+2>>1]=b[Ga>>1]|0;c[K>>2]=m;b[Ga>>1]=Fa;m=m+2|0;f=f+2|0}}}while(1){K=K+-1|0;if((c[la>>2]|0)<5){f=(c[pa>>2]|0)+-1|0;f=f>>>0>>0?f:K}else f=0;c[qa>>2]=f;c[ba>>2]=0;c[ca>>2]=0;c[$>>2]=4240;y=m+1|0;I=y>>>0>>0?y:na;J=y&l;z=c[qa>>2]|0;H=k+J|0;B=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;w=B&255;c[qa>>2]=0;c[da>>2]=0;G=J+K|0;F=k+G|0;E=H;G=k+(G+-4)|0;g=4240;f=0;A=0;while(1){if((A|0)==4)break;v=(c[o+(c[11372+(A<<2)>>2]<<2)>>2]|0)+(c[11436+(A<<2)>>2]|0)|0;j=y-v|0;if(!A)if(j>>>0>=y>>>0|v>>>0>I>>>0)j=z;else ra=71;else if((j>>>0>>0?(a[(j&65535)+(n+196608)>>0]|0)==w<<24>>24:0)^1|v>>>0>I>>>0)j=z;else ra=71;if((ra|0)==71){ra=0;u=j&l;j=0;t=E;while(1){h=t;if(h>>>0>G>>>0)break;Fa=t;Ga=k+(u+j)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;j=j+4|0;t=h+4|0}while(1){if(t>>>0>=F>>>0)break;if((a[k+(u+j)>>0]|0)!=(a[t>>0]|0))break;j=j+1|0;t=t+1|0}if(j>>>0>1?(za=(j*540|0)+(c[11500+(A<<2)>>2]|0)|0,g>>>0>>0):0){c[qa>>2]=j;c[ea>>2]=v;c[fa>>2]=za;g=za;f=1}else j=z}z=j;A=A+1|0}u=0;t=y-(c[n+(B<<2)>>2]|0)|0;h=c[ka>>2]|0;j=e[n+131072+(B<<1)>>1]|0;d:while(1){D=J+z|0;C=D>>>0>l>>>0;D=k+D|0;v=u;w=t;A=h;B=j;while(1){Ga=A;A=A+-1|0;if(!Ga)break d;v=v+w|0;if(v>>>0>I>>>0)break d;u=y-v&l;w=B;B=e[n+262144+(B<<2)+2>>1]|0;w=e[n+262144+(w<<2)>>1]|0;if(C)continue;j=u+z|0;if(j>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+j>>0]|0)){h=0;j=E}else continue;while(1){t=j;if(t>>>0>G>>>0)break;Fa=j;Ga=k+(u+h)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;h=h+4|0;j=t+4|0}while(1){if(j>>>0>=F>>>0)break;if((a[k+(u+h)>>0]|0)!=(a[j>>0]|0))break;h=h+1|0;j=j+1|0}if(h>>>0<=3)continue;j=(h*540|0)+3840+(_((aa(v|0)|0)^31,-120)|0)|0;if(g>>>0>>0)break}c[qa>>2]=h;c[ea>>2]=v;c[fa>>2]=j;u=v;z=h;g=j;t=w;h=A;f=1;j=B}Ga=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;G=Fa&65535;M=n+(Ga<<2)|0;F=y-(c[M>>2]|0)|0;a[(y&65535)+(n+196608)>>0]=Ga;b[n+262144+(G<<2)>>1]=F>>>0>65535?65535:F;Ga=n+131072+(Ga<<1)|0;b[n+262144+(G<<2)+2>>1]=b[Ga>>1]|0;c[M>>2]=y;b[Ga>>1]=Fa;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;u=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ga=b[21084+(u<<1)>>1]|0;j=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(Aa=j&31,Ba=j>>>5,Ca=(c[11272+(Aa<<2)>>2]|0)+(_(Aa,Ba)|0)|0,Aa>>>0<=K>>>0):0){g=Ca+Aa|0;h=280811+g|0;g=280811+(g+-4)|0;t=0;j=280811+Ca|0;while(1){if(j>>>0>g>>>0)break;Ga=k+(J+t)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;t=t+4|0;j=j+4|0}while(1){if(j>>>0>=h>>>0)break;if((a[k+(J+t)>>0]|0)!=(a[j>>0]|0))break;t=t+1|0;j=j+1|0}if(!((t+10|0)>>>0<=Aa>>>0|(t|0)==0)?(Da=I+Ba+1+(d[407930+(Aa-t)>>0]<>0])|0,Ea=(t*540|0)+3840+(_((aa(Da|0)|0)^31,-120)|0)|0,Ea>>>0>=(c[fa>>2]|0)>>>0):0){c[qa>>2]=t;c[da>>2]=Aa^t;c[ea>>2]=Da;c[fa>>2]=Ea;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;u=u+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[Q>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[pa>>2]=c[qa>>2];c[pa+4>>2]=c[qa+4>>2];c[pa+8>>2]=c[qa+8>>2];c[pa+12>>2]=c[qa+12>>2];L=L+1|0;if(!((L|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[pa>>2]|0;t=y+(m<<1)+ja|0;f=c[P>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:na)>>>0){h=f+3|0;Ga=c[o>>2]|0;j=h-Ga|0;g=c[ia>>2]|0;h=h-g|0;if((f|0)==(Ga|0))f=0;else{f:do if((f|0)!=(g|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(h>>>0<7){f=266017486>>>(h<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[P>>2];m=c[pa>>2]|0}}else f=f+15|0;while(0);w=N+16|0;Ga=c[O>>2]|0;j=m^Ga;c[N>>2]=x;c[N+4>>2]=m|Ga<<24;m=N+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{M=f+-12|0;Ga=((aa(M|0)|0)^31)+-1|0;Fa=M>>>Ga&1;f=((Ga<<1)+65534|Fa)+16&65535;b[m>>1]=f;m=Ga<<24|M-((Fa|2)<>2]=m;u=f<<16>>16==0;v=N+12|0;do if(x>>>0>=6){if(x>>>0<130){Ga=x+-2|0;h=((aa(Ga|0)|0)^31)+-1|0;h=(h<<1)+(Ga>>>h)+2&65535;break}if(x>>>0<2114){h=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)h=21;else h=x>>>0<22594?22:23}else h=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ga=j+-6|0;f=((aa(Ga|0)|0)^31)+-1|0;f=(f<<1)+(Ga>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=h&65535;g=m&7|j<<3&56;if(u&(h&65535)<8&(f&65535)<16)f=((f&65535)<8?g:g|64)&65535;else f=b[88156+((m>>>3)+((j>>>3)*3|0)<<1)>>1]|g&65535;b[v>>1]=f;c[s>>2]=(c[s>>2]|0)+x;f=y+(c[pa>>2]|0)|0;f=f>>>0>>0?f:ma;m=y+2|0;while(1){if(m>>>0>=f>>>0)break;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;M=Fa&65535;N=n+(Ga<<2)|0;L=m-(c[N>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(M<<2)>>1]=L>>>0>65535?65535:L;Ga=n+131072+(Ga<<1)|0;b[n+262144+(M<<2)+2>>1]=b[Ga>>1]|0;c[N>>2]=m;b[Ga>>1]=Fa;m=m+1|0}m=y+(c[pa>>2]|0)|0;N=w;f=0}c[p>>2]=f+K;c[r>>2]=(c[r>>2]|0)+(L-q>>4);i=sa;return}function Sa(f,g,h,j,k,l,m,n,o,p,q,r,s){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0;sa=i;i=i+32|0;pa=sa+16|0;qa=sa;na=(1<>2])+-16|0;u=c[p>>2]|0;oa=h+g|0;ma=g>>>0>3?oa+-3|0:h;la=m+4|0;ia=c[la>>2]|0;ja=(ia|0)<9?64:512;t=ja+h|0;ka=n+524300|0;c[ka>>2]=((ia|0)>6?7:8)<>>0<513){f=0;while(1){if((f|0)==(g|0))break;ia=k+f|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;c[n+(ia<<2)>>2]=-858993460;b[n+131072+(ia<<1)>>1]=-13108;f=f+1|0}ac(n+196608|0,0,65536)|0;b[n+524288>>1]=0;if(g){a[n+524290>>0]=0;ra=8}}else{f=n+524290|0;if(!(a[f>>0]&1))ra=8;else{ac(n|0,-52,131072)|0;b[n+524288>>1]=0;a[f>>0]=0;ac(n+131072|0,0,131072)|0;ra=8}}if((ra|0)==8?g>>>0>2&h>>>0>2:0){da=h+-3|0;ga=k+(da&l)|0;ga=(_(d[ga>>0]|d[ga+1>>0]<<8|d[ga+2>>0]<<16|d[ga+3>>0]<<24,506832829)|0)>>>17;ea=n+524288|0;fa=b[ea>>1]|0;b[ea>>1]=fa+1<<16>>16;ha=fa&65535;ia=n+(ga<<2)|0;ca=da-(c[ia>>2]|0)|0;a[(da&65535)+(n+196608)>>0]=ga;b[n+262144+(ha<<2)>>1]=ca>>>0>65535?65535:ca;ga=n+131072+(ga<<1)|0;b[n+262144+(ha<<2)+2>>1]=b[ga>>1]|0;c[ia>>2]=da;b[ga>>1]=fa;ga=h+-2|0;fa=k+(ga&l)|0;fa=(_(d[fa>>0]|d[fa+1>>0]<<8|d[fa+2>>0]<<16|d[fa+3>>0]<<24,506832829)|0)>>>17;ia=b[ea>>1]|0;b[ea>>1]=ia+1<<16>>16;da=ia&65535;ha=n+(fa<<2)|0;ca=ga-(c[ha>>2]|0)|0;a[(ga&65535)+(n+196608)>>0]=fa;b[n+262144+(da<<2)>>1]=ca>>>0>65535?65535:ca;fa=n+131072+(fa<<1)|0;b[n+262144+(da<<2)+2>>1]=b[fa>>1]|0;c[ha>>2]=ga;b[fa>>1]=ia;fa=h+-1|0;ia=k+(fa&l)|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;ha=b[ea>>1]|0;b[ea>>1]=ha+1<<16>>16;ea=ha&65535;ga=n+(ia<<2)|0;da=fa-(c[ga>>2]|0)|0;a[(fa&65535)+(n+196608)>>0]=ia;b[n+262144+(ea<<2)>>1]=da>>>0>65535?65535:da;ia=n+131072+(ia<<1)|0;b[n+262144+(ea<<2)+2>>1]=b[ia>>1]|0;c[ga>>2]=fa;b[ia>>1]=ha}O=pa+4|0;P=pa+8|0;Q=pa+12|0;R=pa+4|0;S=pa+8|0;T=pa+12|0;U=n+524288|0;V=n+524296|0;W=n+524292|0;X=ja<<2;Y=oa+-4|0;Z=oa+-3|0;$=qa+12|0;ba=qa+4|0;ca=qa+8|0;da=qa+4|0;ea=qa+8|0;fa=qa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;N=q;f=u;a:while(1){L=N;M=t+X|0;b:while(1){K=oa-m|0;if((m+4|0)>>>0>=oa>>>0)break a;I=m>>>0>>0?m:na;c[pa>>2]=0;c[O>>2]=0;c[P>>2]=0;c[Q>>2]=4240;J=m&l;z=c[pa>>2]|0;H=k+J|0;B=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;y=B&255;c[pa>>2]=0;c[R>>2]=0;G=J+K|0;F=k+G|0;E=H;G=k+(G+-4)|0;h=4240;j=0;A=0;while(1){if((A|0)==10)break;x=(c[o+(c[11372+(A<<2)>>2]<<2)>>2]|0)+(c[11436+(A<<2)>>2]|0)|0;g=m-x|0;if(!A)if(g>>>0>=m>>>0|x>>>0>I>>>0)g=z;else ra=17;else if((g>>>0>>0?(a[(g&65535)+(n+196608)>>0]|0)==y<<24>>24:0)^1|x>>>0>I>>>0)g=z;else ra=17;if((ra|0)==17){ra=0;w=g&l;g=0;u=E;while(1){v=u;if(v>>>0>G>>>0)break;C=u;D=k+(w+g)|0;if((d[C>>0]|d[C+1>>0]<<8|d[C+2>>0]<<16|d[C+3>>0]<<24|0)!=(d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0))break;g=g+4|0;u=v+4|0}while(1){if(u>>>0>=F>>>0)break;if((a[k+(w+g)>>0]|0)!=(a[u>>0]|0))break;g=g+1|0;u=u+1|0}if(g>>>0>1?(ta=(g*540|0)+(c[11500+(A<<2)>>2]|0)|0,h>>>0>>0):0){c[pa>>2]=g;c[S>>2]=x;c[T>>2]=ta;h=ta;j=1}else g=z}z=g;A=A+1|0}w=0;u=m-(c[n+(B<<2)>>2]|0)|0;v=c[ka>>2]|0;g=e[n+131072+(B<<1)>>1]|0;c:while(1){D=J+z|0;C=D>>>0>l>>>0;D=k+D|0;x=w;y=u;A=v;B=g;while(1){w=A;A=A+-1|0;if(!w)break c;x=x+y|0;if(x>>>0>I>>>0)break c;w=m-x&l;y=B;B=e[n+262144+(B<<2)+2>>1]|0;y=e[n+262144+(y<<2)>>1]|0;if(C)continue;g=w+z|0;if(g>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+g>>0]|0)){v=0;g=E}else continue;while(1){u=g;if(u>>>0>G>>>0)break;Ga=g;Fa=k+(w+v)|0;if((d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0)!=(d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0))break;v=v+4|0;g=u+4|0}while(1){if(g>>>0>=F>>>0)break;if((a[k+(w+v)>>0]|0)!=(a[g>>0]|0))break;v=v+1|0;g=g+1|0}if(v>>>0<=3)continue;g=(v*540|0)+3840+(_((aa(x|0)|0)^31,-120)|0)|0;if(h>>>0>>0)break}c[pa>>2]=v;c[S>>2]=x;c[T>>2]=g;w=x;z=v;h=g;u=y;v=A;j=1;g=B}Ga=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;F=Fa&65535;G=n+(Ga<<2)|0;E=m-(c[G>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(F<<2)>>1]=E>>>0>65535?65535:E;Ga=n+131072+(Ga<<1)|0;b[n+262144+(F<<2)+2>>1]=b[Ga>>1]|0;c[G>>2]=m;b[Ga>>1]=Fa;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ga=b[21084+(w<<1)>>1]|0;g=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(ua=g&31,va=g>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=K>>>0):0){h=wa+ua|0;v=280811+h|0;h=280811+(h+-4)|0;u=0;g=280811+wa|0;while(1){if(g>>>0>h>>>0)break;Ga=k+(J+u)|0;if((d[g>>0]|d[g+1>>0]<<8|d[g+2>>0]<<16|d[g+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;u=u+4|0;g=g+4|0}while(1){if(g>>>0>=v>>>0)break;if((a[k+(J+u)>>0]|0)!=(a[g>>0]|0))break;u=u+1|0;g=g+1|0}if(!((u+10|0)>>>0<=ua>>>0|(u|0)==0)?(xa=I+va+1+(d[407930+(ua-u)>>0]<>0])|0,ya=(u*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[T>>2]|0)>>>0):0){c[pa>>2]=u;c[R>>2]=ua^u;c[S>>2]=xa;c[T>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){L=0;x=f;break}f=f+1|0;g=m+1|0;if(g>>>0<=t>>>0){m=g;continue}if(g>>>0>M>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;J=Fa&65535;K=n+(Ga<<2)|0;I=m-(c[K>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(J<<2)>>1]=I>>>0>65535?65535:I;Ga=n+131072+(Ga<<1)|0;b[n+262144+(J<<2)+2>>1]=b[Ga>>1]|0;c[K>>2]=m;b[Ga>>1]=Fa;m=m+4|0;f=f+4|0}}else{j=m+9|0;j=j>>>0>>0?j:Z;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;J=Fa&65535;K=n+(Ga<<2)|0;I=m-(c[K>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(J<<2)>>1]=I>>>0>65535?65535:I;Ga=n+131072+(Ga<<1)|0;b[n+262144+(J<<2)+2>>1]=b[Ga>>1]|0;c[K>>2]=m;b[Ga>>1]=Fa;m=m+2|0;f=f+2|0}}}while(1){K=K+-1|0;if((c[la>>2]|0)<5){f=(c[pa>>2]|0)+-1|0;f=f>>>0>>0?f:K}else f=0;c[qa>>2]=f;c[ba>>2]=0;c[ca>>2]=0;c[$>>2]=4240;y=m+1|0;I=y>>>0>>0?y:na;J=y&l;z=c[qa>>2]|0;H=k+J|0;B=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;w=B&255;c[qa>>2]=0;c[da>>2]=0;G=J+K|0;F=k+G|0;E=H;G=k+(G+-4)|0;g=4240;f=0;A=0;while(1){if((A|0)==10)break;v=(c[o+(c[11372+(A<<2)>>2]<<2)>>2]|0)+(c[11436+(A<<2)>>2]|0)|0;j=y-v|0;if(!A)if(j>>>0>=y>>>0|v>>>0>I>>>0)j=z;else ra=71;else if((j>>>0>>0?(a[(j&65535)+(n+196608)>>0]|0)==w<<24>>24:0)^1|v>>>0>I>>>0)j=z;else ra=71;if((ra|0)==71){ra=0;u=j&l;j=0;t=E;while(1){h=t;if(h>>>0>G>>>0)break;Fa=t;Ga=k+(u+j)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;j=j+4|0;t=h+4|0}while(1){if(t>>>0>=F>>>0)break;if((a[k+(u+j)>>0]|0)!=(a[t>>0]|0))break;j=j+1|0;t=t+1|0}if(j>>>0>1?(za=(j*540|0)+(c[11500+(A<<2)>>2]|0)|0,g>>>0>>0):0){c[qa>>2]=j;c[ea>>2]=v;c[fa>>2]=za;g=za;f=1}else j=z}z=j;A=A+1|0}u=0;t=y-(c[n+(B<<2)>>2]|0)|0;h=c[ka>>2]|0;j=e[n+131072+(B<<1)>>1]|0;d:while(1){D=J+z|0;C=D>>>0>l>>>0;D=k+D|0;v=u;w=t;A=h;B=j;while(1){Ga=A;A=A+-1|0;if(!Ga)break d;v=v+w|0;if(v>>>0>I>>>0)break d;u=y-v&l;w=B;B=e[n+262144+(B<<2)+2>>1]|0;w=e[n+262144+(w<<2)>>1]|0;if(C)continue;j=u+z|0;if(j>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+j>>0]|0)){h=0;j=E}else continue;while(1){t=j;if(t>>>0>G>>>0)break;Fa=j;Ga=k+(u+h)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;h=h+4|0;j=t+4|0}while(1){if(j>>>0>=F>>>0)break;if((a[k+(u+h)>>0]|0)!=(a[j>>0]|0))break;h=h+1|0;j=j+1|0}if(h>>>0<=3)continue;j=(h*540|0)+3840+(_((aa(v|0)|0)^31,-120)|0)|0;if(g>>>0>>0)break}c[qa>>2]=h;c[ea>>2]=v;c[fa>>2]=j;u=v;z=h;g=j;t=w;h=A;f=1;j=B}Ga=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>17;Fa=b[U>>1]|0;b[U>>1]=Fa+1<<16>>16;G=Fa&65535;M=n+(Ga<<2)|0;F=y-(c[M>>2]|0)|0;a[(y&65535)+(n+196608)>>0]=Ga;b[n+262144+(G<<2)>>1]=F>>>0>65535?65535:F;Ga=n+131072+(Ga<<1)|0;b[n+262144+(G<<2)+2>>1]=b[Ga>>1]|0;c[M>>2]=y;b[Ga>>1]=Fa;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;u=(_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ga=b[21084+(u<<1)>>1]|0;j=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(Aa=j&31,Ba=j>>>5,Ca=(c[11272+(Aa<<2)>>2]|0)+(_(Aa,Ba)|0)|0,Aa>>>0<=K>>>0):0){g=Ca+Aa|0;h=280811+g|0;g=280811+(g+-4)|0;t=0;j=280811+Ca|0;while(1){if(j>>>0>g>>>0)break;Ga=k+(J+t)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;t=t+4|0;j=j+4|0}while(1){if(j>>>0>=h>>>0)break;if((a[k+(J+t)>>0]|0)!=(a[j>>0]|0))break;t=t+1|0;j=j+1|0}if(!((t+10|0)>>>0<=Aa>>>0|(t|0)==0)?(Da=I+Ba+1+(d[407930+(Aa-t)>>0]<>0])|0,Ea=(t*540|0)+3840+(_((aa(Da|0)|0)^31,-120)|0)|0,Ea>>>0>=(c[fa>>2]|0)>>>0):0){c[qa>>2]=t;c[da>>2]=Aa^t;c[ea>>2]=Da;c[fa>>2]=Ea;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;u=u+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[Q>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[pa>>2]=c[qa>>2];c[pa+4>>2]=c[qa+4>>2];c[pa+8>>2]=c[qa+8>>2];c[pa+12>>2]=c[qa+12>>2];L=L+1|0;if(!((L|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[pa>>2]|0;t=y+(m<<1)+ja|0;f=c[P>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:na)>>>0){h=f+3|0;Ga=c[o>>2]|0;j=h-Ga|0;g=c[ia>>2]|0;h=h-g|0;if((f|0)==(Ga|0))f=0;else{f:do if((f|0)!=(g|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(h>>>0<7){f=266017486>>>(h<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[P>>2];m=c[pa>>2]|0}}else f=f+15|0;while(0);w=N+16|0;Ga=c[O>>2]|0;j=m^Ga;c[N>>2]=x;c[N+4>>2]=m|Ga<<24;m=N+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{M=f+-12|0;Ga=((aa(M|0)|0)^31)+-1|0;Fa=M>>>Ga&1;f=((Ga<<1)+65534|Fa)+16&65535;b[m>>1]=f;m=Ga<<24|M-((Fa|2)<>2]=m;u=f<<16>>16==0;v=N+12|0;do if(x>>>0>=6){if(x>>>0<130){Ga=x+-2|0;h=((aa(Ga|0)|0)^31)+-1|0;h=(h<<1)+(Ga>>>h)+2&65535;break}if(x>>>0<2114){h=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)h=21;else h=x>>>0<22594?22:23}else h=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ga=j+-6|0;f=((aa(Ga|0)|0)^31)+-1|0;f=(f<<1)+(Ga>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=h&65535;g=m&7|j<<3&56;if(u&(h&65535)<8&(f&65535)<16)f=((f&65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h;la=m+4|0;ia=c[la>>2]|0;ja=(ia|0)<9?64:512;t=ja+h|0;ka=n+1311756|0;c[ka>>2]=((ia|0)>6?7:8)<>>0<513){f=0;while(1){if((f|0)==(g|0))break;ia=k+f|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;c[n+(ia<<2)>>2]=-858993460;b[n+131072+(ia<<1)>>1]=-13108;f=f+1|0}ac(n+196608|0,0,65536)|0;ac(n+1310720|0,0,1024)|0;if(g){a[n+1311744>>0]=0;Ea=8}}else if(!(a[n+1311744>>0]&1))Ea=8;else{ac(n|0,-52,131072)|0;ac(n+131072|0,0,131072)|0;ac(n+1310720|0,0,1025)|0;Ea=8}if((Ea|0)==8?g>>>0>2&h>>>0>2:0){ea=h+-3|0;ga=k+(ea&l)|0;ga=(_(d[ga>>0]|d[ga+1>>0]<<8|d[ga+2>>0]<<16|d[ga+3>>0]<<24,506832829)|0)>>>17;ia=ga&511;ha=n+1310720+(ia<<1)|0;fa=b[ha>>1]|0;b[ha>>1]=fa+1<<16>>16;fa=fa&511;ha=n+(ga<<2)|0;da=ea-(c[ha>>2]|0)|0;a[(ea&65535)+(n+196608)>>0]=ga;b[n+262144+(ia<<11)+(fa<<2)>>1]=da>>>0>65535?65535:da;ga=n+131072+(ga<<1)|0;b[n+262144+(ia<<11)+(fa<<2)+2>>1]=b[ga>>1]|0;c[ha>>2]=ea;b[ga>>1]=fa;ga=h+-2|0;fa=k+(ga&l)|0;fa=(_(d[fa>>0]|d[fa+1>>0]<<8|d[fa+2>>0]<<16|d[fa+3>>0]<<24,506832829)|0)>>>17;ha=fa&511;ea=n+1310720+(ha<<1)|0;ia=b[ea>>1]|0;b[ea>>1]=ia+1<<16>>16;ia=ia&511;ea=n+(fa<<2)|0;da=ga-(c[ea>>2]|0)|0;a[(ga&65535)+(n+196608)>>0]=fa;b[n+262144+(ha<<11)+(ia<<2)>>1]=da>>>0>65535?65535:da;fa=n+131072+(fa<<1)|0;b[n+262144+(ha<<11)+(ia<<2)+2>>1]=b[fa>>1]|0;c[ea>>2]=ga;b[fa>>1]=ia;fa=h+-1|0;ia=k+(fa&l)|0;ia=(_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17;ea=ia&511;ga=n+1310720+(ea<<1)|0;ha=b[ga>>1]|0;b[ga>>1]=ha+1<<16>>16;ha=ha&511;ga=n+(ia<<2)|0;da=fa-(c[ga>>2]|0)|0;a[(fa&65535)+(n+196608)>>0]=ia;b[n+262144+(ea<<11)+(ha<<2)>>1]=da>>>0>65535?65535:da;ia=n+131072+(ia<<1)|0;b[n+262144+(ea<<11)+(ha<<2)+2>>1]=b[ia>>1]|0;c[ga>>2]=fa;b[ia>>1]=ha}P=pa+4|0;Q=pa+8|0;R=pa+12|0;S=pa+4|0;T=pa+8|0;U=pa+12|0;V=n+1311752|0;W=n+1311748|0;X=ja<<2;Y=oa+-4|0;Z=oa+-3|0;$=qa+12|0;ba=qa+4|0;ca=qa+8|0;da=qa+4|0;ea=qa+8|0;fa=qa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=u;a:while(1){M=O;N=t+X|0;b:while(1){L=oa-m|0;if((m+4|0)>>>0>=oa>>>0)break a;J=m>>>0>>0?m:na;c[pa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;A=c[pa>>2]|0;I=k+K|0;B=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;y=B&255;c[pa>>2]=0;c[S>>2]=0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;h=4240;j=0;z=0;while(1){if((z|0)==16)break;x=(c[o+(c[11372+(z<<2)>>2]<<2)>>2]|0)+(c[11436+(z<<2)>>2]|0)|0;g=m-x|0;if(!z)if(g>>>0>=m>>>0|x>>>0>J>>>0)g=A;else Ea=17;else if((g>>>0>>0?(a[(g&65535)+(n+196608)>>0]|0)==y<<24>>24:0)^1|x>>>0>J>>>0)g=A;else Ea=17;if((Ea|0)==17){Ea=0;w=g&l;g=0;u=F;while(1){v=u;if(v>>>0>H>>>0)break;D=u;E=k+(w+g)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;g=g+4|0;u=v+4|0}while(1){if(u>>>0>=G>>>0)break;if((a[k+(w+g)>>0]|0)!=(a[u>>0]|0))break;g=g+1|0;u=u+1|0}if(g>>>0>1?(sa=(g*540|0)+(c[11500+(z<<2)>>2]|0)|0,h>>>0>>0):0){c[pa>>2]=g;c[T>>2]=x;c[U>>2]=sa;h=sa;j=1}else g=A}A=g;z=z+1|0}E=B&511;w=0;u=m-(c[n+(B<<2)>>2]|0)|0;v=c[ka>>2]|0;g=e[n+131072+(B<<1)>>1]|0;c:while(1){D=K+A|0;C=D>>>0>l>>>0;D=k+D|0;x=w;y=u;z=v;B=g;while(1){w=z;z=z+-1|0;if(!w)break c;x=x+y|0;if(x>>>0>J>>>0)break c;w=m-x&l;y=B;B=e[n+262144+(E<<11)+(B<<2)+2>>1]|0;y=e[n+262144+(E<<11)+(y<<2)>>1]|0;if(C)continue;g=w+A|0;if(g>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+g>>0]|0)){v=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ga=g;Fa=k+(w+v)|0;if((d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0)!=(d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0))break;v=v+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(w+v)>>0]|0)!=(a[g>>0]|0))break;v=v+1|0;g=g+1|0}if(v>>>0<=3)continue;g=(v*540|0)+3840+(_((aa(x|0)|0)^31,-120)|0)|0;if(h>>>0>>0)break}c[pa>>2]=v;c[T>>2]=x;c[U>>2]=g;w=x;A=v;h=g;u=y;v=z;j=1;g=B}Ga=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;G=Ga&511;H=n+1310720+(G<<1)|0;Fa=b[H>>1]|0;b[H>>1]=Fa+1<<16>>16;Fa=Fa&511;H=n+(Ga<<2)|0;F=m-(c[H>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(G<<11)+(Fa<<2)>>1]=F>>>0>65535?65535:F;Ga=n+131072+(Ga<<1)|0;b[n+262144+(G<<11)+(Fa<<2)+2>>1]=b[Ga>>1]|0;c[H>>2]=m;b[Ga>>1]=Fa;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ga=b[21084+(w<<1)>>1]|0;g=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(ta=g&31,ua=g>>>5,va=(c[11272+(ta<<2)>>2]|0)+(_(ta,ua)|0)|0,ta>>>0<=L>>>0):0){h=va+ta|0;v=280811+h|0;h=280811+(h+-4)|0;u=0;g=280811+va|0;while(1){if(g>>>0>h>>>0)break;Ga=k+(K+u)|0;if((d[g>>0]|d[g+1>>0]<<8|d[g+2>>0]<<16|d[g+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;u=u+4|0;g=g+4|0}while(1){if(g>>>0>=v>>>0)break;if((a[k+(K+u)>>0]|0)!=(a[g>>0]|0))break;u=u+1|0;g=g+1|0}if(!((u+10|0)>>>0<=ta>>>0|(u|0)==0)?(wa=J+ua+1+(d[407930+(ta-u)>>0]<>0])|0,xa=(u*540|0)+3840+(_((aa(wa|0)|0)^31,-120)|0)|0,xa>>>0>=(c[U>>2]|0)>>>0):0){c[pa>>2]=u;c[S>>2]=ta^u;c[T>>2]=wa;c[U>>2]=xa;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){M=0;x=f;break}f=f+1|0;g=m+1|0;if(g>>>0<=t>>>0){m=g;continue}if(g>>>0>N>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;K=Ga&511;L=n+1310720+(K<<1)|0;Fa=b[L>>1]|0;b[L>>1]=Fa+1<<16>>16;Fa=Fa&511;L=n+(Ga<<2)|0;J=m-(c[L>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(K<<11)+(Fa<<2)>>1]=J>>>0>65535?65535:J;Ga=n+131072+(Ga<<1)|0;b[n+262144+(K<<11)+(Fa<<2)+2>>1]=b[Ga>>1]|0;c[L>>2]=m;b[Ga>>1]=Fa;m=m+4|0;f=f+4|0}}else{j=m+9|0;j=j>>>0>>0?j:Z;m=g;while(1){if(m>>>0>=j>>>0)continue b;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;K=Ga&511;L=n+1310720+(K<<1)|0;Fa=b[L>>1]|0;b[L>>1]=Fa+1<<16>>16;Fa=Fa&511;L=n+(Ga<<2)|0;J=m-(c[L>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(K<<11)+(Fa<<2)>>1]=J>>>0>65535?65535:J;Ga=n+131072+(Ga<<1)|0;b[n+262144+(K<<11)+(Fa<<2)+2>>1]=b[Ga>>1]|0;c[L>>2]=m;b[Ga>>1]=Fa;m=m+2|0;f=f+2|0}}}while(1){L=L+-1|0;if((c[la>>2]|0)<5){f=(c[pa>>2]|0)+-1|0;f=f>>>0>>0?f:L}else f=0;c[qa>>2]=f;c[ba>>2]=0;c[ca>>2]=0;c[$>>2]=4240;y=m+1|0;J=y>>>0>>0?y:na;K=y&l;A=c[qa>>2]|0;I=k+K|0;B=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;w=B&255;c[qa>>2]=0;c[da>>2]=0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;g=4240;f=0;z=0;while(1){if((z|0)==16)break;v=(c[o+(c[11372+(z<<2)>>2]<<2)>>2]|0)+(c[11436+(z<<2)>>2]|0)|0;j=y-v|0;if(!z)if(j>>>0>=y>>>0|v>>>0>J>>>0)j=A;else Ea=71;else if((j>>>0>>0?(a[(j&65535)+(n+196608)>>0]|0)==w<<24>>24:0)^1|v>>>0>J>>>0)j=A;else Ea=71;if((Ea|0)==71){Ea=0;u=j&l;j=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;Fa=t;Ga=k+(u+j)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;j=j+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(u+j)>>0]|0)!=(a[t>>0]|0))break;j=j+1|0;t=t+1|0}if(j>>>0>1?(ya=(j*540|0)+(c[11500+(z<<2)>>2]|0)|0,g>>>0>>0):0){c[qa>>2]=j;c[ea>>2]=v;c[fa>>2]=ya;g=ya;f=1}else j=A}A=j;z=z+1|0}E=B&511;u=0;t=y-(c[n+(B<<2)>>2]|0)|0;h=c[ka>>2]|0;j=e[n+131072+(B<<1)>>1]|0;d:while(1){D=K+A|0;C=D>>>0>l>>>0;D=k+D|0;v=u;w=t;z=h;B=j;while(1){Ga=z;z=z+-1|0;if(!Ga)break d;v=v+w|0;if(v>>>0>J>>>0)break d;u=y-v&l;w=B;B=e[n+262144+(E<<11)+(B<<2)+2>>1]|0;w=e[n+262144+(E<<11)+(w<<2)>>1]|0;if(C)continue;j=u+A|0;if(j>>>0>l>>>0)continue;if((a[D>>0]|0)==(a[k+j>>0]|0)){h=0;j=F}else continue;while(1){t=j;if(t>>>0>H>>>0)break;Fa=j;Ga=k+(u+h)|0;if((d[Fa>>0]|d[Fa+1>>0]<<8|d[Fa+2>>0]<<16|d[Fa+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;h=h+4|0;j=t+4|0}while(1){if(j>>>0>=G>>>0)break;if((a[k+(u+h)>>0]|0)!=(a[j>>0]|0))break;h=h+1|0;j=j+1|0}if(h>>>0<=3)continue;j=(h*540|0)+3840+(_((aa(v|0)|0)^31,-120)|0)|0;if(g>>>0>>0)break}c[qa>>2]=h;c[ea>>2]=v;c[fa>>2]=j;u=v;A=h;g=j;t=w;h=z;f=1;j=B}Ga=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;H=Ga&511;N=n+1310720+(H<<1)|0;Fa=b[N>>1]|0;b[N>>1]=Fa+1<<16>>16;Fa=Fa&511;N=n+(Ga<<2)|0;G=y-(c[N>>2]|0)|0;a[(y&65535)+(n+196608)>>0]=Ga;b[n+262144+(H<<11)+(Fa<<2)>>1]=G>>>0>65535?65535:G;Ga=n+131072+(Ga<<1)|0;b[n+262144+(H<<11)+(Fa<<2)+2>>1]=b[Ga>>1]|0;c[N>>2]=y;b[Ga>>1]=Fa;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;u=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ga=b[21084+(u<<1)>>1]|0;j=Ga&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ga<<16>>16!=0?(za=j&31,Aa=j>>>5,Ba=(c[11272+(za<<2)>>2]|0)+(_(za,Aa)|0)|0,za>>>0<=L>>>0):0){g=Ba+za|0;h=280811+g|0;g=280811+(g+-4)|0;t=0;j=280811+Ba|0;while(1){if(j>>>0>g>>>0)break;Ga=k+(K+t)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24|0))break;t=t+4|0;j=j+4|0}while(1){if(j>>>0>=h>>>0)break;if((a[k+(K+t)>>0]|0)!=(a[j>>0]|0))break;t=t+1|0;j=j+1|0}if(!((t+10|0)>>>0<=za>>>0|(t|0)==0)?(Ca=J+Aa+1+(d[407930+(za-t)>>0]<>0])|0,Da=(t*540|0)+3840+(_((aa(Ca|0)|0)^31,-120)|0)|0,Da>>>0>=(c[fa>>2]|0)>>>0):0){c[qa>>2]=t;c[da>>2]=za^t;c[ea>>2]=Ca;c[fa>>2]=Da;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;u=u+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[pa>>2]=c[qa>>2];c[pa+4>>2]=c[qa+4>>2];c[pa+8>>2]=c[qa+8>>2];c[pa+12>>2]=c[qa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[pa>>2]|0;t=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:na)>>>0){h=f+3|0;Ga=c[o>>2]|0;j=h-Ga|0;g=c[ia>>2]|0;h=h-g|0;if((f|0)==(Ga|0))f=0;else{f:do if((f|0)!=(g|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(h>>>0<7){f=266017486>>>(h<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[pa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ga=c[P>>2]|0;j=m^Ga;c[O>>2]=x;c[O+4>>2]=m|Ga<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ga=((aa(N|0)|0)^31)+-1|0;Fa=N>>>Ga&1;f=((Ga<<1)+65534|Fa)+16&65535;b[m>>1]=f;m=Ga<<24|N-((Fa|2)<>2]=m;u=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ga=x+-2|0;h=((aa(Ga|0)|0)^31)+-1|0;h=(h<<1)+(Ga>>>h)+2&65535;break}if(x>>>0<2114){h=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)h=21;else h=x>>>0<22594?22:23}else h=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ga=j+-6|0;f=((aa(Ga|0)|0)^31)+-1|0;f=(f<<1)+(Ga>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=h&65535;g=m&7|j<<3&56;if(u&(h&65535)<8&(f&65535)<16)f=((f&65535)<8?g:g|64)&65535;else f=b[88156+((m>>>3)+((j>>>3)*3|0)<<1)>>1]|g&65535;b[v>>1]=f;c[s>>2]=(c[s>>2]|0)+x;f=y+(c[pa>>2]|0)|0;f=f>>>0>>0?f:ma;m=y+2|0;while(1){if(m>>>0>=f>>>0)break;Ga=k+(m&l)|0;Ga=(_(d[Ga>>0]|d[Ga+1>>0]<<8|d[Ga+2>>0]<<16|d[Ga+3>>0]<<24,506832829)|0)>>>17;N=Ga&511;O=n+1310720+(N<<1)|0;Fa=b[O>>1]|0;b[O>>1]=Fa+1<<16>>16;Fa=Fa&511;O=n+(Ga<<2)|0;M=m-(c[O>>2]|0)|0;a[(m&65535)+(n+196608)>>0]=Ga;b[n+262144+(N<<11)+(Fa<<2)>>1]=M>>>0>65535?65535:M;Ga=n+131072+(Ga<<1)|0;b[n+262144+(N<<11)+(Fa<<2)+2>>1]=b[Ga>>1]|0;c[O>>2]=m;b[Ga>>1]=Fa;m=m+1|0}m=y+(c[pa>>2]|0)|0;O=w;f=0}c[p>>2]=f+L;c[r>>2]=(c[r>>2]|0)+(M-q>>4);i=ra;return}function Ua(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;j=d+524304|0;if(!(a[j>>0]&1))return;e=1<>2];c[d>>2]=e+-1;e=1-e|0;c[d+524296>>2]=e;i=0;while(1){if((i|0)==131072)break;c[d+4+(i<<2)>>2]=e;i=i+1|0}if((f|0)==0^1|h^1)g=(c[d>>2]|0)+1|0;h=d+524300|0;do if(g>>>0>(c[h>>2]|0)>>>0){i=d+524292|0;e=b+8|0;ra[c[b+4>>2]&1](c[e>>2]|0,c[i>>2]|0);c[i>>2]=0;e=sa[c[b>>2]&1](c[e>>2]|0,g<<3)|0;if(!e)oa(1);else{c[i>>2]=e;c[h>>2]=g;break}}while(0);a[j>>0]=0;return}function Va(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0,h=0,i=0.0,j=0.0,k=0;f=0;h=0;while(1){if((f|0)==(b|0))break;k=h+(c[a+(f<<2)>>2]|0)|0;f=f+1|0;h=k}if(h>>>0<256)e=+g[19516+(h<<2)>>2];else e=+Xb(+(h>>>0));j=e+2.0;h=0;while(1){if((h|0)==(b|0))break;f=c[a+(h<<2)>>2]|0;if(f){if(f>>>0<256)i=+g[19516+(f<<2)>>2];else i=+Xb(+(f>>>0));i=e-i;f=d+(h<<2)|0;g[f>>2]=i;if(i<1.0)g[f>>2]=1.0}else g[d+(h<<2)>>2]=j;h=h+1|0}return}function Wa(a){a=a|0;var b=0.0,d=0,e=0.0,f=0,h=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0,s=0;s=i;i=i+112|0;m=s+88|0;p=s+72|0;r=s;n=c[a+1024>>2]|0;if(!n){q=12.0;i=s;return +q}else{f=0;l=0}while(1){if(l>>>0>=256){d=f;break}if(c[a+(l<<2)>>2]|0){c[m+(f<<2)>>2]=l;d=f+1|0;if((f|0)>3)break}else d=f;f=d;l=l+1|0}switch(d|0){case 2:{q=+(n>>>0)+20.0;i=s;return +q}case 3:{p=c[a+(c[m>>2]<<2)>>2]|0;n=c[a+(c[m+4>>2]<<2)>>2]|0;a=c[a+(c[m+8>>2]<<2)>>2]|0;r=n>>>0>a>>>0?n:a;q=+(p+n+a<<1>>>0)+28.0-+((p>>>0>r>>>0?p:r)>>>0);i=s;return +q}case 4:{d=0;while(1){if((d|0)==4){n=0;break}c[p+(d<<2)>>2]=c[a+(c[m+(d<<2)>>2]<<2)>>2];d=d+1|0}while(1){if((n|0)==4)break;m=p+(n<<2)|0;d=n;while(1){a=d+1|0;if((d|0)==3)break;d=p+(a<<2)|0;f=c[d>>2]|0;l=c[m>>2]|0;if(f>>>0<=l>>>0){d=a;continue}c[d>>2]=l;c[m>>2]=f;d=a}n=n+1|0}a=(c[p+8>>2]|0)+(c[p+12>>2]|0)|0;r=c[p>>2]|0;q=+((a*3|0)>>>0)+37.0+ +(r+(c[p+4>>2]|0)<<1>>>0)-+((a>>>0>r>>>0?a:r)>>>0);i=s;return +q}case 1:{q=12.0;i=s;return +q}default:{d=r;f=d+72|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(f|0));if(n>>>0<256)h=+g[19516+(n<<2)>>2];else h=+Xb(+(n>>>0));m=r+68|0;b=0.0;d=0;n=1;a:while(1){q=b;b:while(1){while(1){if(d>>>0>=256)break a;f=c[a+(d<<2)>>2]|0;if(!f){l=1;f=d}else break b;while(1){f=f+1|0;if(f>>>0>=256)break;if(c[a+(f<<2)>>2]|0)break;l=l+1|0}d=d+l|0;if((d|0)==256)break a;if(l>>>0>=3)break;c[r>>2]=(c[r>>2]|0)+l}b=q;f=l+-2|0;while(1){if(!f){q=b;continue b}c[m>>2]=(c[m>>2]|0)+1;b=b+3.0;f=f>>>3}}if(f>>>0<256){e=+(f>>>0);b=+g[19516+(f<<2)>>2]}else{b=+(f>>>0);e=b;b=+Xb(b)}b=h-b;p=~~(b+.5)>>>0;p=p>>>0>15?15:p;l=r+(p<<2)|0;c[l>>2]=(c[l>>2]|0)+1;b=q+e*b;d=d+1|0;n=p>>>0>n>>>0?p:n}o=+(((n<<1)+18|0)>>>0);m=r+72|0;d=r;b=0.0;n=0;while(1){if(d>>>0>=m>>>0)break;f=c[d>>2]|0;e=+(f>>>0);if(f>>>0<256)k=+g[19516+(f<<2)>>2];else k=+Xb(e);l=c[d+4>>2]|0;h=+(l>>>0);if(l>>>0<256)j=+g[19516+(l<<2)>>2];else j=+Xb(h);d=d+8|0;b=b-e*k-h*j;n=n+f+l|0}k=q+o;j=+(n>>>0);if(!n)h=j;else{if(n>>>0<256)e=+g[19516+(n<<2)>>2];else e=+Xb(j);h=j;b=b+j*e}q=k+(b>2]|0;if(!n){q=12.0;i=s;return +q}else{f=0;l=0}while(1){if(l>>>0>=704){d=f;break}if(c[a+(l<<2)>>2]|0){c[m+(f<<2)>>2]=l;d=f+1|0;if((f|0)>3)break}else d=f;f=d;l=l+1|0}switch(d|0){case 2:{q=+(n>>>0)+20.0;i=s;return +q}case 3:{p=c[a+(c[m>>2]<<2)>>2]|0;n=c[a+(c[m+4>>2]<<2)>>2]|0;a=c[a+(c[m+8>>2]<<2)>>2]|0;r=n>>>0>a>>>0?n:a;q=+(p+n+a<<1>>>0)+28.0-+((p>>>0>r>>>0?p:r)>>>0);i=s;return +q}case 4:{d=0;while(1){if((d|0)==4){n=0;break}c[p+(d<<2)>>2]=c[a+(c[m+(d<<2)>>2]<<2)>>2];d=d+1|0}while(1){if((n|0)==4)break;m=p+(n<<2)|0;d=n;while(1){a=d+1|0;if((d|0)==3)break;d=p+(a<<2)|0;f=c[d>>2]|0;l=c[m>>2]|0;if(f>>>0<=l>>>0){d=a;continue}c[d>>2]=l;c[m>>2]=f;d=a}n=n+1|0}a=(c[p+8>>2]|0)+(c[p+12>>2]|0)|0;r=c[p>>2]|0;q=+((a*3|0)>>>0)+37.0+ +(r+(c[p+4>>2]|0)<<1>>>0)-+((a>>>0>r>>>0?a:r)>>>0);i=s;return +q}case 1:{q=12.0;i=s;return +q}default:{d=r;f=d+72|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(f|0));if(n>>>0<256)h=+g[19516+(n<<2)>>2];else h=+Xb(+(n>>>0));m=r+68|0;b=0.0;d=0;n=1;a:while(1){q=b;b:while(1){while(1){if(d>>>0>=704)break a;f=c[a+(d<<2)>>2]|0;if(!f){l=1;f=d}else break b;while(1){f=f+1|0;if(f>>>0>=704)break;if(c[a+(f<<2)>>2]|0)break;l=l+1|0}d=d+l|0;if((d|0)==704)break a;if(l>>>0>=3)break;c[r>>2]=(c[r>>2]|0)+l}b=q;f=l+-2|0;while(1){if(!f){q=b;continue b}c[m>>2]=(c[m>>2]|0)+1;b=b+3.0;f=f>>>3}}if(f>>>0<256){e=+(f>>>0);b=+g[19516+(f<<2)>>2]}else{b=+(f>>>0);e=b;b=+Xb(b)}b=h-b;p=~~(b+.5)>>>0;p=p>>>0>15?15:p;l=r+(p<<2)|0;c[l>>2]=(c[l>>2]|0)+1;b=q+e*b;d=d+1|0;n=p>>>0>n>>>0?p:n}o=+(((n<<1)+18|0)>>>0);m=r+72|0;d=r;b=0.0;n=0;while(1){if(d>>>0>=m>>>0)break;f=c[d>>2]|0;e=+(f>>>0);if(f>>>0<256)k=+g[19516+(f<<2)>>2];else k=+Xb(e);l=c[d+4>>2]|0;h=+(l>>>0);if(l>>>0<256)j=+g[19516+(l<<2)>>2];else j=+Xb(h);d=d+8|0;b=b-e*k-h*j;n=n+f+l|0}k=q+o;j=+(n>>>0);if(!n)h=j;else{if(n>>>0<256)e=+g[19516+(n<<2)>>2];else e=+Xb(j);h=j;b=b+j*e}q=k+(b>2]|0;if(!n){q=12.0;i=s;return +q}else{f=0;l=0}while(1){if(l>>>0>=520){d=f;break}if(c[a+(l<<2)>>2]|0){c[m+(f<<2)>>2]=l;d=f+1|0;if((f|0)>3)break}else d=f;f=d;l=l+1|0}switch(d|0){case 2:{q=+(n>>>0)+20.0;i=s;return +q}case 3:{p=c[a+(c[m>>2]<<2)>>2]|0;n=c[a+(c[m+4>>2]<<2)>>2]|0;a=c[a+(c[m+8>>2]<<2)>>2]|0;r=n>>>0>a>>>0?n:a;q=+(p+n+a<<1>>>0)+28.0-+((p>>>0>r>>>0?p:r)>>>0);i=s;return +q}case 4:{d=0;while(1){if((d|0)==4){n=0;break}c[p+(d<<2)>>2]=c[a+(c[m+(d<<2)>>2]<<2)>>2];d=d+1|0}while(1){if((n|0)==4)break;m=p+(n<<2)|0;d=n;while(1){a=d+1|0;if((d|0)==3)break;d=p+(a<<2)|0;f=c[d>>2]|0;l=c[m>>2]|0;if(f>>>0<=l>>>0){d=a;continue}c[d>>2]=l;c[m>>2]=f;d=a}n=n+1|0}a=(c[p+8>>2]|0)+(c[p+12>>2]|0)|0;r=c[p>>2]|0;q=+((a*3|0)>>>0)+37.0+ +(r+(c[p+4>>2]|0)<<1>>>0)-+((a>>>0>r>>>0?a:r)>>>0);i=s;return +q}case 1:{q=12.0;i=s;return +q}default:{d=r;f=d+72|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(f|0));if(n>>>0<256)h=+g[19516+(n<<2)>>2];else h=+Xb(+(n>>>0));m=r+68|0;b=0.0;d=0;n=1;a:while(1){q=b;b:while(1){while(1){if(d>>>0>=520)break a;f=c[a+(d<<2)>>2]|0;if(!f){l=1;f=d}else break b;while(1){f=f+1|0;if(f>>>0>=520)break;if(c[a+(f<<2)>>2]|0)break;l=l+1|0}d=d+l|0;if((d|0)==520)break a;if(l>>>0>=3)break;c[r>>2]=(c[r>>2]|0)+l}b=q;f=l+-2|0;while(1){if(!f){q=b;continue b}c[m>>2]=(c[m>>2]|0)+1;b=b+3.0;f=f>>>3}}if(f>>>0<256){e=+(f>>>0);b=+g[19516+(f<<2)>>2]}else{b=+(f>>>0);e=b;b=+Xb(b)}b=h-b;p=~~(b+.5)>>>0;p=p>>>0>15?15:p;l=r+(p<<2)|0;c[l>>2]=(c[l>>2]|0)+1;b=q+e*b;d=d+1|0;n=p>>>0>n>>>0?p:n}o=+(((n<<1)+18|0)>>>0);m=r+72|0;d=r;b=0.0;n=0;while(1){if(d>>>0>=m>>>0)break;f=c[d>>2]|0;e=+(f>>>0);if(f>>>0<256)k=+g[19516+(f<<2)>>2];else k=+Xb(e);l=c[d+4>>2]|0;h=+(l>>>0);if(l>>>0<256)j=+g[19516+(l<<2)>>2];else j=+Xb(h);d=d+8|0;b=b-e*k-h*j;n=n+f+l|0}k=q+o;j=+(n>>>0);if(!n)h=j;else{if(n>>>0<256)e=+g[19516+(n<<2)>>2];else e=+Xb(j);h=j;b=b+j*e}q=k+(b>2]|0)|0;t=t+1|0;K=$}$=f+8|0;R=sa[c[f>>2]&1](c[$>>2]|0,K)|0;if(!R)oa(1);x=n+1|0;v=0;w=0;while(1){t=m&n;if((w|0)==(k|0))break;m=c[j+(w<<4)>>2]|0;if((t+m|0)>>>0>n>>>0){Q=x-t|0;dc(R+v|0,l+t|0,Q|0)|0;t=0;u=m-Q|0;m=v+Q|0}else{u=m;m=v}if(u){dc(R+m|0,l+t|0,u|0)|0;m=m+u|0}v=m;m=t+u+(c[j+(w<<4)+4>>2]&16777215)|0;w=w+1|0}B=((K>>>0)/544|0)+1|0;B=B>>>0>100?100:B;do if(K){if(K>>>0<128){w=p+16|0;m=c[w>>2]|0;x=p+4|0;t=c[x>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=p+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[f+4>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v;t=c[x>>2]|0}w=p+20|0;m=c[w>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}t=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!t)oa(1);u=c[w>>2]|0;m=p+12|0;if(u)dc(t|0,c[m>>2]|0,u<<2|0)|0;ra[c[f+4>>2]&1](c[$>>2]|0,c[m>>2]|0);c[m>>2]=t;c[w>>2]=v;t=c[x>>2]|0}else m=p+12|0;c[p>>2]=1;a[(c[p+8>>2]|0)+t>>0]=0;c[(c[m>>2]|0)+(c[x>>2]<<2)>>2]=K;c[x>>2]=(c[x>>2]|0)+1;break}J=sa[c[f>>2]&1](c[$>>2]|0,B*1040|0)|0;if(!J)oa(1);t=0;while(1){if((t|0)==(B|0))break;ac(J+(t*1040|0)|0,0,1024)|0;c[J+(t*1040|0)+1024>>2]=0;h[J+(t*1040|0)+1032>>3]=s;t=t+1|0}w=(K>>>0)/(B>>>0)|0;x=K+-71|0;m=7;l=0;while(1){if((l|0)==(B|0))break;t=((_(K,l)|0)>>>0)/(B>>>0)|0;if(l){m=m*16807|0;m=(m|0)==0?1:m;t=t+((m>>>0)%(w>>>0)|0)|0}u=J+(l*1040|0)+1024|0;c[u>>2]=(c[u>>2]|0)+70;u=71;v=R+((t+70|0)>>>0>>0?t:x)|0;while(1){t=u+-1|0;if(!t)break;u=J+(l*1040|0)+(d[v>>0]<<2)|0;c[u>>2]=(c[u>>2]|0)+1;u=t;v=v+1|0}l=l+1|0}c[Z>>2]=7;u=((K<<1>>>0)/70|0)+100+B+-1|0;u=u-((u>>>0)%(B>>>0)|0)|0;v=Y+1024|0;w=Y+1032|0;x=K>>>0>70;l=K+-69|0;n=Y+1024|0;A=0;while(1){if(A>>>0>=u>>>0)break;ac(Y|0,0,1028)|0;h[w>>3]=s;if(x){m=(c[Z>>2]|0)*16807|0;Q=(m|0)==0;c[Z>>2]=Q?1:m;t=70;m=((Q?1:m)>>>0)%(l>>>0)|0}else{t=K;m=0}c[n>>2]=(c[n>>2]|0)+t;t=t+1|0;m=R+m|0;while(1){t=t+-1|0;if(!t)break;Q=Y+(d[m>>0]<<2)|0;c[Q>>2]=(c[Q>>2]|0)+1;m=m+1|0}t=(A>>>0)%(B>>>0)|0;m=J+(t*1040|0)+1024|0;c[m>>2]=(c[m>>2]|0)+(c[v>>2]|0);m=0;while(1){if((m|0)==256)break;Q=J+(t*1040|0)+(m<<2)|0;c[Q>>2]=(c[Q>>2]|0)+(c[Y+(m<<2)>>2]|0);m=m+1|0}A=A+1|0}Q=sa[c[f>>2]&1](c[$>>2]|0,K)|0;if(!Q)oa(1);F=sa[c[f>>2]&1](c[$>>2]|0,B<<11)|0;if(!F)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,B<<3)|0;if(!G)oa(1);H=_(K,(B+7|0)>>>3)|0;H=sa[c[f>>2]&1](c[$>>2]|0,H)|0;if(!H)oa(1);I=sa[c[f>>2]&1](c[$>>2]|0,B<<1)|0;if(!I)oa(1);C=(c[o+4>>2]|0)<11?3:10;D=K+-1|0;E=Q+D|0;O=0;A=0;a:while(1){if(A>>>0>=C>>>0){l=136;break}n=(B+7|0)>>>3;if(B>>>0>=257){l=73;break}b:do if(B>>>0<2){t=0;while(1){if((t|0)==(K|0)){v=1;break b}a[Q+t>>0]=0;t=t+1|0}}else{ac(F|0,0,B<<11|0)|0;m=0;while(1){if((m|0)==(B|0)){t=256;break}t=c[J+(m*1040|0)+1024>>2]|0;if(t>>>0<256)y=+g[19516+(t<<2)>>2];else y=+Xb(+(t>>>0));h[F+(m<<3)>>3]=y;m=m+1|0}c:while(1){if(!t)break;t=t+-1|0;u=_(t,B)|0;v=0;while(1){if((v|0)==(B|0))continue c;z=+h[F+(v<<3)>>3];m=c[J+(v*1040|0)+(t<<2)>>2]|0;do if(m)if(m>>>0<256){y=+g[19516+(m<<2)>>2];break}else{y=+Xb(+(m>>>0));break}else y=-2.0;while(0);h[F+(u+v<<3)>>3]=z-y;v=v+1|0}}ac(G|0,0,B<<3|0)|0;ac(H|0,0,_(K,n)|0)|0;v=0;while(1){if(v>>>0>=K>>>0)break;t=_(d[R+v>>0]|0,B)|0;m=Q+v|0;z=1.e+99;u=0;while(1){if((u|0)==(B|0))break;O=G+(u<<3)|0;y=+h[O>>3]+ +h[F+(t+u<<3)>>3];h[O>>3]=y;if(y>0]=u;else y=z;z=y;u=u+1|0}m=_(v,n)|0;if(v>>>0<2e3)y=(+(v>>>0)*.07/2.0e3+.77)*28.1;else y=28.1;u=0;while(1){if(u>>>0>=B>>>0)break;t=G+(u<<3)|0;ba=+h[t>>3]-z;h[t>>3]=ba;if(ba>=y){h[t>>3]=y;t=u>>>3;if(t>>>0>=n>>>0){l=104;break a}O=H+(m+t)|0;a[O>>0]=a[O>>0]|1<<(u&7)&255}u=u+1|0}v=v+1|0}m=_(D,n)|0;v=D;t=a[E>>0]|0;u=1;while(1){if(!v){v=u;break b}w=t&255;x=w>>>3;if(x>>>0>=n>>>0){l=111;break a}l=v+-1|0;m=m-n|0;v=Q+l|0;if((a[H+(m+x)>>0]&(1<<(w&7)&255))<<24>>24){N=a[v>>0]|0;O=t<<24>>24==N<<24>>24;t=O?t:N;u=O?u:u+1|0}a[v>>0]=t;v=l}}while(0);t=0;while(1){if((t|0)==(B|0)){t=0;u=0;break}b[I+(t<<1)>>1]=256;t=t+1|0}while(1){if(u>>>0>=K>>>0){m=0;break}m=d[Q+u>>0]|0;if(m>>>0>=B>>>0){l=120;break a}m=I+(m<<1)|0;if((b[m>>1]|0)==256){b[m>>1]=t;t=t+1<<16>>16}u=u+1|0}while(1){if(m>>>0>=K>>>0)break;N=Q+m|0;O=b[I+(d[N>>0]<<1)>>1]|0;a[N>>0]=O;if((O&255)>>>0>=B>>>0){l=126;break a}m=m+1|0}u=t&65535;if(u>>>0>B>>>0){l=129;break}t=t&65535;m=0;while(1){if((m|0)==(t|0)){t=0;break}ac(J+(m*1040|0)|0,0,1024)|0;c[J+(m*1040|0)+1024>>2]=0;h[J+(m*1040|0)+1032>>3]=s;m=m+1|0}while(1){if((t|0)==(K|0))break;O=d[Q+t>>0]|0;N=J+(O*1040|0)+(d[R+t>>0]<<2)|0;c[N>>2]=(c[N>>2]|0)+1;O=J+(O*1040|0)+1024|0;c[O>>2]=(c[O>>2]|0)+1;t=t+1|0}O=v;B=u;A=A+1|0}if((l|0)==73)pa(404083,403848,80,404281);else if((l|0)==104)pa(404124,403848,130,404281);else if((l|0)==111)pa(404145,403848,141,404281);else if((l|0)==120)pa(404005,403848,165,404260);else if((l|0)==126)pa(404005,403848,172,404260);else if((l|0)==129)pa(404057,403848,174,404260);else if((l|0)==136){N=f+4|0;ra[c[N>>2]&1](c[$>>2]|0,F);ra[c[N>>2]&1](c[$>>2]|0,G);ra[c[N>>2]&1](c[$>>2]|0,H);ra[c[N>>2]&1](c[$>>2]|0,I);ra[c[N>>2]&1](c[$>>2]|0,J);t=O<<2;L=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!L)oa(1);M=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!M)oa(1);x=((O<<4)+1008|0)>>>6;J=sa[c[f>>2]&1](c[$>>2]|0,x*1040|0)|0;v=J;if(!J)oa(1);J=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;w=J;if(!J)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,(O>>>0<64?O:64)*1040|0)|0;if(!G)oa(1);H=sa[c[f>>2]&1](c[$>>2]|0,49176)|0;if(!H)oa(1);ac(V|0,0,256)|0;ac(T|0,0,256)|0;ac(W|0,0,256)|0;ac(U|0,0,256)|0;ac(M|0,0,t|0)|0;m=0;u=0;while(1){if(u>>>0>=K>>>0)break;if(m>>>0>=O>>>0){l=151;break}t=M+(m<<2)|0;c[t>>2]=(c[t>>2]|0)+1;t=u+1|0;if((t|0)!=(K|0)?(a[Q+u>>0]|0)==(a[Q+t>>0]|0):0){u=t;continue}m=m+1|0;u=t}if((l|0)==151)pa(403825,403848,231,404239);if((m|0)!=(O|0))pa(403911,403848,237,404239);C=x;B=x;J=0;t=0;F=0;while(1){if(O>>>0<=F>>>0){l=193;break}E=O-F|0;E=E>>>0<64?E:64;n=0;while(1){if((n|0)==(E|0))break;u=G+(n*1040|0)|0;ac(u|0,0,1024)|0;x=G+(n*1040|0)+1024|0;c[x>>2]=0;h[G+(n*1040|0)+1032>>3]=s;l=M+(F+n<<2)|0;m=0;while(1){if(m>>>0>=(c[l>>2]|0)>>>0)break;K=G+(n*1040|0)+(d[R+t>>0]<<2)|0;c[K>>2]=(c[K>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+1;t=t+1|0;m=m+1|0}h[G+(n*1040|0)+1032>>3]=+Wa(u);c[T+(n<<2)>>2]=n;c[W+(n<<2)>>2]=n;c[V+(n<<2)>>2]=1;n=n+1|0}D=pb(G,V,W,T,H,E,E,64,2048)|0;m=J+D|0;if(C>>>0>>0){u=(C|0)==0;x=u?m:C;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x*1040|0)|0;if(!m){l=170;break}if(!u)dc(m|0,v|0,C*1040|0)|0;ra[c[N>>2]&1](c[$>>2]|0,v);v=m;C=x}m=J+D|0;if(B>>>0>>0){u=(B|0)==0;x=u?m:B;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;if(!m){l=179;break}if(!u)dc(m|0,w|0,B<<2|0)|0;ra[c[N>>2]&1](c[$>>2]|0,w);w=m;B=x}m=v;u=w;A=D+J|0;x=J;l=J;n=0;while(1){if((n|0)==(D|0)){m=0;break}K=T+(n<<2)|0;I=c[K>>2]|0;dc(m+(x*1040|0)|0,G+(I*1040|0)|0,1040)|0;c[u+(l<<2)>>2]=c[V+(I<<2)>>2];c[U+(c[K>>2]<<2)>>2]=n;x=x+1|0;l=l+1|0;n=n+1|0}while(1){if((m|0)==(E|0))break;c[L+(F+m<<2)>>2]=J+(c[U+(c[W+(m<<2)>>2]<<2)>>2]|0);m=m+1|0}m=D+J|0;if((J+D|0)!=(m|0)){l=189;break}if((m|0)!=(A|0)){l=191;break}J=m;F=F+64|0}if((l|0)==170)oa(1);else if((l|0)==179)oa(1);else if((l|0)==189)pa(403935,403848,273,404239);else if((l|0)==191)pa(403969,403848,274,404239);else if((l|0)==193){ra[c[N>>2]&1](c[$>>2]|0,G);K=J<<6;u=_(J>>>1,J)|0;u=K>>>0>>0?K:u;do if((u+1|0)>>>0>2049){ra[c[N>>2]&1](c[$>>2]|0,H);t=sa[c[f>>2]&1](c[$>>2]|0,(u*24|0)+24|0)|0;if(t){P=t;break}oa(1)}else P=H;while(0);m=J<<2;I=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!I)oa(1);t=0;while(1){if((t|0)==(J|0))break;c[I+(t<<2)>>2]=t;t=t+1|0}H=v;G=pb(H,w,L,I,P,J,O,256,u)|0;ra[c[N>>2]&1](c[$>>2]|0,P);ra[c[N>>2]&1](c[$>>2]|0,w);K=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!K)oa(1);t=0;while(1){if((t|0)==(J|0))break;c[K+(t<<2)>>2]=-1;t=t+1|0}B=Y+1024|0;C=Y+1032|0;D=Z+1024|0;E=Z+1024|0;t=0;m=0;F=0;while(1){if((F|0)==(O|0))break;ac(Y|0,0,1028)|0;h[C>>3]=s;u=M+(F<<2)|0;w=0;A=m;m=0;while(1){if(m>>>0>=(c[u>>2]|0)>>>0)break;w=Y+(d[R+A>>0]<<2)|0;c[w>>2]=(c[w>>2]|0)+1;w=(c[B>>2]|0)+1|0;c[B>>2]=w;A=A+1|0;m=m+1|0}u=c[((F|0)==0?L:L+(F+-1<<2)|0)>>2]|0;n=(w|0)==0;if(n)y=0.0;else{dc(Z|0,Y|0,1040)|0;c[E>>2]=(c[E>>2]|0)+(c[H+(u*1040|0)+1024>>2]|0);m=0;while(1){if((m|0)==256)break;P=Z+(m<<2)|0;c[P>>2]=(c[P>>2]|0)+(c[H+(u*1040|0)+(m<<2)>>2]|0);m=m+1|0}y=+Wa(Z);y=y-+h[H+(u*1040|0)+1032>>3]}m=u;l=0;while(1){if((l|0)==(G|0))break;x=I+(l<<2)|0;u=c[x>>2]|0;if(n)z=0.0;else{dc(Z|0,Y|0,1040)|0;c[D>>2]=(c[D>>2]|0)+(c[H+(u*1040|0)+1024>>2]|0);w=0;while(1){if((w|0)==256)break;P=Z+(w<<2)|0;c[P>>2]=(c[P>>2]|0)+(c[H+(u*1040|0)+(w<<2)>>2]|0);w=w+1|0}z=+Wa(Z);z=z-+h[H+(u*1040|0)+1032>>3]}if(z>2]|0}l=l+1|0}c[L+(F<<2)>>2]=m;m=K+(m<<2)|0;if((c[m>>2]|0)==-1){c[m>>2]=t;t=t+1|0}m=A;F=F+1|0}ra[c[N>>2]&1](c[$>>2]|0,I);ra[c[N>>2]&1](c[$>>2]|0,v);w=p+16|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?O:t;while(1){if(v>>>0>=O>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=p+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[N>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}w=p+20|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?O:t;while(1){if(v>>>0>=O>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!m)oa(1);u=c[w>>2]|0;t=p+12|0;if(u)dc(m|0,c[t>>2]|0,u<<2|0)|0;ra[c[N>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}else t=p+12|0;w=p+8|0;l=0;m=0;n=0;u=0;while(1){if((u|0)==(O|0))break;v=m+(c[M+(u<<2)>>2]|0)|0;x=u+1|0;m=c[L+(u<<2)>>2]|0;if((x|0)!=(O|0)?(m|0)==(c[L+(x<<2)>>2]|0):0){m=v;u=x;continue}u=c[K+(m<<2)>>2]|0;P=u&255;a[(c[w>>2]|0)+l>>0]=P;c[(c[t>>2]|0)+(l<<2)>>2]=v;l=l+1|0;m=0;n=((n&255)>(P&255)?n&255:u&255)&255;u=x}c[p+4>>2]=l;c[p>>2]=(n&255)+1;ra[c[N>>2]&1](c[$>>2]|0,K);ra[c[N>>2]&1](c[$>>2]|0,M);ra[c[N>>2]&1](c[$>>2]|0,L);ra[c[N>>2]&1](c[$>>2]|0,Q);break}}}else c[p>>2]=1;while(0);p=f+4|0;ra[c[p>>2]&1](c[$>>2]|0,R);P=k<<1;Q=sa[c[f>>2]&1](c[$>>2]|0,P)|0;if(!Q)oa(1);t=0;while(1){if((t|0)==(k|0))break;b[Q+(t<<1)>>1]=b[j+(t<<4)+12>>1]|0;t=t+1|0}C=((k>>>0)/530|0)+1|0;C=C>>>0>50?50:C;do if(k){if(k>>>0<128){w=q+16|0;m=c[w>>2]|0;x=q+4|0;t=c[x>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=q+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v;t=c[x>>2]|0}w=q+20|0;m=c[w>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}t=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!t)oa(1);u=c[w>>2]|0;m=q+12|0;if(u)dc(t|0,c[m>>2]|0,u<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[m>>2]|0);c[m>>2]=t;c[w>>2]=v;t=c[x>>2]|0}else m=q+12|0;c[q>>2]=1;a[(c[q+8>>2]|0)+t>>0]=0;c[(c[m>>2]|0)+(c[x>>2]<<2)>>2]=k;c[x>>2]=(c[x>>2]|0)+1;break}J=sa[c[f>>2]&1](c[$>>2]|0,C*2832|0)|0;if(!J)oa(1);t=0;while(1){if((t|0)==(C|0))break;ac(J+(t*2832|0)|0,0,2816)|0;c[J+(t*2832|0)+2816>>2]=0;h[J+(t*2832|0)+2824>>3]=s;t=t+1|0}v=(k>>>0)/(C>>>0)|0;w=k+-41|0;m=7;x=0;while(1){if((x|0)==(C|0))break;t=((_(x,k)|0)>>>0)/(C>>>0)|0;if(x){m=m*16807|0;m=(m|0)==0?1:m;t=t+((m>>>0)%(v>>>0)|0)|0}u=J+(x*2832|0)+2816|0;c[u>>2]=(c[u>>2]|0)+40;u=Q+(((t+40|0)>>>0>>0?t:w)<<1)|0;t=41;while(1){t=t+-1|0;if(!t)break;R=J+(x*2832|0)+(e[u>>1]<<2)|0;c[R>>2]=(c[R>>2]|0)+1;u=u+2|0}x=x+1|0}c[Z>>2]=7;v=((P>>>0)/40|0)+100+C+-1|0;v=v-((v>>>0)%(C>>>0)|0)|0;w=Y+2816|0;x=Y+2824|0;l=k>>>0>40;n=k+-39|0;A=Y+2816|0;B=0;while(1){if(B>>>0>=v>>>0)break;ac(Y|0,0,2820)|0;h[x>>3]=s;if(l){t=(c[Z>>2]|0)*16807|0;R=(t|0)==0;c[Z>>2]=R?1:t;m=40;t=((R?1:t)>>>0)%(n>>>0)|0}else{m=k;t=0}c[A>>2]=(c[A>>2]|0)+m;u=Q+(t<<1)|0;t=m+1|0;while(1){t=t+-1|0;if(!t)break;R=Y+(e[u>>1]<<2)|0;c[R>>2]=(c[R>>2]|0)+1;u=u+2|0}t=(B>>>0)%(C>>>0)|0;m=J+(t*2832|0)+2816|0;c[m>>2]=(c[m>>2]|0)+(c[w>>2]|0);m=0;while(1){if((m|0)==704)break;R=J+(t*2832|0)+(m<<2)|0;c[R>>2]=(c[R>>2]|0)+(c[Y+(m<<2)>>2]|0);m=m+1|0}B=B+1|0}O=sa[c[f>>2]&1](c[$>>2]|0,k)|0;if(!O)oa(1);F=sa[c[f>>2]&1](c[$>>2]|0,C*5632|0)|0;if(!F)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,C<<3)|0;if(!G)oa(1);H=_((C+7|0)>>>3,k)|0;H=sa[c[f>>2]&1](c[$>>2]|0,H)|0;if(!H)oa(1);I=sa[c[f>>2]&1](c[$>>2]|0,C<<1)|0;if(!I)oa(1);B=(c[o+4>>2]|0)<11?3:10;D=k+-1|0;E=O+D|0;N=0;A=0;d:while(1){if(A>>>0>=B>>>0){l=382;break}n=(C+7|0)>>>3;if(C>>>0>=257){l=319;break}e:do if(C>>>0<2){t=0;while(1){if((t|0)==(k|0)){v=1;break e}a[O+t>>0]=0;t=t+1|0}}else{ac(F|0,0,C*5632|0)|0;m=0;while(1){if((m|0)==(C|0)){t=704;break}t=c[J+(m*2832|0)+2816>>2]|0;if(t>>>0<256)y=+g[19516+(t<<2)>>2];else y=+Xb(+(t>>>0));h[F+(m<<3)>>3]=y;m=m+1|0}f:while(1){if(!t)break;t=t+-1|0;u=_(t,C)|0;v=0;while(1){if((v|0)==(C|0))continue f;z=+h[F+(v<<3)>>3];m=c[J+(v*2832|0)+(t<<2)>>2]|0;do if(m)if(m>>>0<256){y=+g[19516+(m<<2)>>2];break}else{y=+Xb(+(m>>>0));break}else y=-2.0;while(0);h[F+(u+v<<3)>>3]=z-y;v=v+1|0}}ac(G|0,0,C<<3|0)|0;ac(H|0,0,_(n,k)|0)|0;v=0;while(1){if(v>>>0>=k>>>0)break;t=_(e[Q+(v<<1)>>1]|0,C)|0;m=O+v|0;z=1.e+99;u=0;while(1){if((u|0)==(C|0))break;R=G+(u<<3)|0;y=+h[R>>3]+ +h[F+(t+u<<3)>>3];h[R>>3]=y;if(y>0]=u;else y=z;z=y;u=u+1|0}m=_(v,n)|0;if(v>>>0<2e3)y=(+(v>>>0)*.07/2.0e3+.77)*13.5;else y=13.5;u=0;while(1){if(u>>>0>=C>>>0)break;t=G+(u<<3)|0;ba=+h[t>>3]-z;h[t>>3]=ba;if(ba>=y){h[t>>3]=y;t=u>>>3;if(t>>>0>=n>>>0){l=350;break d}R=H+(m+t)|0;a[R>>0]=a[R>>0]|1<<(u&7)&255}u=u+1|0}v=v+1|0}m=_(D,n)|0;v=D;t=a[E>>0]|0;u=1;while(1){if(!v){v=u;break e}w=t&255;x=w>>>3;if(x>>>0>=n>>>0){l=357;break d}l=v+-1|0;m=m-n|0;v=O+l|0;if((a[H+(m+x)>>0]&(1<<(w&7)&255))<<24>>24){N=a[v>>0]|0;R=t<<24>>24==N<<24>>24;t=R?t:N;u=R?u:u+1|0}a[v>>0]=t;v=l}}while(0);t=0;while(1){if((t|0)==(C|0)){t=0;u=0;break}b[I+(t<<1)>>1]=256;t=t+1|0}while(1){if(u>>>0>=k>>>0){m=0;break}m=d[O+u>>0]|0;if(m>>>0>=C>>>0){l=366;break d}m=I+(m<<1)|0;if((b[m>>1]|0)==256){b[m>>1]=t;t=t+1<<16>>16}u=u+1|0}while(1){if(m>>>0>=k>>>0)break;N=O+m|0;R=b[I+(d[N>>0]<<1)>>1]|0;a[N>>0]=R;if((R&255)>>>0>=C>>>0){l=372;break d}m=m+1|0}u=t&65535;if(u>>>0>C>>>0){l=375;break}t=t&65535;m=0;while(1){if((m|0)==(t|0)){t=0;break}ac(J+(m*2832|0)|0,0,2816)|0;c[J+(m*2832|0)+2816>>2]=0;h[J+(m*2832|0)+2824>>3]=s;m=m+1|0}while(1){if((t|0)==(k|0))break;R=d[O+t>>0]|0;N=J+(R*2832|0)+(e[Q+(t<<1)>>1]<<2)|0;c[N>>2]=(c[N>>2]|0)+1;R=J+(R*2832|0)+2816|0;c[R>>2]=(c[R>>2]|0)+1;t=t+1|0}N=v;C=u;A=A+1|0}if((l|0)==319)pa(404083,403848,80,404221);else if((l|0)==350)pa(404124,403848,130,404221);else if((l|0)==357)pa(404145,403848,141,404221);else if((l|0)==366)pa(404005,403848,165,404200);else if((l|0)==372)pa(404005,403848,172,404200);else if((l|0)==375)pa(404057,403848,174,404200);else if((l|0)==382){ra[c[p>>2]&1](c[$>>2]|0,F);ra[c[p>>2]&1](c[$>>2]|0,G);ra[c[p>>2]&1](c[$>>2]|0,H);ra[c[p>>2]&1](c[$>>2]|0,I);ra[c[p>>2]&1](c[$>>2]|0,J);t=N<<2;L=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!L)oa(1);M=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!M)oa(1);x=((N<<4)+1008|0)>>>6;R=sa[c[f>>2]&1](c[$>>2]|0,x*2832|0)|0;v=R;if(!R)oa(1);R=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;w=R;if(!R)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,(N>>>0<64?N:64)*2832|0)|0;if(!G)oa(1);H=sa[c[f>>2]&1](c[$>>2]|0,49176)|0;if(!H)oa(1);ac(V|0,0,256)|0;ac(T|0,0,256)|0;ac(W|0,0,256)|0;ac(U|0,0,256)|0;ac(M|0,0,t|0)|0;m=0;u=0;while(1){if(u>>>0>=k>>>0)break;if(m>>>0>=N>>>0){l=397;break}t=M+(m<<2)|0;c[t>>2]=(c[t>>2]|0)+1;t=u+1|0;if((t|0)!=(k|0)?(a[O+u>>0]|0)==(a[O+t>>0]|0):0){u=t;continue}m=m+1|0;u=t}if((l|0)==397)pa(403825,403848,231,404179);if((m|0)!=(N|0))pa(403911,403848,237,404179);C=x;B=x;J=0;t=0;F=0;while(1){if(N>>>0<=F>>>0){l=439;break}E=N-F|0;E=E>>>0<64?E:64;n=0;while(1){if((n|0)==(E|0))break;u=G+(n*2832|0)|0;ac(u|0,0,2816)|0;x=G+(n*2832|0)+2816|0;c[x>>2]=0;h[G+(n*2832|0)+2824>>3]=s;l=M+(F+n<<2)|0;m=0;while(1){if(m>>>0>=(c[l>>2]|0)>>>0)break;R=G+(n*2832|0)+(e[Q+(t<<1)>>1]<<2)|0;c[R>>2]=(c[R>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+1;t=t+1|0;m=m+1|0}h[G+(n*2832|0)+2824>>3]=+Xa(u);c[T+(n<<2)>>2]=n;c[W+(n<<2)>>2]=n;c[V+(n<<2)>>2]=1;n=n+1|0}D=rb(G,V,W,T,H,E,E,64,2048)|0;m=J+D|0;if(C>>>0>>0){u=(C|0)==0;x=u?m:C;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x*2832|0)|0;if(!m){l=416;break}if(!u)dc(m|0,v|0,C*2832|0)|0;ra[c[p>>2]&1](c[$>>2]|0,v);v=m;C=x}m=J+D|0;if(B>>>0>>0){u=(B|0)==0;x=u?m:B;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;if(!m){l=425;break}if(!u)dc(m|0,w|0,B<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,w);w=m;B=x}m=v;u=w;A=D+J|0;x=J;l=J;n=0;while(1){if((n|0)==(D|0)){m=0;break}R=T+(n<<2)|0;K=c[R>>2]|0;dc(m+(x*2832|0)|0,G+(K*2832|0)|0,2832)|0;c[u+(l<<2)>>2]=c[V+(K<<2)>>2];c[U+(c[R>>2]<<2)>>2]=n;x=x+1|0;l=l+1|0;n=n+1|0}while(1){if((m|0)==(E|0))break;c[L+(F+m<<2)>>2]=J+(c[U+(c[W+(m<<2)>>2]<<2)>>2]|0);m=m+1|0}m=D+J|0;if((J+D|0)!=(m|0)){l=435;break}if((m|0)!=(A|0)){l=437;break}J=m;F=F+64|0}if((l|0)==416)oa(1);else if((l|0)==425)oa(1);else if((l|0)==435)pa(403935,403848,273,404179);else if((l|0)==437)pa(403969,403848,274,404179);else if((l|0)==439){ra[c[p>>2]&1](c[$>>2]|0,G);R=J<<6;u=_(J>>>1,J)|0;u=R>>>0>>0?R:u;do if((u+1|0)>>>0>2049){ra[c[p>>2]&1](c[$>>2]|0,H);t=sa[c[f>>2]&1](c[$>>2]|0,(u*24|0)+24|0)|0;if(t){S=t;break}oa(1)}else S=H;while(0);m=J<<2;I=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!I)oa(1);t=0;while(1){if((t|0)==(J|0))break;c[I+(t<<2)>>2]=t;t=t+1|0}H=v;G=rb(H,w,L,I,S,J,N,256,u)|0;ra[c[p>>2]&1](c[$>>2]|0,S);ra[c[p>>2]&1](c[$>>2]|0,w);K=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!K)oa(1);t=0;while(1){if((t|0)==(J|0))break;c[K+(t<<2)>>2]=-1;t=t+1|0}B=Y+2816|0;C=Y+2824|0;D=Z+2816|0;E=Z+2816|0;t=0;m=0;F=0;while(1){if((F|0)==(N|0))break;ac(Y|0,0,2820)|0;h[C>>3]=s;u=M+(F<<2)|0;w=0;A=m;m=0;while(1){if(m>>>0>=(c[u>>2]|0)>>>0)break;w=Y+(e[Q+(A<<1)>>1]<<2)|0;c[w>>2]=(c[w>>2]|0)+1;w=(c[B>>2]|0)+1|0;c[B>>2]=w;A=A+1|0;m=m+1|0}u=c[((F|0)==0?L:L+(F+-1<<2)|0)>>2]|0;n=(w|0)==0;if(n)y=0.0;else{dc(Z|0,Y|0,2832)|0;c[E>>2]=(c[E>>2]|0)+(c[H+(u*2832|0)+2816>>2]|0);m=0;while(1){if((m|0)==704)break;S=Z+(m<<2)|0;c[S>>2]=(c[S>>2]|0)+(c[H+(u*2832|0)+(m<<2)>>2]|0);m=m+1|0}y=+Xa(Z);y=y-+h[H+(u*2832|0)+2824>>3]}m=u;l=0;while(1){if((l|0)==(G|0))break;x=I+(l<<2)|0;u=c[x>>2]|0;if(n)z=0.0;else{dc(Z|0,Y|0,2832)|0;c[D>>2]=(c[D>>2]|0)+(c[H+(u*2832|0)+2816>>2]|0);w=0;while(1){if((w|0)==704)break;S=Z+(w<<2)|0;c[S>>2]=(c[S>>2]|0)+(c[H+(u*2832|0)+(w<<2)>>2]|0);w=w+1|0}z=+Xa(Z);z=z-+h[H+(u*2832|0)+2824>>3]}if(z>2]|0}l=l+1|0}c[L+(F<<2)>>2]=m;m=K+(m<<2)|0;if((c[m>>2]|0)==-1){c[m>>2]=t;t=t+1|0}m=A;F=F+1|0}ra[c[p>>2]&1](c[$>>2]|0,I);ra[c[p>>2]&1](c[$>>2]|0,v);w=q+16|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?N:t;while(1){if(v>>>0>=N>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=q+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}w=q+20|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?N:t;while(1){if(v>>>0>=N>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!m)oa(1);u=c[w>>2]|0;t=q+12|0;if(u)dc(m|0,c[t>>2]|0,u<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}else t=q+12|0;w=q+8|0;l=0;m=0;n=0;u=0;while(1){if((u|0)==(N|0))break;v=m+(c[M+(u<<2)>>2]|0)|0;x=u+1|0;m=c[L+(u<<2)>>2]|0;if((x|0)!=(N|0)?(m|0)==(c[L+(x<<2)>>2]|0):0){m=v;u=x;continue}u=c[K+(m<<2)>>2]|0;S=u&255;a[(c[w>>2]|0)+l>>0]=S;c[(c[t>>2]|0)+(l<<2)>>2]=v;l=l+1|0;m=0;n=((n&255)>(S&255)?n&255:u&255)&255;u=x}c[q+4>>2]=l;c[q>>2]=(n&255)+1;ra[c[p>>2]&1](c[$>>2]|0,K);ra[c[p>>2]&1](c[$>>2]|0,M);ra[c[p>>2]&1](c[$>>2]|0,L);ra[c[p>>2]&1](c[$>>2]|0,O);break}}}else c[q>>2]=1;while(0);ra[c[p>>2]&1](c[$>>2]|0,Q);P=sa[c[f>>2]&1](c[$>>2]|0,P)|0;if(!P)oa(1);K=0;m=0;while(1){if((m|0)==(k|0))break;if((c[j+(m<<4)+4>>2]&16777215|0)!=0?(e[j+(m<<4)+12>>1]|0)>127:0){b[P+(K<<1)>>1]=b[j+(m<<4)+14>>1]|0;t=K+1|0}else t=K;K=t;m=m+1|0}C=((K>>>0)/544|0)+1|0;C=C>>>0>50?50:C;if(!K){c[r>>2]=1;f=c[p>>2]|0;r=c[$>>2]|0;ra[f&1](r,P);i=aa;return}if(K>>>0<128){w=r+16|0;m=c[w>>2]|0;x=r+4|0;t=c[x>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=r+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v;t=c[x>>2]|0}w=r+20|0;m=c[w>>2]|0;u=t+1|0;if(m>>>0>>0){v=(m|0)==0?u:m;while(1){if(v>>>0>=u>>>0)break;v=v<<1}t=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!t)oa(1);u=c[w>>2]|0;m=r+12|0;if(u)dc(t|0,c[m>>2]|0,u<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[m>>2]|0);c[m>>2]=t;c[w>>2]=v;t=c[x>>2]|0}else m=r+12|0;c[r>>2]=1;a[(c[r+8>>2]|0)+t>>0]=0;c[(c[m>>2]|0)+(c[x>>2]<<2)>>2]=K;c[x>>2]=(c[x>>2]|0)+1;f=c[p>>2]|0;r=c[$>>2]|0;ra[f&1](r,P);i=aa;return}J=sa[c[f>>2]&1](c[$>>2]|0,C*2096|0)|0;if(!J)oa(1);t=0;while(1){if((t|0)==(C|0))break;ac(J+(t*2096|0)|0,0,2080)|0;c[J+(t*2096|0)+2080>>2]=0;h[J+(t*2096|0)+2088>>3]=s;t=t+1|0}v=(K>>>0)/(C>>>0)|0;w=K+-41|0;m=7;x=0;while(1){if((x|0)==(C|0))break;t=((_(K,x)|0)>>>0)/(C>>>0)|0;if(x){m=m*16807|0;m=(m|0)==0?1:m;t=t+((m>>>0)%(v>>>0)|0)|0}u=J+(x*2096|0)+2080|0;c[u>>2]=(c[u>>2]|0)+40;u=P+(((t+40|0)>>>0>>0?t:w)<<1)|0;t=41;while(1){t=t+-1|0;if(!t)break;k=J+(x*2096|0)+(e[u>>1]<<2)|0;c[k>>2]=(c[k>>2]|0)+1;u=u+2|0}x=x+1|0}c[Z>>2]=7;v=((K<<1>>>0)/40|0)+100+C+-1|0;v=v-((v>>>0)%(C>>>0)|0)|0;w=Y+2080|0;x=Y+2088|0;l=K>>>0>40;n=K+-39|0;A=Y+2080|0;B=0;while(1){if(B>>>0>=v>>>0)break;ac(Y|0,0,2084)|0;h[x>>3]=s;if(l){t=(c[Z>>2]|0)*16807|0;k=(t|0)==0;c[Z>>2]=k?1:t;m=40;t=((k?1:t)>>>0)%(n>>>0)|0}else{m=K;t=0}c[A>>2]=(c[A>>2]|0)+m;u=P+(t<<1)|0;t=m+1|0;while(1){t=t+-1|0;if(!t)break;k=Y+(e[u>>1]<<2)|0;c[k>>2]=(c[k>>2]|0)+1;u=u+2|0}t=(B>>>0)%(C>>>0)|0;m=J+(t*2096|0)+2080|0;c[m>>2]=(c[m>>2]|0)+(c[w>>2]|0);m=0;while(1){if((m|0)==520)break;k=J+(t*2096|0)+(m<<2)|0;c[k>>2]=(c[k>>2]|0)+(c[Y+(m<<2)>>2]|0);m=m+1|0}B=B+1|0}O=sa[c[f>>2]&1](c[$>>2]|0,K)|0;if(!O)oa(1);F=sa[c[f>>2]&1](c[$>>2]|0,C*4160|0)|0;if(!F)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,C<<3)|0;if(!G)oa(1);H=_(K,(C+7|0)>>>3)|0;H=sa[c[f>>2]&1](c[$>>2]|0,H)|0;if(!H)oa(1);I=sa[c[f>>2]&1](c[$>>2]|0,C<<1)|0;if(!I)oa(1);B=(c[o+4>>2]|0)<11?3:10;D=K+-1|0;E=O+D|0;N=0;A=0;g:while(1){if(A>>>0>=B>>>0){l=631;break}n=(C+7|0)>>>3;if(C>>>0>=257){l=568;break}h:do if(C>>>0<2){t=0;while(1){if((t|0)==(K|0)){v=1;break h}a[O+t>>0]=0;t=t+1|0}}else{ac(F|0,0,C*4160|0)|0;m=0;while(1){if((m|0)==(C|0)){t=520;break}t=c[J+(m*2096|0)+2080>>2]|0;if(t>>>0<256)y=+g[19516+(t<<2)>>2];else y=+Xb(+(t>>>0));h[F+(m<<3)>>3]=y;m=m+1|0}i:while(1){if(!t)break;t=t+-1|0;u=_(t,C)|0;v=0;while(1){if((v|0)==(C|0))continue i;z=+h[F+(v<<3)>>3];m=c[J+(v*2096|0)+(t<<2)>>2]|0;do if(m)if(m>>>0<256){y=+g[19516+(m<<2)>>2];break}else{y=+Xb(+(m>>>0));break}else y=-2.0;while(0);h[F+(u+v<<3)>>3]=z-y;v=v+1|0}}ac(G|0,0,C<<3|0)|0;ac(H|0,0,_(K,n)|0)|0;v=0;while(1){if(v>>>0>=K>>>0)break;t=_(e[P+(v<<1)>>1]|0,C)|0;m=O+v|0;z=1.e+99;u=0;while(1){if((u|0)==(C|0))break;o=G+(u<<3)|0;y=+h[o>>3]+ +h[F+(t+u<<3)>>3];h[o>>3]=y;if(y>0]=u;else y=z;z=y;u=u+1|0}m=_(v,n)|0;if(v>>>0<2e3)y=(+(v>>>0)*.07/2.0e3+.77)*14.6;else y=14.6;u=0;while(1){if(u>>>0>=C>>>0)break;t=G+(u<<3)|0;ba=+h[t>>3]-z;h[t>>3]=ba;if(ba>=y){h[t>>3]=y;t=u>>>3;if(t>>>0>=n>>>0){l=599;break g}o=H+(m+t)|0;a[o>>0]=a[o>>0]|1<<(u&7)&255}u=u+1|0}v=v+1|0}m=_(D,n)|0;v=D;t=a[E>>0]|0;u=1;while(1){if(!v){v=u;break h}w=t&255;x=w>>>3;if(x>>>0>=n>>>0){l=606;break g}l=v+-1|0;m=m-n|0;v=O+l|0;if((a[H+(m+x)>>0]&(1<<(w&7)&255))<<24>>24){k=a[v>>0]|0;o=t<<24>>24==k<<24>>24;t=o?t:k;u=o?u:u+1|0}a[v>>0]=t;v=l}}while(0);t=0;while(1){if((t|0)==(C|0)){t=0;u=0;break}b[I+(t<<1)>>1]=256;t=t+1|0}while(1){if(u>>>0>=K>>>0){m=0;break}m=d[O+u>>0]|0;if(m>>>0>=C>>>0){l=615;break g}m=I+(m<<1)|0;if((b[m>>1]|0)==256){b[m>>1]=t;t=t+1<<16>>16}u=u+1|0}while(1){if(m>>>0>=K>>>0)break;k=O+m|0;o=b[I+(d[k>>0]<<1)>>1]|0;a[k>>0]=o;if((o&255)>>>0>=C>>>0){l=621;break g}m=m+1|0}u=t&65535;if(u>>>0>C>>>0){l=624;break}t=t&65535;m=0;while(1){if((m|0)==(t|0)){t=0;break}ac(J+(m*2096|0)|0,0,2080)|0;c[J+(m*2096|0)+2080>>2]=0;h[J+(m*2096|0)+2088>>3]=s;m=m+1|0}while(1){if((t|0)==(K|0))break;o=d[O+t>>0]|0;k=J+(o*2096|0)+(e[P+(t<<1)>>1]<<2)|0;c[k>>2]=(c[k>>2]|0)+1;o=J+(o*2096|0)+2080|0;c[o>>2]=(c[o>>2]|0)+1;t=t+1|0}N=v;C=u;A=A+1|0}if((l|0)==568)pa(404083,403848,80,404105);else if((l|0)==599)pa(404124,403848,130,404105);else if((l|0)==606)pa(404145,403848,141,404105);else if((l|0)==615)pa(404005,403848,165,404035);else if((l|0)==621)pa(404005,403848,172,404035);else if((l|0)==624)pa(404057,403848,174,404035);else if((l|0)==631){ra[c[p>>2]&1](c[$>>2]|0,F);ra[c[p>>2]&1](c[$>>2]|0,G);ra[c[p>>2]&1](c[$>>2]|0,H);ra[c[p>>2]&1](c[$>>2]|0,I);ra[c[p>>2]&1](c[$>>2]|0,J);t=N<<2;L=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!L)oa(1);M=sa[c[f>>2]&1](c[$>>2]|0,t)|0;if(!M)oa(1);x=((N<<4)+1008|0)>>>6;o=sa[c[f>>2]&1](c[$>>2]|0,x*2096|0)|0;v=o;if(!o)oa(1);o=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;w=o;if(!o)oa(1);G=sa[c[f>>2]&1](c[$>>2]|0,(N>>>0<64?N:64)*2096|0)|0;if(!G)oa(1);H=sa[c[f>>2]&1](c[$>>2]|0,49176)|0;if(!H)oa(1);ac(V|0,0,256)|0;ac(T|0,0,256)|0;ac(W|0,0,256)|0;ac(U|0,0,256)|0;ac(M|0,0,t|0)|0;m=0;u=0;while(1){if(u>>>0>=K>>>0)break;if(m>>>0>=N>>>0){l=646;break}t=M+(m<<2)|0;c[t>>2]=(c[t>>2]|0)+1;t=u+1|0;if((t|0)!=(K|0)?(a[O+u>>0]|0)==(a[O+t>>0]|0):0){u=t;continue}m=m+1|0;u=t}if((l|0)==646)pa(403825,403848,231,403889);if((m|0)!=(N|0))pa(403911,403848,237,403889);C=x;B=x;K=0;t=0;F=0;while(1){if(N>>>0<=F>>>0){l=688;break}E=N-F|0;E=E>>>0<64?E:64;n=0;while(1){if((n|0)==(E|0))break;u=G+(n*2096|0)|0;ac(u|0,0,2080)|0;x=G+(n*2096|0)+2080|0;c[x>>2]=0;h[G+(n*2096|0)+2088>>3]=s;l=M+(F+n<<2)|0;m=0;while(1){if(m>>>0>=(c[l>>2]|0)>>>0)break;o=G+(n*2096|0)+(e[P+(t<<1)>>1]<<2)|0;c[o>>2]=(c[o>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+1;t=t+1|0;m=m+1|0}h[G+(n*2096|0)+2088>>3]=+Ya(u);c[T+(n<<2)>>2]=n;c[W+(n<<2)>>2]=n;c[V+(n<<2)>>2]=1;n=n+1|0}D=tb(G,V,W,T,H,E,E,64,2048)|0;m=K+D|0;if(C>>>0>>0){u=(C|0)==0;x=u?m:C;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x*2096|0)|0;if(!m){l=665;break}if(!u)dc(m|0,v|0,C*2096|0)|0;ra[c[p>>2]&1](c[$>>2]|0,v);v=m;C=x}m=K+D|0;if(B>>>0>>0){u=(B|0)==0;x=u?m:B;while(1){if(x>>>0>=m>>>0)break;x=x<<1}m=sa[c[f>>2]&1](c[$>>2]|0,x<<2)|0;if(!m){l=674;break}if(!u)dc(m|0,w|0,B<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,w);w=m;B=x}m=v;u=w;A=D+K|0;x=K;l=K;n=0;while(1){if((n|0)==(D|0)){m=0;break}o=T+(n<<2)|0;k=c[o>>2]|0;dc(m+(x*2096|0)|0,G+(k*2096|0)|0,2096)|0;c[u+(l<<2)>>2]=c[V+(k<<2)>>2];c[U+(c[o>>2]<<2)>>2]=n;x=x+1|0;l=l+1|0;n=n+1|0}while(1){if((m|0)==(E|0))break;c[L+(F+m<<2)>>2]=K+(c[U+(c[W+(m<<2)>>2]<<2)>>2]|0);m=m+1|0}m=D+K|0;if((K+D|0)!=(m|0)){l=684;break}if((m|0)!=(A|0)){l=686;break}K=m;F=F+64|0}if((l|0)==665)oa(1);else if((l|0)==674)oa(1);else if((l|0)==684)pa(403935,403848,273,403889);else if((l|0)==686)pa(403969,403848,274,403889);else if((l|0)==688){ra[c[p>>2]&1](c[$>>2]|0,G);W=K<<6;u=_(K>>>1,K)|0;u=W>>>0>>0?W:u;do if((u+1|0)>>>0>2049){ra[c[p>>2]&1](c[$>>2]|0,H);t=sa[c[f>>2]&1](c[$>>2]|0,(u*24|0)+24|0)|0;if(t){X=t;break}oa(1)}else X=H;while(0);m=K<<2;I=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!I)oa(1);t=0;while(1){if((t|0)==(K|0))break;c[I+(t<<2)>>2]=t;t=t+1|0}H=v;G=tb(H,w,L,I,X,K,N,256,u)|0;ra[c[p>>2]&1](c[$>>2]|0,X);ra[c[p>>2]&1](c[$>>2]|0,w);J=sa[c[f>>2]&1](c[$>>2]|0,m)|0;if(!J)oa(1);t=0;while(1){if((t|0)==(K|0))break;c[J+(t<<2)>>2]=-1;t=t+1|0}B=Y+2080|0;C=Y+2088|0;D=Z+2080|0;E=Z+2080|0;t=0;m=0;F=0;while(1){if((F|0)==(N|0))break;ac(Y|0,0,2084)|0;h[C>>3]=s;u=M+(F<<2)|0;w=0;A=m;m=0;while(1){if(m>>>0>=(c[u>>2]|0)>>>0)break;w=Y+(e[P+(A<<1)>>1]<<2)|0;c[w>>2]=(c[w>>2]|0)+1;w=(c[B>>2]|0)+1|0;c[B>>2]=w;A=A+1|0;m=m+1|0}u=c[((F|0)==0?L:L+(F+-1<<2)|0)>>2]|0;n=(w|0)==0;if(n)y=0.0;else{dc(Z|0,Y|0,2096)|0;c[E>>2]=(c[E>>2]|0)+(c[H+(u*2096|0)+2080>>2]|0);m=0;while(1){if((m|0)==520)break;X=Z+(m<<2)|0;c[X>>2]=(c[X>>2]|0)+(c[H+(u*2096|0)+(m<<2)>>2]|0);m=m+1|0}y=+Ya(Z);y=y-+h[H+(u*2096|0)+2088>>3]}m=u;l=0;while(1){if((l|0)==(G|0))break;x=I+(l<<2)|0;u=c[x>>2]|0;if(n)z=0.0;else{dc(Z|0,Y|0,2096)|0;c[D>>2]=(c[D>>2]|0)+(c[H+(u*2096|0)+2080>>2]|0);w=0;while(1){if((w|0)==520)break;X=Z+(w<<2)|0;c[X>>2]=(c[X>>2]|0)+(c[H+(u*2096|0)+(w<<2)>>2]|0);w=w+1|0}z=+Ya(Z);z=z-+h[H+(u*2096|0)+2088>>3]}if(z>2]|0}l=l+1|0}c[L+(F<<2)>>2]=m;m=J+(m<<2)|0;if((c[m>>2]|0)==-1){c[m>>2]=t;t=t+1|0}m=A;F=F+1|0}ra[c[p>>2]&1](c[$>>2]|0,I);ra[c[p>>2]&1](c[$>>2]|0,v);w=r+16|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?N:t;while(1){if(v>>>0>=N>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v)|0;if(!m)oa(1);u=c[w>>2]|0;t=r+8|0;if(u)dc(m|0,c[t>>2]|0,u|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}w=r+20|0;t=c[w>>2]|0;if(t>>>0>>0){v=(t|0)==0?N:t;while(1){if(v>>>0>=N>>>0)break;v=v<<1}m=sa[c[f>>2]&1](c[$>>2]|0,v<<2)|0;if(!m)oa(1);u=c[w>>2]|0;t=r+12|0;if(u)dc(m|0,c[t>>2]|0,u<<2|0)|0;ra[c[p>>2]&1](c[$>>2]|0,c[t>>2]|0);c[t>>2]=m;c[w>>2]=v}else t=r+12|0;w=r+8|0;l=0;m=0;n=0;u=0;while(1){if((u|0)==(N|0))break;v=m+(c[M+(u<<2)>>2]|0)|0;x=u+1|0;m=c[L+(u<<2)>>2]|0;if((x|0)!=(N|0)?(m|0)==(c[L+(x<<2)>>2]|0):0){m=v;u=x;continue}u=c[J+(m<<2)>>2]|0;f=u&255;a[(c[w>>2]|0)+l>>0]=f;c[(c[t>>2]|0)+(l<<2)>>2]=v;l=l+1|0;m=0;n=((n&255)>(f&255)?n&255:u&255)&255;u=x}c[r+4>>2]=l;c[r>>2]=(n&255)+1;ra[c[p>>2]&1](c[$>>2]|0,J);ra[c[p>>2]&1](c[$>>2]|0,M);ra[c[p>>2]&1](c[$>>2]|0,L);ra[c[p>>2]&1](c[$>>2]|0,O);f=c[p>>2]|0;r=c[$>>2]|0;ra[f&1](r,P);i=aa;return}}}function _a(b,f,g,h,j){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;A=i;i=i+1552|0;y=A+840|0;z=A+136|0;v=A+72|0;w=A+112|0;x=A+76|0;t=A;c[v>>2]=0;l=w;m=l+18|0;do{a[l>>0]=0;l=l+1|0}while((l|0)<(m|0));l=t;m=l+72|0;do{c[l>>2]=0;l=l+4|0}while((l|0)<(m|0));if(f>>>0<705){s=f;k=0}else pa(404299,404333,308,404371);while(1){if(k>>>0>=f>>>0)break;if(a[b+(f-k+-1)>>0]|0)break;s=s+-1|0;k=k+1|0}if(f>>>0>50){m=1;f=1;q=0;n=0;o=0;while(1){if(q>>>0>=s>>>0)break;l=a[b+q>>0]|0;p=1;k=q;while(1){k=k+1|0;if(k>>>0>=s>>>0)break;if((a[b+k>>0]|0)!=l<<24>>24)break;p=p+1|0}if(p>>>0>2){r=l<<24>>24==0;f=r?f+1|0:f;k=r?o+p|0:o;if(p>>>0>3?!r:0){m=m+1|0;l=n+p|0}else l=n}else{l=n;k=o}q=q+p|0;n=l;o=k}k=n>>>0>m<<1>>>0&1;f=o>>>0>f<<1>>>0&1}else{k=0;f=0}r=f<<24>>24==0;p=k<<24>>24==0;n=8;q=0;a:while(1){if(q>>>0>=s>>>0)break;o=a[b+q>>0]|0;l=o<<24>>24==0;if(l)if(r){f=1;u=30}else{k=q;f=1;u=23}else if(p){f=1;u=43}else{k=q;f=1;u=23}b:do if((u|0)==23){while(1){u=0;k=k+1|0;if(k>>>0>=s>>>0)break;if((a[b+k>>0]|0)!=o<<24>>24)break;f=f+1|0;u=23}if(!l)if(!f){u=42;break a}else{u=43;break}if((f|0)!=11)if(f>>>0<3){u=30;break}else m=f;else{a[y+(c[v>>2]|0)>>0]=0;a[z+(c[v>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+1;m=10}l=c[v>>2]|0;k=l;m=m+-3|0;while(1){a[y+k>>0]=17;a[z+(c[v>>2]|0)>>0]=m&7;k=(c[v>>2]|0)+1|0;c[v>>2]=k;m=m>>>3;if(!m){m=l;break}m=m+-1|0}while(1){k=k+-1|0;if(m>>>0>=k>>>0)break;D=y+m|0;B=a[D>>0]|0;o=y+k|0;a[D>>0]=a[o>>0]|0;a[o>>0]=B;m=m+1|0}k=c[v>>2]|0;while(1){k=k+-1|0;if(l>>>0>=k>>>0){k=n;break b}o=z+l|0;B=a[o>>0]|0;D=z+k|0;a[o>>0]=a[D>>0]|0;a[D>>0]=B;l=l+1|0}}while(0);c:do if((u|0)==30){u=0;k=0;while(1){if((k|0)==(f|0)){k=n;break c}a[y+(c[v>>2]|0)>>0]=0;a[z+(c[v>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+1;k=k+1|0}}else if((u|0)==43){u=0;if(n<<24>>24==o<<24>>24)k=f;else{a[y+(c[v>>2]|0)>>0]=o;a[z+(c[v>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+1;k=f+-1|0}if((k|0)==7){a[y+(c[v>>2]|0)>>0]=o;a[z+(c[v>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+1;k=k+-1|0}if(k>>>0<3){l=0;while(1){if((l|0)==(k|0)){k=o;break c}a[y+(c[v>>2]|0)>>0]=o;a[z+(c[v>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+1;l=l+1|0}}l=c[v>>2]|0;n=l;m=k+-3|0;while(1){a[y+n>>0]=16;a[z+(c[v>>2]|0)>>0]=m&3;k=(c[v>>2]|0)+1|0;c[v>>2]=k;m=m>>>2;if(!m){m=l;break}n=k;m=m+-1|0}while(1){k=k+-1|0;if(m>>>0>=k>>>0)break;n=y+m|0;B=a[n>>0]|0;D=y+k|0;a[n>>0]=a[D>>0]|0;a[D>>0]=B;m=m+1|0}k=c[v>>2]|0;while(1){k=k+-1|0;if(l>>>0>=k>>>0){k=o;break c}n=z+l|0;B=a[n>>0]|0;D=z+k|0;a[n>>0]=a[D>>0]|0;a[D>>0]=B;l=l+1|0}}while(0);n=k;q=q+f|0}if((u|0)==42)pa(406724,406674,168,406740);f=c[v>>2]|0;k=0;while(1){if((k|0)==(f|0)){r=0;k=0;l=0;break}D=t+(d[y+k>>0]<<2)|0;c[D>>2]=(c[D>>2]|0)+1;k=k+1|0}while(1){if(l>>>0>=18){q=k;break}if(c[t+(l<<2)>>2]|0)if(k)if((k|0)==1){q=2;break}else f=r;else{f=l;k=1}else f=r;r=f;l=l+1|0}Hb(t,18,5,g,w);Jb(w,18,x);d:do if((q|0)>1){k=18;while(1){if(!k)break d;f=k+-1|0;if(!(a[w+(d[405371+f>>0]|0)>>0]|0))k=f;else break}}else k=18;while(0);if((a[w+1>>0]|0)==0?(a[w+2>>0]|0)==0:0)f=(a[w+3>>0]|0)==0?3:2;else f=0;g=c[h>>2]|0;p=j+(g>>>3)|0;B=d[p>>0]|0;g=cc(f|0,0,g&7|0)|0;D=C;g=B|g;B=p;a[B>>0]=g;a[B+1>>0]=g>>8;a[B+2>>0]=g>>16;a[B+3>>0]=g>>24;p=p+4|0;a[p>>0]=D;a[p+1>>0]=D>>8;a[p+2>>0]=D>>16;a[p+3>>0]=D>>24;p=(c[h>>2]|0)+2|0;c[h>>2]=p;while(1){if(f>>>0>=k>>>0)break;m=d[w+(d[405371+f>>0]|0)>>0]|0;l=a[405389+m>>0]|0;m=d[405395+m>>0]|0;n=j+(p>>>3)|0;o=d[n>>0]|0;D=bc(m|0,0,l&255|0)|0;if(!((D|0)==0&(C|0)==0)){u=76;break}t=cc(m|0,0,p&7|0)|0;B=C;t=o|t;D=n;g=D;a[g>>0]=t;a[g+1>>0]=t>>8;a[g+2>>0]=t>>16;a[g+3>>0]=t>>24;D=D+4|0;a[D>>0]=B;a[D+1>>0]=B>>8;a[D+2>>0]=B>>16;a[D+3>>0]=B>>24;D=(c[h>>2]|0)+(l&255)|0;c[h>>2]=D;p=D;f=f+1|0}if((u|0)==76)pa(406196,406218,54,406251);if((q|0)==1)a[w+r>>0]=0;p=c[v>>2]|0;q=0;e:while(1){if(q>>>0>=p>>>0){u=94;break}o=d[y+q>>0]|0;f=a[w+o>>0]|0;k=e[x+(o<<1)>>1]|0;l=c[h>>2]|0;m=j+(l>>>3)|0;n=d[m>>0]|0;D=bc(k|0,0,f&255|0)|0;if(!((D|0)==0&(C|0)==0)){u=83;break}if((f&255)>=57){u=85;break}v=cc(k|0,0,l&7|0)|0;D=C;v=n|v;B=m;a[B>>0]=v;a[B+1>>0]=v>>8;a[B+2>>0]=v>>16;a[B+3>>0]=v>>24;m=m+4|0;a[m>>0]=D;a[m+1>>0]=D>>8;a[m+2>>0]=D>>16;a[m+3>>0]=D>>24;m=(c[h>>2]|0)+(f&255)|0;c[h>>2]=m;switch(o|0){case 16:{f=d[z+q>>0]|0;k=j+(m>>>3)|0;l=d[k>>0]|0;if(!((f&252|0)==0&0==0)){u=88;break e}u=cc(f|0,0,m&7|0)|0;B=C;u=l|u;D=k;v=D;a[v>>0]=u;a[v+1>>0]=u>>8;a[v+2>>0]=u>>16;a[v+3>>0]=u>>24;D=D+4|0;a[D>>0]=B;a[D+1>>0]=B>>8;a[D+2>>0]=B>>16;a[D+3>>0]=B>>24;c[h>>2]=(c[h>>2]|0)+2;break}case 17:{f=d[z+q>>0]|0;k=j+(m>>>3)|0;l=d[k>>0]|0;if(!((f&248|0)==0&0==0)){u=91;break e}u=cc(f|0,0,m&7|0)|0;B=C;u=l|u;D=k;v=D;a[v>>0]=u;a[v+1>>0]=u>>8;a[v+2>>0]=u>>16;a[v+3>>0]=u>>24;D=D+4|0;a[D>>0]=B;a[D+1>>0]=B>>8;a[D+2>>0]=B>>16;a[D+3>>0]=B>>24;c[h>>2]=(c[h>>2]|0)+3;break}default:{}}q=q+1|0}if((u|0)==83)pa(406196,406218,54,406251);else if((u|0)==85)pa(406267,406218,55,406251);else if((u|0)==88)pa(406196,406218,54,406251);else if((u|0)==91)pa(406196,406218,54,406251);else if((u|0)==94){i=A;return}} +function ta(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function ua(){return i|0}function va(a){a=a|0;i=a}function wa(a,b){a=a|0;b=b|0;i=a;j=b}function xa(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function ya(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function za(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function Aa(a){a=a|0;C=a}function Ba(){return C|0}function Ca(e,f,h,j,k,l,m){e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,qa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;Oa=i;i=i+224|0;Ha=Oa+200|0;Ca=Oa+184|0;Ka=Oa+168|0;Ja=Oa+152|0;Fa=Oa+144|0;Ia=Oa+140|0;La=Oa+136|0;Ga=Oa+24|0;q=Oa+20|0;u=Oa+16|0;r=Oa+12|0;v=Oa+8|0;w=Oa+4|0;Na=Oa;c[Na>>2]=l;p=k;z=m;Ma=j>>>24;Ma=(Ma<<2|2)+((j-(Ma<<24)|0)>>>0>1048576?4:3)+1+j|0;n=(j|0)==0;Ma=n?1:Ma>>>0>>0?0:Ma;if(!l){k=0;Na=c[Na>>2]|0;Na=k?Na:-1;i=Oa;return Na|0}if(n){c[Na>>2]=1;a[m>>0]=6;k=1;Na=c[Na>>2]|0;Na=k?Na:-1;i=Oa;return Na|0}do if((e|0)==10){if((f|0)>=16)if((f|0)>24)f=24;else x=7;else{f=16;x=7}q=1<>2]=c[4721];c[Ca+4>>2]=c[4722];c[Ca+8>>2]=c[4723];c[Ca+12>>2]=c[4724];c[Ka>>2]=c[4721];c[Ka+4>>2]=c[4722];c[Ka+8>>2]=c[4723];c[Ka+12>>2]=c[4724];wa=c[Na>>2]|0;q=q>>>0>j>>>0?j:q;xa=1<<((f|0)>23?24:f+1|0);ya=xa>>>3;c[Ja>>2]=0;za=Ja+4|0;c[za>>2]=10;n=Ja+8|0;c[n>>2]=f;Aa=Ja+12|0;c[Aa>>2]=0;c[za>>2]=10;za=(f|0)>16?((f|0)>18?18:f):16;c[Aa>>2]=za;za=1<>2]=1;Aa=Ha+4|0;c[Aa>>2]=1;Ba=Ha+8|0;c[Ba>>2]=0;if(j>>>0>=2147483649)pa(406392,406053,1025,406415);if((f|0)!=16)if((f|0)==17){r=1;h=7}else{r=((f<<1)+222|1)&255;h=4}else{r=0;h=1}ua=Lb(0,524308)|0;if(!ua)oa(1);c[ua+524292>>2]=0;c[ua+524300>>2]=0;a[ua+524304>>0]=1;p=ua+524304|0;f=1<>2];c[ua>>2]=f+-1;f=1-f|0;ta=ua+524296|0;c[ta>>2]=f;n=0;while(1){if((n|0)==131072)break;c[ua+4+(n<<2)>>2]=f;n=n+1|0}f=ua+524300|0;do if(q>>>0>(c[f>>2]|0)>>>0){n=ua+524292|0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[n>>2]|0);c[n>>2]=0;o=sa[c[Ha>>2]&1](c[Ba>>2]|0,q<<3)|0;if(!o)oa(1);else{c[n>>2]=o;c[f>>2]=q;break}}while(0);a[p>>0]=0;W=ua+524292|0;X=Ga+8|0;Y=Ga+12|0;Z=Ga+28|0;$=Ga+32|0;ba=Ga+36|0;ca=Ga+48|0;da=Ga+52|0;ea=Ga+56|0;fa=Ga+60|0;ga=Ga+72|0;ha=Ga+80|0;ia=Ga+88|0;ja=Ga+96|0;ka=Ga+104|0;la=Ga+8|0;ma=Ga+32|0;qa=Ga+56|0;n=z;U=0;V=1;T=0;t=0;u=0;a:while(1){f=(V&1)==0;if(!((f^1)&U>>>0>>0)){x=93;break}R=U+xa|0;R=R>>>0>j>>>0?j:R;P=(((R-U|0)>>>0)/12|0)+16|0;c[Fa>>2]=0;c[Ia>>2]=0;f=0;Q=U;L=0;N=0;v=0;S=0;while(1){if(R>>>0<=Q>>>0){p=f;z=N;e=v;o=S;break}O=R-Q|0;O=O>>>0>>0?O:za;M=sa[c[Ha>>2]&1](c[Ba>>2]|0,(O<<4)+16|0)|0;if(!M){x=27;break a}f=O+1|0;o=0;while(1){if((o|0)==(f|0))break;c[M+(o<<4)>>2]=1;c[M+(o<<4)+4>>2]=0;c[M+(o<<4)+8>>2]=0;g[M+(o<<4)+12>>2]=s;o=o+1|0}b:do if(O>>>0>2&Q>>>0>127){K=Q+-127|0;J=K+O|0;J=Q>>>0>>0?Q:J;while(1){if(K>>>0>=J>>>0)break b;p=c[ua>>2]|0;F=Q-K|0;F=p-(F>>>0<15?15:F)|0;G=K&2147483647;H=k+G|0;D=ua+4+((_(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,506832829)|0)>>>15<<2)|0;B=c[D>>2]|0;p=(K&p)<<1;c[D>>2]=K;D=0;q=0;E=0;o=p;p=p|1;I=64;while(1){A=B&2147483647;if((K|0)==(B|0)|(K-B|0)>>>0>F>>>0|(I|0)==0){x=36;break}z=q>>>0>>0?q:E;if(z>>>0>=129){x=38;break a}x=G+z|0;y=k+(A+128)|0;e=k+(A+124)|0;w=0;f=k+(A+z)|0;while(1){if(f>>>0>e>>>0)break;Pa=k+(x+w)|0;if((d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0)!=(d[Pa>>0]|d[Pa+1>>0]<<8|d[Pa+2>>0]<<16|d[Pa+3>>0]<<24|0))break;w=w+4|0;f=f+4|0}while(1){if(f>>>0>=y>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[f>>0]|0))break;w=w+1|0;f=f+1|0}z=z+w|0;c:do if(z){f=z;x=H;y=k+A|0;while(1){e=a[x>>0]|0;w=a[y>>0]|0;if(e<<24>>24!=w<<24>>24)break;f=f+-1|0;if(!f)break c;else{x=x+1|0;y=y+1|0}}if(e<<24>>24!=w<<24>>24){x=51;break a}}while(0);if(D){x=53;break a}if(z>>>0>=128){x=55;break}f=c[W>>2]|0;if((d[k+(G+z)>>0]|0)>(d[k+(A+z)>>0]|0)){c[f+(o<<2)>>2]=B;e=(B&c[ua>>2])<<1|1;q=z;f=E;o=e;e=(c[W>>2]|0)+(e<<2)|0}else{c[f+(p<<2)>>2]=B;e=(B&c[ua>>2])<<1;f=z;p=e;e=(c[W>>2]|0)+(e<<2)|0}D=0;E=f;B=c[e>>2]|0;I=I+-1|0}if((x|0)==36){c[(c[W>>2]|0)+(o<<2)>>2]=c[ta>>2];c[(c[W>>2]|0)+(p<<2)>>2]=c[ta>>2]}else if((x|0)==55){Pa=c[W>>2]|0;c[Pa+(o<<2)>>2]=c[Pa+((B&c[ua>>2])<<1<<2)>>2];Pa=c[W>>2]|0;c[Pa+(p<<2)>>2]=c[Pa+(((B&c[ua>>2])<<1|1)<<2)>>2]}K=K+1|0}}while(0);o=S+(Ea(Ha,O,Q,k,2147483647,Ja,va,Ca,ua,M)|0)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);c[ba>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[qa>>2]|0);c[ea>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[fa>>2]|0);c[fa>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[ga>>2]|0);c[ga>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[ha>>2]|0);c[ha>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[ia>>2]|0);c[ia>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[ja>>2]|0);c[ja>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[ka>>2]|0);c[ka>>2]=0}while(0);p=c[La>>2]|0;o=p>>>3;r=a[f+o>>0]|0;q=a[k+(w+-1)>>0]|0;t=a[k+(w+-2)>>0]|0;c[Ka>>2]=c[Ca>>2];c[Ka+4>>2]=c[Ca+4>>2];c[Ka+8>>2]=c[Ca+8>>2];c[Ka+12>>2]=c[Ca+12>>2];u=u+o|0;if(u>>>0>wa>>>0)o=0;else{dc(n|0,f|0,o|0)|0;n=n+o|0;o=V}ra[c[Aa>>2]&1](c[Ba>>2]|0,f);ra[c[Aa>>2]&1](c[Ba>>2]|0,z);h=p&7;U=w;V=o;T=q}if((x|0)==27)oa(1);else if((x|0)==38)pa(405873,405905,373,405932);else if((x|0)==51)pa(405955,405905,378,405932);else if((x|0)==53)na();else if((x|0)==63)oa(1);else if((x|0)==79)oa(1);else if((x|0)==83)oa(1);else if((x|0)==86)oa(1);else if((x|0)==93){c[Na>>2]=u;ra[c[Aa>>2]&1](c[Ba>>2]|0,c[W>>2]|0);c[W>>2]=0;ra[c[Aa>>2]&1](c[Ba>>2]|0,ua);if(f){x=107;break}if((Ma|0)!=0?(c[Na>>2]|0)>>>0>Ma>>>0:0){x=106;break}else f=1;Pa=c[Na>>2]|0;Pa=f?Pa:-1;i=Oa;return Pa|0}}else{t=Yb(5240)|0;if(!t){k=0;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}c[t+16>>2]=1;c[t+20>>2]=1;c[t+24>>2]=0;c[t>>2]=0;c[t+4>>2]=11;c[t+8>>2]=22;c[t+12>>2]=0;x=t+80|0;c[x>>2]=0;c[x+4>>2]=0;c[t+128>>2]=0;c[t+132>>2]=0;c[t+136>>2]=0;x=t+144|0;c[t+4300>>2]=0;c[t+4304>>2]=0;n=t+5204|0;c[t+5232>>2]=0;a[t+5236>>0]=0;a[t+5237>>0]=0;c[t+28>>2]=0;o=t+32|0;c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;x=t+194|0;y=x+10|0;do{a[x>>0]=0;x=x+1|0}while((x|0)<(y|0));c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;c[n+12>>2]=0;c[n+16>>2]=0;c[n+20>>2]=0;n=t+104|0;x=o;y=x+44|0;do{c[x>>2]=0;x=x+4|0}while((x|0)<(y|0));c[n>>2]=0;c[t+108>>2]=0;c[t+112>>2]=0;c[t+116>>2]=0;c[t+124>>2]=0;c[t+120>>2]=0;c[t+160>>2]=4;c[t+164>>2]=11;c[t+168>>2]=15;c[t+172>>2]=16;Pa=t+176|0;La=t+160|0;c[Pa>>2]=c[La>>2];c[Pa+4>>2]=c[La+4>>2];c[Pa+8>>2]=c[La+8>>2];c[Pa+12>>2]=c[La+12>>2];if(!t){k=0;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}c[q>>2]=j;c[u>>2]=p;c[r>>2]=c[Na>>2];c[v>>2]=z;c[w>>2]=0;if(!(a[t+5237>>0]&1)){c[t+4>>2]=e;c[t+8>>2]=f;c[t>>2]=h}f=Ab(t,q,u,r,v,w)|0;if((c[t+5232>>2]|0)==2?(c[t+5220>>2]|0)==0:0)h=f&1;else h=0;c[Na>>2]=c[w>>2];q=t+200|0;f=c[t+20>>2]|0;n=c[t+24>>2]|0;ra[f&1](n,c[q>>2]|0);c[q>>2]=0;q=t+124|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0>Ma>>>0:0)x=106;else{k=1;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}else x=107}while(0);if((x|0)==106){c[Na>>2]=0;if(Ma>>>0>l>>>0){k=0;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}}else if((x|0)==107?(c[Na>>2]=0,(Ma|0)==0|Ma>>>0>l>>>0):0){k=0;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}a[m>>0]=33;a[m+1>>0]=3;h=0;q=2;r=j;while(1){if(!r)break;if(r>>>0<=16777216)if(r>>>0>65536){f=r;if(f>>>0>1048576)x=113;else p=1}else{f=r;p=0}else{f=16777216;x=113}if((x|0)==113){x=0;p=2}o=p<<1|(f<<3)+-8|1<<(p<<2|19);a[m+q>>0]=o;a[m+(q+1)>>0]=o>>>8;n=q+3|0;a[m+(q+2)>>0]=o>>>16;if((p|0)==2){a[m+n>>0]=o>>>24;n=q+4|0}dc(m+n|0,k+h|0,f|0)|0;h=h+f|0;q=n+f|0;r=r-f|0}a[m+q>>0]=3;c[Na>>2]=q+1;k=1;Pa=c[Na>>2]|0;Pa=k?Pa:-1;i=Oa;return Pa|0}function Da(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;x=g+8|0;y=g+12|0;z=g+4|0;k=c[f+12>>2]|0;l=0;B=0;while(1){if((k|0)==-1)break;n=l+k|0;o=f+(n<<4)|0;p=c[o>>2]|0;A=p&16777215;m=c[f+(n<<4)+8>>2]|0;w=l+m|0;k=c[f+(n<<4)+12>>2]|0;if(!B){m=m+(c[h>>2]|0)|0;c[h>>2]=0}u=c[f+(n<<4)+4>>2]|0;v=u&33554431;o=c[o>>2]|0;o=(o&16777215)+9-(o>>>24)|0;t=w+d|0;t=v>>>0>(t>>>0>>0?t:e)>>>0;u=u>>>25;u=(u|0)==0?v+15|0:u+-1|0;c[i+(B<<4)>>2]=m;c[i+(B<<4)+4>>2]=A|(o^p)<<24;l=i+(B<<4)+14|0;if(u>>>0<16){n=u&65535;b[l>>1]=n;l=n;n=0}else{r=u+-12|0;n=((aa(r|0)|0)^31)+-1|0;s=r>>>n&1;q=((n<<1)+65534|s)+16&65535;b[l>>1]=q;l=q;n=n<<24|r-((s|2)<>2]=n;r=l<<16>>16==0;s=i+(B<<4)+12|0;do if(m>>>0>=6){if(m>>>0<130){p=m+-2|0;q=((aa(p|0)|0)^31)+-1|0;q=(q<<1)+(p>>>q)+2&65535;break}if(m>>>0<2114){q=((aa(m+-66|0)|0)^31)+10&65535;break}if(m>>>0<6210)q=21;else q=m>>>0<22594?22:23}else q=m&65535;while(0);do if(o>>>0>=10){if(o>>>0<134){p=o+-6|0;l=((aa(p|0)|0)^31)+-1|0;l=(l<<1)+(p>>>l)+4&65535;break}if(o>>>0<2118)l=((aa(o+-70|0)|0)^31)+12&65535;else l=23}else l=o+65534&65535;while(0);n=l&65535;o=q&65535;p=n&7|o<<3&56;if(r&(q&65535)<8&(l&65535)<16)l=((l&65535)<8?p:p|64)&65535;else l=b[88156+((n>>>3)+((o>>>3)*3|0)<<1)>>1]|p&65535;b[s>>1]=l;if(!(t|(u|0)==0)){c[y>>2]=c[x>>2];c[x>>2]=c[z>>2];c[z>>2]=c[g>>2];c[g>>2]=v}c[j>>2]=(c[j>>2]|0)+m;l=w+A|0;B=B+1|0}c[h>>2]=(c[h>>2]|0)+(a-l);return}function Ea(b,e,f,h,j,k,l,m,n,o){b=b|0;e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0;ba=i;i=i+6320|0;Y=ba+6160|0;$=ba+1252|0;aa=ba+1024|0;Z=ba;W=(c[k+4>>2]|0)<11?150:325;X=e>>>0>127?f+e+-127|0:f;c[o>>2]=0;g[o+12>>2]=0.0;c[$+4904>>2]=e;U=b+8|0;p=sa[c[b>>2]&1](c[U>>2]|0,(e<<2)+8|0)|0;if(!p)oa(1);V=$+4896|0;c[V>>2]=p;Fa($,f,h,j);N=aa+224|0;c[N>>2]=0;O=Z;P=k+4|0;Q=n+524292|0;R=n+524296|0;S=Z;T=Z+4|0;p=0;a:while(1){if((p+3|0)>>>0>=e>>>0){w=98;break}M=p+f|0;L=M>>>0>>0?M:l;J=e-p|0;I=M&j;A=(c[P>>2]|0)!=11?16:64;A=M>>>0>>0?0:M-A|0;K=h+I|0;x=h+(I+1)|0;z=I+J|0;y=h+z|0;z=h+(z+-4)|0;q=O;s=1;r=M;while(1){r=r+-1|0;if(!(r>>>0>A>>>0&s>>>0<3))break;v=M-r|0;if(v>>>0>L>>>0)break;w=r&j;if((a[K>>0]|0)!=(a[h+w>>0]|0)){G=s;H=q;s=G;q=H;continue}if((a[x>>0]|0)==(a[h+(w+1)>>0]|0)){t=0;u=K}else{G=s;H=q;s=G;q=H;continue}while(1){if(u>>>0>z>>>0)break;H=h+(w+t)|0;if((d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24|0)!=(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24|0))break;t=t+4|0;u=u+4|0}while(1){if(u>>>0>=y>>>0)break;if((a[h+(w+t)>>0]|0)!=(a[u>>0]|0))break;t=t+1|0;u=u+1|0}if(t>>>0<=s>>>0){G=s;H=q;s=G;q=H;continue}s=q;c[s>>2]=v;c[s+4>>2]=t<<5;q=s+8|0;s=t}do if(s>>>0>>0){G=J>>>0<128?J:128;H=J>>>0>127;r=n+4+((_(d[K>>0]|d[K+1>>0]<<8|d[K+2>>0]<<16|d[K+3>>0]<<24,506832829)|0)>>>15<<2)|0;v=c[r>>2]|0;t=(M&c[n>>2])<<1;u=t|1;if(H){c[r>>2]=M;E=0;F=0;D=64}else{E=0;F=0;D=64}while(1){B=M-v|0;C=v&j;if((M|0)==(v|0)|B>>>0>L>>>0|(D|0)==0){w=22;break}A=E>>>0>>0?E:F;if(A>>>0>=129){w=25;break a}y=I+A|0;w=C+J|0;z=h+w|0;w=h+(w+-4)|0;x=0;r=h+(C+A)|0;while(1){if(r>>>0>w>>>0)break;ca=h+(y+x)|0;if((d[r>>0]|d[r+1>>0]<<8|d[r+2>>0]<<16|d[r+3>>0]<<24|0)!=(d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0))break;x=x+4|0;r=r+4|0}while(1){if(r>>>0>=z>>>0)break;if((a[h+(y+x)>>0]|0)!=(a[r>>0]|0))break;x=x+1|0;r=r+1|0}A=A+x|0;b:do if(A){r=A;y=K;z=h+C|0;while(1){w=a[y>>0]|0;x=a[z>>0]|0;if(w<<24>>24!=x<<24>>24)break;r=r+-1|0;if(!r)break b;else{y=y+1|0;z=z+1|0}}if(w<<24>>24!=x<<24>>24){w=38;break a}}while(0);r=q;if((q|0)!=0&A>>>0>s>>>0){c[r>>2]=B;c[r+4>>2]=A<<5;q=r+8|0;s=A}if(A>>>0>=G>>>0){w=42;break}if((d[h+(I+A)>>0]|0)>(d[h+(C+A)>>0]|0)){if(H)c[(c[Q>>2]|0)+(t<<2)>>2]=v;w=(v&c[n>>2])<<1|1;v=A;r=F;t=w;w=(c[Q>>2]|0)+(w<<2)|0}else{if(H)c[(c[Q>>2]|0)+(u<<2)>>2]=v;w=(v&c[n>>2])<<1;v=E;r=A;u=w;w=(c[Q>>2]|0)+(w<<2)|0}E=v;F=r;v=c[w>>2]|0;D=D+-1|0}if((w|0)==22){if(!H)break;c[(c[Q>>2]|0)+(t<<2)>>2]=c[R>>2];c[(c[Q>>2]|0)+(u<<2)>>2]=c[R>>2];break}else if((w|0)==42){if(!H)break;ca=c[Q>>2]|0;c[ca+(t<<2)>>2]=c[ca+((v&c[n>>2])<<1<<2)>>2];ca=c[Q>>2]|0;c[ca+(u<<2)>>2]=c[ca+(((v&c[n>>2])<<1|1)<<2)>>2];break}}while(0);r=0;while(1){if((r|0)==38)break;c[Y+(r<<2)>>2]=268435455;r=r+1|0}s=s+1|0;s=s>>>0<4?4:s;c:do if(Vb(K,s,J,Y)|0){t=J>>>0>37?37:J;while(1){if(s>>>0>t>>>0)break c;r=c[Y+(s<<2)>>2]|0;if(r>>>0<268435455){ca=r&31;c[q>>2]=L+(r>>>5)+1;c[q+4>>2]=s<<5|((s|0)==(ca|0)?0:ca);q=q+8|0}s=s+1|0}}while(0);q=q-S>>3;do if(q){r=q+-1|0;if((c[Z+(r<<3)+4>>2]|0)>>>5>>>0<=W>>>0){ca=q;Ga(e,f,p,h,j,k,l,m,ca,Z,$,aa,o);if((ca|0)!=1)break}else{K=Z+(r<<3)|0;L=c[K+4>>2]|0;ca=Z;c[ca>>2]=c[K>>2];c[ca+4>>2]=L;Ga(e,f,p,h,j,k,l,m,1,Z,$,aa,o)}q=(c[T>>2]|0)>>>5;if(q>>>0>W>>>0){I=M+q|0;I=I>>>0>>0?I:X;H=(M+64|0)>>>0>I>>>0?M+1|0:I+-63|0;while(1){if(H>>>0>=I>>>0)break;s=c[n>>2]|0;D=s+-15|0;E=H&j;F=h+E|0;B=n+4+((_(d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24,506832829)|0)>>>15<<2)|0;A=c[B>>2]|0;s=(H&s)<<1;c[B>>2]=H;B=0;t=0;C=0;r=s;s=s|1;G=64;while(1){z=A&j;if((H|0)==(A|0)|(H-A|0)>>>0>D>>>0|(G|0)==0){w=71;break}y=t>>>0>>0?t:C;if(y>>>0>=129){w=73;break a}w=E+y|0;x=h+(z+128)|0;u=h+(z+124)|0;v=0;q=h+(z+y)|0;while(1){if(q>>>0>u>>>0)break;ca=h+(w+v)|0;if((d[q>>0]|d[q+1>>0]<<8|d[q+2>>0]<<16|d[q+3>>0]<<24|0)!=(d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0))break;v=v+4|0;q=q+4|0}while(1){if(q>>>0>=x>>>0)break;if((a[h+(w+v)>>0]|0)!=(a[q>>0]|0))break;v=v+1|0;q=q+1|0}y=y+v|0;d:do if(y){q=y;w=F;x=h+z|0;while(1){u=a[w>>0]|0;v=a[x>>0]|0;if(u<<24>>24!=v<<24>>24)break;q=q+-1|0;if(!q)break d;else{w=w+1|0;x=x+1|0}}if(u<<24>>24!=v<<24>>24){w=86;break a}}while(0);if(B){w=88;break a}if(y>>>0>=128){w=90;break}q=c[Q>>2]|0;if((d[h+(E+y)>>0]|0)>(d[h+(z+y)>>0]|0)){c[q+(r<<2)>>2]=A;u=(A&c[n>>2])<<1|1;t=y;q=C;r=u;u=(c[Q>>2]|0)+(u<<2)|0}else{c[q+(s<<2)>>2]=A;u=(A&c[n>>2])<<1;q=y;s=u;u=(c[Q>>2]|0)+(u<<2)|0}B=0;C=q;A=c[u>>2]|0;G=G+-1|0}if((w|0)==71){c[(c[Q>>2]|0)+(r<<2)>>2]=c[R>>2];c[(c[Q>>2]|0)+(s<<2)>>2]=c[R>>2]}else if((w|0)==90){ca=c[Q>>2]|0;c[ca+(r<<2)>>2]=c[ca+((A&c[n>>2])<<1<<2)>>2];ca=c[Q>>2]|0;c[ca+(s<<2)>>2]=c[ca+(((A&c[n>>2])<<1|1)<<2)>>2]}H=H+1|0}p=p+(((c[T>>2]|0)>>>5)+-1)|0;c[N>>2]=0}}else Ga(e,f,p,h,j,k,l,m,0,Z,$,aa,o);while(0);p=p+1|0}if((w|0)==25)pa(405873,405905,373,405932);else if((w|0)==38)pa(405955,405905,378,405932);else if((w|0)==73)pa(405873,405905,373,405932);else if((w|0)==86)pa(405955,405905,378,405932);else if((w|0)==88)na();else if((w|0)==98){ra[c[b+4>>2]&1](c[U>>2]|0,c[V>>2]|0);c[V>>2]=0;while(1){if(c[o+(e<<4)+8>>2]|0)break;if((c[o+(e<<4)>>2]|0)!=1)break;e=e+-1|0}c[o+(e<<4)+12>>2]=-1;p=0;while(1){if(!e)break;j=(c[o+(e<<4)>>2]&16777215)+(c[o+(e<<4)+8>>2]|0)|0;ca=e-j|0;c[o+(ca<<4)+12>>2]=j;e=ca;p=p+1|0}i=ba;return p|0}return 0}function Fa(b,e,f,h){b=b|0;e=e|0;f=f|0;h=h|0;var j=0,k=0.0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=i;i=i+4128|0;p=w+4112|0;s=w+1040|0;t=w+1024|0;o=w;u=c[b+4904>>2]|0;v=c[b+4896>>2]|0;a:do if(Wb(f,e,h,u)|0){c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;l=0;o=0;while(1){if((o|0)==(u|0))break;j=a[f+(o+e&h)>>0]|0;n=j&255;if(j<<24>>24<=-1)if((j&255)>191)j=1;else j=l>>>0<224?0:2;else j=0;l=p+(j<<2)|0;c[l>>2]=(c[l>>2]|0)+1;l=n;o=o+1|0}r=((c[p+4>>2]|0)+(c[p+8>>2]|0)|0)>>>0<25?0:1;ac(s|0,0,3072)|0;n=u>>>0>495?495:u;c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;p=0;q=0;j=0;while(1){if((q|0)==(n|0)){o=0;break}l=a[f+(q+e&h)>>0]|0;o=l&255;x=s+(j<<10)+(o<<2)|0;c[x>>2]=(c[x>>2]|0)+1;j=t+(j<<2)|0;c[j>>2]=(c[j>>2]|0)+1;if(l<<24>>24<=-1)if((l&255)>191)j=r;else j=p>>>0<224?0:r;else j=0;p=o;q=q+1|0}while(1){if((o|0)==(u|0))break;if(o>>>0>=495){if(o>>>0>=496){j=o+e|0;l=d[f+(j+-496&h)>>0]|0;if(o>>>0<497)j=0;else j=d[f+(j+-497&h)>>0]|0;if(l>>>0>=128)if(l>>>0>191)j=r;else j=j>>>0<224?0:r;else j=0}else j=0;x=s+(j<<10)+((d[f+(o+e+-495&h)>>0]|0)<<2)|0;c[x>>2]=(c[x>>2]|0)+-1;x=t+(j<<2)|0;c[x>>2]=(c[x>>2]|0)+-1}if((o+495|0)>>>0>>0){l=o+e|0;n=l+495|0;j=a[f+(l+494&h)>>0]|0;l=a[f+(l+493&h)>>0]|0;if(j<<24>>24<=-1)if((j&255)>191)j=r;else j=(l&255)<224?0:r;else j=0;x=s+(j<<10)+((d[f+(n&h)>>0]|0)<<2)|0;c[x>>2]=(c[x>>2]|0)+1;x=t+(j<<2)|0;c[x>>2]=(c[x>>2]|0)+1}if(o){j=o+e|0;l=d[f+(j+-1&h)>>0]|0;if(o>>>0<2)j=0;else j=d[f+(j+-2&h)>>0]|0;if(l>>>0>=128)if(l>>>0>191)j=r;else j=j>>>0<224?0:r;else j=0}else j=0;l=c[s+(j<<10)+((d[f+(o+e&h)>>0]|0)<<2)>>2]|0;l=(l|0)==0?1:l;j=c[t+(j<<2)>>2]|0;if(j>>>0<256)m=+g[19516+(j<<2)>>2];else m=+Xb(+(j>>>0));if(l>>>0<256)k=+g[19516+(l<<2)>>2];else k=+Xb(+(l>>>0));k=m-k+.02905;k=k<1.0?k*.5+.5:k;if(o>>>0<2e3)k=k+(.7-+((2e3-o|0)>>>0)/2.0e3*.35);g[v+(o+1<<2)>>2]=k;o=o+1|0}}else{ac(o|0,0,1024)|0;j=u>>>0>2e3?2e3:u;l=0;while(1){if((l|0)==(j|0)){n=0;break}x=o+((d[f+(l+e&h)>>0]|0)<<2)|0;c[x>>2]=(c[x>>2]|0)+1;l=l+1|0}while(1){if((n|0)==(u|0))break a;if(n>>>0>=2e3){x=o+((d[f+(n+e+-2e3&h)>>0]|0)<<2)|0;c[x>>2]=(c[x>>2]|0)+-1;j=j+-1|0}l=n+e|0;if((n+2e3|0)>>>0>>0){x=o+((d[f+(l+2e3&h)>>0]|0)<<2)|0;c[x>>2]=(c[x>>2]|0)+1;j=j+1|0}l=c[o+((d[f+(l&h)>>0]|0)<<2)>>2]|0;l=(l|0)==0?1:l;if(j>>>0<256)m=+g[19516+(j<<2)>>2];else m=+Xb(+(j>>>0));if(l>>>0<256)k=+g[19516+(l<<2)>>2];else k=+Xb(+(l>>>0));m=m-k+.029;g[v+(n+1<<2)>>2]=m<1.0?m*.5+.5:m;n=n+1|0}}while(0);g[v>>2]=0.0;k=0.0;j=0;while(1){if((j|0)==(u|0)){l=0;break}x=j+1|0;h=v+(x<<2)|0;m=+g[h>>2]+k;g[h>>2]=m;k=m;j=x}while(1){if((l|0)==704){l=0;break}j=l+11|0;if(j>>>0<256)k=+g[19516+(j<<2)>>2];else k=+Xb(+(j>>>0));g[b+(l<<2)>>2]=k;l=l+1|0}while(1){if((l|0)==520)break;j=l+20|0;if(j>>>0<256)k=+g[19516+(j<<2)>>2];else k=+Xb(+(j>>>0));g[b+2816+(l<<2)>>2]=k;l=l+1|0}g[b+4900>>2]=3.4594316482543945;i=w;return}function Ga(e,f,h,j,l,m,n,o,p,q,r,s,t){e=e|0;f=f|0;h=h|0;j=j|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;var u=0.0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;Z=i;i=i+64|0;A=Z+36|0;z=Z+8|0;Y=Z;S=f+h|0;T=S&l;R=S>>>0>>0?S:n;U=e-h|0;Q=(c[m+4>>2]|0)<11;P=Q?150:325;Q=Q?1:5;y=c[t+(h<<4)+12>>2]|0;f=c[t+(h<<4)>>2]&16777215;m=c[t+(h<<4)+8>>2]|0;v=c[t+(h<<4)+4>>2]|0;w=v&33554431;if(h)if((w+f|0)>>>0>S>>>0|w>>>0>n>>>0|(v>>>25|0)==1)f=c[t+(h-f-m<<4)+12>>2]|0;else f=h;else f=0;v=t+(h<<4)+12|0;c[v>>2]=f;x=(c[k>>2]=y,+g[k>>2]);O=r+4896|0;m=c[O>>2]|0;u=+g[m+(h<<2)>>2];if(!(x<=u-+g[m>>2]))y=s+224|0;else{c[z>>2]=h;c[z+24>>2]=y;f=c[O>>2]|0;g[z+20>>2]=x-(+g[f+(h<<2)>>2]-+g[f>>2]);f=0;m=v;while(1){m=c[m>>2]|0;if(!((f|0)<4&(m|0)!=0)){m=o;break}N=c[t+(m<<4)+8>>2]|0;M=c[t+(m<<4)>>2]&16777215;c[z+4+(f<<2)>>2]=c[t+(m<<4)+4>>2]&33554431;f=f+1|0;m=t+(m-M-N<<4)+12|0}while(1){if((f|0)>=4)break;c[z+4+(f<<2)>>2]=c[m>>2];m=m+4|0;f=f+1|0}y=s+224|0;f=c[y>>2]|0;n=f+1|0;c[y>>2]=n;f=f&7^7;n=n>>>0<8?n:8;w=s+(f*28|0)|0;c[w>>2]=c[z>>2];c[w+4>>2]=c[z+4>>2];c[w+8>>2]=c[z+8>>2];c[w+12>>2]=c[z+12>>2];c[w+16>>2]=c[z+16>>2];c[w+20>>2]=c[z+20>>2];c[w+24>>2]=c[z+24>>2];w=1;while(1){if(w>>>0>=n>>>0)break;v=f&7;f=f+1|0;m=f&7;if(+g[s+(v*28|0)+20>>2]>+g[s+(m*28|0)+20>>2]){M=s+(v*28|0)|0;c[A>>2]=c[M>>2];c[A+4>>2]=c[M+4>>2];c[A+8>>2]=c[M+8>>2];c[A+12>>2]=c[M+12>>2];c[A+16>>2]=c[M+16>>2];c[A+20>>2]=c[M+20>>2];c[A+24>>2]=c[M+24>>2];N=s+(m*28|0)|0;c[M>>2]=c[N>>2];c[M+4>>2]=c[N+4>>2];c[M+8>>2]=c[N+8>>2];c[M+12>>2]=c[N+12>>2];c[M+16>>2]=c[N+16>>2];c[M+20>>2]=c[N+20>>2];c[M+24>>2]=c[N+24>>2];c[N>>2]=c[A>>2];c[N+4>>2]=c[A+4>>2];c[N+8>>2]=c[A+8>>2];c[N+12>>2]=c[A+12>>2];c[N+16>>2]=c[A+16>>2];c[N+20>>2]=c[A+20>>2];c[N+24>>2]=c[A+24>>2]}w=w+1|0}N=c[O>>2]|0;m=N;u=+g[N+(h<<2)>>2]}v=0-(c[y>>2]|0)&7;f=2;u=+g[s+(v*28|0)+24>>2]+ +g[r+4900>>2]+(u-+g[m+(c[s+(v*28|0)>>2]<<2)>>2]);v=4;w=10;a:while(1){do{m=f+h|0;if(m>>>0>e>>>0)break a;if(!(+g[t+(m<<4)+12>>2]<=u))break a;f=f+1|0}while((f|0)!=(w|0));N=w+v|0;f=w;u=u+1.0;v=v<<1;w=N}H=f+-1|0;I=j+T|0;K=T+U|0;J=j+K|0;K=j+(K+-4)|0;L=Y+4|0;M=Y+4|0;N=0;while(1){if(N>>>0>=Q>>>0){f=82;break}m=c[y>>2]|0;if(N>>>0>=(m>>>0<8?m:8)>>>0){f=82;break}C=N-m&7;D=h-(c[s+(C*28|0)>>2]|0)|0;do if(D>>>0>=6){if(D>>>0<130){G=D+-2|0;m=((aa(G|0)|0)^31)+-1|0;m=(m<<1)+(G>>>m)+2&65535;break}if(D>>>0<2114){m=((aa(D+-66|0)|0)^31)+10&65535;break}if(D>>>0<6210)m=21;else m=D>>>0<22594?22:23}else m=D&65535;while(0);G=m&65535;F=c[O>>2]|0;E=+g[s+(C*28|0)+20>>2]+ +((c[17268+(G<<2)>>2]|0)>>>0)+(+g[F+(h<<2)>>2]-+g[F>>2]);F=G<<3&56;G=(G>>>3)*3|0;e=(m&65535)<8;m=H;B=0;while(1){if(!(B>>>0<16&m>>>0>>0))break;n=(c[s+(C*28|0)+4+(c[11372+(B<<2)>>2]<<2)>>2]|0)+(c[11436+(B<<2)>>2]|0)|0;v=S-n|0;b:do if(((!(v>>>0>=S>>>0|n>>>0>R>>>0)?(V=v&l,W=T+m|0,W>>>0<=l>>>0):0)?(X=V+m|0,X>>>0<=l>>>0):0)?(a[j+W>>0]|0)==(a[j+X>>0]|0):0){v=0;w=I;while(1){if(w>>>0>K>>>0)break;A=j+(V+v)|0;if((d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24|0)!=(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0))break;v=v+4|0;w=w+4|0}while(1){if(w>>>0>=J>>>0)break;if((a[j+(V+v)>>0]|0)!=(a[w>>0]|0))break;v=v+1|0;w=w+1|0}x=E+ +g[r+2816+(B<<2)>>2];A=(B|0)==0;z=n|(B<<25)+33554432;while(1){o=m+1|0;if(o>>>0>v>>>0)break b;do if(o>>>0>=10){if(o>>>0<134){n=m+-5|0;m=((aa(n|0)|0)^31)+-1|0;m=(m<<1)+(n>>>m)+4&65535;break}if(o>>>0<2118)m=((aa(m+-69|0)|0)^31)+12&65535;else m=23}else m=m+65535&65535;while(0);n=m&65535;w=n&7|F;if(((A^1|e^1)^1)&(m&65535)<16)m=((m&65535)<8?w:w|64)&65535;else m=b[88156+((n>>>3)+G<<1)>>1]|w&65535;u=((m&65535)<128?E:x)+ +((c[17460+(n<<2)>>2]|0)>>>0)+ +g[r+((m&65535)<<2)>>2];m=o+h|0;if(!(u<+g[t+(m<<4)+12>>2])){m=o;continue}c[t+(m<<4)>>2]=o|150994944;c[t+(m<<4)+4>>2]=z;c[t+(m<<4)+8>>2]=D;g[t+(m<<4)+12>>2]=u;m=o}}while(0);B=B+1|0}c:do if(N>>>0<=1){o=f;C=0;while(1){if((C|0)==(p|0))break c;z=q+(C<<3)|0;e=c[z>>2]|0;z=c[z+4>>2]|0;n=Y;c[n>>2]=e;c[n+4>>2]=z;n=e>>>0>R>>>0;m=n&1;v=e+15|0;B=bc(e|0,z|0,37)|0;if(v>>>0<16)w=0;else{_=e+3|0;w=((aa(_|0)|0)^31)+-1|0;A=_>>>w&1;v=((w<<1)+65534|A)+16|0;w=w<<24|_-((A|2)<>>24>>>0)+ +g[r+2816+((v&65535)<<2)>>2];if(o>>>0>>0){_=n|B>>>0>P>>>0;m=_?m:0;o=_?B:o}A=m<<24>>24==0;w=bc(e|0,z|0,37)|0;w=w+1|0;n=o>>>0>w>>>0;z=o;while(1){if(z>>>0>B>>>0)break;if(!A){m=c[L>>2]&31;if(!m)m=(c[M>>2]|0)>>>5}else m=z;do if(m>>>0>=10){if(m>>>0<134){_=m+-6|0;v=((aa(_|0)|0)^31)+-1|0;v=(v<<1)+(_>>>v)+4|0;break}if(m>>>0<2118)v=((aa(m+-70|0)|0)^31)+12|0;else v=23}else v=m+65534|0;while(0);_=v&65535;u=x+ +((c[17460+(_<<2)>>2]|0)>>>0)+ +g[r+(((b[88156+((_>>>3)+G<<1)>>1]|(v&7|F)&65535)&65535)<<2)>>2];v=z+h|0;if(u<+g[t+(v<<4)+12>>2]){c[t+(v<<4)>>2]=z|z+9-m<<24;c[t+(v<<4)+4>>2]=e;c[t+(v<<4)+8>>2]=D;g[t+(v<<4)+12>>2]=u}z=z+1|0}o=n?o:w;C=C+1|0}}while(0);N=N+1|0}if((f|0)==82){i=Z;return}}function Ha(b,e,f,h,i,j,k,l,m,n,o,p,q){b=b|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;M=(1<>2])+-16|0;Ua(b,l,k,f,e,h);a:do if(e>>>0>2&f>>>0>127){L=f+-127|0;K=L+e|0;K=K>>>0>f>>>0?f:K;J=l+524292|0;I=l+524296|0;b:while(1){if(L>>>0>=K>>>0)break a;t=c[l>>2]|0;E=f-L|0;E=t-(E>>>0<15?15:E)|0;F=L&j;G=i+F|0;C=l+4+((_(d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24,506832829)|0)>>>15<<2)|0;B=c[C>>2]|0;t=(L&t)<<1;c[C>>2]=L;C=0;u=0;D=0;r=t;t=t|1;H=64;while(1){A=B&j;if((L|0)==(B|0)|(L-B|0)>>>0>E>>>0|(H|0)==0){h=6;break}z=u>>>0>>0?u:D;if(z>>>0>=129){h=8;break b}x=F+z|0;y=i+(A+128)|0;v=i+(A+124)|0;w=0;h=i+(A+z)|0;while(1){if(h>>>0>v>>>0)break;N=i+(x+w)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24|0))break;w=w+4|0;h=h+4|0}while(1){if(h>>>0>=y>>>0)break;if((a[i+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}z=z+w|0;c:do if(z){h=z;x=G;y=i+A|0;while(1){v=a[x>>0]|0;w=a[y>>0]|0;if(v<<24>>24!=w<<24>>24)break;h=h+-1|0;if(!h)break c;else{x=x+1|0;y=y+1|0}}if(v<<24>>24!=w<<24>>24){h=21;break b}}while(0);if(C){h=23;break b}if(z>>>0>=128){h=25;break}h=c[J>>2]|0;if((d[i+(F+z)>>0]|0)>(d[i+(A+z)>>0]|0)){c[h+(r<<2)>>2]=B;v=(B&c[l>>2])<<1|1;u=z;h=D;r=v;v=(c[J>>2]|0)+(v<<2)|0}else{c[h+(t<<2)>>2]=B;v=(B&c[l>>2])<<1;h=z;t=v;v=(c[J>>2]|0)+(v<<2)|0}C=0;D=h;B=c[v>>2]|0;H=H+-1|0}if((h|0)==6){c[(c[J>>2]|0)+(r<<2)>>2]=c[I>>2];c[(c[J>>2]|0)+(t<<2)>>2]=c[I>>2]}else if((h|0)==25){N=c[J>>2]|0;c[N+(r<<2)>>2]=c[N+((B&c[l>>2])<<1<<2)>>2];N=c[J>>2]|0;c[N+(t<<2)>>2]=c[N+(((B&c[l>>2])<<1|1)<<2)>>2]}L=L+1|0}if((h|0)==8)pa(405873,405905,373,405932);else if((h|0)==21)pa(405955,405905,378,405932);else if((h|0)==23)na()}while(0);h=b+8|0;r=sa[c[b>>2]&1](c[h>>2]|0,(e<<4)+16|0)|0;if(!r)oa(1);t=e+1|0;u=0;while(1){if((u|0)==(t|0))break;c[r+(u<<4)>>2]=1;c[r+(u<<4)+4>>2]=0;c[r+(u<<4)+8>>2]=0;g[r+(u<<4)+12>>2]=s;u=u+1|0}N=Ea(b,e,f,i,j,k,M,m,l,r)|0;c[p>>2]=(c[p>>2]|0)+N;Da(e,f,M,r,m,n,o,q);ra[c[b+4>>2]&1](c[h>>2]|0,r);return}function Ia(e,f,h,j,l,m,n,o,p,q,r,t,u){e=e|0;f=f|0;h=h|0;j=j|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;t=t|0;u=u|0;var v=0,w=0,x=0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,qa=0,ta=0,ua=0,va=0,wa=0,xa=0.0;va=i;i=i+12256|0;fa=va+12028|0;ea=va+12024|0;qa=va+11e3|0;la=va+8184|0;ma=va+6104|0;ka=va+5080|0;aa=va+4928|0;ua=va+4912|0;ta=va;ga=(1<>2])+-16|0;da=f<<2;ia=e+8|0;ja=sa[c[e>>2]&1](c[ia>>2]|0,da)|0;if(!ja)oa(1);$=f>>>0>127?h+f+-127|0:h;ca=sa[c[e>>2]&1](c[ia>>2]|0,f<<5)|0;Q=ca;if(!ca)oa(1);Ua(e,o,n,h,f,j);a:do if(f>>>0>2&h>>>0>127){P=h+-127|0;O=P+f|0;O=O>>>0>h>>>0?h:O;M=o+524292|0;N=o+524296|0;b:while(1){if(P>>>0>=O>>>0)break a;w=c[o>>2]|0;I=h-P|0;I=w-(I>>>0<15?15:I)|0;J=P&m;K=l+J|0;G=o+4+((_(d[K>>0]|d[K+1>>0]<<8|d[K+2>>0]<<16|d[K+3>>0]<<24,506832829)|0)>>>15<<2)|0;F=c[G>>2]|0;w=(P&w)<<1;c[G>>2]=P;G=0;x=0;H=0;v=w;w=w|1;L=64;while(1){E=F&m;if((P|0)==(F|0)|(P-F|0)>>>0>I>>>0|(L|0)==0){x=11;break}D=x>>>0>>0?x:H;if(D>>>0>=129){x=13;break b}B=J+D|0;C=l+(E+128)|0;z=l+(E+124)|0;A=0;j=l+(E+D)|0;while(1){if(j>>>0>z>>>0)break;ca=l+(B+A)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0))break;A=A+4|0;j=j+4|0}while(1){if(j>>>0>=C>>>0)break;if((a[l+(B+A)>>0]|0)!=(a[j>>0]|0))break;A=A+1|0;j=j+1|0}D=D+A|0;c:do if(D){j=D;B=K;C=l+E|0;while(1){z=a[B>>0]|0;A=a[C>>0]|0;if(z<<24>>24!=A<<24>>24)break;j=j+-1|0;if(!j)break c;else{B=B+1|0;C=C+1|0}}if(z<<24>>24!=A<<24>>24){x=26;break b}}while(0);if(G){x=28;break b}if(D>>>0>=128){x=30;break}j=c[M>>2]|0;if((d[l+(J+D)>>0]|0)>(d[l+(E+D)>>0]|0)){c[j+(v<<2)>>2]=F;z=(F&c[o>>2])<<1|1;x=D;j=H;v=z;z=(c[M>>2]|0)+(z<<2)|0}else{c[j+(w<<2)>>2]=F;z=(F&c[o>>2])<<1;j=D;w=z;z=(c[M>>2]|0)+(z<<2)|0}G=0;H=j;F=c[z>>2]|0;L=L+-1|0}if((x|0)==11){c[(c[M>>2]|0)+(v<<2)>>2]=c[N>>2];c[(c[M>>2]|0)+(w<<2)>>2]=c[N>>2]}else if((x|0)==30){ca=c[M>>2]|0;c[ca+(v<<2)>>2]=c[ca+((F&c[o>>2])<<1<<2)>>2];ca=c[M>>2]|0;c[ca+(w<<2)>>2]=c[ca+(((F&c[o>>2])<<1|1)<<2)>>2]}P=P+1|0}if((x|0)==13)pa(405873,405905,373,405932);else if((x|0)==26)pa(405955,405905,378,405932);else if((x|0)==28)na()}while(0);ba=e+4|0;ca=n+4|0;Y=o+524292|0;Z=o+524296|0;W=0;A=da;v=0;d:while(1){if((v+3|0)>>>0>=f>>>0){x=142;break}V=v+h|0;U=V>>>0>>0?V:ga;R=f-v|0;j=W+128|0;if(A>>>0>>0){x=(A|0)==0;z=x?j:A;while(1){if(z>>>0>=j>>>0)break;z=z<<1}w=sa[c[e>>2]&1](c[ia>>2]|0,z<<3)|0;if(!w){x=42;break}j=Q;if(!x)dc(w|0,j|0,A<<3|0)|0;ra[c[ba>>2]&1](c[ia>>2]|0,j);X=z}else{w=Q;X=A}S=w;T=S+(W<<3)|0;P=V&m;E=(c[ca>>2]|0)!=11?16:64;E=V>>>0>>0?0:V-E|0;Q=l+P|0;F=l+(P+1)|0;H=P+R|0;G=l+H|0;H=l+(H+-4)|0;j=T;z=1;x=V;while(1){x=x+-1|0;if(!(x>>>0>E>>>0&z>>>0<3))break;C=V-x|0;if(C>>>0>U>>>0)break;D=x&m;if((a[Q>>0]|0)!=(a[l+D>>0]|0)){N=z;O=j;z=N;j=O;continue}if((a[F>>0]|0)==(a[l+(D+1)>>0]|0)){A=0;B=Q}else{N=z;O=j;z=N;j=O;continue}while(1){if(B>>>0>H>>>0)break;O=l+(D+A)|0;if((d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24|0)!=(d[O>>0]|d[O+1>>0]<<8|d[O+2>>0]<<16|d[O+3>>0]<<24|0))break;A=A+4|0;B=B+4|0}while(1){if(B>>>0>=G>>>0)break;if((a[l+(D+A)>>0]|0)!=(a[B>>0]|0))break;A=A+1|0;B=B+1|0}if(A>>>0<=z>>>0){N=z;O=j;z=N;j=O;continue}z=j;c[z>>2]=C;c[z+4>>2]=A<<5;j=z+8|0;z=A}do if(z>>>0>>0){N=R>>>0<128?R:128;O=R>>>0>127;x=o+4+((_(d[Q>>0]|d[Q+1>>0]<<8|d[Q+2>>0]<<16|d[Q+3>>0]<<24,506832829)|0)>>>15<<2)|0;C=c[x>>2]|0;A=(V&c[o>>2])<<1;B=A|1;if(O){c[x>>2]=V;L=0;M=0;K=64}else{L=0;M=0;K=64}while(1){I=V-C|0;J=C&m;if((V|0)==(C|0)|I>>>0>U>>>0|(K|0)==0){x=63;break}H=L>>>0>>0?L:M;if(H>>>0>=129){x=66;break d}F=P+H|0;D=J+R|0;G=l+D|0;D=l+(D+-4)|0;E=0;x=l+(J+H)|0;while(1){if(x>>>0>D>>>0)break;wa=l+(F+E)|0;if((d[x>>0]|d[x+1>>0]<<8|d[x+2>>0]<<16|d[x+3>>0]<<24|0)!=(d[wa>>0]|d[wa+1>>0]<<8|d[wa+2>>0]<<16|d[wa+3>>0]<<24|0))break;E=E+4|0;x=x+4|0}while(1){if(x>>>0>=G>>>0)break;if((a[l+(F+E)>>0]|0)!=(a[x>>0]|0))break;E=E+1|0;x=x+1|0}H=H+E|0;e:do if(H){x=H;F=Q;G=l+J|0;while(1){D=a[F>>0]|0;E=a[G>>0]|0;if(D<<24>>24!=E<<24>>24)break;x=x+-1|0;if(!x)break e;else{F=F+1|0;G=G+1|0}}if(D<<24>>24!=E<<24>>24){x=79;break d}}while(0);x=j;if((j|0)!=0&H>>>0>z>>>0){c[x>>2]=I;c[x+4>>2]=H<<5;j=x+8|0;z=H}if(H>>>0>=N>>>0){x=83;break}if((d[l+(P+H)>>0]|0)>(d[l+(J+H)>>0]|0)){if(O)c[(c[Y>>2]|0)+(A<<2)>>2]=C;D=(C&c[o>>2])<<1|1;C=H;x=M;A=D;D=(c[Y>>2]|0)+(D<<2)|0}else{if(O)c[(c[Y>>2]|0)+(B<<2)>>2]=C;D=(C&c[o>>2])<<1;C=L;x=H;B=D;D=(c[Y>>2]|0)+(D<<2)|0}L=C;M=x;C=c[D>>2]|0;K=K+-1|0}if((x|0)==63){if(!O)break;c[(c[Y>>2]|0)+(A<<2)>>2]=c[Z>>2];c[(c[Y>>2]|0)+(B<<2)>>2]=c[Z>>2];break}else if((x|0)==83){if(!O)break;wa=c[Y>>2]|0;c[wa+(A<<2)>>2]=c[wa+((C&c[o>>2])<<1<<2)>>2];wa=c[Y>>2]|0;c[wa+(B<<2)>>2]=c[wa+(((C&c[o>>2])<<1|1)<<2)>>2];break}}while(0);x=0;while(1){if((x|0)==38)break;c[aa+(x<<2)>>2]=268435455;x=x+1|0}z=z+1|0;z=z>>>0<4?4:z;f:do if(Vb(Q,z,R,aa)|0){A=R>>>0>37?37:R;while(1){if(z>>>0>A>>>0)break f;x=c[aa+(z<<2)>>2]|0;if(x>>>0<268435455){wa=x&31;c[j>>2]=U+(x>>>5)+1;c[j+4>>2]=z<<5|((z|0)==(wa|0)?0:wa);j=j+8|0}z=z+1|0}}while(0);A=j-T>>3;j=W+A|0;z=W;while(1){x=z;z=z+1|0;if(z>>>0>=j>>>0)break;if((c[S+(x<<3)+4>>2]|0)>>>5>>>0>=(c[S+(z<<3)+4>>2]|0)>>>5>>>0){x=105;break d}x=c[S+(x<<3)>>2]|0;if(x>>>0>U>>>0)continue;if(x>>>0>(c[S+(z<<3)>>2]|0)>>>0){x=108;break d}}B=ja+(v<<2)|0;c[B>>2]=A;if(A){x=j+-1|0;wa=c[S+(x<<3)+4>>2]|0;z=wa>>>5;if(wa>>>0>10431){R=z+-1|0;j=W+1|0;wa=S+(x<<3)|0;P=c[wa+4>>2]|0;Q=T;c[Q>>2]=c[wa>>2];c[Q+4>>2]=P;c[B>>2]=1;Q=V+z|0;Q=Q>>>0<$>>>0?Q:$;P=(V+64|0)>>>0>Q>>>0?V+1|0:Q+-63|0;while(1){if(P>>>0>=Q>>>0)break;A=c[o>>2]|0;L=A+-15|0;M=P&m;N=l+M|0;J=o+4+((_(d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24,506832829)|0)>>>15<<2)|0;I=c[J>>2]|0;A=(P&A)<<1;c[J>>2]=P;J=0;B=0;K=0;z=A;A=A|1;O=64;while(1){H=I&m;if((P|0)==(I|0)|(P-I|0)>>>0>L>>>0|(O|0)==0){x=115;break}G=B>>>0>>0?B:K;if(G>>>0>=129){x=117;break d}E=M+G|0;F=l+(H+128)|0;C=l+(H+124)|0;D=0;x=l+(H+G)|0;while(1){if(x>>>0>C>>>0)break;wa=l+(E+D)|0;if((d[x>>0]|d[x+1>>0]<<8|d[x+2>>0]<<16|d[x+3>>0]<<24|0)!=(d[wa>>0]|d[wa+1>>0]<<8|d[wa+2>>0]<<16|d[wa+3>>0]<<24|0))break;D=D+4|0;x=x+4|0}while(1){if(x>>>0>=F>>>0)break;if((a[l+(E+D)>>0]|0)!=(a[x>>0]|0))break;D=D+1|0;x=x+1|0}G=G+D|0;g:do if(G){x=G;E=N;F=l+H|0;while(1){C=a[E>>0]|0;D=a[F>>0]|0;if(C<<24>>24!=D<<24>>24)break;x=x+-1|0;if(!x)break g;else{E=E+1|0;F=F+1|0}}if(C<<24>>24!=D<<24>>24){x=130;break d}}while(0);if(J){x=132;break d}if(G>>>0>=128){x=134;break}x=c[Y>>2]|0;if((d[l+(M+G)>>0]|0)>(d[l+(H+G)>>0]|0)){c[x+(z<<2)>>2]=I;C=(I&c[o>>2])<<1|1;B=G;x=K;z=C;C=(c[Y>>2]|0)+(C<<2)|0}else{c[x+(A<<2)>>2]=I;C=(I&c[o>>2])<<1;x=G;A=C;C=(c[Y>>2]|0)+(C<<2)|0}J=0;K=x;I=c[C>>2]|0;O=O+-1|0}if((x|0)==115){c[(c[Y>>2]|0)+(z<<2)>>2]=c[Z>>2];c[(c[Y>>2]|0)+(A<<2)>>2]=c[Z>>2]}else if((x|0)==134){wa=c[Y>>2]|0;c[wa+(z<<2)>>2]=c[wa+((I&c[o>>2])<<1<<2)>>2];wa=c[Y>>2]|0;c[wa+(A<<2)>>2]=c[wa+(((I&c[o>>2])<<1|1)<<2)>>2]}P=P+1|0}ac(ja+(v+1<<2)|0,0,R<<2|0)|0;v=v+R|0}}else j=W;W=j;Q=w;A=X;v=v+1|0}if((x|0)==42)oa(1);else if((x|0)==66)pa(405873,405905,373,405932);else if((x|0)==79)pa(405955,405905,378,405932);else if((x|0)==105)pa(403595,403667,793,403707);else if((x|0)==108)pa(403740,403667,795,403707);else if((x|0)==117)pa(405873,405905,373,405932);else if((x|0)==130)pa(405955,405905,378,405932);else if((x|0)==132)na();else if((x|0)==142){K=c[u>>2]|0;L=c[q>>2]|0;c[ua>>2]=c[p>>2];c[ua+4>>2]=c[p+4>>2];c[ua+8>>2]=c[p+8>>2];c[ua+12>>2]=c[p+12>>2];M=c[t>>2]|0;N=sa[c[e>>2]&1](c[ia>>2]|0,(f<<4)+16|0)|0;if(!N)oa(1);O=ta+4904|0;c[O>>2]=f;j=sa[c[e>>2]&1](c[ia>>2]|0,da+8|0)|0;if(!j)oa(1);J=ta+4896|0;c[J>>2]=j;B=N+12|0;C=fa+224|0;D=Q;E=h-L|0;F=ta+2816|0;G=ta+4900|0;H=f+1|0;I=0;while(1){if((I|0)==2)break;else j=0;while(1){if((j|0)==(H|0))break;c[N+(j<<4)>>2]=1;c[N+(j<<4)+4>>2]=0;c[N+(j<<4)+8>>2]=0;g[N+(j<<4)+12>>2]=s;j=j+1|0}if(!I)Fa(ta,h,l,m);else{v=c[t>>2]|0;ac(qa|0,0,1024)|0;ac(la|0,0,2816)|0;ac(ma|0,0,2080)|0;v=v-M|0;z=E;A=0;while(1){if((A|0)==(v|0))break;w=c[r+(A<<4)>>2]|0;x=c[r+(A<<4)+4>>2]&16777215;j=b[r+(A<<4)+14>>1]|0;wa=b[r+(A<<4)+12>>1]|0;e=la+((wa&65535)<<2)|0;c[e>>2]=(c[e>>2]|0)+1;if((wa&65535)>127){j=ma+((j&65535)<<2)|0;c[j>>2]=(c[j>>2]|0)+1;j=0}else j=0;while(1){if((j|0)==(w|0))break;wa=qa+(d[l+(z+j&m)>>0]<<2)|0;c[wa>>2]=(c[wa>>2]|0)+1;j=j+1|0}z=z+(w+x)|0;A=A+1|0}Va(qa,256,ka);Va(la,704,ta);Va(ma,520,F);j=2139095040;v=0;while(1){if((v|0)==704)break;wa=c[ta+(v<<2)>>2]|0;c[fa>>2]=j;c[ea>>2]=wa;y=(c[k>>2]=j,+g[k>>2]);j=c[(y<(c[k>>2]=wa,+g[k>>2])?fa:ea)>>2]|0;v=v+1|0}c[G>>2]=j;v=c[O>>2]|0;j=c[J>>2]|0;g[j>>2]=0.0;y=0.0;w=0;while(1){if((w|0)==(v|0))break;xa=y+ +g[ka+(d[l+(w+h&m)>>0]<<2)>>2];wa=w+1|0;g[j+(wa<<2)>>2]=xa;y=xa;w=wa}}c[t>>2]=M;c[u>>2]=K;c[q>>2]=L;c[p>>2]=c[ua>>2];c[p+4>>2]=c[ua+4>>2];c[p+8>>2]=c[ua+8>>2];c[p+12>>2]=c[ua+12>>2];w=(c[ca>>2]|0)<11?150:325;c[N>>2]=0;g[B>>2]=0.0;c[C>>2]=0;j=0;v=0;while(1){if((v+3|0)>>>0>=f>>>0){j=f;break}wa=ja+(v<<2)|0;Ga(f,h,v,l,m,n,ga,p,c[wa>>2]|0,D+(j<<3)|0,ta,fa,N);wa=c[wa>>2]|0;j=j+wa|0;if((wa|0)==1?(ha=(c[D+(j+-1<<3)+4>>2]|0)>>>5,ha>>>0>w>>>0):0){c[C>>2]=0;v=v+(ha+-1)|0}v=v+1|0}while(1){if(c[N+(j<<4)+8>>2]|0)break;if((c[N+(j<<4)>>2]|0)!=1)break;j=j+-1|0}c[N+(j<<4)+12>>2]=-1;v=0;while(1){if(!j)break;e=(c[N+(j<<4)>>2]&16777215)+(c[N+(j<<4)+8>>2]|0)|0;wa=j-e|0;c[N+(wa<<4)+12>>2]=e;j=wa;v=v+1|0}c[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>>2]=0;if(h>>>0>>0?(ha=h&k,(a[j+ha>>0]|0)==(w&255)<<24>>24):0){f=A+D|0;t=j+f|0;f=j+(f+-4)|0;g=0;h=x;while(1){if(h>>>0>f>>>0)break;y=j+(ha+g)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[y>>0]|d[y+1>>0]<<8|d[y+2>>0]<<16|d[y+3>>0]<<24|0))break;g=g+4|0;h=h+4|0}while(1){if(h>>>0>=t>>>0)break;if((a[j+(ha+g)>>0]|0)!=(a[h>>0]|0))break;g=g+1|0;h=h+1|0}if(g>>>0>3){ta=22;break}}y=m+(u<<2)|0;t=c[y>>2]|0;c[y>>2]=l;u=l-t|0;v=t&k;if(!(((l|0)==(t|0)?1:(a[j+v>>0]|0)!=(w&255)<<24>>24)|u>>>0>z>>>0)){f=A+D|0;t=j+f|0;f=j+(f+-4)|0;g=0;h=x;while(1){if(h>>>0>f>>>0)break;w=j+(v+g)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24|0))break;g=g+4|0;h=h+4|0}while(1){if(h>>>0>=t>>>0)break;if((a[j+(v+g)>>0]|0)!=(a[h>>0]|0))break;g=g+1|0;h=h+1|0}if(g>>>0>3){ta=32;break}if((c[K>>2]|0)>>>0<(c[L>>2]|0)>>>7>>>0)h=0;else{w=0;h=0;v=(_(d[x>>0]|d[x+1>>0]<<8|d[x+2>>0]<<16|d[x+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((w|0)==1)break;x=b[21084+(v<<1)>>1]|0;f=x&65535;c[L>>2]=(c[L>>2]|0)+1;if(x<<16>>16!=0?(ia=f&31,ja=f>>>5,ka=(c[11272+(ia<<2)>>2]|0)+(_(ia,ja)|0)|0,ia>>>0<=D>>>0):0){g=ka+ia|0;u=280811+g|0;g=280811+(g+-4)|0;t=0;f=280811+ka|0;while(1){if(f>>>0>g>>>0)break;x=j+(A+t)|0;if((d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0)!=(d[x>>0]|d[x+1>>0]<<8|d[x+2>>0]<<16|d[x+3>>0]<<24|0))break;t=t+4|0;f=f+4|0}while(1){if(f>>>0>=u>>>0)break;if((a[j+(A+t)>>0]|0)!=(a[f>>0]|0))break;t=t+1|0;f=f+1|0}if(!((t+10|0)>>>0<=ia>>>0|(t|0)==0)?(la=z+ja+1+(d[407930+(ia-t)>>0]<>0])|0,ma=(t*540|0)+3840+(_((aa(la|0)|0)^31,-120)|0)|0,ma>>>0>=(c[M>>2]|0)>>>0):0){c[ea>>2]=t;c[J>>2]=ia^t;c[N>>2]=la;c[M>>2]=ma;c[K>>2]=(c[K>>2]|0)+1;h=1}}w=w+1|0;v=v+1|0}h=(h&1)!=0}c[y>>2]=l;if(h&1){E=0;break}}e=e+1|0;f=l+1|0;if(f>>>0<=s>>>0){l=f;continue}if(f>>>0>E>>>0){h=l+17|0;h=h>>>0

>>0?h:P;l=f;while(1){if(l>>>0>=h>>>0)continue b;D=j+(l&k)|0;A=D;D=D+4|0;D=lc(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0,d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0,-1124073472,1979815)|0;D=bc(D|0,C|0,48)|0;c[m+(D<<2)>>2]=l;l=l+4|0;e=e+4|0}}else{h=l+9|0;h=h>>>0

>>0?h:P;l=f;while(1){if(l>>>0>=h>>>0)continue b;D=j+(l&k)|0;A=D;D=D+4|0;D=lc(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0,d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0,-1124073472,1979815)|0;D=bc(D|0,C|0,48)|0;c[m+(D<<2)>>2]=l;l=l+2|0;e=e+2|0}}}if((ta|0)==22){ta=0;c[ea>>2]=g;c[N>>2]=v;c[M>>2]=(g*540|0)+3900;c[m+(u<<2)>>2]=l;E=0}else if((ta|0)==32){ta=0;c[ea>>2]=g;c[N>>2]=u;c[M>>2]=(g*540|0)+3840+(_((aa(u|0)|0)^31,-120)|0);E=0}c:while(1){D=D+-1|0;if((c[$>>2]|0)<5){v=(c[ea>>2]|0)+-1|0;v=v>>>0>>0?v:D}else v=0;c[fa>>2]=v;c[Q>>2]=0;c[R>>2]=0;c[S>>2]=4240;x=l+1|0;A=x>>>0>>0?x:ca;B=x&k;y=j+B|0;t=y;w=t;t=t+4|0;t=lc(d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24|0,d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0,-1124073472,1979815)|0;t=bc(t|0,C|0,48)|0;w=a[j+(B+v)>>0]|0;u=c[n>>2]|0;h=x-u|0;c[T>>2]=0;if(h>>>0>>0?(na=h&k,w<<24>>24==(a[j+(na+v)>>0]|0)):0){f=B+D|0;g=j+f|0;f=j+(f+-4)|0;s=0;h=y;while(1){if(h>>>0>f>>>0)break;z=j+(na+s)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24|0))break;s=s+4|0;h=h+4|0}while(1){if(h>>>0>=g>>>0)break;if((a[j+(na+s)>>0]|0)!=(a[h>>0]|0))break;s=s+1|0;h=h+1|0}if(s>>>0>3){c[fa>>2]=s;c[U>>2]=u;c[V>>2]=(s*540|0)+3900;c[m+(t<<2)>>2]=x}else ta=64}else ta=64;do if((ta|0)==64){ta=0;z=m+(t<<2)|0;g=c[z>>2]|0;c[z>>2]=x;t=x-g|0;u=g&k;if(((x|0)==(g|0)?1:w<<24>>24!=(a[j+(u+v)>>0]|0))|t>>>0>A>>>0){x=l;w=e;break c}f=B+D|0;g=j+f|0;f=j+(f+-4)|0;s=0;h=y;while(1){if(h>>>0>f>>>0)break;w=j+(u+s)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24|0))break;s=s+4|0;h=h+4|0}while(1){if(h>>>0>=g>>>0)break;if((a[j+(u+s)>>0]|0)!=(a[h>>0]|0))break;s=s+1|0;h=h+1|0}if(s>>>0>3){c[fa>>2]=s;c[U>>2]=t;c[V>>2]=(s*540|0)+3840+(_((aa(t|0)|0)^31,-120)|0);break}if((c[K>>2]|0)>>>0<(c[L>>2]|0)>>>7>>>0)h=0;else{v=0;h=0;u=(_(d[y>>0]|d[y+1>>0]<<8|d[y+2>>0]<<16|d[y+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==1)break;y=b[21084+(u<<1)>>1]|0;f=y&65535;c[L>>2]=(c[L>>2]|0)+1;if(y<<16>>16!=0?(oa=f&31,pa=f>>>5,qa=(c[11272+(oa<<2)>>2]|0)+(_(oa,pa)|0)|0,oa>>>0<=D>>>0):0){s=qa+oa|0;t=280811+s|0;s=280811+(s+-4)|0;g=0;f=280811+qa|0;while(1){if(f>>>0>s>>>0)break;y=j+(B+g)|0;if((d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0)!=(d[y>>0]|d[y+1>>0]<<8|d[y+2>>0]<<16|d[y+3>>0]<<24|0))break;g=g+4|0;f=f+4|0}while(1){if(f>>>0>=t>>>0)break;if((a[j+(B+g)>>0]|0)!=(a[f>>0]|0))break;g=g+1|0;f=f+1|0}if(!((g+10|0)>>>0<=oa>>>0|(g|0)==0)?(ra=A+pa+1+(d[407930+(oa-g)>>0]<>0])|0,sa=(g*540|0)+3840+(_((aa(ra|0)|0)^31,-120)|0)|0,sa>>>0>=(c[V>>2]|0)>>>0):0){c[fa>>2]=g;c[T>>2]=oa^g;c[U>>2]=ra;c[V>>2]=sa;c[K>>2]=(c[K>>2]|0)+1;h=1}}v=v+1|0;u=u+1|0}h=(h&1)!=0}c[z>>2]=x;if(!(h&1)){x=l;w=e;break c}}while(0);if((c[S>>2]|0)>>>0<((c[I>>2]|0)+700|0)>>>0){x=l;w=e;break}e=e+1|0;c[ea>>2]=c[fa>>2];c[ea+4>>2]=c[fa+4>>2];c[ea+8>>2]=c[fa+8>>2];c[ea+12>>2]=c[fa+12>>2];E=E+1|0;if(!((E|0)<4&(l+9|0)>>>0>>0)){w=e;break}else l=x}l=c[ea>>2]|0;s=x+(l<<1)+Z|0;e=c[H>>2]|0;d:do if(e>>>0<=(x>>>0>>0?x:ca)>>>0){g=e+3|0;E=c[n>>2]|0;h=g-E|0;f=c[Y>>2]|0;g=g-f|0;if((e|0)==(E|0))e=0;else{e:do if((e|0)!=(f|0)){do if(h>>>0<7)e=158663784>>>(h<<2)&15;else{if(g>>>0<7){e=266017486>>>(g<<2)&15;break}if((e|0)==(c[W>>2]|0)){e=2;break e}if((e|0)==(c[X>>2]|0)){e=3;break e}e=e+15|0}while(0);if(!e)break d}else e=1;while(0);c[X>>2]=c[W>>2];c[W>>2]=c[Y>>2];c[Y>>2]=c[n>>2];c[n>>2]=c[H>>2];l=c[ea>>2]|0}}else e=e+15|0;while(0);v=F+16|0;E=c[G>>2]|0;h=l^E;c[F>>2]=w;c[F+4>>2]=l|E<<24;l=F+14|0;if(e>>>0<16){e=e&65535;b[l>>1]=e;l=0}else{B=e+-12|0;E=((aa(B|0)|0)^31)+-1|0;D=B>>>E&1;e=((E<<1)+65534|D)+16&65535;b[l>>1]=e;l=E<<24|B-((D|2)<>2]=l;t=e<<16>>16==0;u=F+12|0;do if(w>>>0>=6){if(w>>>0<130){F=w+-2|0;g=((aa(F|0)|0)^31)+-1|0;g=(g<<1)+(F>>>g)+2&65535;break}if(w>>>0<2114){g=((aa(w+-66|0)|0)^31)+10&65535;break}if(w>>>0<6210)g=21;else g=w>>>0<22594?22:23}else g=w&65535;while(0);do if(h>>>0>=10){if(h>>>0<134){F=h+-6|0;e=((aa(F|0)|0)^31)+-1|0;e=(e<<1)+(F>>>e)+4&65535;break}if(h>>>0<2118)e=((aa(h+-70|0)|0)^31)+12&65535;else e=23}else e=h+65534&65535;while(0);l=e&65535;h=g&65535;f=l&7|h<<3&56;if(t&(g&65535)<8&(e&65535)<16)e=((e&65535)<8?f:f|64)&65535;else e=b[88156+((l>>>3)+((h>>>3)*3|0)<<1)>>1]|f&65535;b[u>>1]=e;c[r>>2]=(c[r>>2]|0)+w;e=x+(c[ea>>2]|0)|0;e=e>>>0>>0?e:ba;l=x+2|0;while(1){if(l>>>0>=e>>>0)break;F=j+(l&k)|0;E=F;F=F+4|0;F=lc(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0,d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24|0,-1124073472,1979815)|0;F=bc(F|0,C|0,48)|0;c[m+(F<<2)>>2]=l;l=l+1|0}l=x+(c[ea>>2]|0)|0;F=v;e=0}c[o>>2]=e+D;c[q>>2]=(c[q>>2]|0)+(B-p>>4);i=ga;return}function Ka(e,f,g,h,i,j,k,l,m,n,o,p,q){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ba=0,ca=0,da=0;X=(1<>2])+-16|0;s=c[n>>2]|0;Y=g+f|0;W=f>>>0>7?Y+-7|0:g;V=k+4|0;U=(c[V>>2]|0)<9?64:512;k=U+g|0;if((((g|0)==0^1|h^1)^1)&f>>>0<2049){e=0;while(1){if((e|0)==(f|0))break;T=i+e|0;S=T;T=T+4|0;T=lc(d[S>>0]|d[S+1>>0]<<8|d[S+2>>0]<<16|d[S+3>>0]<<24|0,d[T>>0]|d[T+1>>0]<<8|d[T+2>>0]<<16|d[T+3>>0]<<24|0,-1124073472,1979815)|0;T=bc(T|0,C|0,48)|0;T=l+(T<<2)|0;c[T>>2]=0;c[T+4>>2]=0;e=e+1|0}if(f){a[l+262152>>0]=0;r=8}}else if(!(a[l+262152>>0]&1))r=8;else{ac(l|0,0,262153)|0;r=8}if((r|0)==8?f>>>0>6&g>>>0>2:0){T=g+-3|0;S=i+(T&j)|0;R=S;S=S+4|0;S=lc(d[R>>0]|d[R+1>>0]<<8|d[R+2>>0]<<16|d[R+3>>0]<<24|0,d[S>>0]|d[S+1>>0]<<8|d[S+2>>0]<<16|d[S+3>>0]<<24|0,-1124073472,1979815)|0;S=bc(S|0,C|0,48)|0;c[l+(S+(T>>>3&1)<<2)>>2]=T;T=g+-2|0;S=i+(T&j)|0;R=S;S=S+4|0;S=lc(d[R>>0]|d[R+1>>0]<<8|d[R+2>>0]<<16|d[R+3>>0]<<24|0,d[S>>0]|d[S+1>>0]<<8|d[S+2>>0]<<16|d[S+3>>0]<<24|0,-1124073472,1979815)|0;S=bc(S|0,C|0,48)|0;c[l+(S+(T>>>3&1)<<2)>>2]=T;T=g+-1|0;S=i+(T&j)|0;R=S;S=S+4|0;S=lc(d[R>>0]|d[R+1>>0]<<8|d[R+2>>0]<<16|d[R+3>>0]<<24|0,d[S>>0]|d[S+1>>0]<<8|d[S+2>>0]<<16|d[S+3>>0]<<24|0,-1124073472,1979815)|0;S=bc(S|0,C|0,48)|0;c[l+(S+(T>>>3&1)<<2)>>2]=T}P=U<<2;Q=Y+-7|0;R=m+8|0;S=m+12|0;T=m+4|0;h=g;O=o;v=k;e=s;a:while(1){J=O;K=v+P|0;b:while(1){M=Y-h|0;if((h+8|0)>>>0>=Y>>>0)break a;F=h>>>0>>0?h:X;G=h&j;H=i+G|0;I=H;k=I;k=d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24;I=I+4|0;I=lc(k|0,d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24|0,-1124073472,1979815)|0;I=bc(I|0,C|0,48)|0;t=k&255;f=c[m>>2]|0;r=h-f|0;if(r>>>0>>0?(Z=r&j,(a[i+Z>>0]|0)==(k&255)<<24>>24):0){r=G+M|0;s=i+r|0;r=i+(r+-4)|0;g=0;k=H;while(1){if(k>>>0>r>>>0)break;N=i+(Z+g)|0;if((d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0)!=(d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24|0))break;g=g+4|0;k=k+4|0}while(1){if(k>>>0>=s>>>0)break;if((a[i+(Z+g)>>0]|0)!=(a[k>>0]|0))break;g=g+1|0;k=k+1|0}if(g>>>0>3){t=d[i+(G+g)>>0]|0;k=1;s=g;g=(g*540|0)+3900|0}else{k=0;s=0;f=0;g=4240}}else{k=0;s=0;f=0;g=4240}D=G+M|0;B=i+D|0;D=i+(D+-4)|0;x=s;u=g;E=l+(I+1<<2)|0;y=0;r=l+(I<<2)|0;z=s;A=g;while(1){r=c[r>>2]|0;if((y|0)==2)break;w=h-r|0;s=r&j;if(!(((h|0)==(r|0)?1:(t|0)!=(d[i+(s+x)>>0]|0))|w>>>0>F>>>0)){r=0;g=H;while(1){if(g>>>0>D>>>0)break;N=i+(s+r)|0;if((d[g>>0]|d[g+1>>0]<<8|d[g+2>>0]<<16|d[g+3>>0]<<24|0)!=(d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24|0))break;r=r+4|0;g=g+4|0}while(1){if(g>>>0>=B>>>0)break;if((a[i+(s+r)>>0]|0)!=(a[g>>0]|0))break;r=r+1|0;g=g+1|0}if(r>>>0>3?($=(r*540|0)+3840+(_((aa(w|0)|0)^31,-120)|0)|0,u>>>0<$>>>0):0){s=r;u=$;t=d[i+(G+r)>>0]|0;k=1;g=r;f=w;r=$}else{s=x;g=z;r=A}}else{s=x;g=z;r=A}N=E;x=s;E=E+4|0;y=y+1|0;z=g;A=r;r=N}c[l+(I+(h>>>3&1)<<2)>>2]=h;if(k&1){N=0;break}e=e+1|0;f=h+1|0;if(f>>>0<=v>>>0){h=f;continue}if(f>>>0>K>>>0){k=h+17|0;k=k>>>0>>0?k:Q;h=f;while(1){if(h>>>0>=k>>>0)continue b;N=i+(h&j)|0;M=N;N=N+4|0;N=lc(d[M>>0]|d[M+1>>0]<<8|d[M+2>>0]<<16|d[M+3>>0]<<24|0,d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24|0,-1124073472,1979815)|0;N=bc(N|0,C|0,48)|0;c[l+(N+(h>>>3&1)<<2)>>2]=h;h=h+4|0;e=e+4|0}}else{k=h+9|0;k=k>>>0>>0?k:Q;h=f;while(1){if(h>>>0>=k>>>0)continue b;N=i+(h&j)|0;M=N;N=N+4|0;N=lc(d[M>>0]|d[M+1>>0]<<8|d[M+2>>0]<<16|d[M+3>>0]<<24|0,d[N>>0]|d[N+1>>0]<<8|d[N+2>>0]<<16|d[N+3>>0]<<24|0,-1124073472,1979815)|0;N=bc(N|0,C|0,48)|0;c[l+(N+(h>>>3&1)<<2)>>2]=h;h=h+2|0;e=e+2|0}}}while(1){M=M+-1|0;if((c[V>>2]|0)<5){u=z+-1|0;u=u>>>0>>0?u:M}else u=0;x=h+1|0;I=x>>>0>>0?x:X;J=x&j;K=i+J|0;L=K;k=L;L=L+4|0;L=lc(d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0,d[L>>0]|d[L+1>>0]<<8|d[L+2>>0]<<16|d[L+3>>0]<<24|0,-1124073472,1979815)|0;L=bc(L|0,C|0,48)|0;k=a[i+(J+u)>>0]|0;t=k&255;v=c[m>>2]|0;r=x-v|0;if(r>>>0>>0?(ba=r&j,k<<24>>24==(a[i+(ba+u)>>0]|0)):0){r=J+M|0;s=i+r|0;r=i+(r+-4)|0;g=0;k=K;while(1){if(k>>>0>r>>>0)break;H=i+(ba+g)|0;if((d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0)!=(d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24|0))break;g=g+4|0;k=k+4|0}while(1){if(k>>>0>=s>>>0)break;if((a[i+(ba+g)>>0]|0)!=(a[k>>0]|0))break;g=g+1|0;k=k+1|0}if(g>>>0>3){t=d[i+(J+g)>>0]|0;k=1;u=g;r=(g*540|0)+3900|0}else{k=0;r=4240;v=0}}else{k=0;r=4240;v=0}G=J+M|0;F=i+G|0;G=i+(G+-4)|0;B=u;D=r;H=l+(L+1<<2)|0;E=0;s=k;k=l+(L<<2)|0;y=r;while(1){k=c[k>>2]|0;if((E|0)==2)break;w=x-k|0;g=k&j;if(!(((x|0)==(k|0)?1:(t|0)!=(d[i+(g+B)>>0]|0))|w>>>0>I>>>0)){k=0;r=K;while(1){if(r>>>0>G>>>0)break;da=i+(g+k)|0;if((d[r>>0]|d[r+1>>0]<<8|d[r+2>>0]<<16|d[r+3>>0]<<24|0)!=(d[da>>0]|d[da+1>>0]<<8|d[da+2>>0]<<16|d[da+3>>0]<<24|0))break;k=k+4|0;r=r+4|0}while(1){if(r>>>0>=F>>>0)break;if((a[i+(g+k)>>0]|0)!=(a[r>>0]|0))break;k=k+1|0;r=r+1|0}if(k>>>0>3?(ca=(k*540|0)+3840+(_((aa(w|0)|0)^31,-120)|0)|0,D>>>0>>0):0){r=k;g=ca;t=d[i+(J+k)>>0]|0;s=1;u=k;k=ca;v=w}else{r=B;g=D;k=y}}else{r=B;g=D;k=y}da=H;B=r;D=g;H=H+4|0;E=E+1|0;y=k;k=da}c[l+(L+(x>>>3&1)<<2)>>2]=x;if((s&1)==0|y>>>0<(A+700|0)>>>0){x=h;w=e;u=z;break}e=e+1|0;N=N+1|0;if(!((N|0)<4&(h+9|0)>>>0>>0)){w=e;f=v;break}else{h=x;z=u;f=v;A=y}}v=x+(u<<1)+U|0;c:do if(f>>>0<=(x>>>0>>0?x:X)>>>0){h=f+3|0;da=c[m>>2]|0;e=h-da|0;k=c[T>>2]|0;h=h-k|0;if((f|0)==(da|0))e=0;else{d:do if((f|0)!=(k|0)){do if(e>>>0<7)e=158663784>>>(e<<2)&15;else{if(h>>>0<7){e=266017486>>>(h<<2)&15;break}if((f|0)==(c[R>>2]|0)){e=2;break d}if((f|0)==(c[S>>2]|0)){e=3;break d}e=f+15|0}while(0);if(!e)break c}else e=1;while(0);c[S>>2]=c[R>>2];c[R>>2]=c[T>>2];c[T>>2]=c[m>>2];c[m>>2]=f}}else e=f+15|0;while(0);t=O+16|0;c[O>>2]=w;c[O+4>>2]=u;k=O+14|0;if(e>>>0<16){e=e&65535;b[k>>1]=e;k=0}else{M=e+-12|0;da=((aa(M|0)|0)^31)+-1|0;N=M>>>da&1;e=((da<<1)+65534|N)+16&65535;b[k>>1]=e;k=da<<24|M-((N|2)<>2]=k;g=e<<16>>16==0;s=O+12|0;do if(w>>>0>=6){if(w>>>0<130){da=w+-2|0;k=((aa(da|0)|0)^31)+-1|0;k=(k<<1)+(da>>>k)+2&65535;break}if(w>>>0<2114){k=((aa(w+-66|0)|0)^31)+10&65535;break}if(w>>>0<6210)k=21;else k=w>>>0<22594?22:23}else k=w&65535;while(0);do if(u>>>0>=10){if(u>>>0<134){da=u+-6|0;e=((aa(da|0)|0)^31)+-1|0;e=(e<<1)+(da>>>e)+4&65535;break}if(u>>>0<2118)e=((aa(u+-70|0)|0)^31)+12&65535;else e=23}else e=u+65534&65535;while(0);h=e&65535;f=k&65535;r=h&7|f<<3&56;if(g&(k&65535)<8&(e&65535)<16)e=((e&65535)<8?r:r|64)&65535;else e=b[88156+((h>>>3)+((f>>>3)*3|0)<<1)>>1]|r&65535;b[s>>1]=e;c[q>>2]=(c[q>>2]|0)+w;h=x+u|0;k=h>>>0>>0?h:W;e=x+2|0;while(1){if(e>>>0>=k>>>0){O=t;e=0;continue a}da=i+(e&j)|0;O=da;da=da+4|0;da=lc(d[O>>0]|d[O+1>>0]<<8|d[O+2>>0]<<16|d[O+3>>0]<<24|0,d[da>>0]|d[da+1>>0]<<8|d[da+2>>0]<<16|d[da+3>>0]<<24|0,-1124073472,1979815)|0;da=bc(da|0,C|0,48)|0;c[l+(da+(e>>>3&1)<<2)>>2]=e;e=e+1|0}}c[n>>2]=e+M;c[p>>2]=(c[p>>2]|0)+(J-o>>4);return}function La(e,f,g,h,j,k,l,m,n,o,p,q,r){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0;la=i;i=i+32|0;ja=la+16|0;ka=la;ha=(1<>2])+-16|0;u=c[o>>2]|0;ia=g+f|0;ga=f>>>0>7?ia+-7|0:g;fa=l+4|0;ea=(c[fa>>2]|0)<9?64:512;t=ea+g|0;if((((g|0)==0^1|h^1)^1)&f>>>0<4097){e=0;while(1){if((e|0)==(f|0))break;da=j+e|0;ca=da;da=da+4|0;da=lc(d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0,d[da>>0]|d[da+1>>0]<<8|d[da+2>>0]<<16|d[da+3>>0]<<24|0,-1124073472,1979815)|0;da=bc(da|0,C|0,47)|0;da=m+(da<<2)|0;c[da>>2]=0;c[da+4>>2]=0;c[da+8>>2]=0;c[da+12>>2]=0;e=e+1|0}if(f){a[m+524304>>0]=0;s=8}}else if(!(a[m+524304>>0]&1))s=8;else{ac(m|0,0,524305)|0;s=8}if((s|0)==8?f>>>0>6&g>>>0>2:0){da=g+-3|0;ca=j+(da&k)|0;ba=ca;ca=ca+4|0;ca=lc(d[ba>>0]|d[ba+1>>0]<<8|d[ba+2>>0]<<16|d[ba+3>>0]<<24|0,d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0,-1124073472,1979815)|0;ca=bc(ca|0,C|0,47)|0;c[m+(ca+(da>>>3&3)<<2)>>2]=da;da=g+-2|0;ca=j+(da&k)|0;ba=ca;ca=ca+4|0;ca=lc(d[ba>>0]|d[ba+1>>0]<<8|d[ba+2>>0]<<16|d[ba+3>>0]<<24|0,d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0,-1124073472,1979815)|0;ca=bc(ca|0,C|0,47)|0;c[m+(ca+(da>>>3&3)<<2)>>2]=da;da=g+-1|0;ca=j+(da&k)|0;ba=ca;ca=ca+4|0;ca=lc(d[ba>>0]|d[ba+1>>0]<<8|d[ba+2>>0]<<16|d[ba+3>>0]<<24|0,d[ca>>0]|d[ca+1>>0]<<8|d[ca+2>>0]<<16|d[ca+3>>0]<<24|0,-1124073472,1979815)|0;ca=bc(ca|0,C|0,47)|0;c[m+(ca+(da>>>3&3)<<2)>>2]=da}R=ja+4|0;S=ja+8|0;T=ja+12|0;U=ja+12|0;V=ja+4|0;W=ja+8|0;X=m+524312|0;Y=m+524308|0;Z=ea<<2;$=ia+-7|0;ba=ka+12|0;ca=ka+4|0;da=ka+8|0;L=ka+12|0;M=ka+4|0;N=ka+8|0;O=n+8|0;P=n+12|0;Q=n+4|0;l=g;K=p;e=u;a:while(1){I=K;J=t+Z|0;b:while(1){H=ia-l|0;if((l+8|0)>>>0>=ia>>>0)break a;E=l>>>0>>0?l:ha;c[ja>>2]=0;c[R>>2]=0;c[S>>2]=0;c[T>>2]=4240;F=l&k;D=j+F|0;G=D;h=G;h=d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24;G=G+4|0;G=lc(h|0,d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24|0,-1124073472,1979815)|0;G=bc(G|0,C|0,47)|0;w=h&255;v=c[U>>2]|0;u=c[n>>2]|0;f=l-u|0;c[V>>2]=0;if(f>>>0>>0?(ma=f&k,(a[j+ma>>0]|0)==(h&255)<<24>>24):0){f=F+H|0;g=j+f|0;f=j+(f+-4)|0;s=0;h=D;while(1){if(h>>>0>f>>>0)break;B=j+(ma+s)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[B>>0]|d[B+1>>0]<<8|d[B+2>>0]<<16|d[B+3>>0]<<24|0))break;s=s+4|0;h=h+4|0}while(1){if(h>>>0>=g>>>0)break;if((a[j+(ma+s)>>0]|0)!=(a[h>>0]|0))break;s=s+1|0;h=h+1|0}if(s>>>0>3){g=(s*540|0)+3900|0;c[ja>>2]=s;c[W>>2]=u;c[U>>2]=g;f=s;s=d[j+(F+s)>>0]|0;h=1}else{f=0;g=v;s=w;h=0}}else{f=0;g=v;s=w;h=0}B=F+H|0;A=j+B|0;B=j+(B+-4)|0;z=m+(G+1<<2)|0;y=0;u=m+(G<<2)|0;while(1){u=c[u>>2]|0;if((y|0)==4)break;w=l-u|0;x=u&k;if(!(((l|0)==(u|0)?1:(s|0)!=(d[j+(x+f)>>0]|0))|w>>>0>E>>>0)){u=0;v=D;while(1){if(v>>>0>B>>>0)break;Aa=j+(x+u)|0;if((d[v>>0]|d[v+1>>0]<<8|d[v+2>>0]<<16|d[v+3>>0]<<24|0)!=(d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24|0))break;u=u+4|0;v=v+4|0}while(1){if(v>>>0>=A>>>0)break;if((a[j+(x+u)>>0]|0)!=(a[v>>0]|0))break;u=u+1|0;v=v+1|0}if(u>>>0>3?(na=(u*540|0)+3840+(_((aa(w|0)|0)^31,-120)|0)|0,g>>>0>>0):0){c[ja>>2]=u;c[W>>2]=w;c[U>>2]=na;f=u;g=na;s=d[j+(F+u)>>0]|0;h=1}}u=z;z=z+4|0;y=y+1|0}if(!(h&1)){if((c[X>>2]|0)>>>0<(c[Y>>2]|0)>>>7>>>0)h=0;else{w=0;h=0;v=(_(d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((w|0)==1)break;Aa=b[21084+(v<<1)>>1]|0;f=Aa&65535;c[Y>>2]=(c[Y>>2]|0)+1;if(Aa<<16>>16!=0?(oa=f&31,pa=f>>>5,qa=(c[11272+(oa<<2)>>2]|0)+(_(oa,pa)|0)|0,oa>>>0<=H>>>0):0){s=qa+oa|0;u=280811+s|0;s=280811+(s+-4)|0;g=0;f=280811+qa|0;while(1){if(f>>>0>s>>>0)break;Aa=j+(F+g)|0;if((d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0)!=(d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24|0))break;g=g+4|0;f=f+4|0}while(1){if(f>>>0>=u>>>0)break;if((a[j+(F+g)>>0]|0)!=(a[f>>0]|0))break;g=g+1|0;f=f+1|0}if(!((g+10|0)>>>0<=oa>>>0|(g|0)==0)?(ra=E+pa+1+(d[407930+(oa-g)>>0]<>0])|0,sa=(g*540|0)+3840+(_((aa(ra|0)|0)^31,-120)|0)|0,sa>>>0>=(c[U>>2]|0)>>>0):0){c[ja>>2]=g;c[V>>2]=oa^g;c[W>>2]=ra;c[U>>2]=sa;c[X>>2]=(c[X>>2]|0)+1;h=1}}w=w+1|0;v=v+1|0}h=(h&1)!=0}h=h&1}c[m+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0?(ta=f&k,h<<24>>24==(a[j+(ta+u)>>0]|0)):0){f=F+H|0;g=j+f|0;f=j+(f+-4)|0;s=0;h=D;while(1){if(h>>>0>f>>>0)break;Aa=j+(ta+s)|0;if((d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24|0)!=(d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24|0))break;s=s+4|0;h=h+4|0}while(1){if(h>>>0>=g>>>0)break;if((a[j+(ta+s)>>0]|0)!=(a[h>>0]|0))break;s=s+1|0;h=h+1|0}if(s>>>0>3){t=(s*540|0)+3900|0;c[ka>>2]=s;c[N>>2]=v;c[L>>2]=t;f=s;s=d[j+(F+s)>>0]|0;h=1}else{f=u;s=w;h=0}}else{f=u;s=w;h=0}B=F+H|0;A=j+B|0;B=j+(B+-4)|0;z=m+(G+1<<2)|0;y=0;g=m+(G<<2)|0;while(1){g=c[g>>2]|0;if((y|0)==4)break;v=x-g|0;w=g&k;if(!(((x|0)==(g|0)?1:(s|0)!=(d[j+(w+f)>>0]|0))|v>>>0>E>>>0)){g=0;u=D;while(1){if(u>>>0>B>>>0)break;Aa=j+(w+g)|0;if((d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24|0)!=(d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24|0))break;g=g+4|0;u=u+4|0}while(1){if(u>>>0>=A>>>0)break;if((a[j+(w+g)>>0]|0)!=(a[u>>0]|0))break;g=g+1|0;u=u+1|0}if(g>>>0>3?(ua=(g*540|0)+3840+(_((aa(v|0)|0)^31,-120)|0)|0,t>>>0>>0):0){c[ka>>2]=g;c[N>>2]=v;c[L>>2]=ua;f=g;t=ua;s=d[j+(F+g)>>0]|0;h=1}}g=z;z=z+4|0;y=y+1|0}if(!(h&1)){if((c[X>>2]|0)>>>0<(c[Y>>2]|0)>>>7>>>0)h=0;else{v=0;h=0;u=(_(d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==1)break;Aa=b[21084+(u<<1)>>1]|0;f=Aa&65535;c[Y>>2]=(c[Y>>2]|0)+1;if(Aa<<16>>16!=0?(va=f&31,wa=f>>>5,xa=(c[11272+(va<<2)>>2]|0)+(_(va,wa)|0)|0,va>>>0<=H>>>0):0){s=xa+va|0;g=280811+s|0;s=280811+(s+-4)|0;t=0;f=280811+xa|0;while(1){if(f>>>0>s>>>0)break;Aa=j+(F+t)|0;if((d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0)!=(d[Aa>>0]|d[Aa+1>>0]<<8|d[Aa+2>>0]<<16|d[Aa+3>>0]<<24|0))break;t=t+4|0;f=f+4|0}while(1){if(f>>>0>=g>>>0)break;if((a[j+(F+t)>>0]|0)!=(a[f>>0]|0))break;t=t+1|0;f=f+1|0}if(!((t+10|0)>>>0<=va>>>0|(t|0)==0)?(ya=E+wa+1+(d[407930+(va-t)>>0]<>0])|0,za=(t*540|0)+3840+(_((aa(ya|0)|0)^31,-120)|0)|0,za>>>0>=(c[L>>2]|0)>>>0):0){c[ka>>2]=t;c[M>>2]=va^t;c[N>>2]=ya;c[L>>2]=za;c[X>>2]=(c[X>>2]|0)+1;h=1}}v=v+1|0;u=u+1|0}h=(h&1)!=0}h=h&1}c[m+(G+(x>>>3&3)<<2)>>2]=x;if(!(h&1)){x=l;w=e;break}if((c[ba>>2]|0)>>>0<((c[T>>2]|0)+700|0)>>>0){x=l;w=e;break}e=e+1|0;c[ja>>2]=c[ka>>2];c[ja+4>>2]=c[ka+4>>2];c[ja+8>>2]=c[ka+8>>2];c[ja+12>>2]=c[ka+12>>2];I=I+1|0;if(!((I|0)<4&(l+9|0)>>>0>>0)){w=e;break}else l=x}l=c[ja>>2]|0;t=x+(l<<1)+ea|0;e=c[S>>2]|0;c:do if(e>>>0<=(x>>>0>>0?x:ha)>>>0){s=e+3|0;Aa=c[n>>2]|0;h=s-Aa|0;f=c[Q>>2]|0;s=s-f|0;if((e|0)==(Aa|0))e=0;else{d:do if((e|0)!=(f|0)){do if(h>>>0<7)e=158663784>>>(h<<2)&15;else{if(s>>>0<7){e=266017486>>>(s<<2)&15;break}if((e|0)==(c[O>>2]|0)){e=2;break d}if((e|0)==(c[P>>2]|0)){e=3;break d}e=e+15|0}while(0);if(!e)break c}else e=1;while(0);c[P>>2]=c[O>>2];c[O>>2]=c[Q>>2];c[Q>>2]=c[n>>2];c[n>>2]=c[S>>2];l=c[ja>>2]|0}}else e=e+15|0;while(0);v=K+16|0;Aa=c[R>>2]|0;h=l^Aa;c[K>>2]=w;c[K+4>>2]=l|Aa<<24;l=K+14|0;if(e>>>0<16){e=e&65535;b[l>>1]=e;l=0}else{I=e+-12|0;Aa=((aa(I|0)|0)^31)+-1|0;J=I>>>Aa&1;e=((Aa<<1)+65534|J)+16&65535;b[l>>1]=e;l=Aa<<24|I-((J|2)<>2]=l;g=e<<16>>16==0;u=K+12|0;do if(w>>>0>=6){if(w>>>0<130){Aa=w+-2|0;s=((aa(Aa|0)|0)^31)+-1|0;s=(s<<1)+(Aa>>>s)+2&65535;break}if(w>>>0<2114){s=((aa(w+-66|0)|0)^31)+10&65535;break}if(w>>>0<6210)s=21;else s=w>>>0<22594?22:23}else s=w&65535;while(0);do if(h>>>0>=10){if(h>>>0<134){Aa=h+-6|0;e=((aa(Aa|0)|0)^31)+-1|0;e=(e<<1)+(Aa>>>e)+4&65535;break}if(h>>>0<2118)e=((aa(h+-70|0)|0)^31)+12&65535;else e=23}else e=h+65534&65535;while(0);l=e&65535;h=s&65535;f=l&7|h<<3&56;if(g&(s&65535)<8&(e&65535)<16)e=((e&65535)<8?f:f|64)&65535;else e=b[88156+((l>>>3)+((h>>>3)*3|0)<<1)>>1]|f&65535;b[u>>1]=e;c[r>>2]=(c[r>>2]|0)+w;e=x+(c[ja>>2]|0)|0;e=e>>>0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a[n+1081344>>0]=0;t=8}}else{f=n+1081344|0;if(!(a[f>>0]&1))t=8;else{ac(n|0,0,32768)|0;a[f>>0]=0;t=8}}if((t|0)==8?g>>>0>2&h>>>0>2:0){ga=h+-3|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ia=n+(ha<<1)|0;c[n+32768+((e[ia>>1]&15|ha<<4)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16;ia=h+-2|0;ha=k+(ia&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ga=n+(ha<<1)|0;c[n+32768+((e[ga>>1]&15|ha<<4)<<2)>>2]=ia;b[ga>>1]=(b[ga>>1]|0)+1<<16>>16;ga=h+-1|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ia=n+(ha<<1)|0;c[n+32768+((e[ia>>1]&15|ha<<4)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16}P=oa+4|0;Q=oa+8|0;R=oa+12|0;S=oa+4|0;T=oa+8|0;U=oa+12|0;V=n+1081352|0;W=n+1081348|0;X=ja<<2;Y=na+-4|0;Z=na+-3|0;$=pa+12|0;ba=pa+4|0;ca=pa+8|0;da=pa+4|0;ea=pa+8|0;fa=pa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=v;a:while(1){M=O;N=u+X|0;b:while(1){L=na-m|0;if((m+4|0)>>>0>=na>>>0)break a;J=m>>>0>>0?m:ma;c[oa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;g=c[oa>>2]|0;c[oa>>2]=0;c[S>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;y=4240;j=0;x=0;while(1){if((x|0)==4)break;w=(c[o+(c[11372+(x<<2)>>2]<<2)>>2]|0)+(c[11436+(x<<2)>>2]|0)|0;t=m-w|0;do if(((!(t>>>0>=m>>>0|w>>>0>J>>>0)?(ra=t&l,sa=K+g|0,sa>>>0<=l>>>0):0)?(ta=ra+g|0,ta>>>0<=l>>>0):0)?(a[k+sa>>0]|0)==(a[k+ta>>0]|0):0){v=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;D=t;E=k+(ra+v)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;v=v+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(ra+v)>>0]|0)!=(a[t>>0]|0))break;v=v+1|0;t=t+1|0}if(v>>>0<=2?!((v|0)==2&x>>>0<2):0){t=y;break}t=(v*540|0)+(c[11500+(x<<2)>>2]|0)|0;if(y>>>0>>0){c[oa>>2]=v;c[T>>2]=w;c[U>>2]=t;g=v;j=1}else t=y}else t=y;while(0);y=t;x=x+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18;C=D<<4;D=n+(D<<1)|0;E=b[D>>1]|0;t=E&65535;E=(E&65535)>16?t+-16|0:0;c:while(1){B=K+g|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(t>>>0<=E>>>0)break c;t=t+-1|0;h=c[n+32768+((C|t&15)<<2)>>2]|0;z=m-h|0;if(z>>>0>J>>>0)break c;x=h&l;if(A)continue;h=x+g|0;if(h>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+h>>0]|0)){w=0;h=F}else continue;while(1){v=h;if(v>>>0>H>>>0)break;Ia=h;Ha=k+(x+w)|0;if((d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0)!=(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0))break;w=w+4|0;h=v+4|0}while(1){if(h>>>0>=G>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}if(w>>>0<=3)continue;h=(w*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(y>>>0>>0)break}c[oa>>2]=w;c[T>>2]=z;c[U>>2]=h;g=w;y=h;j=1}Ia=b[D>>1]|0;c[n+32768+((C|Ia&15)<<2)>>2]=m;b[D>>1]=Ia+1<<16>>16;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ia=b[21084+(w<<1)>>1]|0;t=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(ua=t&31,va=t>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=L>>>0):0){g=wa+ua|0;v=280811+g|0;g=280811+(g+-4)|0;h=0;t=280811+wa|0;while(1){if(t>>>0>g>>>0)break;Ia=k+(K+h)|0;if((d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;t=t+4|0}while(1){if(t>>>0>=v>>>0)break;if((a[k+(K+h)>>0]|0)!=(a[t>>0]|0))break;h=h+1|0;t=t+1|0}if(!((h+10|0)>>>0<=ua>>>0|(h|0)==0)?(xa=J+va+1+(d[407930+(ua-h)>>0]<>0])|0,ya=(h*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[U>>2]|0)>>>0):0){c[oa>>2]=h;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>0):0)?(Ba=za+t|0,Ba>>>0<=l>>>0):0)?(a[k+Aa>>0]|0)==(a[k+Ba>>0]|0):0){u=0;j=F;while(1){g=j;if(g>>>0>H>>>0)break;Ha=j;Ia=k+(za+u)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;u=u+4|0;j=g+4|0}while(1){if(j>>>0>=G>>>0)break;if((a[k+(za+u)>>0]|0)!=(a[j>>0]|0))break;u=u+1|0;j=j+1|0}if(u>>>0<=2?!((u|0)==2&v>>>0<2):0){j=w;break}j=(u*540|0)+(c[11500+(v<<2)>>2]|0)|0;if(w>>>0>>0){c[pa>>2]=u;c[ea>>2]=h;c[fa>>2]=j;t=u;f=1}else j=w}else j=w;while(0);w=j;v=v+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18;C=D<<4;D=n+(D<<1)|0;E=b[D>>1]|0;j=E&65535;E=(E&65535)>16?j+-16|0:0;d:while(1){B=K+t|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(j>>>0<=E>>>0)break d;j=j+-1|0;g=c[n+32768+((C|j&15)<<2)>>2]|0;z=y-g|0;if(z>>>0>J>>>0)break d;v=g&l;if(A)continue;g=v+t|0;if(g>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+g>>0]|0)){h=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ha=g;Ia=k+(v+h)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(v+h)>>0]|0)!=(a[g>>0]|0))break;h=h+1|0;g=g+1|0}if(h>>>0<=3)continue;g=(h*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(w>>>0>>0)break}c[pa>>2]=h;c[ea>>2]=z;c[fa>>2]=g;t=h;w=g;f=1}Ia=b[D>>1]|0;c[n+32768+((C|Ia&15)<<2)>>2]=y;b[D>>1]=Ia+1<<16>>16;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;h=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ia=b[21084+(h<<1)>>1]|0;j=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(Ca=j&31,Da=j>>>5,Ea=(c[11272+(Ca<<2)>>2]|0)+(_(Ca,Da)|0)|0,Ca>>>0<=L>>>0):0){t=Ea+Ca|0;u=280811+t|0;t=280811+(t+-4)|0;g=0;j=280811+Ea|0;while(1){if(j>>>0>t>>>0)break;Ia=k+(K+g)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;g=g+4|0;j=j+4|0}while(1){if(j>>>0>=u>>>0)break;if((a[k+(K+g)>>0]|0)!=(a[j>>0]|0))break;g=g+1|0;j=j+1|0}if(!((g+10|0)>>>0<=Ca>>>0|(g|0)==0)?(Fa=J+Da+1+(d[407930+(Ca-g)>>0]<>0])|0,Ga=(g*540|0)+3840+(_((aa(Fa|0)|0)^31,-120)|0)|0,Ga>>>0>=(c[fa>>2]|0)>>>0):0){c[pa>>2]=g;c[da>>2]=Ca^g;c[ea>>2]=Fa;c[fa>>2]=Ga;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;h=h+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[oa>>2]=c[pa>>2];c[oa+4>>2]=c[pa+4>>2];c[oa+8>>2]=c[pa+8>>2];c[oa+12>>2]=c[pa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[oa>>2]|0;u=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:ma)>>>0){g=f+3|0;Ia=c[o>>2]|0;j=g-Ia|0;t=c[ia>>2]|0;g=g-t|0;if((f|0)==(Ia|0))f=0;else{f:do if((f|0)!=(t|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(g>>>0<7){f=266017486>>>(g<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[oa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ia=c[P>>2]|0;j=m^Ia;c[O>>2]=x;c[O+4>>2]=m|Ia<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ia=((aa(N|0)|0)^31)+-1|0;Ha=N>>>Ia&1;f=((Ia<<1)+65534|Ha)+16&65535;b[m>>1]=f;m=Ia<<24|N-((Ha|2)<>2]=m;h=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ia=x+-2|0;g=((aa(Ia|0)|0)^31)+-1|0;g=(g<<1)+(Ia>>>g)+2&65535;break}if(x>>>0<2114){g=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)g=21;else g=x>>>0<22594?22:23}else g=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ia=j+-6|0;f=((aa(Ia|0)|0)^31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>2]|0;na=h+g|0;la=g>>>0>3?na+-3|0:h;ka=m+4|0;ja=(c[ka>>2]|0)<9?64:512;u=ja+h|0;if((((h|0)==0^1|j^1)^1)&g>>>0<257){f=0;while(1){if((f|0)==(g|0))break;ia=k+f|0;b[n+((_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>18<<1)>>1]=0;f=f+1|0}if(g){a[n+2129920>>0]=0;t=8}}else{f=n+2129920|0;if(!(a[f>>0]&1))t=8;else{ac(n|0,0,32768)|0;a[f>>0]=0;t=8}}if((t|0)==8?g>>>0>2&h>>>0>2:0){ga=h+-3|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ia=n+(ha<<1)|0;c[n+32768+((e[ia>>1]&31|ha<<5)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16;ia=h+-2|0;ha=k+(ia&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ga=n+(ha<<1)|0;c[n+32768+((e[ga>>1]&31|ha<<5)<<2)>>2]=ia;b[ga>>1]=(b[ga>>1]|0)+1<<16>>16;ga=h+-1|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>18;ia=n+(ha<<1)|0;c[n+32768+((e[ia>>1]&31|ha<<5)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16}P=oa+4|0;Q=oa+8|0;R=oa+12|0;S=oa+4|0;T=oa+8|0;U=oa+12|0;V=n+2129928|0;W=n+2129924|0;X=ja<<2;Y=na+-4|0;Z=na+-3|0;$=pa+12|0;ba=pa+4|0;ca=pa+8|0;da=pa+4|0;ea=pa+8|0;fa=pa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=v;a:while(1){M=O;N=u+X|0;b:while(1){L=na-m|0;if((m+4|0)>>>0>=na>>>0)break a;J=m>>>0>>0?m:ma;c[oa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;g=c[oa>>2]|0;c[oa>>2]=0;c[S>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;y=4240;j=0;x=0;while(1){if((x|0)==4)break;w=(c[o+(c[11372+(x<<2)>>2]<<2)>>2]|0)+(c[11436+(x<<2)>>2]|0)|0;t=m-w|0;do if(((!(t>>>0>=m>>>0|w>>>0>J>>>0)?(ra=t&l,sa=K+g|0,sa>>>0<=l>>>0):0)?(ta=ra+g|0,ta>>>0<=l>>>0):0)?(a[k+sa>>0]|0)==(a[k+ta>>0]|0):0){v=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;D=t;E=k+(ra+v)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;v=v+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(ra+v)>>0]|0)!=(a[t>>0]|0))break;v=v+1|0;t=t+1|0}if(v>>>0<=2?!((v|0)==2&x>>>0<2):0){t=y;break}t=(v*540|0)+(c[11500+(x<<2)>>2]|0)|0;if(y>>>0>>0){c[oa>>2]=v;c[T>>2]=w;c[U>>2]=t;g=v;j=1}else t=y}else t=y;while(0);y=t;x=x+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18;C=D<<5;D=n+(D<<1)|0;E=b[D>>1]|0;t=E&65535;E=(E&65535)>32?t+-32|0:0;c:while(1){B=K+g|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(t>>>0<=E>>>0)break c;t=t+-1|0;h=c[n+32768+((C|t&31)<<2)>>2]|0;z=m-h|0;if(z>>>0>J>>>0)break c;x=h&l;if(A)continue;h=x+g|0;if(h>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+h>>0]|0)){w=0;h=F}else continue;while(1){v=h;if(v>>>0>H>>>0)break;Ia=h;Ha=k+(x+w)|0;if((d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0)!=(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0))break;w=w+4|0;h=v+4|0}while(1){if(h>>>0>=G>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}if(w>>>0<=3)continue;h=(w*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(y>>>0>>0)break}c[oa>>2]=w;c[T>>2]=z;c[U>>2]=h;g=w;y=h;j=1}Ia=b[D>>1]|0;c[n+32768+((C|Ia&31)<<2)>>2]=m;b[D>>1]=Ia+1<<16>>16;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ia=b[21084+(w<<1)>>1]|0;t=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(ua=t&31,va=t>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=L>>>0):0){g=wa+ua|0;v=280811+g|0;g=280811+(g+-4)|0;h=0;t=280811+wa|0;while(1){if(t>>>0>g>>>0)break;Ia=k+(K+h)|0;if((d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;t=t+4|0}while(1){if(t>>>0>=v>>>0)break;if((a[k+(K+h)>>0]|0)!=(a[t>>0]|0))break;h=h+1|0;t=t+1|0}if(!((h+10|0)>>>0<=ua>>>0|(h|0)==0)?(xa=J+va+1+(d[407930+(ua-h)>>0]<>0])|0,ya=(h*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[U>>2]|0)>>>0):0){c[oa>>2]=h;c[S>>2]=ua^h;c[T>>2]=xa;c[U>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){M=0;x=f;break}f=f+1|0;t=m+1|0;if(t>>>0<=u>>>0){m=t;continue}if(t>>>0>N>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=t;while(1){if(m>>>0>=j>>>0)continue b;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>18;Ia=n+(Ha<<1)|0;c[n+32768+((e[Ia>>1]&31|Ha<<5)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+4|0;f=f+4|0}}else{j=m+9|0;j=j>>>0>>0?j:Z;m=t;while(1){if(m>>>0>=j>>>0)continue b;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>18;Ia=n+(Ha<<1)|0;c[n+32768+((e[Ia>>1]&31|Ha<<5)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+2|0;f=f+2|0}}}while(1){L=L+-1|0;if((c[ka>>2]|0)<5){f=(c[oa>>2]|0)+-1|0;f=f>>>0>>0?f:L}else f=0;c[pa>>2]=f;c[ba>>2]=0;c[ca>>2]=0;c[$>>2]=4240;y=m+1|0;J=y>>>0>>0?y:ma;K=y&l;t=c[pa>>2]|0;c[pa>>2]=0;c[da>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;w=4240;f=0;v=0;while(1){if((v|0)==4)break;h=(c[o+(c[11372+(v<<2)>>2]<<2)>>2]|0)+(c[11436+(v<<2)>>2]|0)|0;j=y-h|0;do if(((!(j>>>0>=y>>>0|h>>>0>J>>>0)?(za=j&l,Aa=K+t|0,Aa>>>0<=l>>>0):0)?(Ba=za+t|0,Ba>>>0<=l>>>0):0)?(a[k+Aa>>0]|0)==(a[k+Ba>>0]|0):0){u=0;j=F;while(1){g=j;if(g>>>0>H>>>0)break;Ha=j;Ia=k+(za+u)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;u=u+4|0;j=g+4|0}while(1){if(j>>>0>=G>>>0)break;if((a[k+(za+u)>>0]|0)!=(a[j>>0]|0))break;u=u+1|0;j=j+1|0}if(u>>>0<=2?!((u|0)==2&v>>>0<2):0){j=w;break}j=(u*540|0)+(c[11500+(v<<2)>>2]|0)|0;if(w>>>0>>0){c[pa>>2]=u;c[ea>>2]=h;c[fa>>2]=j;t=u;f=1}else j=w}else j=w;while(0);w=j;v=v+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18;C=D<<5;D=n+(D<<1)|0;E=b[D>>1]|0;j=E&65535;E=(E&65535)>32?j+-32|0:0;d:while(1){B=K+t|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(j>>>0<=E>>>0)break d;j=j+-1|0;g=c[n+32768+((C|j&31)<<2)>>2]|0;z=y-g|0;if(z>>>0>J>>>0)break d;v=g&l;if(A)continue;g=v+t|0;if(g>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+g>>0]|0)){h=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ha=g;Ia=k+(v+h)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(v+h)>>0]|0)!=(a[g>>0]|0))break;h=h+1|0;g=g+1|0}if(h>>>0<=3)continue;g=(h*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(w>>>0>>0)break}c[pa>>2]=h;c[ea>>2]=z;c[fa>>2]=g;t=h;w=g;f=1}Ia=b[D>>1]|0;c[n+32768+((C|Ia&31)<<2)>>2]=y;b[D>>1]=Ia+1<<16>>16;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;h=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ia=b[21084+(h<<1)>>1]|0;j=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(Ca=j&31,Da=j>>>5,Ea=(c[11272+(Ca<<2)>>2]|0)+(_(Ca,Da)|0)|0,Ca>>>0<=L>>>0):0){t=Ea+Ca|0;u=280811+t|0;t=280811+(t+-4)|0;g=0;j=280811+Ea|0;while(1){if(j>>>0>t>>>0)break;Ia=k+(K+g)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;g=g+4|0;j=j+4|0}while(1){if(j>>>0>=u>>>0)break;if((a[k+(K+g)>>0]|0)!=(a[j>>0]|0))break;g=g+1|0;j=j+1|0}if(!((g+10|0)>>>0<=Ca>>>0|(g|0)==0)?(Fa=J+Da+1+(d[407930+(Ca-g)>>0]<>0])|0,Ga=(g*540|0)+3840+(_((aa(Fa|0)|0)^31,-120)|0)|0,Ga>>>0>=(c[fa>>2]|0)>>>0):0){c[pa>>2]=g;c[da>>2]=Ca^g;c[ea>>2]=Fa;c[fa>>2]=Ga;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;h=h+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[oa>>2]=c[pa>>2];c[oa+4>>2]=c[pa+4>>2];c[oa+8>>2]=c[pa+8>>2];c[oa+12>>2]=c[pa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[oa>>2]|0;u=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:ma)>>>0){g=f+3|0;Ia=c[o>>2]|0;j=g-Ia|0;t=c[ia>>2]|0;g=g-t|0;if((f|0)==(Ia|0))f=0;else{f:do if((f|0)!=(t|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(g>>>0<7){f=266017486>>>(g<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[oa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ia=c[P>>2]|0;j=m^Ia;c[O>>2]=x;c[O+4>>2]=m|Ia<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ia=((aa(N|0)|0)^31)+-1|0;Ha=N>>>Ia&1;f=((Ia<<1)+65534|Ha)+16&65535;b[m>>1]=f;m=Ia<<24|N-((Ha|2)<>2]=m;h=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ia=x+-2|0;g=((aa(Ia|0)|0)^31)+-1|0;g=(g<<1)+(Ia>>>g)+2&65535;break}if(x>>>0<2114){g=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)g=21;else g=x>>>0<22594?22:23}else g=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ia=j+-6|0;f=((aa(Ia|0)|0)^31)+-1|0;f=(f<<1)+(Ia>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=g&65535;t=m&7|j<<3&56;if(h&(g&65535)<8&(f&65535)<16)f=((f&65535)<8?t:t|64)&65535;else f=b[88156+((m>>>3)+((j>>>3)*3|0)<<1)>>1]|t&65535;b[v>>1]=f;c[s>>2]=(c[s>>2]|0)+x;f=y+(c[oa>>2]|0)|0;f=f>>>0>>0?f:la;m=y+2|0;while(1){if(m>>>0>=f>>>0)break;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>18;Ia=n+(Ha<<1)|0;c[n+32768+((e[Ia>>1]&31|Ha<<5)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+1|0}m=y+(c[oa>>2]|0)|0;O=w;f=0}c[p>>2]=f+L;c[r>>2]=(c[r>>2]|0)+(M-q>>4);i=qa;return}function Oa(f,g,h,j,k,l,m,n,o,p,q,r,s){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;qa=i;i=i+32|0;oa=qa+16|0;pa=qa;ma=(1<>2])+-16|0;v=c[p>>2]|0;na=h+g|0;la=g>>>0>3?na+-3|0:h;ka=m+4|0;ja=(c[ka>>2]|0)<9?64:512;u=ja+h|0;if((((h|0)==0^1|j^1)^1)&g>>>0<513){f=0;while(1){if((f|0)==(g|0))break;ia=k+f|0;b[n+((_(d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,506832829)|0)>>>17<<1)>>1]=0;f=f+1|0}if(g){a[n+8454144>>0]=0;t=8}}else{f=n+8454144|0;if(!(a[f>>0]&1))t=8;else{ac(n|0,0,65536)|0;a[f>>0]=0;t=8}}if((t|0)==8?g>>>0>2&h>>>0>2:0){ga=h+-3|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ia=n+(ha<<1)|0;c[n+65536+((e[ia>>1]&63|ha<<6)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16;ia=h+-2|0;ha=k+(ia&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ga=n+(ha<<1)|0;c[n+65536+((e[ga>>1]&63|ha<<6)<<2)>>2]=ia;b[ga>>1]=(b[ga>>1]|0)+1<<16>>16;ga=h+-1|0;ha=k+(ga&l)|0;ha=(_(d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,506832829)|0)>>>17;ia=n+(ha<<1)|0;c[n+65536+((e[ia>>1]&63|ha<<6)<<2)>>2]=ga;b[ia>>1]=(b[ia>>1]|0)+1<<16>>16}P=oa+4|0;Q=oa+8|0;R=oa+12|0;S=oa+4|0;T=oa+8|0;U=oa+12|0;V=n+8454152|0;W=n+8454148|0;X=ja<<2;Y=na+-4|0;Z=na+-3|0;$=pa+12|0;ba=pa+4|0;ca=pa+8|0;da=pa+4|0;ea=pa+8|0;fa=pa+12|0;ga=o+8|0;ha=o+12|0;ia=o+4|0;m=h;O=q;f=v;a:while(1){M=O;N=u+X|0;b:while(1){L=na-m|0;if((m+4|0)>>>0>=na>>>0)break a;J=m>>>0>>0?m:ma;c[oa>>2]=0;c[P>>2]=0;c[Q>>2]=0;c[R>>2]=4240;K=m&l;g=c[oa>>2]|0;c[oa>>2]=0;c[S>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;y=4240;j=0;x=0;while(1){if((x|0)==10)break;w=(c[o+(c[11372+(x<<2)>>2]<<2)>>2]|0)+(c[11436+(x<<2)>>2]|0)|0;t=m-w|0;do if(((!(t>>>0>=m>>>0|w>>>0>J>>>0)?(ra=t&l,sa=K+g|0,sa>>>0<=l>>>0):0)?(ta=ra+g|0,ta>>>0<=l>>>0):0)?(a[k+sa>>0]|0)==(a[k+ta>>0]|0):0){v=0;t=F;while(1){h=t;if(h>>>0>H>>>0)break;D=t;E=k+(ra+v)|0;if((d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;v=v+4|0;t=h+4|0}while(1){if(t>>>0>=G>>>0)break;if((a[k+(ra+v)>>0]|0)!=(a[t>>0]|0))break;v=v+1|0;t=t+1|0}if(v>>>0<=2?!((v|0)==2&x>>>0<2):0){t=y;break}t=(v*540|0)+(c[11500+(x<<2)>>2]|0)|0;if(y>>>0>>0){c[oa>>2]=v;c[T>>2]=w;c[U>>2]=t;g=v;j=1}else t=y}else t=y;while(0);y=t;x=x+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<6;D=n+(D<<1)|0;E=b[D>>1]|0;t=E&65535;E=(E&65535)>64?t+-64|0:0;c:while(1){B=K+g|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(t>>>0<=E>>>0)break c;t=t+-1|0;h=c[n+65536+((C|t&63)<<2)>>2]|0;z=m-h|0;if(z>>>0>J>>>0)break c;x=h&l;if(A)continue;h=x+g|0;if(h>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+h>>0]|0)){w=0;h=F}else continue;while(1){v=h;if(v>>>0>H>>>0)break;Ia=h;Ha=k+(x+w)|0;if((d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0)!=(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0))break;w=w+4|0;h=v+4|0}while(1){if(h>>>0>=G>>>0)break;if((a[k+(x+w)>>0]|0)!=(a[h>>0]|0))break;w=w+1|0;h=h+1|0}if(w>>>0<=3)continue;h=(w*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(y>>>0>>0)break}c[oa>>2]=w;c[T>>2]=z;c[U>>2]=h;g=w;y=h;j=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&63)<<2)>>2]=m;b[D>>1]=Ia+1<<16>>16;if(!(j&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)j=0;else{x=0;j=0;w=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((x|0)==2)break;Ia=b[21084+(w<<1)>>1]|0;t=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(ua=t&31,va=t>>>5,wa=(c[11272+(ua<<2)>>2]|0)+(_(ua,va)|0)|0,ua>>>0<=L>>>0):0){g=wa+ua|0;v=280811+g|0;g=280811+(g+-4)|0;h=0;t=280811+wa|0;while(1){if(t>>>0>g>>>0)break;Ia=k+(K+h)|0;if((d[t>>0]|d[t+1>>0]<<8|d[t+2>>0]<<16|d[t+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;t=t+4|0}while(1){if(t>>>0>=v>>>0)break;if((a[k+(K+h)>>0]|0)!=(a[t>>0]|0))break;h=h+1|0;t=t+1|0}if(!((h+10|0)>>>0<=ua>>>0|(h|0)==0)?(xa=J+va+1+(d[407930+(ua-h)>>0]<>0])|0,ya=(h*540|0)+3840+(_((aa(xa|0)|0)^31,-120)|0)|0,ya>>>0>=(c[U>>2]|0)>>>0):0){c[oa>>2]=h;c[S>>2]=ua^h;c[T>>2]=xa;c[U>>2]=ya;c[V>>2]=(c[V>>2]|0)+1;j=1}}x=x+1|0;w=w+1|0}j=(j&1)!=0}j=j&1}if(j&1){M=0;x=f;break}f=f+1|0;t=m+1|0;if(t>>>0<=u>>>0){m=t;continue}if(t>>>0>N>>>0){j=m+17|0;j=j>>>0>>0?j:Y;m=t;while(1){if(m>>>0>=j>>>0)continue b;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>17;Ia=n+(Ha<<1)|0;c[n+65536+((e[Ia>>1]&63|Ha<<6)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+4|0;f=f+4|0}}else{j=m+9|0;j=j>>>0>>0?j:Z;m=t;while(1){if(m>>>0>=j>>>0)continue b;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>17;Ia=n+(Ha<<1)|0;c[n+65536+((e[Ia>>1]&63|Ha<<6)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+2|0;f=f+2|0}}}while(1){L=L+-1|0;if((c[ka>>2]|0)<5){f=(c[oa>>2]|0)+-1|0;f=f>>>0>>0?f:L}else f=0;c[pa>>2]=f;c[ba>>2]=0;c[ca>>2]=0;c[$>>2]=4240;y=m+1|0;J=y>>>0>>0?y:ma;K=y&l;t=c[pa>>2]|0;c[pa>>2]=0;c[da>>2]=0;I=k+K|0;H=K+L|0;G=k+H|0;F=I;H=k+(H+-4)|0;w=4240;f=0;v=0;while(1){if((v|0)==10)break;h=(c[o+(c[11372+(v<<2)>>2]<<2)>>2]|0)+(c[11436+(v<<2)>>2]|0)|0;j=y-h|0;do if(((!(j>>>0>=y>>>0|h>>>0>J>>>0)?(za=j&l,Aa=K+t|0,Aa>>>0<=l>>>0):0)?(Ba=za+t|0,Ba>>>0<=l>>>0):0)?(a[k+Aa>>0]|0)==(a[k+Ba>>0]|0):0){u=0;j=F;while(1){g=j;if(g>>>0>H>>>0)break;Ha=j;Ia=k+(za+u)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;u=u+4|0;j=g+4|0}while(1){if(j>>>0>=G>>>0)break;if((a[k+(za+u)>>0]|0)!=(a[j>>0]|0))break;u=u+1|0;j=j+1|0}if(u>>>0<=2?!((u|0)==2&v>>>0<2):0){j=w;break}j=(u*540|0)+(c[11500+(v<<2)>>2]|0)|0;if(w>>>0>>0){c[pa>>2]=u;c[ea>>2]=h;c[fa>>2]=j;t=u;f=1}else j=w}else j=w;while(0);w=j;v=v+1|0}D=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>17;C=D<<6;D=n+(D<<1)|0;E=b[D>>1]|0;j=E&65535;E=(E&65535)>64?j+-64|0:0;d:while(1){B=K+t|0;A=B>>>0>l>>>0;B=k+B|0;while(1){if(j>>>0<=E>>>0)break d;j=j+-1|0;g=c[n+65536+((C|j&63)<<2)>>2]|0;z=y-g|0;if(z>>>0>J>>>0)break d;v=g&l;if(A)continue;g=v+t|0;if(g>>>0>l>>>0)continue;if((a[B>>0]|0)==(a[k+g>>0]|0)){h=0;g=F}else continue;while(1){u=g;if(u>>>0>H>>>0)break;Ha=g;Ia=k+(v+h)|0;if((d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;h=h+4|0;g=u+4|0}while(1){if(g>>>0>=G>>>0)break;if((a[k+(v+h)>>0]|0)!=(a[g>>0]|0))break;h=h+1|0;g=g+1|0}if(h>>>0<=3)continue;g=(h*540|0)+3840+(_((aa(z|0)|0)^31,-120)|0)|0;if(w>>>0>>0)break}c[pa>>2]=h;c[ea>>2]=z;c[fa>>2]=g;t=h;w=g;f=1}Ia=b[D>>1]|0;c[n+65536+((C|Ia&63)<<2)>>2]=y;b[D>>1]=Ia+1<<16>>16;if(!(f&1)){if((c[V>>2]|0)>>>0<(c[W>>2]|0)>>>7>>>0)f=0;else{v=0;f=0;h=(_(d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,506832829)|0)>>>18<<1;while(1){if((v|0)==2)break;Ia=b[21084+(h<<1)>>1]|0;j=Ia&65535;c[W>>2]=(c[W>>2]|0)+1;if(Ia<<16>>16!=0?(Ca=j&31,Da=j>>>5,Ea=(c[11272+(Ca<<2)>>2]|0)+(_(Ca,Da)|0)|0,Ca>>>0<=L>>>0):0){t=Ea+Ca|0;u=280811+t|0;t=280811+(t+-4)|0;g=0;j=280811+Ea|0;while(1){if(j>>>0>t>>>0)break;Ia=k+(K+g)|0;if((d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24|0)!=(d[Ia>>0]|d[Ia+1>>0]<<8|d[Ia+2>>0]<<16|d[Ia+3>>0]<<24|0))break;g=g+4|0;j=j+4|0}while(1){if(j>>>0>=u>>>0)break;if((a[k+(K+g)>>0]|0)!=(a[j>>0]|0))break;g=g+1|0;j=j+1|0}if(!((g+10|0)>>>0<=Ca>>>0|(g|0)==0)?(Fa=J+Da+1+(d[407930+(Ca-g)>>0]<>0])|0,Ga=(g*540|0)+3840+(_((aa(Fa|0)|0)^31,-120)|0)|0,Ga>>>0>=(c[fa>>2]|0)>>>0):0){c[pa>>2]=g;c[da>>2]=Ca^g;c[ea>>2]=Fa;c[fa>>2]=Ga;c[V>>2]=(c[V>>2]|0)+1;f=1}}v=v+1|0;h=h+1|0}f=(f&1)!=0}f=f&1}if(!(f&1)){y=m;break}if((c[$>>2]|0)>>>0<((c[R>>2]|0)+700|0)>>>0){y=m;break}f=x+1|0;c[oa>>2]=c[pa>>2];c[oa+4>>2]=c[pa+4>>2];c[oa+8>>2]=c[pa+8>>2];c[oa+12>>2]=c[pa+12>>2];M=M+1|0;if(!((M|0)<4&(m+5|0)>>>0>>0)){x=f;break}else{m=y;x=f}}m=c[oa>>2]|0;u=y+(m<<1)+ja|0;f=c[Q>>2]|0;e:do if(f>>>0<=(y>>>0>>0?y:ma)>>>0){g=f+3|0;Ia=c[o>>2]|0;j=g-Ia|0;t=c[ia>>2]|0;g=g-t|0;if((f|0)==(Ia|0))f=0;else{f:do if((f|0)!=(t|0)){do if(j>>>0<7)f=158663784>>>(j<<2)&15;else{if(g>>>0<7){f=266017486>>>(g<<2)&15;break}if((f|0)==(c[ga>>2]|0)){f=2;break f}if((f|0)==(c[ha>>2]|0)){f=3;break f}f=f+15|0}while(0);if(!f)break e}else f=1;while(0);c[ha>>2]=c[ga>>2];c[ga>>2]=c[ia>>2];c[ia>>2]=c[o>>2];c[o>>2]=c[Q>>2];m=c[oa>>2]|0}}else f=f+15|0;while(0);w=O+16|0;Ia=c[P>>2]|0;j=m^Ia;c[O>>2]=x;c[O+4>>2]=m|Ia<<24;m=O+14|0;if(f>>>0<16){f=f&65535;b[m>>1]=f;m=0}else{N=f+-12|0;Ia=((aa(N|0)|0)^31)+-1|0;Ha=N>>>Ia&1;f=((Ia<<1)+65534|Ha)+16&65535;b[m>>1]=f;m=Ia<<24|N-((Ha|2)<>2]=m;h=f<<16>>16==0;v=O+12|0;do if(x>>>0>=6){if(x>>>0<130){Ia=x+-2|0;g=((aa(Ia|0)|0)^31)+-1|0;g=(g<<1)+(Ia>>>g)+2&65535;break}if(x>>>0<2114){g=((aa(x+-66|0)|0)^31)+10&65535;break}if(x>>>0<6210)g=21;else g=x>>>0<22594?22:23}else g=x&65535;while(0);do if(j>>>0>=10){if(j>>>0<134){Ia=j+-6|0;f=((aa(Ia|0)|0)^31)+-1|0;f=(f<<1)+(Ia>>>f)+4&65535;break}if(j>>>0<2118)f=((aa(j+-70|0)|0)^31)+12&65535;else f=23}else f=j+65534&65535;while(0);m=f&65535;j=g&65535;t=m&7|j<<3&56;if(h&(g&65535)<8&(f&65535)<16)f=((f&65535)<8?t:t|64)&65535;else f=b[88156+((m>>>3)+((j>>>3)*3|0)<<1)>>1]|t&65535;b[v>>1]=f;c[s>>2]=(c[s>>2]|0)+x;f=y+(c[oa>>2]|0)|0;f=f>>>0>>0?f:la;m=y+2|0;while(1){if(m>>>0>=f>>>0)break;Ha=k+(m&l)|0;Ha=(_(d[Ha>>0]|d[Ha+1>>0]<<8|d[Ha+2>>0]<<16|d[Ha+3>>0]<<24,506832829)|0)>>>17;Ia=n+(Ha<<1)|0;c[n+65536+((e[Ia>>1]&63|Ha<<6)<<2)>>2]=m;b[Ia>>1]=(b[Ia>>1]|0)+1<<16>>16;m=m+1|0}m=y+(c[oa>>2]|0)|0;O=w;f=0}c[p>>2]=f+L;c[r>>2]=(c[r>>2]|0)+(M-q>>4);i=qa;return} +function Db(f,j,k,l,m,n,o,p,q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;Ea=c[y>>2]|0;Aa=p+4|0;l=c[Aa>>2]|0;if((l|0)>9)if((c[p>>2]|0)==2){A=0;while(1){if((A|0)==(u|0))break;do if((c[v+(A<<4)+4>>2]&16777215|0)!=0?(e[v+(A<<4)+12>>1]|0)>127:0){t=v+(A<<4)+14|0;l=b[t>>1]|0;if((l&65535)>=16){m=v+(A<<4)+8|0;xa=c[m>>2]|0;wa=xa>>>24;l=((l&65535)+-12-(wa<<1)<>>0>=28){va=l+-20|0;ua=(aa(va|0)|0)^31;xa=ua+-1|0;wa=va>>>xa&1;ua=ua+-2|0;b[t>>1]=(((ua<<1)+32766|wa)<<1)+28|va&1;c[m>>2]=ua<<24|(va-((wa|2)<>>1;break}}else{m=v+(A<<4)+8|0;l=l&65535}b[t>>1]=l;c[m>>2]=0}while(0);A=A+1|0}l=c[Aa>>2]|0;m=1;t=12;H=19}else{xa=0;wa=0;H=38}else{m=0;t=0;H=19}do if((H|0)==19){if((l|0)>=3){if((l|0)>=4){xa=m;wa=t;H=38;break}db(o,n,y,z);ac(Ca|0,0,1028)|0;h[Ca+1032>>3]=s;ac(ya|0,0,2820)|0;h[ya+2824>>3]=s;ac(za|0,0,2084)|0;h[za+2088>>3]=s;jb(j,Fa,k,v,u,Ca,ya,za);l=z+((c[y>>2]|0)>>>3)|0;r=d[l>>0]|0;m=l;a[m>>0]=r;a[m+1>>0]=r>>8;a[m+2>>0]=r>>16;a[m+3>>0]=r>>24;l=l+4|0;a[l>>0]=0;a[l+1>>0]=0;a[l+2>>0]=0;a[l+3>>0]=0;c[y>>2]=(c[y>>2]|0)+13;l=f+8|0;m=sa[c[f>>2]&1](c[l>>2]|0,11272)|0;if(!m)oa(1);kb(Ca,256,m,O,N,y,z);kb(ya,704,m,J,I,y,z);kb(za,64,m,L,K,y,z);ra[c[f+4>>2]&1](c[l>>2]|0,m);lb(j,Fa,k,v,u,O,N,J,I,L,K,y,z);if(o){u=(c[y>>2]|0)+7|0;c[y>>2]=u&-8;a[z+(u>>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3>>0]=Ca>>24;c[y>>2]=(c[y>>2]|0)+28;lb(j,Fa,k,v,u,O,N,404412,86620,405116,88028,y,z)}else{ac(ya|0,0,1028)|0;h[ya+1032>>3]=s;ac(za|0,0,2820)|0;h[za+2824>>3]=s;ac(B|0,0,2084)|0;h[B+2088>>3]=s;jb(j,Fa,k,v,u,ya,za,B);$a(f,ya,c[ya+1024>>2]|0,8,E,D,y,z);$a(f,za,c[za+2816>>2]|0,10,J,I,y,z);$a(f,B,c[B+2080>>2]|0,6,L,K,y,z);lb(j,Fa,k,v,u,E,D,J,I,L,K,y,z)}if(o){u=(c[y>>2]|0)+7|0;c[y>>2]=u&-8;a[z+(u>>>3)>>0]=0}}while(0);if((H|0)==38){ha=Ba+8|0;ia=Ba+12|0;K=Ba+24|0;ga=Ba+28|0;c[Ba>>2]=0;c[Ba+4>>2]=0;c[Ba+8>>2]=0;c[Ba+12>>2]=0;c[Ba+16>>2]=0;c[Ba+20>>2]=0;c[Ba+24>>2]=0;ja=Ba+32|0;ka=Ba+36|0;L=Ba+48|0;c[ga>>2]=0;c[ga+4>>2]=0;c[ga+8>>2]=0;c[ga+12>>2]=0;c[ga+16>>2]=0;c[L>>2]=0;ga=Ba+52|0;la=Ba+56|0;ma=Ba+60|0;na=Ba+72|0;c[ga>>2]=0;c[ga+4>>2]=0;c[ga+8>>2]=0;c[ga+12>>2]=0;c[ga+16>>2]=0;ga=Ba+76|0;qa=Ba+80|0;ta=Ba+88|0;J=Ba+92|0;ua=Ba+96|0;N=Ba+100|0;va=Ba+104|0;O=Ba+108|0;m=(l|0)<10;t=na;A=t+40|0;do{c[t>>2]=0;t=t+4|0}while((t|0)<(A|0));do if(m){c[Q>>2]=1;c[P>>2]=0;if(!((l|0)<5|n>>>0<64)){D=Fa+n|0;t=za;A=t+36|0;do{c[t>>2]=0;t=t+4|0}while((t|0)<(A|0));B=Fa;while(1){A=B+64|0;if(A>>>0>D>>>0)break;t=d[j+(B&k)>>0]|0;m=B;while(1){m=m+1|0;if(m>>>0>=A>>>0)break;fa=d[j+(m&k)>>0]|0;ea=za+(((c[18900+(t>>>6<<2)>>2]|0)*3|0)+(c[18900+(fa>>>6<<2)>>2]|0)<<2)|0;c[ea>>2]=(c[ea>>2]|0)+1;t=fa}B=B+4096|0}c[Ca>>2]=0;c[Ca+4>>2]=0;c[Ca+8>>2]=0;c[ya>>2]=0;c[ya+4>>2]=0;c[ya+8>>2]=0;c[ya+12>>2]=0;c[ya+16>>2]=0;c[ya+20>>2]=0;m=0;I=0;while(1){if((m|0)==9)break;fa=c[za+(m<<2)>>2]|0;ea=Ca+(((m>>>0)%3|0)<<2)|0;c[ea>>2]=(c[ea>>2]|0)+fa;ea=ya+((m>>>0>5?m+-6|0:m)<<2)|0;c[ea>>2]=(c[ea>>2]|0)+fa;m=m+1|0;I=I+fa|0}D=Ca+12|0;B=Ca;M=0.0;m=0;while(1){A=B+4|0;t=c[B>>2]|0;E=m+t|0;G=+(t>>>0);if(t>>>0<256)F=+g[19516+(t<<2)>>2];else F=+Xb(G);M=M-G*F;if(A>>>0>=D>>>0)break;m=c[A>>2]|0;F=+(m>>>0);if(m>>>0<256)G=+g[19516+(m<<2)>>2];else G=+Xb(F);B=B+8|0;M=M-F*G;m=E+m|0}if(!E)ba=M;else{G=+(E>>>0);if(E>>>0<256)F=+g[19516+(E<<2)>>2];else F=+Xb(G);ba=M+G*F}H=ya+12|0;B=ya;M=0.0;m=0;while(1){A=B+4|0;t=c[B>>2]|0;D=m+t|0;G=+(t>>>0);if(t>>>0<256)F=+g[19516+(t<<2)>>2];else F=+Xb(G);M=M-G*F;if(A>>>0>=H>>>0)break;m=c[A>>2]|0;F=+(m>>>0);if(m>>>0<256)G=+g[19516+(m<<2)>>2];else G=+Xb(F);B=B+8|0;M=M-F*G;m=D+m|0}if(!D)Z=M;else{G=+(D>>>0);if(D>>>0<256)F=+g[19516+(D<<2)>>2];else F=+Xb(G);Z=M+G*F}E=ya+24|0;B=H;M=0.0;m=0;while(1){A=B+4|0;t=c[B>>2]|0;D=m+t|0;G=+(t>>>0);if(t>>>0<256)F=+g[19516+(t<<2)>>2];else F=+Xb(G);M=M-G*F;if(A>>>0>=E>>>0)break;m=c[A>>2]|0;F=+(m>>>0);if(m>>>0<256)G=+g[19516+(m<<2)>>2];else G=+Xb(F);B=B+8|0;M=M-F*G;m=D+m|0}if(!D)R=M;else{G=+(D>>>0);if(D>>>0<256)F=+g[19516+(D<<2)>>2];else F=+Xb(G);R=M+G*F}S=0.0;E=0;while(1){if((E|0)==3)break;t=E*3|0;A=za+(t+3<<2)|0;t=za+(t<<2)|0;M=0.0;m=0;while(1){B=t+4|0;t=c[t>>2]|0;D=m+t|0;G=+(t>>>0);if(t>>>0<256)F=+g[19516+(t<<2)>>2];else F=+Xb(G);F=M-G*F;if(B>>>0>=A>>>0)break;m=c[B>>2]|0;G=+(m>>>0);if(m>>>0<256)M=+g[19516+(m<<2)>>2];else M=+Xb(G);t=B+4|0;M=F-G*M;m=D+m|0}if(D){M=+(D>>>0);if(D>>>0<256)G=+g[19516+(D<<2)>>2];else G=+Xb(M);F=F+M*G}S=S+F;E=E+1|0}if(!I)pa(406445,406053,339,406456);F=1.0/+(I>>>0);ba=ba*F;G=(Z+R)*F;F=(l|0)<7?ba*10.0:S*F;do if(!(ba-G<.2&ba-F<.2))if(G-F<.02){c[Q>>2]=2;c[P>>2]=18916;break}else{c[Q>>2]=3;c[P>>2]=19172;break}else c[Q>>2]=1;while(0);fa=c[P>>2]|0;W=fa;if(fa){fa=c[Q>>2]|0;l=0;m=0;while(1){if((m|0)==(u|0))break;l=l+(c[v+(m<<4)>>2]|0)|0;m=m+1|0}E=(l>>>9)+1|0;c[Ca>>2]=256;c[Ca+4>>2]=fa;H=256/(fa>>>0)|0;c[Ca+8>>2]=H;c[Ca+12>>2]=512;h[Ca+16>>3]=400.0;c[Ca+24>>2]=0;c[Ca+28>>2]=Ba;c[Ca+36>>2]=J;ca=Ca+40|0;c[ca>>2]=512;da=Ca+44|0;c[da>>2]=0;ea=Ca+48|0;c[ea>>2]=0;c[Ca+64>>2]=0;H=H+1|0;H=E>>>0>>0?E:H;D=Ba+16|0;l=c[D>>2]|0;if(l>>>0>>0){B=(l|0)==0?E:l;while(1){if(B>>>0>=E>>>0)break;B=B<<1}m=f+8|0;t=sa[c[f>>2]&1](c[m>>2]|0,B)|0;if(!t)oa(1);A=c[D>>2]|0;l=Ba+8|0;if(A)dc(t|0,c[l>>2]|0,A|0)|0;ra[c[f+4>>2]&1](c[m>>2]|0,c[l>>2]|0);c[l>>2]=t;c[D>>2]=B}B=Ba+20|0;l=c[B>>2]|0;if(l>>>0>>0){A=(l|0)==0?E:l;while(1){if(A>>>0>=E>>>0)break;A=A<<1}D=f+8|0;m=sa[c[f>>2]&1](c[D>>2]|0,A<<2)|0;if(!m)oa(1);t=c[B>>2]|0;l=Ba+12|0;if(t)dc(m|0,c[l>>2]|0,t<<2|0)|0;ra[c[f+4>>2]&1](c[D>>2]|0,c[l>>2]|0);c[l>>2]=m;c[B>>2]=A;$=f}else{$=f;D=f+8|0}c[Ba+4>>2]=E;l=sa[c[$>>2]&1](c[D>>2]|0,fa<<4)|0;if(!l)oa(1);Y=Ca+60|0;c[Y>>2]=l;if(c[ta>>2]|0)pa(407776,406802,255,407793);m=_(H,fa)|0;c[J>>2]=m;m=sa[c[$>>2]&1](c[D>>2]|0,m*1040|0)|0;l=m;if(!m)oa(1);c[ta>>2]=l;X=Ca+32|0;c[X>>2]=l;l=0;while(1){if((l|0)==(fa|0))break;ac(m+(l*1040|0)|0,0,1024)|0;c[m+(l*1040|0)+1024>>2]=0;h[m+(l*1040|0)+1032>>3]=s;l=l+1|0}c[Ca+56>>2]=0;c[Ca+52>>2]=0;Pb(f,ya,u,K,ua,N);Qb(f,za,u,L,va,O);Q=ya+40|0;T=ya+24|0;U=ya+36|0;V=ya+32|0;L=za+40|0;N=za+24|0;O=za+36|0;p=za+32|0;t=Fa;m=q;l=r;P=0;while(1){if((P|0)==(u|0))break;H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;t=0;while(1){if(t>>>0>=(c[Ba>>2]|0)>>>0)break;l=_(t,fa)|0;m=t<<6;A=0;while(1){if((A|0)==64)break;c[(c[na>>2]|0)+(m+A<<2)>>2]=l+(c[W+(A<<2)>>2]|0);A=A+1|0}t=t+1|0}l=2;break}}l=0;m=0;while(1){if((m|0)==(u|0))break;l=l+(c[v+(m<<4)>>2]|0)|0;m=m+1|0}H=(l>>>9)+1|0;E=H>>>0<257?H:257;c[Ca>>2]=256;c[Ca+4>>2]=512;h[Ca+8>>3]=400.0;c[Ca+16>>2]=0;I=Ca+20|0;c[I>>2]=Ba;c[Ca+28>>2]=J;T=Ca+32|0;c[T>>2]=512;U=Ca+36|0;c[U>>2]=0;V=Ca+40|0;c[V>>2]=0;c[Ca+72>>2]=0;D=Ba+16|0;l=c[D>>2]|0;if(l>>>0>>0){B=(l|0)==0?H:l;while(1){if(B>>>0>=H>>>0)break;B=B<<1}m=f+8|0;t=sa[c[f>>2]&1](c[m>>2]|0,B)|0;if(!t)oa(1);A=c[D>>2]|0;l=Ba+8|0;if(A)dc(t|0,c[l>>2]|0,A|0)|0;ra[c[f+4>>2]&1](c[m>>2]|0,c[l>>2]|0);c[l>>2]=t;c[D>>2]=B}D=Ba+20|0;l=c[D>>2]|0;if(l>>>0>>0){B=(l|0)==0?H:l;while(1){if(B>>>0>=H>>>0)break;B=B<<1}m=f+8|0;t=sa[c[f>>2]&1](c[m>>2]|0,B<<2)|0;if(!t)oa(1);A=c[D>>2]|0;l=Ba+12|0;if(A)dc(t|0,c[l>>2]|0,A<<2|0)|0;ra[c[f+4>>2]&1](c[m>>2]|0,c[l>>2]|0);c[l>>2]=t;c[D>>2]=B}c[(c[I>>2]|0)+4>>2]=H;if(c[ta>>2]|0)pa(407776,407818,70,407905);c[J>>2]=E;l=sa[c[f>>2]&1](c[f+8>>2]|0,E*1040|0)|0;m=l;if(!l)oa(1);c[ta>>2]=m;Q=Ca+24|0;c[Q>>2]=m;ac(l|0,0,1024)|0;c[l+1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c[b>>2]=(c[b>>2]|0)+((h+13|0)>>>3);return}function Fb(a,b,e,f,h,j,k){a=a|0;b=b|0;e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;var l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,s=0;s=i;i=i+1024|0;q=s;if(((h>>>8)+2|0)>>>0>k>>>0?(l=+(h>>>0),+(j>>>0)>l*.99):0){ac(q|0,0,1024)|0;l=l*7.92;j=((h+12|0)>>>0)/13|0;f=e;k=0;while(1){if(k>>>0>=j>>>0)break;e=q+((d[a+(f&b)>>0]|0)<<2)|0;c[e>>2]=(c[e>>2]|0)+1;f=f+13|0;k=k+1|0}r=l/13.0;h=q+1024|0;f=q;l=0.0;e=0;while(1){if(f>>>0>=h>>>0)break;k=c[f>>2]|0;m=+(k>>>0);if(k>>>0<256)p=+g[19516+(k<<2)>>2];else p=+Xb(m);j=c[f+4>>2]|0;n=+(j>>>0);if(j>>>0<256)o=+g[19516+(j<<2)>>2];else o=+Xb(n);f=f+8|0;l=l-m*p-n*o;e=e+k+j|0}n=+(e>>>0);if(!e)o=n;else{if(e>>>0<256)m=+g[19516+(e<<2)>>2];else m=+Xb(n);o=n;l=l+n*m}if((lr){q=0;i=s;return q|0}}q=1;i=s;return q|0}function Gb(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;m=i;i=i+64|0;l=m;if((g|0)>=16)pa(406658,406674,26,406709);c[l>>2]=-1;h=0;a:while(1){j=b[e+(d<<3)+4>>1]|0;if(j<<16>>16>-1){k=h+1|0;if((h|0)>=(g|0)){h=0;d=12;break}c[l+(k<<2)>>2]=b[e+(d<<3)+6>>1];h=k;d=j<<16>>16;continue}a[f+(b[e+(d<<3)+6>>1]|0)>>0]=h;while(1){if((h|0)<=-1){h=1;d=12;break a}if((c[l+(h<<2)>>2]|0)!=-1)break;h=h+-1|0}k=l+(h<<2)|0;d=c[k>>2]|0;c[k>>2]=-1}if((d|0)==12){i=m;return h|0}return 0}function Hb(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=i;i=i+16|0;u=x+8|0;v=x;t=1;while(1){j=e;s=0;a:while(1){do{if(!j)break a;j=j+-1|0;k=c[d+(j<<2)>>2]|0}while((k|0)==0);c[g+(s<<3)>>2]=k>>>0>t>>>0?k:t;b[g+(s<<3)+4>>1]=-1;b[g+(s<<3)+6>>1]=j;s=s+1|0}if((s|0)==1)break;b:do if(s>>>0<13){o=1;while(1){if(o>>>0>=s>>>0)break b;n=g+(o<<3)|0;m=c[n>>2]|0;n=c[n+4>>2]|0;l=u;c[l>>2]=m;c[l+4>>2]=n;l=o;while(1){j=l;l=l+-1|0;k=g+(l<<3)|0;if(!(Kb(u,k)|0))break;p=k;q=c[p+4>>2]|0;r=g+(j<<3)|0;c[r>>2]=c[p>>2];c[r+4>>2]=q;if(!l){j=0;break}}r=g+(j<<3)|0;c[r>>2]=m;c[r+4>>2]=n;o=o+1|0}}else{p=s>>>0<57?2:0;while(1){if((p|0)==6)break b;j=c[19428+(p<<2)>>2]|0;q=j;while(1){if(q>>>0>=s>>>0)break;l=g+(q<<3)|0;k=c[l>>2]|0;l=c[l+4>>2]|0;o=v;c[o>>2]=k;c[o+4>>2]=l;o=q;while(1){if(o>>>0>>0)break;m=o-j|0;n=g+(m<<3)|0;if(!(Kb(v,n)|0))break;y=n;n=c[y+4>>2]|0;r=g+(o<<3)|0;c[r>>2]=c[y>>2];c[r+4>>2]=n;o=m}y=g+(o<<3)|0;c[y>>2]=k;c[y+4>>2]=l;q=q+1|0}p=p+1|0}}while(0);n=g+(s<<3)|0;c[n>>2]=-1;c[n+4>>2]=-1;n=s+1|0;r=g+(n<<3)|0;c[r>>2]=-1;c[r+4>>2]=-1;r=s<<1;m=0;j=s;while(1){j=j+-1|0;if(!j)break;l=c[g+(m<<3)>>2]|0;k=c[g+(n<<3)>>2]|0;if(l>>>0>k>>>0){q=n+1|0;k=c[g+(q<<3)>>2]|0;p=m;o=n}else{p=m+1|0;l=c[g+(p<<3)>>2]|0;q=n;o=m}if(l>>>0>k>>>0){m=p;n=q+1|0;l=q}else{k=l;m=p+1|0;n=q;l=p}y=r-j|0;c[g+(y<<3)>>2]=(c[g+(o<<3)>>2]|0)+k;b[g+(y<<3)+4>>1]=o;b[g+(y<<3)+6>>1]=l;y=g+(y+1<<3)|0;c[y>>2]=-1;c[y+4>>2]=-1}if(Gb(r+-1|0,g,h,f)|0){w=36;break}t=t<<1}if((w|0)==36){i=x;return}a[h+(b[g+6>>1]|0)>>0]=1;i=x;return}function Ib(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=0;g=0;while(1){if((g|0)==(b|0))break;f=(c[d+(g<<2)>>2]|0)==0?f:f+1|0;g=g+1|0}if(f>>>0<16)return;else k=b;while(1){if(!k){l=55;break}b=k+-1|0;if(!(c[d+(b<<2)>>2]|0))k=b;else break}if((l|0)==55)return;g=0;b=1073741824;h=0;while(1){if((h|0)==(k|0))break;f=c[d+(h<<2)>>2]|0;if(f){g=g+1|0;b=b>>>0>f>>>0?f:b}h=h+1|0}if(g>>>0<5)return;a:do if(b>>>0<4&(k-g|0)>>>0<6){b=k+-1|0;f=1;while(1){if(f>>>0>=b>>>0)break a;if(((c[d+(f+-1<<2)>>2]|0)!=0?(i=d+(f<<2)|0,(c[i>>2]|0)==0):0)?(c[d+(f+1<<2)>>2]|0)!=0:0)c[i>>2]=1;f=f+1|0}}while(0);if(g>>>0<28)return;ac(e|0,0,k|0)|0;b=0;i=0;f=c[d>>2]|0;while(1){if(i>>>0>k>>>0)break;g=(i|0)==(k|0);if(!g?(c[d+(i<<2)>>2]|0)==(f|0):0)b=b+1|0;else{if(!f){if(b>>>0>4){h=0;l=29}}else if(b>>>0>6){h=0;l=29}b:do if((l|0)==29)while(1){l=0;if((h|0)==(b|0))break b;a[e+(i-h+-1)>>0]=1;h=h+1|0;l=29}while(0);if(g)b=1;else{b=1;f=c[d+(i<<2)>>2]|0}}i=i+1|0}i=k+-2|0;f=(((c[d>>2]|0)+(c[d+4>>2]|0)+(c[d+8>>2]|0)<<8>>>0)/3|0)+420|0;j=0;g=0;b=0;while(1){if(j>>>0>k>>>0)break;h=(j|0)==(k|0);do if(!h?(a[e+j>>0]|0)==0:0){if((j|0)!=0?(a[e+(j+-1)>>0]|0)!=0:0){l=42;break}if(((c[d+(j<<2)>>2]<<8)-f+1240|0)>>>0>2479)l=42}else l=42;while(0);do if((l|0)==42){l=0;if(!(g>>>0<=3?!(g>>>0>2&(b|0)==0):0))l=44;c:do if((l|0)==44){l=0;f=((b+(g>>>1)|0)>>>0)/(g>>>0)|0;b=(b|0)==0?0:(f|0)==0?1:f;f=0;while(1){if((f|0)==(g|0))break c;c[d+(j-f+-1<<2)>>2]=b;f=f+1|0}}while(0);if(j>>>0>>0){f=(((c[d+(j<<2)>>2]|0)+(c[d+(j+1<<2)>>2]|0)+(c[d+(j+2<<2)>>2]|0)<<8>>>0)/3|0)+420|0;g=0;b=0;break}if(j>>>0>>0){f=c[d+(j<<2)>>2]<<8;g=0;b=0}else{f=0;g=0;b=0}}while(0);g=g+1|0;if(!h){b=b+(c[d+(j<<2)>>2]|0)|0;if(g>>>0>3){f=(((b<<8)+(g>>>1)|0)>>>0)/(g>>>0)|0;f=(g|0)==4?f+120|0:f}}j=j+1|0}return}function Jb(f,g,h){f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;p=i;i=i+64|0;l=p+32|0;o=p;j=l;k=j+32|0;do{b[j>>1]=0;j=j+2|0}while((j|0)<(k|0));j=0;while(1){if((j|0)==(g|0))break;n=l+((d[f+j>>0]|0)<<1)|0;b[n>>1]=(b[n>>1]|0)+1<<16>>16;j=j+1|0}b[l>>1]=0;b[o>>1]=0;j=0;k=1;while(1){if((k|0)==16){n=0;break}n=j+(e[l+(k+-1<<1)>>1]|0)<<1;b[o+(k<<1)>>1]=n;j=n;k=k+1|0}while(1){if((n|0)==(g|0))break;j=a[f+n>>0]|0;if(j<<24>>24){k=j&255;j=o+(k<<1)|0;l=b[j>>1]|0;b[j>>1]=l+1<<16>>16;j=l;l=c[19452+((l&15)<<2)>>2]|0;m=4;while(1){if(m>>>0>=k>>>0)break;q=(j&65535)>>>4;j=q;l=l<<4|c[19452+((q&15)<<2)>>2];m=m+4|0}b[h+(n<<1)>>1]=l>>>(0-k&3)}n=n+1|0}i=p;return}function Kb(a,d){a=a|0;d=d|0;var e=0,f=0;e=c[a>>2]|0;f=c[d>>2]|0;if((e|0)==(f|0)){d=(b[a+6>>1]|0)>(b[d+6>>1]|0);return d|0}else{d=e>>>0>>0;return d|0}return 0}function Lb(a,b){a=a|0;b=b|0;return Yb(b)|0}function Mb(a,b){a=a|0;b=b|0;Zb(b);return}function Nb(f,g,j,k,l,m,n,o,p,q,r){f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var t=0,u=0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0;Z=i;i=i+2096|0;W=Z;Za(f,o,p,g,j,k,l,r,r+24|0,r+48|0);Y=f+8|0;R=sa[c[f>>2]&1](c[Y>>2]|0,c[r>>2]<<2)|0;if(!R)oa(1);l=0;while(1){t=c[r>>2]|0;if(l>>>0>=t>>>0)break;c[R+(l<<2)>>2]=q;l=l+1|0}U=r+48|0;u=c[U>>2]|0;T=sa[c[f>>2]&1](c[Y>>2]|0,t*66560|0)|0;if(!T)oa(1);l=t<<6;q=0;while(1){if((q|0)==(l|0))break;ac(T+(q*1040|0)|0,0,1024)|0;c[T+(q*1040|0)+1024>>2]=0;h[T+(q*1040|0)+1032>>3]=s;q=q+1|0}v=r+96|0;if(c[v>>2]|0)pa(406774,406802,70,406832);t=c[r+24>>2]|0;l=r+100|0;c[l>>2]=t;t=sa[c[f>>2]&1](c[Y>>2]|0,t*2832|0)|0;if(!t)oa(1);c[v>>2]=t;l=c[l>>2]|0;q=0;while(1){if((q|0)==(l|0))break;ac(t+(q*2832|0)|0,0,2816)|0;c[t+(q*2832|0)+2816>>2]=0;h[t+(q*2832|0)+2824>>3]=s;q=q+1|0}X=sa[c[f>>2]&1](c[Y>>2]|0,u*8384|0)|0;if(!X)oa(1);l=u<<2;q=0;while(1){if((q|0)==(l|0))break;ac(X+(q*2096|0)|0,0,2080)|0;c[X+(q*2096|0)+2080>>2]=0;h[X+(q*2096|0)+2088>>3]=s;q=q+1|0}l=c[r+12>>2]|0;if(!l)u=0;else u=c[l>>2]|0;l=c[r+36>>2]|0;if(!l)q=0;else q=c[l>>2]|0;l=c[r+60>>2]|0;if(!l)l=0;else l=c[l>>2]|0;P=r+32|0;Q=r+36|0;K=c[v>>2]|0;L=r+8|0;M=r+12|0;N=r+56|0;O=r+60|0;v=n;z=0;t=0;A=0;y=0;C=0;B=0;J=0;while(1){if((J|0)==(p|0))break;if(!q){y=y+1|0;I=d[(c[P>>2]|0)+y>>0]|0;q=c[(c[Q>>2]|0)+(y<<2)>>2]|0}else I=A;G=o+(J<<4)+12|0;F=K+(I*2832|0)+((e[G>>1]|0)<<2)|0;c[F>>2]=(c[F>>2]|0)+1;F=K+(I*2832|0)+2816|0;c[F>>2]=(c[F>>2]|0)+1;F=c[o+(J<<4)>>2]|0;E=v;H=C;n=u;C=j;D=F;while(1){if(!D)break;if(!n){B=B+1|0;A=d[(c[L>>2]|0)+B>>0]|0;u=c[(c[M>>2]|0)+(B<<2)>>2]|0}else{A=H;u=n}n=u+-1|0;v=A<<6;switch(c[R+(A<<2)>>2]|0){case 0:{u=m&63;break}case 1:{u=(m&255)>>>2;break}case 2:{u=a[406969+(m&255)>>0]|a[406969+(E&255|256)>>0];break}case 3:{u=((d[407481+(m&255)>>0]|0)<<3)+(d[407481+(E&255)>>0]|0)&255;break}default:u=0}E=v+(u&255)|0;H=g+(C&k)|0;v=T+(E*1040|0)+((d[H>>0]|0)<<2)|0;c[v>>2]=(c[v>>2]|0)+1;E=T+(E*1040|0)+1024|0;c[E>>2]=(c[E>>2]|0)+1;E=m;m=a[H>>0]|0;H=A;C=C+1|0;D=D+-1|0}q=q+-1|0;D=c[o+(J<<4)+4>>2]&16777215;j=j+F+D|0;if(D){C=a[g+(j+-2&k)>>0]|0;m=a[g+(j+-1&k)>>0]|0;v=b[G>>1]|0;if((v&65535)>127){if(!l){A=t+1|0;z=d[(c[N>>2]|0)+A>>0]|0;l=c[(c[O>>2]|0)+(A<<2)>>2]|0}else A=t;l=l+-1|0;u=z<<2;G=v&65535;t=G&7;switch(G>>>6|0){case 7:case 4:case 2:case 0:{t=t>>>0<3?t:3;break}default:t=3}v=u+t|0;u=X+(v*2096|0)+((e[o+(J<<4)+14>>1]|0)<<2)|0;c[u>>2]=(c[u>>2]|0)+1;v=X+(v*2096|0)+2080|0;c[v>>2]=(c[v>>2]|0)+1;v=C;u=z;t=A}else{v=C;u=z}}else{v=E;u=z}z=u;A=I;C=H;u=n;J=J+1|0}H=f+4|0;ra[c[H>>2]&1](c[Y>>2]|0,R);t=r+72|0;if(c[t>>2]|0)pa(406853,406802,86,406832);l=c[r>>2]|0;q=r+76|0;c[q>>2]=l<<6;l=sa[c[f>>2]&1](c[Y>>2]|0,l<<8)|0;if(!l)oa(1);c[t>>2]=l;l=r+88|0;if(c[l>>2]|0)pa(406882,406802,92,406832);j=c[q>>2]|0;G=r+92|0;c[G>>2]=j;j=sa[c[f>>2]&1](c[Y>>2]|0,j*1040|0)|0;if(!j)oa(1);c[l>>2]=j;F=c[q>>2]|0;l=c[t>>2]|0;C=F<<2;n=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!n)oa(1);D=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!D)oa(1);v=sa[c[f>>2]&1](c[Y>>2]|0,49176)|0;if(!v)oa(1);q=0;while(1){if((q|0)==(F|0))break;c[n+(q<<2)>>2]=1;q=q+1|0}E=l;l=0;while(1){if((l|0)==(F|0))break;g=T+(l*1040|0)|0;dc(j+(l*1040|0)|0,g|0,1040)|0;h[j+(l*1040|0)+1032>>3]=+Wa(g);c[E+(l<<2)>>2]=l;l=l+1|0}u=0;q=0;while(1){if(F>>>0<=q>>>0)break;l=F-q|0;l=l>>>0<64?l:64;t=0;while(1){if((t|0)==(l|0))break;c[D+(u+t<<2)>>2]=q+t;t=t+1|0}u=u+(pb(j,n,E+(q<<2)|0,D+(u<<2)|0,v,l,l,256,2048)|0)|0;q=q+64|0}l=u<<6;t=_(u>>>1,u)|0;t=l>>>0>>0?l:t;l=t+1|0;do if(l>>>0>2048){q=2048;while(1){if(q>>>0>=l>>>0)break;q=q<<1}l=sa[c[f>>2]&1](c[Y>>2]|0,q*24|0)|0;if(!l)oa(1);else{dc(l|0,v|0,49152)|0;ra[c[H>>2]&1](c[Y>>2]|0,v);S=l;break}}else S=v;while(0);B=pb(j,n,E,D,S,u,F,256,t)|0;ra[c[H>>2]&1](c[Y>>2]|0,S);ra[c[H>>2]&1](c[Y>>2]|0,n);m=W+1024|0;y=W+1024|0;A=0;while(1){if((A|0)==(F|0)){l=0;break}t=c[((A|0)==0?E:E+(A+-1<<2)|0)>>2]|0;l=T+(A*1040|0)|0;z=T+(A*1040|0)+1024|0;if(!(c[z>>2]|0))w=0.0;else{dc(W|0,l|0,1040)|0;c[y>>2]=(c[y>>2]|0)+(c[j+(t*1040|0)+1024>>2]|0);q=0;while(1){if((q|0)==256)break;S=W+(q<<2)|0;c[S>>2]=(c[S>>2]|0)+(c[j+(t*1040|0)+(q<<2)>>2]|0);q=q+1|0}w=+Wa(W);w=w-+h[j+(t*1040|0)+1032>>3]}q=t;n=0;while(1){if((n|0)==(B|0))break;v=D+(n<<2)|0;t=c[v>>2]|0;if(!(c[z>>2]|0))x=0.0;else{dc(W|0,l|0,1040)|0;c[m>>2]=(c[m>>2]|0)+(c[j+(t*1040|0)+1024>>2]|0);u=0;while(1){if((u|0)==256)break;S=W+(u<<2)|0;c[S>>2]=(c[S>>2]|0)+(c[j+(t*1040|0)+(u<<2)>>2]|0);u=u+1|0}x=+Wa(W);x=x-+h[j+(t*1040|0)+1032>>3]}if(x>2]|0}n=n+1|0}c[E+(A<<2)>>2]=q;A=A+1|0}while(1){if((l|0)==(B|0)){q=0;break}S=c[D+(l<<2)>>2]|0;ac(j+(S*1040|0)|0,0,1024)|0;c[j+(S*1040|0)+1024>>2]=0;h[j+(S*1040|0)+1032>>3]=s;l=l+1|0}while(1){if((q|0)==(F|0))break;l=c[E+(q<<2)>>2]|0;t=j+(l*1040|0)+1024|0;c[t>>2]=(c[t>>2]|0)+(c[T+(q*1040|0)+1024>>2]|0);t=0;while(1){if((t|0)==256)break;S=j+(l*1040|0)+(t<<2)|0;c[S>>2]=(c[S>>2]|0)+(c[T+(q*1040|0)+(t<<2)>>2]|0);t=t+1|0}q=q+1|0}ra[c[H>>2]&1](c[Y>>2]|0,D);m=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!m)oa(1);l=0;while(1){if((l|0)==(F|0)){l=0;t=0;break}c[m+(l<<2)>>2]=-1;l=l+1|0}while(1){if((t|0)==(F|0))break;q=m+(c[E+(t<<2)>>2]<<2)|0;if((c[q>>2]|0)==-1){c[q>>2]=l;l=l+1|0}t=t+1|0}n=sa[c[f>>2]&1](c[Y>>2]|0,l*1040|0)|0;if(!n)oa(1);u=0;v=0;while(1){if((v|0)==(F|0))break;t=E+(v<<2)|0;l=c[t>>2]|0;q=c[m+(l<<2)>>2]|0;if((q|0)==(u|0)){dc(n+(u*1040|0)|0,j+(l*1040|0)|0,1040)|0;q=c[m+(c[t>>2]<<2)>>2]|0;l=u+1|0}else l=u;c[t>>2]=q;u=l;v=v+1|0}ra[c[H>>2]&1](c[Y>>2]|0,m);l=0;while(1){if((l|0)==(u|0))break;dc(j+(l*1040|0)|0,n+(l*1040|0)|0,1040)|0;l=l+1|0}ra[c[H>>2]&1](c[Y>>2]|0,n);c[G>>2]=u;ra[c[H>>2]&1](c[Y>>2]|0,T);t=r+80|0;if(c[t>>2]|0)pa(406910,406802,106,406832);l=c[U>>2]|0;q=r+84|0;c[q>>2]=l<<2;l=sa[c[f>>2]&1](c[Y>>2]|0,l<<4)|0;if(!l)oa(1);c[t>>2]=l;l=r+104|0;if(c[l>>2]|0)pa(406940,406802,112,406832);j=c[q>>2]|0;G=r+108|0;c[G>>2]=j;j=sa[c[f>>2]&1](c[Y>>2]|0,j*2096|0)|0;if(!j)oa(1);c[l>>2]=j;F=c[q>>2]|0;l=c[t>>2]|0;C=F<<2;n=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!n)oa(1);D=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!D)oa(1);v=sa[c[f>>2]&1](c[Y>>2]|0,49176)|0;if(!v)oa(1);q=0;while(1){if((q|0)==(F|0))break;c[n+(q<<2)>>2]=1;q=q+1|0}E=l;l=0;while(1){if((l|0)==(F|0))break;r=X+(l*2096|0)|0;dc(j+(l*2096|0)|0,r|0,2096)|0;h[j+(l*2096|0)+2088>>3]=+Ya(r);c[E+(l<<2)>>2]=l;l=l+1|0}u=0;q=0;while(1){if(F>>>0<=q>>>0)break;l=F-q|0;l=l>>>0<64?l:64;t=0;while(1){if((t|0)==(l|0))break;c[D+(u+t<<2)>>2]=q+t;t=t+1|0}u=u+(tb(j,n,E+(q<<2)|0,D+(u<<2)|0,v,l,l,256,2048)|0)|0;q=q+64|0}l=u<<6;t=_(u>>>1,u)|0;t=l>>>0>>0?l:t;l=t+1|0;do if(l>>>0>2048){q=2048;while(1){if(q>>>0>=l>>>0)break;q=q<<1}l=sa[c[f>>2]&1](c[Y>>2]|0,q*24|0)|0;if(!l)oa(1);else{dc(l|0,v|0,49152)|0;ra[c[H>>2]&1](c[Y>>2]|0,v);V=l;break}}else V=v;while(0);B=tb(j,n,E,D,V,u,F,256,t)|0;ra[c[H>>2]&1](c[Y>>2]|0,V);ra[c[H>>2]&1](c[Y>>2]|0,n);m=W+2080|0;y=W+2080|0;A=0;while(1){if((A|0)==(F|0)){l=0;break}t=c[((A|0)==0?E:E+(A+-1<<2)|0)>>2]|0;l=X+(A*2096|0)|0;z=X+(A*2096|0)+2080|0;if(!(c[z>>2]|0))w=0.0;else{dc(W|0,l|0,2096)|0;c[y>>2]=(c[y>>2]|0)+(c[j+(t*2096|0)+2080>>2]|0);q=0;while(1){if((q|0)==520)break;V=W+(q<<2)|0;c[V>>2]=(c[V>>2]|0)+(c[j+(t*2096|0)+(q<<2)>>2]|0);q=q+1|0}w=+Ya(W);w=w-+h[j+(t*2096|0)+2088>>3]}q=t;n=0;while(1){if((n|0)==(B|0))break;v=D+(n<<2)|0;t=c[v>>2]|0;if(!(c[z>>2]|0))x=0.0;else{dc(W|0,l|0,2096)|0;c[m>>2]=(c[m>>2]|0)+(c[j+(t*2096|0)+2080>>2]|0);u=0;while(1){if((u|0)==520)break;V=W+(u<<2)|0;c[V>>2]=(c[V>>2]|0)+(c[j+(t*2096|0)+(u<<2)>>2]|0);u=u+1|0}x=+Ya(W);x=x-+h[j+(t*2096|0)+2088>>3]}if(x>2]|0}n=n+1|0}c[E+(A<<2)>>2]=q;A=A+1|0}while(1){if((l|0)==(B|0)){q=0;break}W=c[D+(l<<2)>>2]|0;ac(j+(W*2096|0)|0,0,2080)|0;c[j+(W*2096|0)+2080>>2]=0;h[j+(W*2096|0)+2088>>3]=s;l=l+1|0}while(1){if((q|0)==(F|0))break;l=c[E+(q<<2)>>2]|0;t=j+(l*2096|0)+2080|0;c[t>>2]=(c[t>>2]|0)+(c[X+(q*2096|0)+2080>>2]|0);t=0;while(1){if((t|0)==520)break;W=j+(l*2096|0)+(t<<2)|0;c[W>>2]=(c[W>>2]|0)+(c[X+(q*2096|0)+(t<<2)>>2]|0);t=t+1|0}q=q+1|0}ra[c[H>>2]&1](c[Y>>2]|0,D);m=sa[c[f>>2]&1](c[Y>>2]|0,C)|0;if(!m)oa(1);l=0;while(1){if((l|0)==(F|0)){l=0;t=0;break}c[m+(l<<2)>>2]=-1;l=l+1|0}while(1){if((t|0)==(F|0))break;q=m+(c[E+(t<<2)>>2]<<2)|0;if((c[q>>2]|0)==-1){c[q>>2]=l;l=l+1|0}t=t+1|0}n=sa[c[f>>2]&1](c[Y>>2]|0,l*2096|0)|0;if(!n)oa(1);u=0;v=0;while(1){if((v|0)==(F|0))break;t=E+(v<<2)|0;l=c[t>>2]|0;q=c[m+(l<<2)>>2]|0;if((q|0)==(u|0)){dc(n+(u*2096|0)|0,j+(l*2096|0)|0,2096)|0;q=c[m+(c[t>>2]<<2)>>2]|0;l=u+1|0}else l=u;c[t>>2]=q;u=l;v=v+1|0}ra[c[H>>2]&1](c[Y>>2]|0,m);l=0;while(1){if((l|0)==(u|0))break;dc(j+(l*2096|0)|0,n+(l*2096|0)|0,2096)|0;l=l+1|0}ra[c[H>>2]&1](c[Y>>2]|0,n);c[G>>2]=u;ra[c[H>>2]&1](c[Y>>2]|0,X);i=Z;return}function Ob(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;j=i;i=i+704|0;h=j;e=d+92|0;f=d+88|0;g=0;while(1){if(g>>>0>=(c[e>>2]|0)>>>0)break;Ib(256,(c[f>>2]|0)+(g*1040|0)|0,h);g=g+1|0}e=d+100|0;f=d+96|0;g=0;while(1){if(g>>>0>=(c[e>>2]|0)>>>0)break;Ib(704,(c[f>>2]|0)+(g*2832|0)|0,h);g=g+1|0}g=a+16+(48<>>0>=(c[b>>2]|0)>>>0)break;Ib(g,(c[e>>2]|0)+(f*2096|0)|0,h);f=f+1|0}i=j;return}function Pb(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=(d>>>10)+1|0;n=o>>>0<257?o:257;c[b>>2]=704;c[b+4>>2]=1024;h[b+8>>3]=500.0;c[b+16>>2]=0;p=b+20|0;c[p>>2]=e;c[b+28>>2]=g;c[b+32>>2]=1024;c[b+36>>2]=0;c[b+40>>2]=0;c[b+72>>2]=0;m=e+16|0;d=c[m>>2]|0;if(d>>>0>>0){l=(d|0)==0?o:d;while(1){if(l>>>0>=o>>>0)break;l=l<<1}i=a+8|0;j=sa[c[a>>2]&1](c[i>>2]|0,l)|0;if(!j)oa(1);k=c[m>>2]|0;d=e+8|0;if(k)dc(j|0,c[d>>2]|0,k|0)|0;ra[c[a+4>>2]&1](c[i>>2]|0,c[d>>2]|0);c[d>>2]=j;c[m>>2]=l}m=e+20|0;d=c[m>>2]|0;if(d>>>0>>0){l=(d|0)==0?o:d;while(1){if(l>>>0>=o>>>0)break;l=l<<1}i=a+8|0;j=sa[c[a>>2]&1](c[i>>2]|0,l<<2)|0;if(!j)oa(1);k=c[m>>2]|0;d=e+12|0;if(k)dc(j|0,c[d>>2]|0,k<<2|0)|0;ra[c[a+4>>2]&1](c[i>>2]|0,c[d>>2]|0);c[d>>2]=j;c[m>>2]=l}c[(c[p>>2]|0)+4>>2]=o;if(c[f>>2]|0)pa(407776,407818,70,407880);c[g>>2]=n;d=sa[c[a>>2]&1](c[a+8>>2]|0,n*2832|0)|0;i=d;if(!d)oa(1);else{c[f>>2]=i;c[b+24>>2]=i;ac(d|0,0,2816)|0;c[d+2816>>2]=0;h[d+2824>>3]=s;c[b+48>>2]=0;c[b+44>>2]=0;return}}function Qb(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=(d>>>9)+1|0;n=o>>>0<257?o:257;c[b>>2]=64;c[b+4>>2]=512;h[b+8>>3]=100.0;c[b+16>>2]=0;p=b+20|0;c[p>>2]=e;c[b+28>>2]=g;c[b+32>>2]=512;c[b+36>>2]=0;c[b+40>>2]=0;c[b+72>>2]=0;m=e+16|0;d=c[m>>2]|0;if(d>>>0>>0){l=(d|0)==0?o:d;while(1){if(l>>>0>=o>>>0)break;l=l<<1}i=a+8|0;j=sa[c[a>>2]&1](c[i>>2]|0,l)|0;if(!j)oa(1);k=c[m>>2]|0;d=e+8|0;if(k)dc(j|0,c[d>>2]|0,k|0)|0;ra[c[a+4>>2]&1](c[i>>2]|0,c[d>>2]|0);c[d>>2]=j;c[m>>2]=l}m=e+20|0;d=c[m>>2]|0;if(d>>>0>>0){l=(d|0)==0?o:d;while(1){if(l>>>0>=o>>>0)break;l=l<<1}i=a+8|0;j=sa[c[a>>2]&1](c[i>>2]|0,l<<2)|0;if(!j)oa(1);k=c[m>>2]|0;d=e+12|0;if(k)dc(j|0,c[d>>2]|0,k<<2|0)|0;ra[c[a+4>>2]&1](c[i>>2]|0,c[d>>2]|0);c[d>>2]=j;c[m>>2]=l}c[(c[p>>2]|0)+4>>2]=o;if(c[f>>2]|0)pa(407776,407818,70,407854);c[g>>2]=n;d=sa[c[a>>2]&1](c[a+8>>2]|0,n*2096|0)|0;i=d;if(!d)oa(1);else{c[f>>2]=i;c[b+24>>2]=i;ac(d|0,0,2080)|0;c[d+2080>>2]=0;h[d+2088>>3]=s;c[b+48>>2]=0;c[b+44>>2]=0;return}}function Rb(b,d){b=b|0;d=d|0;var e=0,f=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=i;i=i+2112|0;y=J+32|0;x=J+16|0;z=J;G=c[b+20>>2]|0;F=b+56|0;e=c[b+24>>2]|0;I=b+36|0;H=c[I>>2]|0;D=b+4|0;B=c[D>>2]|0;B=H>>>0>B>>>0?H:B;c[I>>2]=B;H=b+16|0;w=c[H>>2]|0;do if(w){if(B){E=b+40|0;u=c[E>>2]|0;C=e;q=c[b>>2]|0;e=C+(u*1040|0)|0;o=C+(u*1040|0)+(q<<2)|0;t=(q&1|0)==0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=27}while(1){if((A|0)==27){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=27}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}r=f>2]|0;dc(y+(p*1040|0)|0,C+(u*1040|0)|0,1040)|0;m=y+(p*1040|0)+1024|0;c[m>>2]=(c[m>>2]|0)+(c[C+(e*1040|0)+1024>>2]|0);m=0;while(1){if((m|0)==256)break;o=y+(p*1040|0)+(m<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[C+(e*1040|0)+(m<<2)>>2]|0);m=m+1|0}e=y+(p*1040|0)|0;o=y+(p*1040|0)+(q<<2)|0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=47}while(1){if((A|0)==47){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=47}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}l=f>3]=l;h[z+(p<<3)>>3]=l-r-+h[b+56+(p<<3)>>3];p=p+1|0}e=G;f=+h[z>>3];if(((c[e>>2]|0)>>>0<256?(v=+h[b+8>>3],f>v):0)?+h[z+8>>3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{p=G;c[c[p+12>>2]>>2]=B;a[c[p+8>>2]>>0]=0;q=e;E=c[b>>2]|0;o=q+(E<<2)|0;if(!(E&1)){f=0.0;n=0}else{k=0.0;n=0;A=8}while(1){if((A|0)==8){m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=8}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}v=f>3]=v;h[b+64>>3]=v;c[H>>2]=(c[H>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+1;F=b+40|0;e=(c[F>>2]|0)+1|0;c[F>>2]=e;if(e>>>0<(c[c[b+28>>2]>>2]|0)>>>0){ac(q+(e*1040|0)|0,0,1024)|0;c[q+(e*1040|0)+1024>>2]=0;h[q+(e*1040|0)+1032>>3]=s}c[I>>2]=0}while(0);if(!d){i=J;return}d=G;c[c[b+28>>2]>>2]=c[d>>2];c[d+4>>2]=c[H>>2];i=J;return}function Sb(b,d){b=b|0;d=d|0;var e=0,f=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=i;i=i+5696|0;y=J+32|0;x=J+16|0;z=J;G=c[b+20>>2]|0;F=b+56|0;e=c[b+24>>2]|0;I=b+36|0;H=c[I>>2]|0;D=b+4|0;B=c[D>>2]|0;B=H>>>0>B>>>0?H:B;c[I>>2]=B;H=b+16|0;w=c[H>>2]|0;do if(w){if(B){E=b+40|0;u=c[E>>2]|0;C=e;q=c[b>>2]|0;e=C+(u*2832|0)|0;o=C+(u*2832|0)+(q<<2)|0;t=(q&1|0)==0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=27}while(1){if((A|0)==27){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=27}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}r=f>2]|0;dc(y+(p*2832|0)|0,C+(u*2832|0)|0,2832)|0;m=y+(p*2832|0)+2816|0;c[m>>2]=(c[m>>2]|0)+(c[C+(e*2832|0)+2816>>2]|0);m=0;while(1){if((m|0)==704)break;o=y+(p*2832|0)+(m<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[C+(e*2832|0)+(m<<2)>>2]|0);m=m+1|0}e=y+(p*2832|0)|0;o=y+(p*2832|0)+(q<<2)|0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=47}while(1){if((A|0)==47){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=47}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}l=f>3]=l;h[z+(p<<3)>>3]=l-r-+h[b+56+(p<<3)>>3];p=p+1|0}e=G;f=+h[z>>3];if(((c[e>>2]|0)>>>0<256?(v=+h[b+8>>3],f>v):0)?+h[z+8>>3]>v:0){c[(c[e+12>>2]|0)+(w<<2)>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8>>2]>>0]=0;q=e;E=c[b>>2]|0;o=q+(E<<2)|0;if(!(E&1)){f=0.0;n=0}else{k=0.0;n=0;A=8}while(1){if((A|0)==8){m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=8}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}v=f>3]=v;h[b+64>>3]=v;c[H>>2]=(c[H>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+1;F=b+40|0;e=(c[F>>2]|0)+1|0;c[F>>2]=e;if(e>>>0<(c[c[b+28>>2]>>2]|0)>>>0){ac(q+(e*2832|0)|0,0,2816)|0;c[q+(e*2832|0)+2816>>2]=0;h[q+(e*2832|0)+2824>>3]=s}c[I>>2]=0}while(0);if(!d){i=J;return}d=G;c[c[b+28>>2]>>2]=c[d>>2];c[d+4>>2]=c[H>>2];i=J;return}function Tb(b,d){b=b|0;d=d|0;var e=0,f=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=i;i=i+4224|0;y=J+32|0;x=J+16|0;z=J;G=c[b+20>>2]|0;F=b+56|0;e=c[b+24>>2]|0;I=b+36|0;H=c[I>>2]|0;D=b+4|0;B=c[D>>2]|0;B=H>>>0>B>>>0?H:B;c[I>>2]=B;H=b+16|0;w=c[H>>2]|0;do if(w){if(B){E=b+40|0;u=c[E>>2]|0;C=e;q=c[b>>2]|0;e=C+(u*2096|0)|0;o=C+(u*2096|0)+(q<<2)|0;t=(q&1|0)==0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=27}while(1){if((A|0)==27){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=27}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}r=f>2]|0;dc(y+(p*2096|0)|0,C+(u*2096|0)|0,2096)|0;m=y+(p*2096|0)+2080|0;c[m>>2]=(c[m>>2]|0)+(c[C+(e*2096|0)+2080>>2]|0);m=0;while(1){if((m|0)==520)break;o=y+(p*2096|0)+(m<<2)|0;c[o>>2]=(c[o>>2]|0)+(c[C+(e*2096|0)+(m<<2)>>2]|0);m=m+1|0}e=y+(p*2096|0)|0;o=y+(p*2096|0)+(q<<2)|0;if(t){f=0.0;n=0}else{k=0.0;n=0;A=47}while(1){if((A|0)==47){A=0;m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=47}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}l=f>3]=l;h[z+(p<<3)>>3]=l-r-+h[b+56+(p<<3)>>3];p=p+1|0}e=G;f=+h[z>>3];if(((c[e>>2]|0)>>>0<256?(v=+h[b+8>>3],f>v):0)?+h[z+8>>3]>v:0){c[(c[e+12>>2]|0)+(w<<2)>>2]=B;a[(c[e+8>>2]|0)+(c[H>>2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=q+(E<<2)|0;if(!(E&1)){f=0.0;n=0}else{k=0.0;n=0;A=8}while(1){if((A|0)==8){m=c[e>>2]|0;f=+(m>>>0);if(m>>>0<256)j=+g[19516+(m<<2)>>2];else j=+Xb(f);e=e+4|0;f=k-f*j;n=n+m|0}if(e>>>0>=o>>>0)break;m=c[e>>2]|0;j=+(m>>>0);if(m>>>0<256)k=+g[19516+(m<<2)>>2];else k=+Xb(j);e=e+4|0;k=f-j*k;n=n+m|0;A=8}l=+(n>>>0);if(!n)k=l;else{if(n>>>0<256)j=+g[19516+(n<<2)>>2];else j=+Xb(l);k=l;f=f+l*j}v=f>3]=v;h[b+64>>3]=v;c[H>>2]=(c[H>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+1;F=b+40|0;e=(c[F>>2]|0)+1|0;c[F>>2]=e;if(e>>>0<(c[c[b+28>>2]>>2]|0)>>>0){ac(q+(e*2096|0)|0,0,2080)|0;c[q+(e*2096|0)+2080>>2]=0;h[q+(e*2096|0)+2088>>3]=s}c[I>>2]=0}while(0);if(!d){i=J;return}d=G;c[c[b+28>>2]>>2]=c[d>>2];c[d+4>>2]=c[H>>2];i=J;return}function Ub(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=i;i=i+16|0;z=N;K=c[d+28>>2]|0;I=d+4|0;L=c[I>>2]|0;l=c[d+60>>2]|0;H=d+32|0;k=c[H>>2]|0;M=d+44|0;j=c[M>>2]|0;F=d+12|0;f=c[F>>2]|0;if(j>>>0>>0)c[M>>2]=f;else f=j;J=d+24|0;if(c[J>>2]|0){if(f){C=b+8|0;D=sa[c[b>>2]&1](c[C>>2]|0,L<<3)|0;if(!D)oa(1);E=sa[c[b>>2]&1](c[C>>2]|0,L*2080|0)|0;if(!E)oa(1);B=sa[c[b>>2]&1](c[C>>2]|0,L<<4)|0;if(!B)oa(1);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;A=d+48|0;x=0;while(1){if((x|0)==(L|0))break;t=(c[A>>2]|0)+x|0;w=c[d>>2]|0;f=k+(t*1040|0)|0;r=k+(t*1040|0)+(w<<2)|0;if(!(w&1)){m=0.0;q=0}else{o=0.0;q=0;G=42}while(1){if((G|0)==42){G=0;j=c[f>>2]|0;m=+(j>>>0);if(j>>>0<256)n=+g[19516+(j<<2)>>2];else n=+Xb(m);f=f+4|0;m=o-m*n;q=q+j|0}if(f>>>0>=r>>>0)break;j=c[f>>2]|0;n=+(j>>>0);if(j>>>0<256)o=+g[19516+(j<<2)>>2];else o=+Xb(n);f=f+4|0;o=m-n*o;q=q+j|0;G=42}o=+(q>>>0);if(!q)p=o;else{if(q>>>0<256)n=+g[19516+(q<<2)>>2];else n=+Xb(o);p=o;m=m+o*n}w=D+(x<<3)|0;h[w>>3]=m>2]|0)+x|0;dc(E+(u*1040|0)|0,t|0,1040)|0;j=E+(u*1040|0)+1024|0;c[j>>2]=(c[j>>2]|0)+(c[k+(f*1040|0)+1024>>2]|0);j=0;while(1){if((j|0)==256)break;r=E+(u*1040|0)+(j<<2)|0;c[r>>2]=(c[r>>2]|0)+(c[k+(f*1040|0)+(j<<2)>>2]|0);j=j+1|0}q=c[d>>2]|0;f=E+(u*1040|0)|0;r=E+(u*1040|0)+(q<<2)|0;if(!(q&1)){m=0.0;q=0}else{o=0.0;q=0;G=62}while(1){if((G|0)==62){G=0;j=c[f>>2]|0;m=+(j>>>0);if(j>>>0<256)n=+g[19516+(j<<2)>>2];else n=+Xb(m);f=f+4|0;m=o-m*n;q=q+j|0}if(f>>>0>=r>>>0)break;j=c[f>>2]|0;n=+(j>>>0);if(j>>>0<256)o=+g[19516+(j<<2)>>2];else o=+Xb(n);f=f+4|0;o=m-n*o;q=q+j|0;G=62}p=+(q>>>0);if(!q)o=p;else{if(q>>>0<256)n=+g[19516+(q<<2)>>2];else n=+Xb(p);o=p;m=m+p*n}p=m>3]=p;r=z+(v<<3)|0;h[r>>3]=+h[r>>3]+(p-+h[w>>3]-+h[l+(u<<3)>>3]);v=v+1|0}x=x+1|0}q=K;m=+h[z>>3];if(((c[q>>2]|0)>>>0<(c[d+8>>2]|0)>>>0?(y=+h[d+16>>3],m>y):0)?+h[z+8>>3]>y:0){c[(c[q+12>>2]|0)+(c[J>>2]<<2)>>2]=c[M>>2];a[(c[q+8>>2]|0)+(c[J>>2]|0)>>0]=c[q>>2];f=d+52|0;c[d+56>>2]=c[f>>2];c[f>>2]=_(c[q>>2]|0,L)|0;f=0;while(1){if((f|0)==(L|0))break;z=l+(f<<3)|0;h[l+(L+f<<3)>>3]=+h[z>>3];h[z>>3]=+h[D+(f<<3)>>3];f=f+1|0}c[J>>2]=(c[J>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+1;l=(c[A>>2]|0)+L|0;c[A>>2]=l;a:do if(l>>>0<(c[c[d+36>>2]>>2]|0)>>>0){k=c[H>>2]|0;f=c[I>>2]|0;j=0;while(1){if((j|0)==(f|0))break a;I=l+j|0;ac(k+(I*1040|0)|0,0,1024)|0;c[k+(I*1040|0)+1024>>2]=0;h[k+(I*1040|0)+1032>>3]=s;j=j+1|0}}while(0);c[M>>2]=0;c[d+64>>2]=0;c[d+40>>2]=c[F>>2]}else G=84;do if((G|0)==84){f=c[M>>2]|0;j=c[J>>2]|0;if(+h[z+8>>3]>2]|0)+(j<<2)>>2]=f;f=c[J>>2]|0;I=c[q+8>>2]|0;a[I+f>>0]=a[I+(f+-2)>>0]|0;f=d+52|0;I=c[f>>2]|0;j=d+56|0;c[f>>2]=c[j>>2];c[j>>2]=I;j=0;while(1){if((j|0)==(L|0))break;H=L+j|0;dc(k+(((c[f>>2]|0)+j|0)*1040|0)|0,E+(H*1040|0)|0,1040)|0;I=l+(j<<3)|0;h[l+(H<<3)>>3]=+h[I>>3];h[I>>3]=+h[B+(H<<3)>>3];I=(c[A>>2]|0)+j|0;ac(k+(I*1040|0)|0,0,1024)|0;c[k+(I*1040|0)+1024>>2]=0;h[k+(I*1040|0)+1032>>3]=s;j=j+1|0}c[J>>2]=(c[J>>2]|0)+1;c[M>>2]=0;c[d+64>>2]=0;c[d+40>>2]=c[F>>2];break}j=(c[q+12>>2]|0)+(j+-1<<2)|0;c[j>>2]=(c[j>>2]|0)+f;f=d+52|0;j=0;while(1){if((j|0)==(L|0))break;dc(k+(((c[f>>2]|0)+j|0)*1040|0)|0,E+(j*1040|0)|0,1040)|0;m=+h[B+(j<<3)>>3];h[l+(j<<3)>>3]=m;if((c[q>>2]|0)==1)h[l+(L+j<<3)>>3]=m;I=(c[A>>2]|0)+j|0;ac(k+(I*1040|0)|0,0,1024)|0;c[k+(I*1040|0)+1024>>2]=0;h[k+(I*1040|0)+1032>>3]=s;j=j+1|0}c[M>>2]=0;I=d+64|0;M=(c[I>>2]|0)+1|0;c[I>>2]=M;if(M>>>0>1){M=d+40|0;c[M>>2]=(c[M>>2]|0)+(c[F>>2]|0)}}while(0);M=b+4|0;ra[c[M>>2]&1](c[C>>2]|0,B);ra[c[M>>2]&1](c[C>>2]|0,E);ra[c[M>>2]&1](c[C>>2]|0,D)}}else{u=K;c[c[u+12>>2]>>2]=f;a[c[u+8>>2]>>0]=0;t=k;r=0;while(1){if((r|0)==(L|0))break;b=c[d>>2]|0;f=t+(r*1040|0)|0;q=t+(r*1040|0)+(b<<2)|0;if(!(b&1)){m=0.0;k=0}else{o=0.0;k=0;G=12}while(1){if((G|0)==12){G=0;j=c[f>>2]|0;m=+(j>>>0);if(j>>>0<256)n=+g[19516+(j<<2)>>2];else n=+Xb(m);f=f+4|0;m=o-m*n;k=k+j|0}if(f>>>0>=q>>>0)break;j=c[f>>2]|0;n=+(j>>>0);if(j>>>0<256)o=+g[19516+(j<<2)>>2];else o=+Xb(n);f=f+4|0;o=m-n*o;k=k+j|0;G=12}p=+(k>>>0);if(!k)o=p;else{if(k>>>0<256)n=+g[19516+(k<<2)>>2];else n=+Xb(p);o=p;m=m+p*n}y=m>3]=y;h[l+(L+r<<3)>>3]=y;r=r+1|0}c[J>>2]=(c[J>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+1;G=d+48|0;l=(c[G>>2]|0)+L|0;c[G>>2]=l;b:do if(l>>>0<(c[c[d+36>>2]>>2]|0)>>>0){k=c[H>>2]|0;f=c[I>>2]|0;j=0;while(1){if((j|0)==(f|0))break b;I=l+j|0;ac(k+(I*1040|0)|0,0,1024)|0;c[k+(I*1040|0)+1024>>2]=0;h[k+(I*1040|0)+1032>>3]=s;j=j+1|0}}while(0);c[M>>2]=0}if(!e){i=N;return}e=K;M=_(c[e>>2]|0,L)|0;c[c[d+36>>2]>>2]=M;c[e+4>>2]=c[J>>2];i=N;return}function Vb(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;v=f;k=b[88430+((_(d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24,506832829)|0)>>>17<<1)>>1]|0;D=f+1|0;B=D;l=k<<16>>16==0&1;j=0;k=k&65535;a:while(1){if(l<<24>>24)break;w=k+1|0;m=153966+(k<<2)|0;m=e[m>>1]|e[m+2>>1]<<16;k=m>>>8&255;s=m>>>16;t=m&127;u=d[280786+t>>0]|0;r=1<>>7;if(k<<24>>24){r=k<<24>>24!=10;if(t>>>0>h>>>0){A=j;k=w;j=A;continue}q=(c[11272+(t<<2)>>2]|0)+(_(t,m>>>16)|0)|0;k=280811+q|0;b:do switch((m>>>8&255)<<24>>24){case 0:{p=f+t|0;m=f+(t+-4)|0;o=0;k=v;while(1){n=k;if(n>>>0>m>>>0)break;z=k;A=280811+(q+o)|0;if((d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24|0)!=(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0))break;o=o+4|0;k=n+4|0}while(1){if(k>>>0>=p>>>0)break;if((a[280811+(q+o)>>0]|0)!=(a[k>>0]|0))break;o=o+1|0;k=k+1|0}if((o|0)!=(t|0)){A=j;k=w;j=A;continue a}break}case 10:{k=a[k>>0]|0;if(!((k&255)>96&(k&255)<123)){A=j;k=w;j=A;continue a}if((k&255^32|0)!=(d[f>>0]|0)){A=j;k=w;j=A;continue a}p=q+1|0;q=f+t|0;m=f+(t+-4)|0;o=0;k=B;while(1){n=k;if(n>>>0>m>>>0)break;z=k;A=280811+(p+o)|0;if((d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24|0)!=(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0))break;o=o+4|0;k=n+4|0}while(1){if(k>>>0>=q>>>0)break;if((a[280811+(p+o)>>0]|0)!=(a[k>>0]|0))break;o=o+1|0;k=k+1|0}if((o|0)!=(t+-1|0)){A=j;k=w;j=A;continue a}break}default:{m=0;while(1){if(m>>>0>=t>>>0)break b;k=a[280811+(q+m)>>0]|0;if((k&255)>96&(k&255)<123){if((k&255^32|0)!=(d[f+m>>0]|0)){A=j;k=w;j=A;continue a}}else if(k<<24>>24!=(a[f+m>>0]|0)){A=j;k=w;j=A;continue a}m=m+1|0}}}while(0);A=(s+((r?44:9)<>2]|0;c[j>>2]=z>>>0>>0?z:A;j=t+1|0;if(j>>>0>=h>>>0){j=1;k=w;continue}switch(a[f+t>>0]|0){case 32:{k=(s+(((r&1)<<6|4)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 34:{z=(s+((r?87:66)<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=62){j=1;k=w;continue a}k=(s+((r?97:69)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 46:{z=(s+((r?101:79)<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=32){j=1;k=w;continue a}k=(s+((r?114:88)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 44:{z=(s+((r?112:99)<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=32){j=1;k=w;continue a}k=(s+((r?107:58)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 39:{k=(s+((r?94:74)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 40:{k=(s+((r?113:78)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 61:switch(a[f+(t+1)>>0]|0){case 34:{k=(s+((r&1|104)<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}case 39:{k=(s+(((r&1)<<3)+108<>2]|0;c[j>>2]=A>>>0>>0?A:k;j=1;k=w;continue a}default:{j=1;k=w;continue a}}default:{j=1;k=w;continue a}}}p=(c[11272+(t<<2)>>2]|0)+(_(t,s)|0)|0;m=t>>>0>>0?t:h;q=f+m|0;m=f+(m+-4)|0;o=0;k=v;while(1){n=k;if(n>>>0>m>>>0)break;z=k;A=280811+(p+o)|0;if((d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24|0)!=(d[A>>0]|d[A+1>>0]<<8|d[A+2>>0]<<16|d[A+3>>0]<<24|0))break;o=o+4|0;k=n+4|0}while(1){if(k>>>0>=q>>>0)break;if((a[280811+(p+o)>>0]|0)!=(a[k>>0]|0))break;o=o+1|0;k=k+1|0}if((o|0)==(t|0)){A=(s<<5)+t|0;j=i+(t<<2)|0;z=c[j>>2]|0;c[j>>2]=z>>>0>>0?z:A;j=1}k=t+-1|0;if(o>>>0>=k>>>0){z=(s+(12<>2]|0;c[A>>2]=y>>>0>>0?y:z;A=t+2|0;if((((A>>>0>>0?(a[f+k>>0]|0)==105:0)?(a[f+t>>0]|0)==110:0)?(a[f+(t+1)>>0]|0)==103:0)?(a[f+A>>0]|0)==32:0){A=(s+(49<>2]|0;c[j>>2]=z>>>0>>0?z:A;j=1}else j=1}if(t>>>0>9){k=t+-9|0;k=k>>>0>>0?g:k}else k=g;m=t+-2|0;m=o>>>0>>0?o:m;while(1){if(k>>>0>m>>>0)break;A=(s+(d[407930+(t-k)>>0]<>2]|0;c[j>>2]=z>>>0>>0?z:A;j=1;k=k+1|0}if(o>>>0>>0){k=w;continue}k=t+6|0;if(k>>>0>=h>>>0){k=w;continue}do switch(a[f+t>>0]|0){case 32:{z=(s+r<<5)+t|0;A=i+(t+1<<2)|0;y=c[A>>2]|0;c[A>>2]=y>>>0>>0?y:z;switch(a[f+(t+1)>>0]|0){case 97:switch(a[f+(t+2)>>0]|0){case 32:{A=(s+(28<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 115:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(46<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 116:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(60<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 110:{if((a[f+(t+3)>>0]|0)!=100){k=w;continue a}if((a[f+(t+4)>>0]|0)!=32){k=w;continue a}A=(s+(10<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 98:{if((a[f+(t+2)>>0]|0)!=121){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(38<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 105:switch(a[f+(t+2)>>0]|0){case 110:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(r<<4)<<5)+t|0;k=i+(t+4<<2)|0;z=c[k>>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 115:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(47<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 102:{switch(a[f+(t+2)>>0]|0){case 111:{if((a[f+(t+3)>>0]|0)!=114){k=w;continue a}if((a[f+(t+4)>>0]|0)!=32){k=w;continue a}A=(s+(25<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 114:break;default:{k=w;continue a}}if((a[f+(t+3)>>0]|0)!=111){k=w;continue a}if((a[f+(t+4)>>0]|0)!=109){k=w;continue a}if((a[f+(t+5)>>0]|0)!=32){k=w;continue a}A=(s+(37<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 111:switch(a[f+(t+2)>>0]|0){case 102:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(r<<3)<<5)+t|0;k=i+(t+4<<2)|0;z=c[k>>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 110:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(45<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 110:{if((a[f+(t+2)>>0]|0)!=111){k=w;continue a}if((a[f+(t+3)>>0]|0)!=116){k=w;continue a}if((a[f+(t+4)>>0]|0)!=32){k=w;continue a}A=(s+(80<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 116:{switch(a[f+(t+2)>>0]|0){case 104:break;case 111:{if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(17<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}switch(a[f+(t+3)>>0]|0){case 101:{if((a[f+(t+4)>>0]|0)!=32){k=w;continue a}A=(s+(5<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 97:break;default:{k=w;continue a}}if((a[f+(t+4)>>0]|0)!=116){k=w;continue a}if((a[f+(t+5)>>0]|0)!=32){k=w;continue a}A=(s+(29<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 119:{if((a[f+(t+2)>>0]|0)!=105){k=w;continue a}if((a[f+(t+3)>>0]|0)!=116){k=w;continue a}if((a[f+(t+4)>>0]|0)!=104){k=w;continue a}if((a[f+(t+5)>>0]|0)!=32){k=w;continue a}A=(s+(35<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}}case 34:{z=(s+(19<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=62){k=w;continue a}A=(s+(21<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 46:{z=(s+(20<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=32){k=w;continue a}z=(s+(31<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+2)>>0]|0)!=84){k=w;continue a}if((a[f+(t+3)>>0]|0)!=104){k=w;continue a}switch(a[f+(t+4)>>0]|0){case 101:{if((a[f+(t+5)>>0]|0)!=32){k=w;continue a}A=(s+(43<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 105:break;default:{k=w;continue a}}if((a[f+(t+5)>>0]|0)!=115){k=w;continue a}if((a[f+(t+6)>>0]|0)!=32){k=w;continue a}A=(s+(75<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 44:{z=(s+(76<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=32){k=w;continue a}A=(s+(14<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 10:{z=(s+(22<>2]|0;c[A>>2]=y>>>0>>0?y:z;if((a[f+(t+1)>>0]|0)!=9){k=w;continue a}A=(s+(50<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 93:{A=(s+(24<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 39:{A=(s+(36<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 58:{A=(s+(51<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 40:{A=(s+(57<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 61:switch(a[f+(t+1)>>0]|0){case 34:{A=(s+(70<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 39:{A=(s+(86<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 97:{if((a[f+(t+1)>>0]|0)!=108){k=w;continue a}if((a[f+(t+2)>>0]|0)!=32){k=w;continue a}A=(s+(84<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 101:switch(a[f+(t+1)>>0]|0){case 100:{if((a[f+(t+2)>>0]|0)!=32){k=w;continue a}A=(s+(53<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 114:{if((a[f+(t+2)>>0]|0)!=32){k=w;continue a}A=(s+(82<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 115:{if((a[f+(t+2)>>0]|0)!=116){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(95<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 102:{if((a[f+(t+1)>>0]|0)!=117){k=w;continue a}if((a[f+(t+2)>>0]|0)!=108){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(90<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 105:switch(a[f+(t+1)>>0]|0){case 118:{if((a[f+(t+2)>>0]|0)!=101){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(92<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 122:{if((a[f+(t+2)>>0]|0)!=101){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(100<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}case 108:{switch(a[f+(t+1)>>0]|0){case 101:break;case 121:{if((a[f+(t+2)>>0]|0)!=32){k=w;continue a}A=(s+(61<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}if((a[f+(t+2)>>0]|0)!=115){k=w;continue a}if((a[f+(t+3)>>0]|0)!=115){k=w;continue a}if((a[f+(t+4)>>0]|0)!=32){k=w;continue a}A=(s+(93<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}case 111:{if((a[f+(t+1)>>0]|0)!=117){k=w;continue a}if((a[f+(t+2)>>0]|0)!=115){k=w;continue a}if((a[f+(t+3)>>0]|0)!=32){k=w;continue a}A=(s+(106<>2]|0;c[k>>2]=z>>>0>>0?z:A;k=w;continue a}default:{k=w;continue a}}while(0)}if(h>>>0<=4){h=j;h=h&1;h=h<<24>>24!=0;return h|0}A=a[f>>0]|0;w=A<<24>>24==32;c:do switch(A<<24>>24){case 32:case 46:{k=b[88430+((_(d[D>>0]|d[D+1>>0]<<8|d[D+2>>0]<<16|d[D+3>>0]<<24,506832829)|0)>>>17<<1)>>1]|0;g=h+-1|0;x=w?6:32;y=w?2:77;z=w?89:67;A=f+2|0;l=k<<16>>16==0&1;k=k&65535;d:while(1){if(l<<24>>24)break c;v=k+1|0;m=153966+(k<<2)|0;m=e[m>>1]|e[m+2>>1]<<16;k=m>>>8&255;s=m>>>16;t=m&127;u=d[280786+t>>0]|0;l=(m&255)>>>7;if(!(k<<24>>24)){if(t>>>0>g>>>0){u=j;k=v;j=u;continue}p=(c[11272+(t<<2)>>2]|0)+(_(t,m>>>16)|0)|0;q=f+(t+1)|0;m=f+(t+-3)|0;o=0;k=B;while(1){n=k;if(n>>>0>m>>>0)break;E=k;r=280811+(p+o)|0;if((d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0)!=(d[r>>0]|d[r+1>>0]<<8|d[r+2>>0]<<16|d[r+3>>0]<<24|0))break;o=o+4|0;k=n+4|0}while(1){if(k>>>0>=q>>>0)break;if((a[280811+(p+o)>>0]|0)!=(a[k>>0]|0))break;o=o+1|0;k=k+1|0}if((o|0)!=(t|0)){E=j;k=v;j=E;continue}j=t+1|0;E=(s+(x<>2]|0;c[k>>2]=r>>>0>>0?r:E;k=t+2|0;if(k>>>0>=h>>>0){j=1;k=v;continue}j=a[f+j>>0]|0;switch(j<<24>>24){case 32:{E=(s+(y<>2]|0;c[j>>2]=k>>>0>>0?k:E;j=1;k=v;continue d}case 40:{E=(s+(z<>2]|0;c[j>>2]=k>>>0>>0?k:E;j=1;k=v;continue d}default:{if(!w){j=1;k=v;continue d}switch(j<<24>>24){case 44:{r=(s+(103<>2]|0;c[E>>2]=q>>>0>>0?q:r;if((a[f+(t+2)>>0]|0)!=32){j=1;k=v;continue d}k=(s+(33<>2]|0;c[j>>2]=E>>>0>>0?E:k;j=1;k=v;continue d}case 46:{r=(s+(71<>2]|0;c[E>>2]=q>>>0>>0?q:r;if((a[f+(t+2)>>0]|0)!=32){j=1;k=v;continue d}k=(s+(52<>2]|0;c[j>>2]=E>>>0>>0?E:k;j=1;k=v;continue d}case 61:switch(a[f+(t+2)>>0]|0){case 34:{k=(s+(81<>2]|0;c[j>>2]=E>>>0>>0?E:k;j=1;k=v;continue d}case 39:{k=(s+(98<>2]|0;c[j>>2]=E>>>0>>0?E:k;j=1;k=v;continue d}default:{j=1;k=v;continue d}}default:{j=1;k=v;continue d}}}}}if(!w){E=j;k=v;j=E;continue}r=k<<24>>24!=10;if(t>>>0>g>>>0){E=j;k=v;j=E;continue}q=(c[11272+(t<<2)>>2]|0)+(_(t,m>>>16)|0)|0;k=280811+q|0;e:do switch((m>>>8&255)<<24>>24){case 0:{p=f+(t+1)|0;m=f+(t+-3)|0;o=0;k=B;while(1){n=k;if(n>>>0>m>>>0)break;F=k;E=280811+(q+o)|0;if((d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24|0)!=(d[E>>0]|d[E+1>>0]<<8|d[E+2>>0]<<16|d[E+3>>0]<<24|0))break;o=o+4|0;k=n+4|0}while(1){if(k>>>0>=p>>>0)break;if((a[280811+(q+o)>>0]|0)!=(a[k>>0]|0))break;o=o+1|0;k=k+1|0}if((o|0)!=(t|0)){F=j;k=v;j=F;continue d}break}case 10:{k=a[k>>0]|0;if(!((k&255)>96&(k&255)<123)){F=j;k=v;j=F;continue d}if((k&255^32|0)!=(d[D>>0]|0)){F=j;k=v;j=F;continue d}o=q+1|0;p=f+(t+1)|0;m=f+(t+-3)|0;n=0;k=A;while(1){if(k>>>0>m>>>0)break;F=280811+(o+n)|0;if((d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0)!=(d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24|0))break;n=n+4|0;k=k+4|0}while(1){if(k>>>0>=p>>>0)break;if((a[280811+(o+n)>>0]|0)!=(a[k>>0]|0))break;n=n+1|0;k=k+1|0}if((n|0)!=(t+-1|0)){F=j;k=v;j=F;continue d}break}default:{m=0;while(1){if(m>>>0>=t>>>0)break e;k=a[280811+(q+m)>>0]|0;if((k&255)>96&(k&255)<123){if((k&255^32|0)!=(d[f+(m+1)>>0]|0)){F=j;k=v;j=F;continue d}}else if(k<<24>>24!=(a[f+(m+1)>>0]|0)){F=j;k=v;j=F;continue d}m=m+1|0}}}while(0);j=t+1|0;F=(s+((r?85:30)<>2]|0;c[k>>2]=E>>>0>>0?E:F;k=t+2|0;if(k>>>0>=h>>>0){j=1;k=v;continue}switch(a[f+j>>0]|0){case 32:{F=(s+((r?83:15)<>2]|0;c[j>>2]=k>>>0>>0?k:F;j=1;k=v;continue d}case 44:{if(!r){E=(s+(109<>2]|0;c[F>>2]=q>>>0>>0?q:E}if((a[f+(t+2)>>0]|0)!=32){j=1;k=v;continue d}k=(s+((r?111:65)<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=v;continue d}case 46:{E=(s+((r?115:96)<>2]|0;c[F>>2]=q>>>0>>0?q:E;if((a[f+(t+2)>>0]|0)!=32){j=1;k=v;continue d}k=(s+((r?117:91)<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=v;continue d}case 61:switch(a[f+(t+2)>>0]|0){case 34:{k=(s+(((r&1)<<3^8)+110<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=v;continue d}case 39:{k=(s+(120-(r&1)<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=v;continue d}default:{j=1;k=v;continue d}}default:{j=1;k=v;continue d}}}}default:{}}while(0);if(h>>>0<=5){F=j;F=F&1;F=F<<24>>24!=0;return F|0}k=a[D>>0]|0;l=a[f>>0]|0;f:do if(k<<24>>24==32){switch(l<<24>>24){case 44:case 115:case 101:{C=241;break f}case -62:break;default:break f}if(k<<24>>24==-96)C=241}else if(l<<24>>24==-62&k<<24>>24==-96)C=241;while(0);g:do if((C|0)==241){u=f+2|0;k=b[88430+((_(d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24,506832829)|0)>>>17<<1)>>1]|0;v=h+-2|0;l=k<<16>>16==0&1;k=k&65535;while(1){if(l<<24>>24)break g;t=k+1|0;k=153966+(k<<2)|0;k=e[k>>1]|e[k+2>>1]<<16;q=k>>>16;r=k&127;s=d[280786+r>>0]|0;l=(k&255)>>>7;if((k&65280|0)!=0|r>>>0>v>>>0){F=j;k=t;j=F;continue}o=(c[11272+(r<<2)>>2]|0)+(_(r,k>>>16)|0)|0;p=f+(r+2)|0;m=f+(r+-2)|0;n=0;k=u;while(1){if(k>>>0>m>>>0)break;F=280811+(o+n)|0;if((d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0)!=(d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24|0))break;n=n+4|0;k=k+4|0}while(1){if(k>>>0>=p>>>0)break;if((a[280811+(o+n)>>0]|0)!=(a[k>>0]|0))break;n=n+1|0;k=k+1|0}if((n|0)!=(r|0)){F=j;k=t;j=F;continue}k=a[f>>0]|0;if(k<<24>>24==-62){k=(q+(102<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=t;continue}m=r+2|0;if(m>>>0>=h>>>0){F=j;k=t;j=F;continue}if((a[f+m>>0]|0)!=32){F=j;k=t;j=F;continue}k=(q+((k<<24>>24==101?18:k<<24>>24==115?7:13)<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=t}}while(0);if(h>>>0<=8){F=j;F=F&1;F=F<<24>>24!=0;return F|0}switch(a[f>>0]|0){case 32:{if((a[D>>0]|0)!=116){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+2>>0]|0)!=104){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+3>>0]|0)!=101){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+4>>0]|0)!=32){F=j;F=F&1;F=F<<24>>24!=0;return F|0}break}case 46:{if((a[D>>0]|0)!=99){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+2>>0]|0)!=111){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+3>>0]|0)!=109){F=j;F=F&1;F=F<<24>>24!=0;return F|0}if((a[f+4>>0]|0)!=47){F=j;F=F&1;F=F<<24>>24!=0;return F|0}break}default:{F=j;F=F&1;F=F<<24>>24!=0;return F|0}}u=f+5|0;k=b[88430+((_(d[u>>0]|d[u+1>>0]<<8|d[u+2>>0]<<16|d[u+3>>0]<<24,506832829)|0)>>>17<<1)>>1]|0;v=h+-5|0;l=k<<16>>16==0&1;k=k&65535;while(1){if(l<<24>>24)break;t=k+1|0;k=153966+(k<<2)|0;k=e[k>>1]|e[k+2>>1]<<16;q=k>>>16;r=k&127;s=d[280786+r>>0]|0;l=(k&255)>>>7;if((k&65280|0)!=0|r>>>0>v>>>0){F=j;k=t;j=F;continue}o=(c[11272+(r<<2)>>2]|0)+(_(r,k>>>16)|0)|0;p=f+(r+5)|0;m=f+(r+1)|0;n=0;k=u;while(1){if(k>>>0>m>>>0)break;F=280811+(o+n)|0;if((d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24|0)!=(d[F>>0]|d[F+1>>0]<<8|d[F+2>>0]<<16|d[F+3>>0]<<24|0))break;n=n+4|0;k=k+4|0}while(1){if(k>>>0>=p>>>0)break;if((a[280811+(o+n)>>0]|0)!=(a[k>>0]|0))break;n=n+1|0;k=k+1|0}if((n|0)!=(r|0)){F=j;k=t;j=F;continue}j=r+5|0;E=(q+(((a[f>>0]|0)==32?41:72)<>2]|0;c[F>>2]=D>>>0>>0?D:E;if(j>>>0>=h>>>0){j=1;k=t;continue}if(!((a[f>>0]|0)==32&(r+8|0)>>>0>>0)){j=1;k=t;continue}if((a[f+j>>0]|0)!=32){j=1;k=t;continue}if((a[f+(r+6)>>0]|0)!=111){j=1;k=t;continue}if((a[f+(r+7)>>0]|0)!=102){j=1;k=t;continue}if((a[f+(r+8)>>0]|0)!=32){j=1;k=t;continue}E=(q+(62<>2]|0;c[F>>2]=D>>>0>>0?D:E;if((r+12|0)>>>0>=h>>>0){j=1;k=t;continue}if((a[f+(r+9)>>0]|0)!=116){j=1;k=t;continue}if((a[f+(r+10)>>0]|0)!=104){j=1;k=t;continue}if((a[f+(r+11)>>0]|0)!=101){j=1;k=t;continue}if((a[f+(r+12)>>0]|0)!=32){j=1;k=t;continue}k=(q+(73<>2]|0;c[j>>2]=F>>>0>>0?F:k;j=1;k=t}F=j&1;F=F<<24>>24!=0;return F|0}function Wb(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=0;r=0;a:while(1){b:do{if(f>>>0>=e>>>0)break a;g=f+c&d;h=e-f|0;i=a[b+g>>0]|0;if(!(i<<24>>24<=-1|i<<24>>24==0)){g=1;s=20;break}do if(h>>>0>1){if(((i&-32)<<24>>24==-64?(j=a[b+(g+1)>>0]|0,(j&-64)<<24>>24==-128):0)?(k=(i&255)<<6&1984|j&63,k>>>0>127):0){h=2;g=k;break}if(h>>>0>2){if((((i&-16)<<24>>24==-32?(l=a[b+(g+1)>>0]|0,(l&-64)<<24>>24==-128):0)?(m=a[b+(g+2)>>0]|0,(m&-64)<<24>>24==-128):0)?(n=(i&255)<<12&61440|(l&255)<<6&4032|m&63,n>>>0>2047):0){h=3;g=n;break}if((((h>>>0>3&(i&-8)<<24>>24==-16?(o=a[b+(g+1)>>0]|0,(o&-64)<<24>>24==-128):0)?(p=a[b+(g+2)>>0]|0,(p&-64)<<24>>24==-128):0)?(q=a[b+(g+3)>>0]|0,(q&-64)<<24>>24==-128):0)?(s=(i&255)<<18&1835008|(o&255)<<12&258048|(p&255)<<6&4032|q&63,s>>>0>65535&s>>>0<1114112):0){g=4;s=20;break b}else s=19}else s=19}else s=19;while(0);if((s|0)==19){s=0;h=1;g=i&255|1114112}f=f+h|0}while((g|0)>=1114112);if((s|0)==20){s=0;h=g;f=f+g|0}r=r+h|0}return +(r>>>0)>+(e>>>0)*.75|0}function Xb(a){a=+a;var b=0,d=0,e=0,f=0,g=0.0,i=0.0,j=0.0,l=0.0,m=0.0;h[k>>3]=a;d=c[k>>2]|0;b=c[k+4>>2]|0;e=(b|0)<0;do if(e|b>>>0<1048576){if((d|0)==0&(b&2147483647|0)==0){a=-1.0/(a*a);break}if(e){a=(a-a)/0.0;break}else{h[k>>3]=a*18014398509481984.0;b=c[k+4>>2]|0;e=c[k>>2]|0;d=-1077;f=9;break}}else if(b>>>0<=2146435071)if((d|0)==0&0==0&(b|0)==1072693248)a=0.0;else{e=d;d=-1023;f=9}while(0);if((f|0)==9){f=b+614242|0;c[k>>2]=e;c[k+4>>2]=(f&1048575)+1072079006;l=+h[k>>3]+-1.0;a=l*(l*.5);m=l/(l+2.0);i=m*m;j=i*i;h[k>>3]=l-a;e=c[k+4>>2]|0;c[k>>2]=0;c[k+4>>2]=e;g=+h[k>>3];a=m*(a+(j*(j*(j*.15313837699209373+.22222198432149784)+.3999999999940942)+i*(j*(j*(j*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))+(l-g-a);l=g*1.4426950407214463;j=+(d+(f>>>20)|0);i=j+l;a=i+(l+(j-i)+(a*1.4426950407214463+(g+a)*1.6751713164886512e-10))}return +a}function Yb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;do if(a>>>0<245){o=a>>>0<11?16:a+11&-8;a=o>>>3;i=c[5147]|0;b=i>>>a;if(b&3){b=(b&1^1)+a|0;e=b<<1;d=20628+(e<<2)|0;e=20628+(e+2<<2)|0;f=c[e>>2]|0;g=f+8|0;h=c[g>>2]|0;do if((d|0)!=(h|0)){if(h>>>0<(c[5151]|0)>>>0)ha();a=h+12|0;if((c[a>>2]|0)==(f|0)){c[a>>2]=d;c[e>>2]=h;break}else ha()}else c[5147]=i&~(1<>2]=L|3;L=f+(L|4)|0;c[L>>2]=c[L>>2]|1;L=g;return L|0}h=c[5149]|0;if(o>>>0>h>>>0){if(b){e=2<>>12&16;e=e>>>j;f=e>>>5&8;e=e>>>f;g=e>>>2&4;e=e>>>g;d=e>>>1&2;e=e>>>d;b=e>>>1&1;b=(f|j|g|d|b)+(e>>>b)|0;e=b<<1;d=20628+(e<<2)|0;e=20628+(e+2<<2)|0;g=c[e>>2]|0;j=g+8|0;f=c[j>>2]|0;do if((d|0)!=(f|0)){if(f>>>0<(c[5151]|0)>>>0)ha();a=f+12|0;if((c[a>>2]|0)==(g|0)){c[a>>2]=d;c[e>>2]=f;k=c[5149]|0;break}else ha()}else{c[5147]=i&~(1<>2]=o|3;i=g+o|0;c[g+(o|4)>>2]=h|1;c[g+L>>2]=h;if(k){f=c[5152]|0;d=k>>>3;a=d<<1;e=20628+(a<<2)|0;b=c[5147]|0;d=1<>2]|0;if(a>>>0<(c[5151]|0)>>>0)ha();else{l=b;m=a}}else{c[5147]=b|d;l=20628+(a+2<<2)|0;m=e}c[l>>2]=f;c[m+12>>2]=f;c[f+8>>2]=m;c[f+12>>2]=e}c[5149]=h;c[5152]=i;L=j;return L|0}a=c[5148]|0;if(a){i=(a&0-a)+-1|0;K=i>>>12&16;i=i>>>K;J=i>>>5&8;i=i>>>J;L=i>>>2&4;i=i>>>L;b=i>>>1&2;i=i>>>b;j=i>>>1&1;j=c[20892+((J|K|L|b|j)+(i>>>j)<<2)>>2]|0;i=(c[j+4>>2]&-8)-o|0;b=j;while(1){a=c[b+16>>2]|0;if(!a){a=c[b+20>>2]|0;if(!a)break}b=(c[a+4>>2]&-8)-o|0;L=b>>>0>>0;i=L?b:i;b=a;j=L?a:j}f=c[5151]|0;if(j>>>0>>0)ha();h=j+o|0;if(j>>>0>=h>>>0)ha();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){b=j+20|0;a=c[b>>2]|0;if(!a){b=j+16|0;a=c[b>>2]|0;if(!a){n=0;break}}while(1){d=a+20|0;e=c[d>>2]|0;if(e){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}if(b>>>0>>0)ha();else{c[b>>2]=0;n=a;break}}else{e=c[j+8>>2]|0;if(e>>>0>>0)ha();a=e+12|0;if((c[a>>2]|0)!=(j|0))ha();b=d+8|0;if((c[b>>2]|0)==(j|0)){c[a>>2]=d;c[b>>2]=e;n=d;break}else ha()}while(0);do if(g){a=c[j+28>>2]|0;b=20892+(a<<2)|0;if((j|0)==(c[b>>2]|0)){c[b>>2]=n;if(!n){c[5148]=c[5148]&~(1<>>0<(c[5151]|0)>>>0)ha();a=g+16|0;if((c[a>>2]|0)==(j|0))c[a>>2]=n;else c[g+20>>2]=n;if(!n)break}b=c[5151]|0;if(n>>>0>>0)ha();c[n+24>>2]=g;a=c[j+16>>2]|0;do if(a)if(a>>>0>>0)ha();else{c[n+16>>2]=a;c[a+24>>2]=n;break}while(0);a=c[j+20>>2]|0;if(a)if(a>>>0<(c[5151]|0)>>>0)ha();else{c[n+20>>2]=a;c[a+24>>2]=n;break}}while(0);if(i>>>0<16){L=i+o|0;c[j+4>>2]=L|3;L=j+(L+4)|0;c[L>>2]=c[L>>2]|1}else{c[j+4>>2]=o|3;c[j+(o|4)>>2]=i|1;c[j+(i+o)>>2]=i;a=c[5149]|0;if(a){f=c[5152]|0;d=a>>>3;a=d<<1;e=20628+(a<<2)|0;b=c[5147]|0;d=1<>2]|0;if(b>>>0<(c[5151]|0)>>>0)ha();else{p=a;q=b}}else{c[5147]=b|d;p=20628+(a+2<<2)|0;q=e}c[p>>2]=f;c[q+12>>2]=f;c[f+8>>2]=q;c[f+12>>2]=e}c[5149]=i;c[5152]=h}L=j+8|0;return L|0}}}else if(a>>>0<=4294967231){a=a+11|0;o=a&-8;j=c[5148]|0;if(j){b=0-o|0;a=a>>>8;if(a)if(o>>>0>16777215)i=31;else{q=(a+1048320|0)>>>16&8;x=a<>>16&4;x=x<>>16&2;i=14-(p|q|i)+(x<>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;a=c[20892+(i<<2)>>2]|0;a:do if(!a){d=0;a=0;x=86}else{f=b;d=0;g=o<<((i|0)==31?0:25-(i>>>1)|0);h=a;a=0;while(1){e=c[h+4>>2]&-8;b=e-o|0;if(b>>>0>>0)if((e|0)==(o|0)){e=h;a=h;x=90;break a}else a=h;else b=f;x=c[h+20>>2]|0;h=c[h+16+(g>>>31<<2)>>2]|0;d=(x|0)==0|(x|0)==(h|0)?d:x;if(!h){x=86;break}else{f=b;g=g<<1}}}while(0);if((x|0)==86){if((d|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>n;m=a>>>5&8;a=a>>>m;p=a>>>2&4;a=a>>>p;q=a>>>1&2;a=a>>>q;d=a>>>1&1;d=c[20892+((m|n|p|q|d)+(a>>>d)<<2)>>2]|0;a=0}if(!d){i=b;j=a}else{e=d;x=90}}if((x|0)==90)while(1){x=0;q=(c[e+4>>2]&-8)-o|0;d=q>>>0>>0;b=d?q:b;a=d?e:a;d=c[e+16>>2]|0;if(d){e=d;x=90;continue}e=c[e+20>>2]|0;if(!e){i=b;j=a;break}else x=90}if((j|0)!=0?i>>>0<((c[5149]|0)-o|0)>>>0:0){f=c[5151]|0;if(j>>>0>>0)ha();h=j+o|0;if(j>>>0>=h>>>0)ha();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){b=j+20|0;a=c[b>>2]|0;if(!a){b=j+16|0;a=c[b>>2]|0;if(!a){s=0;break}}while(1){d=a+20|0;e=c[d>>2]|0;if(e){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}if(b>>>0>>0)ha();else{c[b>>2]=0;s=a;break}}else{e=c[j+8>>2]|0;if(e>>>0>>0)ha();a=e+12|0;if((c[a>>2]|0)!=(j|0))ha();b=d+8|0;if((c[b>>2]|0)==(j|0)){c[a>>2]=d;c[b>>2]=e;s=d;break}else ha()}while(0);do if(g){a=c[j+28>>2]|0;b=20892+(a<<2)|0;if((j|0)==(c[b>>2]|0)){c[b>>2]=s;if(!s){c[5148]=c[5148]&~(1<>>0<(c[5151]|0)>>>0)ha();a=g+16|0;if((c[a>>2]|0)==(j|0))c[a>>2]=s;else c[g+20>>2]=s;if(!s)break}b=c[5151]|0;if(s>>>0>>0)ha();c[s+24>>2]=g;a=c[j+16>>2]|0;do if(a)if(a>>>0>>0)ha();else{c[s+16>>2]=a;c[a+24>>2]=s;break}while(0);a=c[j+20>>2]|0;if(a)if(a>>>0<(c[5151]|0)>>>0)ha();else{c[s+20>>2]=a;c[a+24>>2]=s;break}}while(0);b:do if(i>>>0>=16){c[j+4>>2]=o|3;c[j+(o|4)>>2]=i|1;c[j+(i+o)>>2]=i;a=i>>>3;if(i>>>0<256){b=a<<1;e=20628+(b<<2)|0;d=c[5147]|0;a=1<>2]|0;if(b>>>0<(c[5151]|0)>>>0)ha();else{t=a;u=b}}else{c[5147]=d|a;t=20628+(b+2<<2)|0;u=e}c[t>>2]=h;c[u+12>>2]=h;c[j+(o+8)>>2]=u;c[j+(o+12)>>2]=e;break}a=i>>>8;if(a)if(i>>>0>16777215)e=31;else{K=(a+1048320|0)>>>16&8;L=a<>>16&4;L=L<>>16&2;e=14-(J|K|e)+(L<>>15)|0;e=i>>>(e+7|0)&1|e<<1}else e=0;a=20892+(e<<2)|0;c[j+(o+28)>>2]=e;c[j+(o+20)>>2]=0;c[j+(o+16)>>2]=0;b=c[5148]|0;d=1<>2]=h;c[j+(o+24)>>2]=a;c[j+(o+12)>>2]=h;c[j+(o+8)>>2]=h;break}a=c[a>>2]|0;c:do if((c[a+4>>2]&-8|0)!=(i|0)){e=i<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=a+16+(e>>>31<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(i|0)){w=b;break c}else{e=e<<1;a=b}}if(d>>>0<(c[5151]|0)>>>0)ha();else{c[d>>2]=h;c[j+(o+24)>>2]=a;c[j+(o+12)>>2]=h;c[j+(o+8)>>2]=h;break b}}else w=a;while(0);a=w+8|0;b=c[a>>2]|0;L=c[5151]|0;if(b>>>0>=L>>>0&w>>>0>=L>>>0){c[b+12>>2]=h;c[a>>2]=h;c[j+(o+8)>>2]=b;c[j+(o+12)>>2]=w;c[j+(o+24)>>2]=0;break}else ha()}else{L=i+o|0;c[j+4>>2]=L|3;L=j+(L+4)|0;c[L>>2]=c[L>>2]|1}while(0);L=j+8|0;return L|0}}}else o=-1;while(0);d=c[5149]|0;if(d>>>0>=o>>>0){a=d-o|0;b=c[5152]|0;if(a>>>0>15){c[5152]=b+o;c[5149]=a;c[b+(o+4)>>2]=a|1;c[b+d>>2]=a;c[b+4>>2]=o|3}else{c[5149]=0;c[5152]=0;c[b+4>>2]=d|3;L=b+(d+4)|0;c[L>>2]=c[L>>2]|1}L=b+8|0;return L|0}a=c[5150]|0;if(a>>>0>o>>>0){K=a-o|0;c[5150]=K;L=c[5153]|0;c[5153]=L+o;c[L+(o+4)>>2]=K|1;c[L+4>>2]=o|3;L=L+8|0;return L|0}do if(!(c[5265]|0)){a=ja(30)|0;if(!(a+-1&a)){c[5267]=a;c[5266]=a;c[5268]=-1;c[5269]=-1;c[5270]=0;c[5258]=0;c[5265]=(la(0)|0)&-16^1431655768;break}else ha()}while(0);g=o+48|0;f=c[5267]|0;h=o+47|0;e=f+h|0;f=0-f|0;i=e&f;if(i>>>0<=o>>>0){L=0;return L|0}a=c[5257]|0;if((a|0)!=0?(u=c[5255]|0,w=u+i|0,w>>>0<=u>>>0|w>>>0>a>>>0):0){L=0;return L|0}d:do if(!(c[5258]&4)){d=c[5153]|0;e:do if(d){a=21036;while(1){b=c[a>>2]|0;if(b>>>0<=d>>>0?(r=a+4|0,(b+(c[r>>2]|0)|0)>>>0>d>>>0):0)break;a=c[a+8>>2]|0;if(!a){x=174;break e}}b=e-(c[5150]|0)&f;if(b>>>0<2147483647){d=ka(b|0)|0;w=(d|0)==((c[a>>2]|0)+(c[r>>2]|0)|0);a=w?b:0;if(w){if((d|0)!=(-1|0)){r=d;q=a;x=194;break d}}else x=184}else a=0}else x=174;while(0);do if((x|0)==174){e=ka(0)|0;if((e|0)!=(-1|0)){a=e;b=c[5266]|0;d=b+-1|0;if(!(d&a))b=i;else b=i-a+(d+a&0-b)|0;a=c[5255]|0;d=a+b|0;if(b>>>0>o>>>0&b>>>0<2147483647){w=c[5257]|0;if((w|0)!=0?d>>>0<=a>>>0|d>>>0>w>>>0:0){a=0;break}d=ka(b|0)|0;x=(d|0)==(e|0);a=x?b:0;if(x){r=e;q=a;x=194;break d}else x=184}else a=0}else a=0}while(0);f:do if((x|0)==184){e=0-b|0;do if(g>>>0>b>>>0&(b>>>0<2147483647&(d|0)!=(-1|0))?(v=c[5267]|0,v=h-b+v&0-v,v>>>0<2147483647):0)if((ka(v|0)|0)==(-1|0)){ka(e|0)|0;break f}else{b=v+b|0;break}while(0);if((d|0)!=(-1|0)){r=d;q=b;x=194;break d}}while(0);c[5258]=c[5258]|4;x=191}else{a=0;x=191}while(0);if((((x|0)==191?i>>>0<2147483647:0)?(y=ka(i|0)|0,z=ka(0)|0,y>>>0>>0&((y|0)!=(-1|0)&(z|0)!=(-1|0))):0)?(A=z-y|0,B=A>>>0>(o+40|0)>>>0,B):0){r=y;q=B?A:a;x=194}if((x|0)==194){a=(c[5255]|0)+q|0;c[5255]=a;if(a>>>0>(c[5256]|0)>>>0)c[5256]=a;h=c[5153]|0;g:do if(h){f=21036;while(1){a=c[f>>2]|0;b=f+4|0;d=c[b>>2]|0;if((r|0)==(a+d|0)){x=204;break}e=c[f+8>>2]|0;if(!e)break;else f=e}if(((x|0)==204?(c[f+12>>2]&8|0)==0:0)?h>>>0>>0&h>>>0>=a>>>0:0){c[b>>2]=d+q;L=(c[5150]|0)+q|0;K=h+8|0;K=(K&7|0)==0?0:0-K&7;J=L-K|0;c[5153]=h+K;c[5150]=J;c[h+(K+4)>>2]=J|1;c[h+(L+4)>>2]=40;c[5154]=c[5269];break}a=c[5151]|0;if(r>>>0>>0){c[5151]=r;j=r}else j=a;b=r+q|0;a=21036;while(1){if((c[a>>2]|0)==(b|0)){x=212;break}a=c[a+8>>2]|0;if(!a){b=21036;break}}if((x|0)==212)if(!(c[a+12>>2]&8)){c[a>>2]=r;n=a+4|0;c[n>>2]=(c[n>>2]|0)+q;n=r+8|0;n=(n&7|0)==0?0:0-n&7;k=r+(q+8)|0;k=(k&7|0)==0?0:0-k&7;a=r+(k+q)|0;m=n+o|0;p=r+m|0;l=a-(r+n)-o|0;c[r+(n+4)>>2]=o|3;h:do if((a|0)!=(h|0)){if((a|0)==(c[5152]|0)){L=(c[5149]|0)+l|0;c[5149]=L;c[5152]=p;c[r+(m+4)>>2]=L|1;c[r+(L+m)>>2]=L;break}h=q+4|0;b=c[r+(h+k)>>2]|0;if((b&3|0)==1){i=b&-8;f=b>>>3;i:do if(b>>>0>=256){g=c[r+((k|24)+q)>>2]|0;e=c[r+(q+12+k)>>2]|0;do if((e|0)==(a|0)){d=k|16;e=r+(h+d)|0;b=c[e>>2]|0;if(!b){d=r+(d+q)|0;b=c[d>>2]|0;if(!b){I=0;break}}else d=e;while(1){e=b+20|0;f=c[e>>2]|0;if(f){b=f;d=e;continue}e=b+16|0;f=c[e>>2]|0;if(!f)break;else{b=f;d=e}}if(d>>>0>>0)ha();else{c[d>>2]=0;I=b;break}}else{f=c[r+((k|8)+q)>>2]|0;if(f>>>0>>0)ha();b=f+12|0;if((c[b>>2]|0)!=(a|0))ha();d=e+8|0;if((c[d>>2]|0)==(a|0)){c[b>>2]=e;c[d>>2]=f;I=e;break}else ha()}while(0);if(!g)break;b=c[r+(q+28+k)>>2]|0;d=20892+(b<<2)|0;do if((a|0)!=(c[d>>2]|0)){if(g>>>0<(c[5151]|0)>>>0)ha();b=g+16|0;if((c[b>>2]|0)==(a|0))c[b>>2]=I;else c[g+20>>2]=I;if(!I)break i}else{c[d>>2]=I;if(I)break;c[5148]=c[5148]&~(1<>>0>>0)ha();c[I+24>>2]=g;a=k|16;b=c[r+(a+q)>>2]|0;do if(b)if(b>>>0>>0)ha();else{c[I+16>>2]=b;c[b+24>>2]=I;break}while(0);a=c[r+(h+a)>>2]|0;if(!a)break;if(a>>>0<(c[5151]|0)>>>0)ha();else{c[I+20>>2]=a;c[a+24>>2]=I;break}}else{d=c[r+((k|8)+q)>>2]|0;e=c[r+(q+12+k)>>2]|0;b=20628+(f<<1<<2)|0;do if((d|0)!=(b|0)){if(d>>>0>>0)ha();if((c[d+12>>2]|0)==(a|0))break;ha()}while(0);if((e|0)==(d|0)){c[5147]=c[5147]&~(1<>>0>>0)ha();b=e+8|0;if((c[b>>2]|0)==(a|0)){E=b;break}ha()}while(0);c[d+12>>2]=e;c[E>>2]=d}while(0);a=r+((i|k)+q)|0;f=i+l|0}else f=l;a=a+4|0;c[a>>2]=c[a>>2]&-2;c[r+(m+4)>>2]=f|1;c[r+(f+m)>>2]=f;a=f>>>3;if(f>>>0<256){b=a<<1;e=20628+(b<<2)|0;d=c[5147]|0;a=1<>2]|0;if(b>>>0>=(c[5151]|0)>>>0){J=a;K=b;break}ha()}while(0);c[J>>2]=p;c[K+12>>2]=p;c[r+(m+8)>>2]=K;c[r+(m+12)>>2]=e;break}a=f>>>8;do if(!a)e=0;else{if(f>>>0>16777215){e=31;break}J=(a+1048320|0)>>>16&8;K=a<>>16&4;K=K<>>16&2;e=14-(I|J|e)+(K<>>15)|0;e=f>>>(e+7|0)&1|e<<1}while(0);a=20892+(e<<2)|0;c[r+(m+28)>>2]=e;c[r+(m+20)>>2]=0;c[r+(m+16)>>2]=0;b=c[5148]|0;d=1<>2]=p;c[r+(m+24)>>2]=a;c[r+(m+12)>>2]=p;c[r+(m+8)>>2]=p;break}a=c[a>>2]|0;j:do if((c[a+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=a+16+(e>>>31<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(f|0)){L=b;break j}else{e=e<<1;a=b}}if(d>>>0<(c[5151]|0)>>>0)ha();else{c[d>>2]=p;c[r+(m+24)>>2]=a;c[r+(m+12)>>2]=p;c[r+(m+8)>>2]=p;break h}}else L=a;while(0);a=L+8|0;b=c[a>>2]|0;K=c[5151]|0;if(b>>>0>=K>>>0&L>>>0>=K>>>0){c[b+12>>2]=p;c[a>>2]=p;c[r+(m+8)>>2]=b;c[r+(m+12)>>2]=L;c[r+(m+24)>>2]=0;break}else ha()}else{L=(c[5150]|0)+l|0;c[5150]=L;c[5153]=p;c[r+(m+4)>>2]=L|1}while(0);L=r+(n|8)|0;return L|0}else b=21036;while(1){a=c[b>>2]|0;if(a>>>0<=h>>>0?(C=c[b+4>>2]|0,D=a+C|0,D>>>0>h>>>0):0)break;b=c[b+8>>2]|0}b=a+(C+-39)|0;b=a+(C+-47+((b&7|0)==0?0:0-b&7))|0;f=h+16|0;b=b>>>0>>0?h:b;a=b+8|0;d=r+8|0;d=(d&7|0)==0?0:0-d&7;L=q+-40-d|0;c[5153]=r+d;c[5150]=L;c[r+(d+4)>>2]=L|1;c[r+(q+-36)>>2]=40;c[5154]=c[5269];d=b+4|0;c[d>>2]=27;c[a>>2]=c[5259];c[a+4>>2]=c[5260];c[a+8>>2]=c[5261];c[a+12>>2]=c[5262];c[5259]=r;c[5260]=q;c[5262]=0;c[5261]=a;a=b+28|0;c[a>>2]=7;if((b+32|0)>>>0>>0)do{L=a;a=a+4|0;c[a>>2]=7}while((L+8|0)>>>0>>0);if((b|0)!=(h|0)){g=b-h|0;c[d>>2]=c[d>>2]&-2;c[h+4>>2]=g|1;c[b>>2]=g;a=g>>>3;if(g>>>0<256){b=a<<1;e=20628+(b<<2)|0;d=c[5147]|0;a=1<>2]|0;if(b>>>0<(c[5151]|0)>>>0)ha();else{F=a;G=b}}else{c[5147]=d|a;F=20628+(b+2<<2)|0;G=e}c[F>>2]=h;c[G+12>>2]=h;c[h+8>>2]=G;c[h+12>>2]=e;break}a=g>>>8;if(a)if(g>>>0>16777215)e=31;else{K=(a+1048320|0)>>>16&8;L=a<>>16&4;L=L<>>16&2;e=14-(J|K|e)+(L<>>15)|0;e=g>>>(e+7|0)&1|e<<1}else e=0;d=20892+(e<<2)|0;c[h+28>>2]=e;c[h+20>>2]=0;c[f>>2]=0;a=c[5148]|0;b=1<>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}a=c[d>>2]|0;k:do if((c[a+4>>2]&-8|0)!=(g|0)){e=g<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=a+16+(e>>>31<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(g|0)){H=b;break k}else{e=e<<1;a=b}}if(d>>>0<(c[5151]|0)>>>0)ha();else{c[d>>2]=h;c[h+24>>2]=a;c[h+12>>2]=h;c[h+8>>2]=h;break g}}else H=a;while(0);a=H+8|0;b=c[a>>2]|0;L=c[5151]|0;if(b>>>0>=L>>>0&H>>>0>=L>>>0){c[b+12>>2]=h;c[a>>2]=h;c[h+8>>2]=b;c[h+12>>2]=H;c[h+24>>2]=0;break}else ha()}}else{L=c[5151]|0;if((L|0)==0|r>>>0>>0)c[5151]=r;c[5259]=r;c[5260]=q;c[5262]=0;c[5156]=c[5265];c[5155]=-1;a=0;do{L=a<<1;K=20628+(L<<2)|0;c[20628+(L+3<<2)>>2]=K;c[20628+(L+2<<2)>>2]=K;a=a+1|0}while((a|0)!=32);L=r+8|0;L=(L&7|0)==0?0:0-L&7;K=q+-40-L|0;c[5153]=r+L;c[5150]=K;c[r+(L+4)>>2]=K|1;c[r+(q+-36)>>2]=40;c[5154]=c[5269]}while(0);a=c[5150]|0;if(a>>>0>o>>>0){K=a-o|0;c[5150]=K;L=c[5153]|0;c[5153]=L+o;c[L+(o+4)>>2]=K|1;c[L+4>>2]=o|3;L=L+8|0;return L|0}}if(!(c[5135]|0))a=20584;else a=c[(ga()|0)+60>>2]|0;c[a>>2]=12;L=0;return L|0}function Zb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(!a)return;b=a+-8|0;i=c[5151]|0;if(b>>>0>>0)ha();d=c[a+-4>>2]|0;e=d&3;if((e|0)==1)ha();o=d&-8;q=a+(o+-8)|0;do if(!(d&1)){b=c[b>>2]|0;if(!e)return;j=-8-b|0;l=a+j|0;m=b+o|0;if(l>>>0>>0)ha();if((l|0)==(c[5152]|0)){b=a+(o+-4)|0;d=c[b>>2]|0;if((d&3|0)!=3){u=l;g=m;break}c[5149]=m;c[b>>2]=d&-2;c[a+(j+4)>>2]=m|1;c[q>>2]=m;return}f=b>>>3;if(b>>>0<256){e=c[a+(j+8)>>2]|0;d=c[a+(j+12)>>2]|0;b=20628+(f<<1<<2)|0;if((e|0)!=(b|0)){if(e>>>0>>0)ha();if((c[e+12>>2]|0)!=(l|0))ha()}if((d|0)==(e|0)){c[5147]=c[5147]&~(1<>>0>>0)ha();b=d+8|0;if((c[b>>2]|0)==(l|0))h=b;else ha()}else h=d+8|0;c[e+12>>2]=d;c[h>>2]=e;u=l;g=m;break}h=c[a+(j+24)>>2]|0;e=c[a+(j+12)>>2]|0;do if((e|0)==(l|0)){d=a+(j+20)|0;b=c[d>>2]|0;if(!b){d=a+(j+16)|0;b=c[d>>2]|0;if(!b){k=0;break}}while(1){e=b+20|0;f=c[e>>2]|0;if(f){b=f;d=e;continue}e=b+16|0;f=c[e>>2]|0;if(!f)break;else{b=f;d=e}}if(d>>>0>>0)ha();else{c[d>>2]=0;k=b;break}}else{f=c[a+(j+8)>>2]|0;if(f>>>0>>0)ha();b=f+12|0;if((c[b>>2]|0)!=(l|0))ha();d=e+8|0;if((c[d>>2]|0)==(l|0)){c[b>>2]=e;c[d>>2]=f;k=e;break}else ha()}while(0);if(h){b=c[a+(j+28)>>2]|0;d=20892+(b<<2)|0;if((l|0)==(c[d>>2]|0)){c[d>>2]=k;if(!k){c[5148]=c[5148]&~(1<>>0<(c[5151]|0)>>>0)ha();b=h+16|0;if((c[b>>2]|0)==(l|0))c[b>>2]=k;else c[h+20>>2]=k;if(!k){u=l;g=m;break}}d=c[5151]|0;if(k>>>0>>0)ha();c[k+24>>2]=h;b=c[a+(j+16)>>2]|0;do if(b)if(b>>>0>>0)ha();else{c[k+16>>2]=b;c[b+24>>2]=k;break}while(0);b=c[a+(j+20)>>2]|0;if(b)if(b>>>0<(c[5151]|0)>>>0)ha();else{c[k+20>>2]=b;c[b+24>>2]=k;u=l;g=m;break}else{u=l;g=m}}else{u=l;g=m}}else{u=b;g=o}while(0);if(u>>>0>=q>>>0)ha();b=a+(o+-4)|0;d=c[b>>2]|0;if(!(d&1))ha();if(!(d&2)){if((q|0)==(c[5153]|0)){t=(c[5150]|0)+g|0;c[5150]=t;c[5153]=u;c[u+4>>2]=t|1;if((u|0)!=(c[5152]|0))return;c[5152]=0;c[5149]=0;return}if((q|0)==(c[5152]|0)){t=(c[5149]|0)+g|0;c[5149]=t;c[5152]=u;c[u+4>>2]=t|1;c[u+t>>2]=t;return}g=(d&-8)+g|0;f=d>>>3;do if(d>>>0>=256){h=c[a+(o+16)>>2]|0;b=c[a+(o|4)>>2]|0;do if((b|0)==(q|0)){d=a+(o+12)|0;b=c[d>>2]|0;if(!b){d=a+(o+8)|0;b=c[d>>2]|0;if(!b){p=0;break}}while(1){e=b+20|0;f=c[e>>2]|0;if(f){b=f;d=e;continue}e=b+16|0;f=c[e>>2]|0;if(!f)break;else{b=f;d=e}}if(d>>>0<(c[5151]|0)>>>0)ha();else{c[d>>2]=0;p=b;break}}else{d=c[a+o>>2]|0;if(d>>>0<(c[5151]|0)>>>0)ha();e=d+12|0;if((c[e>>2]|0)!=(q|0))ha();f=b+8|0;if((c[f>>2]|0)==(q|0)){c[e>>2]=b;c[f>>2]=d;p=b;break}else ha()}while(0);if(h){b=c[a+(o+20)>>2]|0;d=20892+(b<<2)|0;if((q|0)==(c[d>>2]|0)){c[d>>2]=p;if(!p){c[5148]=c[5148]&~(1<>>0<(c[5151]|0)>>>0)ha();b=h+16|0;if((c[b>>2]|0)==(q|0))c[b>>2]=p;else c[h+20>>2]=p;if(!p)break}d=c[5151]|0;if(p>>>0>>0)ha();c[p+24>>2]=h;b=c[a+(o+8)>>2]|0;do if(b)if(b>>>0>>0)ha();else{c[p+16>>2]=b;c[b+24>>2]=p;break}while(0);b=c[a+(o+12)>>2]|0;if(b)if(b>>>0<(c[5151]|0)>>>0)ha();else{c[p+20>>2]=b;c[b+24>>2]=p;break}}}else{e=c[a+o>>2]|0;d=c[a+(o|4)>>2]|0;b=20628+(f<<1<<2)|0;if((e|0)!=(b|0)){if(e>>>0<(c[5151]|0)>>>0)ha();if((c[e+12>>2]|0)!=(q|0))ha()}if((d|0)==(e|0)){c[5147]=c[5147]&~(1<>>0<(c[5151]|0)>>>0)ha();b=d+8|0;if((c[b>>2]|0)==(q|0))n=b;else ha()}else n=d+8|0;c[e+12>>2]=d;c[n>>2]=e}while(0);c[u+4>>2]=g|1;c[u+g>>2]=g;if((u|0)==(c[5152]|0)){c[5149]=g;return}}else{c[b>>2]=d&-2;c[u+4>>2]=g|1;c[u+g>>2]=g}b=g>>>3;if(g>>>0<256){d=b<<1;f=20628+(d<<2)|0;e=c[5147]|0;b=1<>2]|0;if(d>>>0<(c[5151]|0)>>>0)ha();else{r=b;s=d}}else{c[5147]=e|b;r=20628+(d+2<<2)|0;s=f}c[r>>2]=u;c[s+12>>2]=u;c[u+8>>2]=s;c[u+12>>2]=f;return}b=g>>>8;if(b)if(g>>>0>16777215)f=31;else{r=(b+1048320|0)>>>16&8;s=b<>>16&4;s=s<>>16&2;f=14-(q|r|f)+(s<>>15)|0;f=g>>>(f+7|0)&1|f<<1}else f=0;b=20892+(f<<2)|0;c[u+28>>2]=f;c[u+20>>2]=0;c[u+16>>2]=0;d=c[5148]|0;e=1<>2]|0;b:do if((c[b+4>>2]&-8|0)!=(g|0)){f=g<<((f|0)==31?0:25-(f>>>1)|0);while(1){e=b+16+(f>>>31<<2)|0;d=c[e>>2]|0;if(!d)break;if((c[d+4>>2]&-8|0)==(g|0)){t=d;break b}else{f=f<<1;b=d}}if(e>>>0<(c[5151]|0)>>>0)ha();else{c[e>>2]=u;c[u+24>>2]=b;c[u+12>>2]=u;c[u+8>>2]=u;break a}}else t=b;while(0);b=t+8|0;d=c[b>>2]|0;s=c[5151]|0;if(d>>>0>=s>>>0&t>>>0>=s>>>0){c[d+12>>2]=u;c[b>>2]=u;c[u+8>>2]=d;c[u+12>>2]=t;c[u+24>>2]=0;break}else ha()}else{c[5148]=d|e;c[b>>2]=u;c[u+24>>2]=b;c[u+12>>2]=u;c[u+8>>2]=u}while(0);u=(c[5155]|0)+-1|0;c[5155]=u;if(!u)b=21044;else return;while(1){b=c[b>>2]|0;if(!b)break;else b=b+8|0}c[5155]=-1;return}function _b(){}function $b(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (C=d,a-c>>>0|0)|0}function ac(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;h=b&3;i=d|d<<8|d<<16|d<<24;g=f&~3;if(h){h=b+4-h|0;while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function bc(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>>c;return a>>>c|(b&(1<>>c-32|0}function cc(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b<>>32-c;return a<=4096)return ma(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function ec(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (C=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function fc(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else dc(b,c,d)|0;return b|0}function gc(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>c;return a>>>c|(b&(1<>c-32|0}function hc(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (a[m+(b>>>24)>>0]|0)+24|0}function ic(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=_(e,f)|0;d=a>>>16;a=(c>>>16)+(_(e,d)|0)|0;e=b>>>16;b=_(e,f)|0;return (C=(a>>>16)+(_(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function jc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=$b(j^a,i^b,j,i)|0;g=C;a=f^j;b=e^i;return $b((oc(h,g,$b(f^c,e^d,f,e)|0,C,0)|0)^a,C^b,a,b)|0}function kc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+16|0;j=f|0;h=b>>31|((b|0)<0?-1:0)<<1;g=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;l=e>>31|((e|0)<0?-1:0)<<1;k=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;a=$b(h^a,g^b,h,g)|0;b=C;oc(a,b,$b(l^d,k^e,l,k)|0,C,j)|0;e=$b(c[j>>2]^h,c[j+4>>2]^g,h,g)|0;d=C;i=f;return (C=d,e)|0}function lc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=ic(e,f)|0;a=C;return (C=(_(b,f)|0)+(_(d,e)|0)+a|a&0,c|0|0)|0}function mc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return oc(a,b,c,d,0)|0}function nc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=i;i=i+16|0;f=g|0;oc(a,b,d,e,f)|0;i=g;return (C=c[f+4>>2]|0,c[f>>2]|0)|0}function oc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;l=a;j=b;k=j;h=d;n=e;i=n;if(!k){g=(f|0)!=0;if(!i){if(g){c[f>>2]=(l>>>0)%(h>>>0);c[f+4>>2]=0}n=0;f=(l>>>0)/(h>>>0)>>>0;return (C=n,f)|0}else{if(!g){n=0;f=0;return (C=n,f)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;f=0;return (C=n,f)|0}}g=(i|0)==0;do if(h){if(!g){g=(aa(i|0)|0)-(aa(k|0)|0)|0;if(g>>>0<=31){m=g+1|0;i=31-g|0;b=g-31>>31;h=m;a=l>>>(m>>>0)&b|k<>>(m>>>0)&b;g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;n=0;f=0;return (C=n,f)|0}g=h-1|0;if(g&h){i=(aa(h|0)|0)+33-(aa(k|0)|0)|0;p=64-i|0;m=32-i|0;j=m>>31;o=i-32|0;b=o>>31;h=i;a=m-1>>31&k>>>(o>>>0)|(k<>>(i>>>0))&b;b=b&k>>>(i>>>0);g=l<>>(o>>>0))&j|l<>31;break}if(f){c[f>>2]=g&l;c[f+4>>2]=0}if((h|0)==1){o=j|b&0;p=a|0|0;return (C=o,p)|0}else{p=hc(h|0)|0;o=k>>>(p>>>0)|0;p=k<<32-p|l>>>(p>>>0)|0;return (C=o,p)|0}}else{if(g){if(f){c[f>>2]=(k>>>0)%(h>>>0);c[f+4>>2]=0}o=0;p=(k>>>0)/(h>>>0)>>>0;return (C=o,p)|0}if(!l){if(f){c[f>>2]=0;c[f+4>>2]=(k>>>0)%(i>>>0)}o=0;p=(k>>>0)/(i>>>0)>>>0;return (C=o,p)|0}g=i-1|0;if(!(g&i)){if(f){c[f>>2]=a|0;c[f+4>>2]=g&k|b&0}o=0;p=k>>>((hc(i|0)|0)>>>0);return (C=o,p)|0}g=(aa(i|0)|0)-(aa(k|0)|0)|0;if(g>>>0<=30){b=g+1|0;i=31-g|0;h=b;a=k<>>(b>>>0);b=k>>>(b>>>0);g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return (C=o,p)|0}while(0);if(!h){k=i;j=0;i=0}else{m=d|0|0;l=n|e&0;k=ec(m|0,l|0,-1,-1)|0;d=C;j=i;i=0;do{e=j;j=g>>>31|j<<1;g=i|g<<1;e=a<<1|e>>>31|0;n=a>>>31|b<<1|0;$b(k,d,e,n)|0;p=C;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;a=$b(e,n,o&m,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l)|0;b=C;h=h-1|0}while((h|0)!=0);k=j;j=0}h=0;if(f){c[f>>2]=a;c[f+4>>2]=b}o=(g|0)>>>31|(k|h)<<1|(h<<1|g>>>31)&0|j;p=(g<<1|0>>>31)&-2|i;return (C=o,p)|0}function pc(a,b,c){a=a|0;b=b|0;c=c|0;ra[a&1](b|0,c|0)}function qc(a,b,c){a=a|0;b=b|0;c=c|0;return sa[a&1](b|0,c|0)|0}function rc(a,b){a=a|0;b=b|0;ba(0)}function sc(a,b){a=a|0;b=b|0;ba(1);return 0} + +// EMSCRIPTEN_END_FUNCS +var ra=[rc,Mb];var sa=[sc,Lb];return{_i64Subtract:$b,_free:Zb,_i64Add:ec,_memmove:fc,_memset:ac,_malloc:Yb,_encode:Ca,_memcpy:dc,_bitshift64Lshr:bc,_bitshift64Shl:cc,runPostSets:_b,stackAlloc:ta,stackSave:ua,stackRestore:va,establishStackSpace:wa,setThrew:xa,setTempRet0:Aa,getTempRet0:Ba,dynCall_vii:pc,dynCall_iii:qc}}) + + +// EMSCRIPTEN_END_ASM +(b.I,b.J,buffer),Ja=b._i64Subtract=Y._i64Subtract,pa=b._free=Y._free;b.runPostSets=Y.runPostSets;var Pa=b._i64Add=Y._i64Add,Qa=b._memmove=Y._memmove,La=b._memset=Y._memset,ia=b._malloc=Y._malloc;b._encode=Y._encode;var Oa=b._memcpy=Y._memcpy,Ma=b._bitshift64Lshr=Y._bitshift64Lshr,Na=b._bitshift64Shl=Y._bitshift64Shl;b.dynCall_vii=Y.dynCall_vii;b.dynCall_iii=Y.dynCall_iii;A.n=Y.stackAlloc;A.G=Y.stackSave;A.F=Y.stackRestore;A.W=Y.establishStackSpace;A.P=Y.setTempRet0; +A.N=Y.getTempRet0; +if(W)if("function"===typeof b.locateFile?W=b.locateFile(W):b.memoryInitializerPrefixURL&&(W=b.memoryInitializerPrefixURL+W),v||x){var Ta=b.readBinary(W);P.set(Ta,A.C)}else{var Va=function(){Browser.T(W,Ua,function(){throw"could not load memory initializer "+W;})};U++;b.monitorRunDependencies&&b.monitorRunDependencies(U);var Ua=function(a){a.byteLength&&(a=new Uint8Array(a));P.set(a,A.C);U--;b.monitorRunDependencies&&b.monitorRunDependencies(U);0==U&&(null!==Ha&&(clearInterval(Ha),Ha=null),V&&(a=V, +V=null,a()))},Z=b.memoryInitializerRequest;if(Z){var Wa=function(){200!==Z.status&&0!==Z.status?(console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+Z.status+", retrying "+W),Va()):Ua(Z.response)};Z.response?setTimeout(Wa,0):Z.addEventListener("load",Wa)}else Va()}function y(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}y.prototype=Error();y.prototype.constructor=y; +var Xa=null,V=function Ya(){b.calledRun||Za();b.calledRun||(V=Ya)}; +b.callMain=b.U=function(a){function c(){for(var a=0;3>a;a++)e.push(0)}assert(0==U,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(0==Aa.length,"cannot call main when preRun functions remain to be called");a=a||[];T||(T=!0,S(Ba));var d=a.length+1,e=[O(Ga(b.thisProgram),"i8",0)];c();for(var h=0;h 0; +}; + +/* Fills up the input ringbuffer by calling the input callback. + + Does nothing if there are at least 32 bytes present after current position. + + Returns 0 if either: + - the input callback returned an error, or + - there is no more input and the position is past the end of the stream. + + After encountering the end of the input stream, 32 additional zero bytes are + copied to the ringbuffer, therefore it is safe to call this function after + every 32 bytes of input is read. +*/ +BrotliBitReader.prototype.readMoreInput = function() { + if (this.bit_end_pos_ > 256) { + return; + } else if (this.eos_) { + if (this.bit_pos_ > this.bit_end_pos_) + throw new Error('Unexpected end of input ' + this.bit_pos_ + ' ' + this.bit_end_pos_); + } else { + var dst = this.buf_ptr_; + var bytes_read = this.input_.read(this.buf_, dst, BROTLI_READ_SIZE); + if (bytes_read < 0) { + throw new Error('Unexpected end of input'); + } + + if (bytes_read < BROTLI_READ_SIZE) { + this.eos_ = 1; + /* Store 32 bytes of zero after the stream end. */ + for (var p = 0; p < 32; p++) + this.buf_[dst + bytes_read + p] = 0; + } + + if (dst === 0) { + /* Copy the head of the ringbuffer to the slack region. */ + for (var p = 0; p < 32; p++) + this.buf_[(BROTLI_READ_SIZE << 1) + p] = this.buf_[p]; + + this.buf_ptr_ = BROTLI_READ_SIZE; + } else { + this.buf_ptr_ = 0; + } + + this.bit_end_pos_ += bytes_read << 3; + } +}; + +/* Guarantees that there are at least 24 bits in the buffer. */ +BrotliBitReader.prototype.fillBitWindow = function() { + while (this.bit_pos_ >= 8) { + this.val_ >>>= 8; + this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24; + ++this.pos_; + this.bit_pos_ = this.bit_pos_ - 8 >>> 0; + this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0; + } +}; + +/* Reads the specified number of bits from Read Buffer. */ +BrotliBitReader.prototype.readBits = function(n_bits) { + if (32 - this.bit_pos_ < n_bits) { + this.fillBitWindow(); + } + + var val = ((this.val_ >>> this.bit_pos_) & kBitMask[n_bits]); + this.bit_pos_ += n_bits; + return val; +}; + +module.exports = BrotliBitReader; diff --git a/node_modules/brotli/dec/context.js b/node_modules/brotli/dec/context.js new file mode 100644 index 0000000..ba98779 --- /dev/null +++ b/node_modules/brotli/dec/context.js @@ -0,0 +1,250 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Lookup table to map the previous two bytes to a context id. + + There are four different context modeling modes defined here: + CONTEXT_LSB6: context id is the least significant 6 bits of the last byte, + CONTEXT_MSB6: context id is the most significant 6 bits of the last byte, + CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text, + CONTEXT_SIGNED: second-order context model tuned for signed integers. + + The context id for the UTF8 context model is calculated as follows. If p1 + and p2 are the previous two bytes, we calcualte the context as + + context = kContextLookup[p1] | kContextLookup[p2 + 256]. + + If the previous two bytes are ASCII characters (i.e. < 128), this will be + equivalent to + + context = 4 * context1(p1) + context2(p2), + + where context1 is based on the previous byte in the following way: + + 0 : non-ASCII control + 1 : \t, \n, \r + 2 : space + 3 : other punctuation + 4 : " ' + 5 : % + 6 : ( < [ { + 7 : ) > ] } + 8 : , ; : + 9 : . + 10 : = + 11 : number + 12 : upper-case vowel + 13 : upper-case consonant + 14 : lower-case vowel + 15 : lower-case consonant + + and context2 is based on the second last byte: + + 0 : control, space + 1 : punctuation + 2 : upper-case letter, number + 3 : lower-case letter + + If the last byte is ASCII, and the second last byte is not (in a valid UTF8 + stream it will be a continuation byte, value between 128 and 191), the + context is the same as if the second last byte was an ASCII control or space. + + If the last byte is a UTF8 lead byte (value >= 192), then the next byte will + be a continuation byte and the context id is 2 or 3 depending on the LSB of + the last byte and to a lesser extent on the second last byte if it is ASCII. + + If the last byte is a UTF8 continuation byte, the second last byte can be: + - continuation byte: the next byte is probably ASCII or lead byte (assuming + 4-byte UTF8 characters are rare) and the context id is 0 or 1. + - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1 + - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3 + + The possible value combinations of the previous two bytes, the range of + context ids and the type of the next byte is summarized in the table below: + + |--------\-----------------------------------------------------------------| + | \ Last byte | + | Second \---------------------------------------------------------------| + | last byte \ ASCII | cont. byte | lead byte | + | \ (0-127) | (128-191) | (192-) | + |=============|===================|=====================|==================| + | ASCII | next: ASCII/lead | not valid | next: cont. | + | (0-127) | context: 4 - 63 | | context: 2 - 3 | + |-------------|-------------------|---------------------|------------------| + | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. | + | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 | + |-------------|-------------------|---------------------|------------------| + | lead byte | not valid | next: ASCII/lead | not valid | + | (192-207) | | context: 0 - 1 | | + |-------------|-------------------|---------------------|------------------| + | lead byte | not valid | next: cont. | not valid | + | (208-) | | context: 2 - 3 | | + |-------------|-------------------|---------------------|------------------| + + The context id for the signed context mode is calculated as: + + context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2]. + + For any context modeling modes, the context ids can be calculated by |-ing + together two lookups from one table using context model dependent offsets: + + context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2]. + + where offset1 and offset2 are dependent on the context mode. +*/ + +var CONTEXT_LSB6 = 0; +var CONTEXT_MSB6 = 1; +var CONTEXT_UTF8 = 2; +var CONTEXT_SIGNED = 3; + +/* Common context lookup table for all context modes. */ +exports.lookup = new Uint8Array([ + /* CONTEXT_UTF8, last byte. */ + /* ASCII range. */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12, + 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48, + 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12, + 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56, + 60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0, + /* UTF8 continuation byte range. */ + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + /* UTF8 lead byte range. */ + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, + 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, + /* CONTEXT_UTF8 second last byte. */ + /* ASCII range. */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 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4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, + /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ + 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56, + /* CONTEXT_LSB6, last byte. */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + /* CONTEXT_MSB6, last byte. */ + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, + 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, + 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, + 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, + 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, + 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, + 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, + 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, + 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, + 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, + 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, + 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, + 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, + /* CONTEXT_{M,L}SB6, second last byte, */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]); + +exports.lookupOffsets = new Uint16Array([ + /* CONTEXT_LSB6 */ + 1024, 1536, + /* CONTEXT_MSB6 */ + 1280, 1536, + /* CONTEXT_UTF8 */ + 0, 256, + /* CONTEXT_SIGNED */ + 768, 512, +]); diff --git a/node_modules/brotli/dec/decode.js b/node_modules/brotli/dec/decode.js new file mode 100644 index 0000000..7b2aa77 --- /dev/null +++ b/node_modules/brotli/dec/decode.js @@ -0,0 +1,938 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +var BrotliInput = require('./streams').BrotliInput; +var BrotliOutput = require('./streams').BrotliOutput; +var BrotliBitReader = require('./bit_reader'); +var BrotliDictionary = require('./dictionary'); +var HuffmanCode = require('./huffman').HuffmanCode; +var BrotliBuildHuffmanTable = require('./huffman').BrotliBuildHuffmanTable; +var Context = require('./context'); +var Prefix = require('./prefix'); +var Transform = require('./transform'); + +var kDefaultCodeLength = 8; +var kCodeLengthRepeatCode = 16; +var kNumLiteralCodes = 256; +var kNumInsertAndCopyCodes = 704; +var kNumBlockLengthCodes = 26; +var kLiteralContextBits = 6; +var kDistanceContextBits = 2; + +var HUFFMAN_TABLE_BITS = 8; +var HUFFMAN_TABLE_MASK = 0xff; +/* Maximum possible Huffman table size for an alphabet size of 704, max code + * length 15 and root table bits 8. */ +var HUFFMAN_MAX_TABLE_SIZE = 1080; + +var CODE_LENGTH_CODES = 18; +var kCodeLengthCodeOrder = new Uint8Array([ + 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, +]); + +var NUM_DISTANCE_SHORT_CODES = 16; +var kDistanceShortCodeIndexOffset = new Uint8Array([ + 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 +]); + +var kDistanceShortCodeValueOffset = new Int8Array([ + 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3 +]); + +var kMaxHuffmanTableSize = new Uint16Array([ + 256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822, + 854, 886, 920, 952, 984, 1016, 1048, 1080 +]); + +function DecodeWindowBits(br) { + var n; + if (br.readBits(1) === 0) { + return 16; + } + + n = br.readBits(3); + if (n > 0) { + return 17 + n; + } + + n = br.readBits(3); + if (n > 0) { + return 8 + n; + } + + return 17; +} + +/* Decodes a number in the range [0..255], by reading 1 - 11 bits. */ +function DecodeVarLenUint8(br) { + if (br.readBits(1)) { + var nbits = br.readBits(3); + if (nbits === 0) { + return 1; + } else { + return br.readBits(nbits) + (1 << nbits); + } + } + return 0; +} + +function MetaBlockLength() { + this.meta_block_length = 0; + this.input_end = 0; + this.is_uncompressed = 0; + this.is_metadata = false; +} + +function DecodeMetaBlockLength(br) { + var out = new MetaBlockLength; + var size_nibbles; + var size_bytes; + var i; + + out.input_end = br.readBits(1); + if (out.input_end && br.readBits(1)) { + return out; + } + + size_nibbles = br.readBits(2) + 4; + if (size_nibbles === 7) { + out.is_metadata = true; + + if (br.readBits(1) !== 0) + throw new Error('Invalid reserved bit'); + + size_bytes = br.readBits(2); + if (size_bytes === 0) + return out; + + for (i = 0; i < size_bytes; i++) { + var next_byte = br.readBits(8); + if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0) + throw new Error('Invalid size byte'); + + out.meta_block_length |= next_byte << (i * 8); + } + } else { + for (i = 0; i < size_nibbles; ++i) { + var next_nibble = br.readBits(4); + if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0) + throw new Error('Invalid size nibble'); + + out.meta_block_length |= next_nibble << (i * 4); + } + } + + ++out.meta_block_length; + + if (!out.input_end && !out.is_metadata) { + out.is_uncompressed = br.readBits(1); + } + + return out; +} + +/* Decodes the next Huffman code from bit-stream. */ +function ReadSymbol(table, index, br) { + var start_index = index; + + var nbits; + br.fillBitWindow(); + index += (br.val_ >>> br.bit_pos_) & HUFFMAN_TABLE_MASK; + nbits = table[index].bits - HUFFMAN_TABLE_BITS; + if (nbits > 0) { + br.bit_pos_ += HUFFMAN_TABLE_BITS; + index += table[index].value; + index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1); + } + br.bit_pos_ += table[index].bits; + return table[index].value; +} + +function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) { + var symbol = 0; + var prev_code_len = kDefaultCodeLength; + var repeat = 0; + var repeat_code_len = 0; + var space = 32768; + + var table = []; + for (var i = 0; i < 32; i++) + table.push(new HuffmanCode(0, 0)); + + BrotliBuildHuffmanTable(table, 0, 5, code_length_code_lengths, CODE_LENGTH_CODES); + + while (symbol < num_symbols && space > 0) { + var p = 0; + var code_len; + + br.readMoreInput(); + br.fillBitWindow(); + p += (br.val_ >>> br.bit_pos_) & 31; + br.bit_pos_ += table[p].bits; + code_len = table[p].value & 0xff; + if (code_len < kCodeLengthRepeatCode) { + repeat = 0; + code_lengths[symbol++] = code_len; + if (code_len !== 0) { + prev_code_len = code_len; + space -= 32768 >> code_len; + } + } else { + var extra_bits = code_len - 14; + var old_repeat; + var repeat_delta; + var new_len = 0; + if (code_len === kCodeLengthRepeatCode) { + new_len = prev_code_len; + } + if (repeat_code_len !== new_len) { + repeat = 0; + repeat_code_len = new_len; + } + old_repeat = repeat; + if (repeat > 0) { + repeat -= 2; + repeat <<= extra_bits; + } + repeat += br.readBits(extra_bits) + 3; + repeat_delta = repeat - old_repeat; + if (symbol + repeat_delta > num_symbols) { + throw new Error('[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols'); + } + + for (var x = 0; x < repeat_delta; x++) + code_lengths[symbol + x] = repeat_code_len; + + symbol += repeat_delta; + + if (repeat_code_len !== 0) { + space -= repeat_delta << (15 - repeat_code_len); + } + } + } + if (space !== 0) { + throw new Error("[ReadHuffmanCodeLengths] space = " + space); + } + + for (; symbol < num_symbols; symbol++) + code_lengths[symbol] = 0; +} + +function ReadHuffmanCode(alphabet_size, tables, table, br) { + var table_size = 0; + var simple_code_or_skip; + var code_lengths = new Uint8Array(alphabet_size); + + br.readMoreInput(); + + /* simple_code_or_skip is used as follows: + 1 for simple code; + 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */ + simple_code_or_skip = br.readBits(2); + if (simple_code_or_skip === 1) { + /* Read symbols, codes & code lengths directly. */ + var i; + var max_bits_counter = alphabet_size - 1; + var max_bits = 0; + var symbols = new Int32Array(4); + var num_symbols = br.readBits(2) + 1; + while (max_bits_counter) { + max_bits_counter >>= 1; + ++max_bits; + } + + for (i = 0; i < num_symbols; ++i) { + symbols[i] = br.readBits(max_bits) % alphabet_size; + code_lengths[symbols[i]] = 2; + } + code_lengths[symbols[0]] = 1; + switch (num_symbols) { + case 1: + break; + case 3: + if ((symbols[0] === symbols[1]) || + (symbols[0] === symbols[2]) || + (symbols[1] === symbols[2])) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + break; + case 2: + if (symbols[0] === symbols[1]) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + + code_lengths[symbols[1]] = 1; + break; + case 4: + if ((symbols[0] === symbols[1]) || + (symbols[0] === symbols[2]) || + (symbols[0] === symbols[3]) || + (symbols[1] === symbols[2]) || + (symbols[1] === symbols[3]) || + (symbols[2] === symbols[3])) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + + if (br.readBits(1)) { + code_lengths[symbols[2]] = 3; + code_lengths[symbols[3]] = 3; + } else { + code_lengths[symbols[0]] = 2; + } + break; + } + } else { /* Decode Huffman-coded code lengths. */ + var i; + var code_length_code_lengths = new Uint8Array(CODE_LENGTH_CODES); + var space = 32; + var num_codes = 0; + /* Static Huffman code for the code length code lengths */ + var huff = [ + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 1), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 5) + ]; + for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) { + var code_len_idx = kCodeLengthCodeOrder[i]; + var p = 0; + var v; + br.fillBitWindow(); + p += (br.val_ >>> br.bit_pos_) & 15; + br.bit_pos_ += huff[p].bits; + v = huff[p].value; + code_length_code_lengths[code_len_idx] = v; + if (v !== 0) { + space -= (32 >> v); + ++num_codes; + } + } + + if (!(num_codes === 1 || space === 0)) + throw new Error('[ReadHuffmanCode] invalid num_codes or space'); + + ReadHuffmanCodeLengths(code_length_code_lengths, alphabet_size, code_lengths, br); + } + + table_size = BrotliBuildHuffmanTable(tables, table, HUFFMAN_TABLE_BITS, code_lengths, alphabet_size); + + if (table_size === 0) { + throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: "); + } + + return table_size; +} + +function ReadBlockLength(table, index, br) { + var code; + var nbits; + code = ReadSymbol(table, index, br); + nbits = Prefix.kBlockLengthPrefixCode[code].nbits; + return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits); +} + +function TranslateShortCodes(code, ringbuffer, index) { + var val; + if (code < NUM_DISTANCE_SHORT_CODES) { + index += kDistanceShortCodeIndexOffset[code]; + index &= 3; + val = ringbuffer[index] + kDistanceShortCodeValueOffset[code]; + } else { + val = code - NUM_DISTANCE_SHORT_CODES + 1; + } + return val; +} + +function MoveToFront(v, index) { + var value = v[index]; + var i = index; + for (; i; --i) v[i] = v[i - 1]; + v[0] = value; +} + +function InverseMoveToFrontTransform(v, v_len) { + var mtf = new Uint8Array(256); + var i; + for (i = 0; i < 256; ++i) { + mtf[i] = i; + } + for (i = 0; i < v_len; ++i) { + var index = v[i]; + v[i] = mtf[index]; + if (index) MoveToFront(mtf, index); + } +} + +/* Contains a collection of huffman trees with the same alphabet size. */ +function HuffmanTreeGroup(alphabet_size, num_htrees) { + this.alphabet_size = alphabet_size; + this.num_htrees = num_htrees; + this.codes = new Array(num_htrees + num_htrees * kMaxHuffmanTableSize[(alphabet_size + 31) >>> 5]); + this.htrees = new Uint32Array(num_htrees); +} + +HuffmanTreeGroup.prototype.decode = function(br) { + var i; + var table_size; + var next = 0; + for (i = 0; i < this.num_htrees; ++i) { + this.htrees[i] = next; + table_size = ReadHuffmanCode(this.alphabet_size, this.codes, next, br); + next += table_size; + } +}; + +function DecodeContextMap(context_map_size, br) { + var out = { num_htrees: null, context_map: null }; + var use_rle_for_zeros; + var max_run_length_prefix = 0; + var table; + var i; + + br.readMoreInput(); + var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1; + + var context_map = out.context_map = new Uint8Array(context_map_size); + if (num_htrees <= 1) { + return out; + } + + use_rle_for_zeros = br.readBits(1); + if (use_rle_for_zeros) { + max_run_length_prefix = br.readBits(4) + 1; + } + + table = []; + for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) { + table[i] = new HuffmanCode(0, 0); + } + + ReadHuffmanCode(num_htrees + max_run_length_prefix, table, 0, br); + + for (i = 0; i < context_map_size;) { + var code; + + br.readMoreInput(); + code = ReadSymbol(table, 0, br); + if (code === 0) { + context_map[i] = 0; + ++i; + } else if (code <= max_run_length_prefix) { + var reps = 1 + (1 << code) + br.readBits(code); + while (--reps) { + if (i >= context_map_size) { + throw new Error("[DecodeContextMap] i >= context_map_size"); + } + context_map[i] = 0; + ++i; + } + } else { + context_map[i] = code - max_run_length_prefix; + ++i; + } + } + if (br.readBits(1)) { + InverseMoveToFrontTransform(context_map, context_map_size); + } + + return out; +} + +function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) { + var ringbuffer = tree_type * 2; + var index = tree_type; + var type_code = ReadSymbol(trees, tree_type * HUFFMAN_MAX_TABLE_SIZE, br); + var block_type; + if (type_code === 0) { + block_type = ringbuffers[ringbuffer + (indexes[index] & 1)]; + } else if (type_code === 1) { + block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1; + } else { + block_type = type_code - 2; + } + if (block_type >= max_block_type) { + block_type -= max_block_type; + } + block_types[tree_type] = block_type; + ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type; + ++indexes[index]; +} + +function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) { + var rb_size = ringbuffer_mask + 1; + var rb_pos = pos & ringbuffer_mask; + var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK; + var nbytes; + + /* For short lengths copy byte-by-byte */ + if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) { + while (len-- > 0) { + br.readMoreInput(); + ringbuffer[rb_pos++] = br.readBits(8); + if (rb_pos === rb_size) { + output.write(ringbuffer, rb_size); + rb_pos = 0; + } + } + return; + } + + if (br.bit_end_pos_ < 32) { + throw new Error('[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32'); + } + + /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */ + while (br.bit_pos_ < 32) { + ringbuffer[rb_pos] = (br.val_ >>> br.bit_pos_); + br.bit_pos_ += 8; + ++rb_pos; + --len; + } + + /* Copy remaining bytes from br.buf_ to ringbuffer. */ + nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3; + if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) { + var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos; + for (var x = 0; x < tail; x++) + ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; + + nbytes -= tail; + rb_pos += tail; + len -= tail; + br_pos = 0; + } + + for (var x = 0; x < nbytes; x++) + ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; + + rb_pos += nbytes; + len -= nbytes; + + /* If we wrote past the logical end of the ringbuffer, copy the tail of the + ringbuffer to its beginning and flush the ringbuffer to the output. */ + if (rb_pos >= rb_size) { + output.write(ringbuffer, rb_size); + rb_pos -= rb_size; + for (var x = 0; x < rb_pos; x++) + ringbuffer[x] = ringbuffer[rb_size + x]; + } + + /* If we have more to copy than the remaining size of the ringbuffer, then we + first fill the ringbuffer from the input and then flush the ringbuffer to + the output */ + while (rb_pos + len >= rb_size) { + nbytes = rb_size - rb_pos; + if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) { + throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); + } + output.write(ringbuffer, rb_size); + len -= nbytes; + rb_pos = 0; + } + + /* Copy straight from the input onto the ringbuffer. The ringbuffer will be + flushed to the output at a later time. */ + if (br.input_.read(ringbuffer, rb_pos, len) < len) { + throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); + } + + /* Restore the state of the bit reader. */ + br.reset(); +} + +/* Advances the bit reader position to the next byte boundary and verifies + that any skipped bits are set to zero. */ +function JumpToByteBoundary(br) { + var new_bit_pos = (br.bit_pos_ + 7) & ~7; + var pad_bits = br.readBits(new_bit_pos - br.bit_pos_); + return pad_bits == 0; +} + +function BrotliDecompressedSize(buffer) { + var input = new BrotliInput(buffer); + var br = new BrotliBitReader(input); + DecodeWindowBits(br); + var out = DecodeMetaBlockLength(br); + return out.meta_block_length; +} + +exports.BrotliDecompressedSize = BrotliDecompressedSize; + +function BrotliDecompressBuffer(buffer, output_size) { + var input = new BrotliInput(buffer); + + if (output_size == null) { + output_size = BrotliDecompressedSize(buffer); + } + + var output_buffer = new Uint8Array(output_size); + var output = new BrotliOutput(output_buffer); + + BrotliDecompress(input, output); + + if (output.pos < output.buffer.length) { + output.buffer = output.buffer.subarray(0, output.pos); + } + + return output.buffer; +} + +exports.BrotliDecompressBuffer = BrotliDecompressBuffer; + +function BrotliDecompress(input, output) { + var i; + var pos = 0; + var input_end = 0; + var window_bits = 0; + var max_backward_distance; + var max_distance = 0; + var ringbuffer_size; + var ringbuffer_mask; + var ringbuffer; + var ringbuffer_end; + /* This ring buffer holds a few past copy distances that will be used by */ + /* some special distance codes. */ + var dist_rb = [ 16, 15, 11, 4 ]; + var dist_rb_idx = 0; + /* The previous 2 bytes used for context. */ + var prev_byte1 = 0; + var prev_byte2 = 0; + var hgroup = [new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0)]; + var block_type_trees; + var block_len_trees; + var br; + + /* We need the slack region for the following reasons: + - always doing two 8-byte copies for fast backward copying + - transforms + - flushing the input ringbuffer when decoding uncompressed blocks */ + var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE; + + br = new BrotliBitReader(input); + + /* Decode window size. */ + window_bits = DecodeWindowBits(br); + max_backward_distance = (1 << window_bits) - 16; + + ringbuffer_size = 1 << window_bits; + ringbuffer_mask = ringbuffer_size - 1; + ringbuffer = new Uint8Array(ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength); + ringbuffer_end = ringbuffer_size; + + block_type_trees = []; + block_len_trees = []; + for (var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++) { + block_type_trees[x] = new HuffmanCode(0, 0); + block_len_trees[x] = new HuffmanCode(0, 0); + } + + while (!input_end) { + var meta_block_remaining_len = 0; + var is_uncompressed; + var block_length = [ 1 << 28, 1 << 28, 1 << 28 ]; + var block_type = [ 0 ]; + var num_block_types = [ 1, 1, 1 ]; + var block_type_rb = [ 0, 1, 0, 1, 0, 1 ]; + var block_type_rb_index = [ 0 ]; + var distance_postfix_bits; + var num_direct_distance_codes; + var distance_postfix_mask; + var num_distance_codes; + var context_map = null; + var context_modes = null; + var num_literal_htrees; + var dist_context_map = null; + var num_dist_htrees; + var context_offset = 0; + var context_map_slice = null; + var literal_htree_index = 0; + var dist_context_offset = 0; + var dist_context_map_slice = null; + var dist_htree_index = 0; + var context_lookup_offset1 = 0; + var context_lookup_offset2 = 0; + var context_mode; + var htree_command; + + for (i = 0; i < 3; ++i) { + hgroup[i].codes = null; + hgroup[i].htrees = null; + } + + br.readMoreInput(); + + var _out = DecodeMetaBlockLength(br); + meta_block_remaining_len = _out.meta_block_length; + if (pos + meta_block_remaining_len > output.buffer.length) { + /* We need to grow the output buffer to fit the additional data. */ + var tmp = new Uint8Array( pos + meta_block_remaining_len ); + tmp.set( output.buffer ); + output.buffer = tmp; + } + input_end = _out.input_end; + is_uncompressed = _out.is_uncompressed; + + if (_out.is_metadata) { + JumpToByteBoundary(br); + + for (; meta_block_remaining_len > 0; --meta_block_remaining_len) { + br.readMoreInput(); + /* Read one byte and ignore it. */ + br.readBits(8); + } + + continue; + } + + if (meta_block_remaining_len === 0) { + continue; + } + + if (is_uncompressed) { + br.bit_pos_ = (br.bit_pos_ + 7) & ~7; + CopyUncompressedBlockToOutput(output, meta_block_remaining_len, pos, + ringbuffer, ringbuffer_mask, br); + pos += meta_block_remaining_len; + continue; + } + + for (i = 0; i < 3; ++i) { + num_block_types[i] = DecodeVarLenUint8(br) + 1; + if (num_block_types[i] >= 2) { + ReadHuffmanCode(num_block_types[i] + 2, block_type_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + ReadHuffmanCode(kNumBlockLengthCodes, block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + block_length[i] = ReadBlockLength(block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + block_type_rb_index[i] = 1; + } + } + + br.readMoreInput(); + + distance_postfix_bits = br.readBits(2); + num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits); + distance_postfix_mask = (1 << distance_postfix_bits) - 1; + num_distance_codes = (num_direct_distance_codes + (48 << distance_postfix_bits)); + context_modes = new Uint8Array(num_block_types[0]); + + for (i = 0; i < num_block_types[0]; ++i) { + br.readMoreInput(); + context_modes[i] = (br.readBits(2) << 1); + } + + var _o1 = DecodeContextMap(num_block_types[0] << kLiteralContextBits, br); + num_literal_htrees = _o1.num_htrees; + context_map = _o1.context_map; + + var _o2 = DecodeContextMap(num_block_types[2] << kDistanceContextBits, br); + num_dist_htrees = _o2.num_htrees; + dist_context_map = _o2.context_map; + + hgroup[0] = new HuffmanTreeGroup(kNumLiteralCodes, num_literal_htrees); + hgroup[1] = new HuffmanTreeGroup(kNumInsertAndCopyCodes, num_block_types[1]); + hgroup[2] = new HuffmanTreeGroup(num_distance_codes, num_dist_htrees); + + for (i = 0; i < 3; ++i) { + hgroup[i].decode(br); + } + + context_map_slice = 0; + dist_context_map_slice = 0; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + htree_command = hgroup[1].htrees[0]; + + while (meta_block_remaining_len > 0) { + var cmd_code; + var range_idx; + var insert_code; + var copy_code; + var insert_length; + var copy_length; + var distance_code; + var distance; + var context; + var j; + var copy_dst; + + br.readMoreInput(); + + if (block_length[1] === 0) { + DecodeBlockType(num_block_types[1], + block_type_trees, 1, block_type, block_type_rb, + block_type_rb_index, br); + block_length[1] = ReadBlockLength(block_len_trees, HUFFMAN_MAX_TABLE_SIZE, br); + htree_command = hgroup[1].htrees[block_type[1]]; + } + --block_length[1]; + cmd_code = ReadSymbol(hgroup[1].codes, htree_command, br); + range_idx = cmd_code >> 6; + if (range_idx >= 2) { + range_idx -= 2; + distance_code = -1; + } else { + distance_code = 0; + } + insert_code = Prefix.kInsertRangeLut[range_idx] + ((cmd_code >> 3) & 7); + copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7); + insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + + br.readBits(Prefix.kInsertLengthPrefixCode[insert_code].nbits); + copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + + br.readBits(Prefix.kCopyLengthPrefixCode[copy_code].nbits); + prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask]; + prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask]; + for (j = 0; j < insert_length; ++j) { + br.readMoreInput(); + + if (block_length[0] === 0) { + DecodeBlockType(num_block_types[0], + block_type_trees, 0, block_type, block_type_rb, + block_type_rb_index, br); + block_length[0] = ReadBlockLength(block_len_trees, 0, br); + context_offset = block_type[0] << kLiteralContextBits; + context_map_slice = context_offset; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + } + context = (Context.lookup[context_lookup_offset1 + prev_byte1] | + Context.lookup[context_lookup_offset2 + prev_byte2]); + literal_htree_index = context_map[context_map_slice + context]; + --block_length[0]; + prev_byte2 = prev_byte1; + prev_byte1 = ReadSymbol(hgroup[0].codes, hgroup[0].htrees[literal_htree_index], br); + ringbuffer[pos & ringbuffer_mask] = prev_byte1; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write(ringbuffer, ringbuffer_size); + } + ++pos; + } + meta_block_remaining_len -= insert_length; + if (meta_block_remaining_len <= 0) break; + + if (distance_code < 0) { + var context; + + br.readMoreInput(); + if (block_length[2] === 0) { + DecodeBlockType(num_block_types[2], + block_type_trees, 2, block_type, block_type_rb, + block_type_rb_index, br); + block_length[2] = ReadBlockLength(block_len_trees, 2 * HUFFMAN_MAX_TABLE_SIZE, br); + dist_context_offset = block_type[2] << kDistanceContextBits; + dist_context_map_slice = dist_context_offset; + } + --block_length[2]; + context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff; + dist_htree_index = dist_context_map[dist_context_map_slice + context]; + distance_code = ReadSymbol(hgroup[2].codes, hgroup[2].htrees[dist_htree_index], br); + if (distance_code >= num_direct_distance_codes) { + var nbits; + var postfix; + var offset; + distance_code -= num_direct_distance_codes; + postfix = distance_code & distance_postfix_mask; + distance_code >>= distance_postfix_bits; + nbits = (distance_code >> 1) + 1; + offset = ((2 + (distance_code & 1)) << nbits) - 4; + distance_code = num_direct_distance_codes + + ((offset + br.readBits(nbits)) << + distance_postfix_bits) + postfix; + } + } + + /* Convert the distance code to the actual distance by possibly looking */ + /* up past distnaces from the ringbuffer. */ + distance = TranslateShortCodes(distance_code, dist_rb, dist_rb_idx); + if (distance < 0) { + throw new Error('[BrotliDecompress] invalid distance'); + } + + if (pos < max_backward_distance && + max_distance !== max_backward_distance) { + max_distance = pos; + } else { + max_distance = max_backward_distance; + } + + copy_dst = pos & ringbuffer_mask; + + if (distance > max_distance) { + if (copy_length >= BrotliDictionary.minDictionaryWordLength && + copy_length <= BrotliDictionary.maxDictionaryWordLength) { + var offset = BrotliDictionary.offsetsByLength[copy_length]; + var word_id = distance - max_distance - 1; + var shift = BrotliDictionary.sizeBitsByLength[copy_length]; + var mask = (1 << shift) - 1; + var word_idx = word_id & mask; + var transform_idx = word_id >> shift; + offset += word_idx * copy_length; + if (transform_idx < Transform.kNumTransforms) { + var len = Transform.transformDictionaryWord(ringbuffer, copy_dst, offset, copy_length, transform_idx); + copy_dst += len; + pos += len; + meta_block_remaining_len -= len; + if (copy_dst >= ringbuffer_end) { + output.write(ringbuffer, ringbuffer_size); + + for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++) + ringbuffer[_x] = ringbuffer[ringbuffer_end + _x]; + } + } else { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + } else { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + } else { + if (distance_code > 0) { + dist_rb[dist_rb_idx & 3] = distance; + ++dist_rb_idx; + } + + if (copy_length > meta_block_remaining_len) { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + + for (j = 0; j < copy_length; ++j) { + ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask]; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write(ringbuffer, ringbuffer_size); + } + ++pos; + --meta_block_remaining_len; + } + } + + /* When we get here, we must have inserted at least one literal and */ + /* made a copy of at least length two, therefore accessing the last 2 */ + /* bytes is valid. */ + prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask]; + prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask]; + } + + /* Protect pos from overflow, wrap it around at every GB of input data */ + pos &= 0x3fffffff; + } + + output.write(ringbuffer, pos & ringbuffer_mask); +} + +exports.BrotliDecompress = BrotliDecompress; + +BrotliDictionary.init(); diff --git a/node_modules/brotli/dec/dictionary-browser.js b/node_modules/brotli/dec/dictionary-browser.js new file mode 100644 index 0000000..9608543 --- /dev/null +++ b/node_modules/brotli/dec/dictionary-browser.js @@ -0,0 +1,14 @@ +var base64 = require('base64-js'); + +/** + * The normal dictionary-data.js is quite large, which makes it + * unsuitable for browser usage. In order to make it smaller, + * we read dictionary.bin, which is a compressed version of + * the dictionary, and on initial load, Brotli decompresses + * it's own dictionary. 😜 + */ +exports.init = function() { + var BrotliDecompressBuffer = require('./decode').BrotliDecompressBuffer; + var compressed = base64.toByteArray(require('./dictionary.bin.js')); + return BrotliDecompressBuffer(compressed); +}; diff --git a/node_modules/brotli/dec/dictionary-data.js b/node_modules/brotli/dec/dictionary-data.js new file mode 100644 index 0000000..55448aa --- /dev/null +++ b/node_modules/brotli/dec/dictionary-data.js @@ -0,0 +1,9469 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Collection of static dictionary words. +*/ + +exports.dictionary = new Uint8Array([ + 0x74, 0x69, 0x6d, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x66, 0x65, 0x6c, + 0x65, 0x66, 0x74, 0x62, 0x61, 0x63, 0x6b, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x68, 0x6f, 0x77, 0x6f, 0x6e, 0x6c, 0x79, 0x73, 0x69, 0x74, + 0x65, 0x63, 0x69, 0x74, 0x79, 0x6f, 0x70, 0x65, 0x6e, 0x6a, 0x75, 0x73, 0x74, + 0x6c, 0x69, 0x6b, 0x65, 0x66, 0x72, 0x65, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x74, + 0x65, 0x78, 0x74, 0x79, 0x65, 0x61, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x6f, + 0x64, 0x79, 0x6c, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x62, 0x6f, 0x6f, + 0x6b, 0x70, 0x6c, 0x61, 0x79, 0x6c, 0x69, 0x76, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x68, 0x65, 0x6c, 0x70, 0x68, 0x6f, 0x6d, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6d, + 0x6f, 0x72, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x6c, 0x6f, 0x6e, 0x67, 0x74, 0x68, + 0x65, 0x6d, 0x76, 0x69, 0x65, 0x77, 0x66, 0x69, 0x6e, 0x64, 0x70, 0x61, 0x67, + 0x65, 0x64, 0x61, 0x79, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x68, 0x65, 0x61, 0x64, + 0x74, 0x65, 0x72, 0x6d, 0x65, 0x61, 0x63, 0x68, 0x61, 0x72, 0x65, 0x61, 0x66, + 0x72, 0x6f, 0x6d, 0x74, 0x72, 0x75, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x62, + 0x6c, 0x65, 0x75, 0x70, 0x6f, 0x6e, 0x68, 0x69, 0x67, 0x68, 0x64, 0x61, 0x74, + 0x65, 0x6c, 0x61, 0x6e, 0x64, 0x6e, 0x65, 0x77, 0x73, 0x65, 0x76, 0x65, 0x6e, + 0x6e, 0x65, 0x78, 0x74, 0x63, 0x61, 0x73, 0x65, 0x62, 0x6f, 0x74, 0x68, 0x70, + 0x6f, 0x73, 0x74, 0x75, 0x73, 0x65, 0x64, 0x6d, 0x61, 0x64, 0x65, 0x68, 0x61, + 0x6e, 0x64, 0x68, 0x65, 0x72, 0x65, 0x77, 0x68, 0x61, 0x74, 0x6e, 0x61, 0x6d, + 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x69, 0x7a, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x68, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x6b, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x75, 0x73, 0x65, 0x72, 0x27, 0x29, 0x20, 0x2b, 0x68, 0x6f, + 0x6c, 0x64, 0x65, 0x6e, 0x64, 0x73, 0x77, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x77, + 0x73, 0x72, 0x65, 0x61, 0x64, 0x77, 0x65, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, + 0x74, 0x61, 0x6b, 0x65, 0x68, 0x61, 0x76, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x73, + 0x65, 0x65, 0x6e, 0x63, 0x61, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, 0x77, 0x65, + 0x6c, 0x6c, 0x70, 0x6c, 0x75, 0x73, 0x6d, 0x65, 0x6e, 0x75, 0x66, 0x69, 0x6c, + 0x6d, 0x70, 0x61, 0x72, 0x74, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x68, 0x69, 0x73, + 0x6c, 0x69, 0x73, 0x74, 0x67, 0x6f, 0x6f, 0x64, 0x6e, 0x65, 0x65, 0x64, 0x77, + 0x61, 0x79, 0x73, 0x77, 0x65, 0x73, 0x74, 0x6a, 0x6f, 0x62, 0x73, 0x6d, 0x69, + 0x6e, 0x64, 0x61, 0x6c, 0x73, 0x6f, 0x6c, 0x6f, 0x67, 0x6f, 0x72, 0x69, 0x63, + 0x68, 0x75, 0x73, 0x65, 0x73, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x65, 0x61, 0x6d, + 0x61, 0x72, 0x6d, 0x79, 0x66, 0x6f, 0x6f, 0x64, 0x6b, 0x69, 0x6e, 0x67, 0x77, + 0x69, 0x6c, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x77, 0x61, 0x72, 0x64, 0x62, 0x65, + 0x73, 0x74, 0x66, 0x69, 0x72, 0x65, 0x50, 0x61, 0x67, 0x65, 0x6b, 0x6e, 0x6f, + 0x77, 0x61, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6e, 0x67, 0x6d, 0x6f, 0x76, 0x65, + 0x74, 0x68, 0x61, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x67, 0x69, 0x76, 0x65, 0x73, + 0x65, 0x6c, 0x66, 0x6e, 0x6f, 0x74, 0x65, 0x6d, 0x75, 0x63, 0x68, 0x66, 0x65, + 0x65, 0x64, 0x6d, 0x61, 0x6e, 0x79, 0x72, 0x6f, 0x63, 0x6b, 0x69, 0x63, 0x6f, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x6c, 0x6f, 0x6f, 0x6b, 0x68, 0x69, 0x64, 0x65, + 0x64, 0x69, 0x65, 0x64, 0x48, 0x6f, 0x6d, 0x65, 0x72, 0x75, 0x6c, 0x65, 0x68, + 0x6f, 0x73, 0x74, 0x61, 0x6a, 0x61, 0x78, 0x69, 0x6e, 0x66, 0x6f, 0x63, 0x6c, + 0x75, 0x62, 0x6c, 0x61, 0x77, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x68, 0x61, 0x6c, + 0x66, 0x73, 0x6f, 0x6d, 0x65, 0x73, 0x75, 0x63, 0x68, 0x7a, 0x6f, 0x6e, 0x65, + 0x31, 0x30, 0x30, 0x25, 0x6f, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x72, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x61, 0x63, 0x65, 0x62, 0x6c, 0x75, 0x65, 0x66, 0x6f, + 0x75, 0x72, 0x77, 0x65, 0x65, 0x6b, 0x66, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x70, + 0x65, 0x67, 0x61, 0x76, 0x65, 0x68, 0x61, 0x72, 0x64, 0x6c, 0x6f, 0x73, 0x74, + 0x77, 0x68, 0x65, 0x6e, 0x70, 0x61, 0x72, 0x6b, 0x6b, 0x65, 0x70, 0x74, 0x70, + 0x61, 0x73, 0x73, 0x73, 0x68, 0x69, 0x70, 0x72, 0x6f, 0x6f, 0x6d, 0x48, 0x54, + 0x4d, 0x4c, 0x70, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x6f, 0x6e, + 0x65, 0x73, 0x61, 0x76, 0x65, 0x6b, 0x65, 0x65, 0x70, 0x66, 0x6c, 0x61, 0x67, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x6f, 0x6c, 0x64, 0x66, 0x69, 0x76, 0x65, 0x74, + 0x6f, 0x6f, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x74, 0x6f, 0x77, 0x6e, 0x6a, 0x75, + 0x6d, 0x70, 0x74, 0x68, 0x75, 0x73, 0x64, 0x61, 0x72, 0x6b, 0x63, 0x61, 0x72, + 0x64, 0x66, 0x69, 0x6c, 0x65, 0x66, 0x65, 0x61, 0x72, 0x73, 0x74, 0x61, 0x79, + 0x6b, 0x69, 0x6c, 0x6c, 0x74, 0x68, 0x61, 0x74, 0x66, 0x61, 0x6c, 0x6c, 0x61, + 0x75, 0x74, 0x6f, 0x65, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x74, 0x61, + 0x6c, 0x6b, 0x73, 0x68, 0x6f, 0x70, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x65, 0x65, + 0x70, 0x6d, 0x6f, 0x64, 0x65, 0x72, 0x65, 0x73, 0x74, 0x74, 0x75, 0x72, 0x6e, + 0x62, 0x6f, 0x72, 0x6e, 0x62, 0x61, 0x6e, 0x64, 0x66, 0x65, 0x6c, 0x6c, 0x72, + 0x6f, 0x73, 0x65, 0x75, 0x72, 0x6c, 0x28, 0x73, 0x6b, 0x69, 0x6e, 0x72, 0x6f, + 0x6c, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x61, 0x63, 0x74, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x6d, 0x65, 0x65, 0x74, 0x67, 0x6f, 0x6c, 0x64, 0x2e, 0x6a, 0x70, 0x67, + 0x69, 0x74, 0x65, 0x6d, 0x76, 0x61, 0x72, 0x79, 0x66, 0x65, 0x6c, 0x74, 0x74, + 0x68, 0x65, 0x6e, 0x73, 0x65, 0x6e, 0x64, 0x64, 0x72, 0x6f, 0x70, 0x56, 0x69, + 0x65, 0x77, 0x63, 0x6f, 0x70, 0x79, 0x31, 0x2e, 0x30, 0x22, 0x3c, 0x2f, 0x61, + 0x3e, 0x73, 0x74, 0x6f, 0x70, 0x65, 0x6c, 0x73, 0x65, 0x6c, 0x69, 0x65, 0x73, + 0x74, 0x6f, 0x75, 0x72, 0x70, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x69, 0x66, 0x70, + 0x61, 0x73, 0x74, 0x63, 0x73, 0x73, 0x3f, 0x67, 0x72, 0x61, 0x79, 0x6d, 0x65, + 0x61, 0x6e, 0x26, 0x67, 0x74, 0x3b, 0x72, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, + 0x74, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x61, 0x69, 0x64, 0x72, 0x6f, 0x61, 0x64, + 0x76, 0x61, 0x72, 0x20, 0x66, 0x65, 0x65, 0x6c, 0x6a, 0x6f, 0x68, 0x6e, 0x72, + 0x69, 0x63, 0x6b, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x61, 0x73, 0x74, 0x27, 0x55, + 0x41, 0x2d, 0x64, 0x65, 0x61, 0x64, 0x3c, 0x2f, 0x62, 0x3e, 0x70, 0x6f, 0x6f, + 0x72, 0x62, 0x69, 0x6c, 0x6c, 0x74, 0x79, 0x70, 0x65, 0x55, 0x2e, 0x53, 0x2e, + 0x77, 0x6f, 0x6f, 0x64, 0x6d, 0x75, 0x73, 0x74, 0x32, 0x70, 0x78, 0x3b, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x61, 0x6e, 0x6b, 0x77, 0x69, 0x64, 0x65, 0x77, 0x61, + 0x6e, 0x74, 0x77, 0x61, 0x6c, 0x6c, 0x6c, 0x65, 0x61, 0x64, 0x5b, 0x30, 0x5d, + 0x3b, 0x70, 0x61, 0x75, 0x6c, 0x77, 0x61, 0x76, 0x65, 0x73, 0x75, 0x72, 0x65, + 0x24, 0x28, 0x27, 0x23, 0x77, 0x61, 0x69, 0x74, 0x6d, 0x61, 0x73, 0x73, 0x61, + 0x72, 0x6d, 0x73, 0x67, 0x6f, 0x65, 0x73, 0x67, 0x61, 0x69, 0x6e, 0x6c, 0x61, + 0x6e, 0x67, 0x70, 0x61, 0x69, 0x64, 0x21, 0x2d, 0x2d, 0x20, 0x6c, 0x6f, 0x63, + 0x6b, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x6f, 0x74, 0x77, 0x61, 0x6c, 0x6b, + 0x66, 0x69, 0x72, 0x6d, 0x77, 0x69, 0x66, 0x65, 0x78, 0x6d, 0x6c, 0x22, 0x73, + 0x6f, 0x6e, 0x67, 0x74, 0x65, 0x73, 0x74, 0x32, 0x30, 0x70, 0x78, 0x6b, 0x69, + 0x6e, 0x64, 0x72, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x6f, 0x6c, 0x66, 0x6f, 0x6e, + 0x74, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x61, 0x66, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x6d, 0x61, 0x70, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x72, 0x61, 0x69, 0x6e, 0x66, + 0x6c, 0x6f, 0x77, 0x62, 0x61, 0x62, 0x79, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x61, + 0x79, 0x73, 0x34, 0x70, 0x78, 0x3b, 0x36, 0x70, 0x78, 0x3b, 0x61, 0x72, 0x74, + 0x73, 0x66, 0x6f, 0x6f, 0x74, 0x72, 0x65, 0x61, 0x6c, 0x77, 0x69, 0x6b, 0x69, + 0x68, 0x65, 0x61, 0x74, 0x73, 0x74, 0x65, 0x70, 0x74, 0x72, 0x69, 0x70, 0x6f, + 0x72, 0x67, 0x2f, 0x6c, 0x61, 0x6b, 0x65, 0x77, 0x65, 0x61, 0x6b, 0x74, 0x6f, + 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x66, 0x61, 0x6e, + 0x73, 0x62, 0x61, 0x6e, 0x6b, 0x76, 0x65, 0x72, 0x79, 0x72, 0x75, 0x6e, 0x73, + 0x6a, 0x75, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x31, 0x70, 0x78, 0x3b, 0x67, + 0x6f, 0x61, 0x6c, 0x67, 0x72, 0x65, 0x77, 0x73, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x67, 0x65, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x65, 0x74, 0x73, 0x35, 0x70, 0x78, + 0x3b, 0x2e, 0x6a, 0x73, 0x3f, 0x34, 0x30, 0x70, 0x78, 0x69, 0x66, 0x20, 0x28, + 0x73, 0x6f, 0x6f, 0x6e, 0x73, 0x65, 0x61, 0x74, 0x6e, 0x6f, 0x6e, 0x65, 0x74, + 0x75, 0x62, 0x65, 0x7a, 0x65, 0x72, 0x6f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x65, + 0x65, 0x64, 0x66, 0x61, 0x63, 0x74, 0x69, 0x6e, 0x74, 0x6f, 0x67, 0x69, 0x66, + 0x74, 0x68, 0x61, 0x72, 0x6d, 0x31, 0x38, 0x70, 0x78, 0x63, 0x61, 0x6d, 0x65, + 0x68, 0x69, 0x6c, 0x6c, 0x62, 0x6f, 0x6c, 0x64, 0x7a, 0x6f, 0x6f, 0x6d, 0x76, + 0x6f, 0x69, 0x64, 0x65, 0x61, 0x73, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x66, 0x69, + 0x6c, 0x6c, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x69, 0x74, 0x63, 0x6f, 0x73, + 0x74, 0x33, 0x70, 0x78, 0x3b, 0x6a, 0x61, 0x63, 0x6b, 0x74, 0x61, 0x67, 0x73, + 0x62, 0x69, 0x74, 0x73, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x69, 0x74, 0x6b, + 0x6e, 0x65, 0x77, 0x6e, 0x65, 0x61, 0x72, 0x3c, 0x21, 0x2d, 0x2d, 0x67, 0x72, + 0x6f, 0x77, 0x4a, 0x53, 0x4f, 0x4e, 0x64, 0x75, 0x74, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x61, 0x6c, 0x65, 0x79, 0x6f, 0x75, 0x20, 0x6c, 0x6f, 0x74, 0x73, + 0x70, 0x61, 0x69, 0x6e, 0x6a, 0x61, 0x7a, 0x7a, 0x63, 0x6f, 0x6c, 0x64, 0x65, + 0x79, 0x65, 0x73, 0x66, 0x69, 0x73, 0x68, 0x77, 0x77, 0x77, 0x2e, 0x72, 0x69, + 0x73, 0x6b, 0x74, 0x61, 0x62, 0x73, 0x70, 0x72, 0x65, 0x76, 0x31, 0x30, 0x70, + 0x78, 0x72, 0x69, 0x73, 0x65, 0x32, 0x35, 0x70, 0x78, 0x42, 0x6c, 0x75, 0x65, + 0x64, 0x69, 0x6e, 0x67, 0x33, 0x30, 0x30, 0x2c, 0x62, 0x61, 0x6c, 0x6c, 0x66, + 0x6f, 0x72, 0x64, 0x65, 0x61, 0x72, 0x6e, 0x77, 0x69, 0x6c, 0x64, 0x62, 0x6f, + 0x78, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x6c, 0x61, 0x63, 0x6b, 0x76, 0x65, 0x72, + 0x73, 0x70, 0x61, 0x69, 0x72, 0x6a, 0x75, 0x6e, 0x65, 0x74, 0x65, 0x63, 0x68, + 0x69, 0x66, 0x28, 0x21, 0x70, 0x69, 0x63, 0x6b, 0x65, 0x76, 0x69, 0x6c, 0x24, + 0x28, 0x22, 0x23, 0x77, 0x61, 0x72, 0x6d, 0x6c, 0x6f, 0x72, 0x64, 0x64, 0x6f, + 0x65, 0x73, 0x70, 0x75, 0x6c, 0x6c, 0x2c, 0x30, 0x30, 0x30, 0x69, 0x64, 0x65, + 0x61, 0x64, 0x72, 0x61, 0x77, 0x68, 0x75, 0x67, 0x65, 0x73, 0x70, 0x6f, 0x74, + 0x66, 0x75, 0x6e, 0x64, 0x62, 0x75, 0x72, 0x6e, 0x68, 0x72, 0x65, 0x66, 0x63, + 0x65, 0x6c, 0x6c, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x68, 0x6f, + 0x75, 0x72, 0x6c, 0x6f, 0x73, 0x73, 0x66, 0x75, 0x65, 0x6c, 0x31, 0x32, 0x70, + 0x78, 0x73, 0x75, 0x69, 0x74, 0x64, 0x65, 0x61, 0x6c, 0x52, 0x53, 0x53, 0x22, + 0x61, 0x67, 0x65, 0x64, 0x67, 0x72, 0x65, 0x79, 0x47, 0x45, 0x54, 0x22, 0x65, + 0x61, 0x73, 0x65, 0x61, 0x69, 0x6d, 0x73, 0x67, 0x69, 0x72, 0x6c, 0x61, 0x69, + 0x64, 0x73, 0x38, 0x70, 0x78, 0x3b, 0x6e, 0x61, 0x76, 0x79, 0x67, 0x72, 0x69, + 0x64, 0x74, 0x69, 0x70, 0x73, 0x23, 0x39, 0x39, 0x39, 0x77, 0x61, 0x72, 0x73, + 0x6c, 0x61, 0x64, 0x79, 0x63, 0x61, 0x72, 0x73, 0x29, 0x3b, 0x20, 0x7d, 0x70, + 0x68, 0x70, 0x3f, 0x68, 0x65, 0x6c, 0x6c, 0x74, 0x61, 0x6c, 0x6c, 0x77, 0x68, + 0x6f, 0x6d, 0x7a, 0x68, 0x3a, 0xe5, 0x2a, 0x2f, 0x0d, 0x0a, 0x20, 0x31, 0x30, + 0x30, 0x68, 0x61, 0x6c, 0x6c, 0x2e, 0x0a, 0x0a, 0x41, 0x37, 0x70, 0x78, 0x3b, + 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x74, 0x30, 0x70, 0x78, 0x3b, 0x63, + 0x72, 0x65, 0x77, 0x2a, 0x2f, 0x3c, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x37, 0x35, + 0x70, 0x78, 0x66, 0x6c, 0x61, 0x74, 0x72, 0x61, 0x72, 0x65, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x65, 0x6c, 0x6c, 0x63, 0x61, 0x6d, 0x70, 0x6f, 0x6e, 0x74, 0x6f, + 0x6c, 0x61, 0x69, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x73, 0x6b, 0x69, 0x70, 0x74, + 0x65, 0x6e, 0x74, 0x66, 0x69, 0x6e, 0x65, 0x6d, 0x61, 0x6c, 0x65, 0x67, 0x65, + 0x74, 0x73, 0x70, 0x6c, 0x6f, 0x74, 0x34, 0x30, 0x30, 0x2c, 0x0d, 0x0a, 0x0d, + 0x0a, 0x63, 0x6f, 0x6f, 0x6c, 0x66, 0x65, 0x65, 0x74, 0x2e, 0x70, 0x68, 0x70, + 0x3c, 0x62, 0x72, 0x3e, 0x65, 0x72, 0x69, 0x63, 0x6d, 0x6f, 0x73, 0x74, 0x67, + 0x75, 0x69, 0x64, 0x62, 0x65, 0x6c, 0x6c, 0x64, 0x65, 0x73, 0x63, 0x68, 0x61, + 0x69, 0x72, 0x6d, 0x61, 0x74, 0x68, 0x61, 0x74, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, + 0x67, 0x26, 0x23, 0x38, 0x32, 0x6c, 0x75, 0x63, 0x6b, 0x63, 0x65, 0x6e, 0x74, + 0x30, 0x30, 0x30, 0x3b, 0x74, 0x69, 0x6e, 0x79, 0x67, 0x6f, 0x6e, 0x65, 0x68, + 0x74, 0x6d, 0x6c, 0x73, 0x65, 0x6c, 0x6c, 0x64, 0x72, 0x75, 0x67, 0x46, 0x52, + 0x45, 0x45, 0x6e, 0x6f, 0x64, 0x65, 0x6e, 0x69, 0x63, 0x6b, 0x3f, 0x69, 0x64, + 0x3d, 0x6c, 0x6f, 0x73, 0x65, 0x6e, 0x75, 0x6c, 0x6c, 0x76, 0x61, 0x73, 0x74, + 0x77, 0x69, 0x6e, 0x64, 0x52, 0x53, 0x53, 0x20, 0x77, 0x65, 0x61, 0x72, 0x72, + 0x65, 0x6c, 0x79, 0x62, 0x65, 0x65, 0x6e, 0x73, 0x61, 0x6d, 0x65, 0x64, 0x75, + 0x6b, 0x65, 0x6e, 0x61, 0x73, 0x61, 0x63, 0x61, 0x70, 0x65, 0x77, 0x69, 0x73, + 0x68, 0x67, 0x75, 0x6c, 0x66, 0x54, 0x32, 0x33, 0x3a, 0x68, 0x69, 0x74, 0x73, + 0x73, 0x6c, 0x6f, 0x74, 0x67, 0x61, 0x74, 0x65, 0x6b, 0x69, 0x63, 0x6b, 0x62, + 0x6c, 0x75, 0x72, 0x74, 0x68, 0x65, 0x79, 0x31, 0x35, 0x70, 0x78, 0x27, 0x27, + 0x29, 0x3b, 0x29, 0x3b, 0x22, 0x3e, 0x6d, 0x73, 0x69, 0x65, 0x77, 0x69, 0x6e, + 0x73, 0x62, 0x69, 0x72, 0x64, 0x73, 0x6f, 0x72, 0x74, 0x62, 0x65, 0x74, 0x61, + 0x73, 0x65, 0x65, 0x6b, 0x54, 0x31, 0x38, 0x3a, 0x6f, 0x72, 0x64, 0x73, 0x74, + 0x72, 0x65, 0x65, 0x6d, 0x61, 0x6c, 0x6c, 0x36, 0x30, 0x70, 0x78, 0x66, 0x61, + 0x72, 0x6d, 0xe2, 0x80, 0x99, 0x73, 0x62, 0x6f, 0x79, 0x73, 0x5b, 0x30, 0x5d, + 0x2e, 0x27, 0x29, 0x3b, 0x22, 0x50, 0x4f, 0x53, 0x54, 0x62, 0x65, 0x61, 0x72, + 0x6b, 0x69, 0x64, 0x73, 0x29, 0x3b, 0x7d, 0x7d, 0x6d, 0x61, 0x72, 0x79, 0x74, + 0x65, 0x6e, 0x64, 0x28, 0x55, 0x4b, 0x29, 0x71, 0x75, 0x61, 0x64, 0x7a, 0x68, + 0x3a, 0xe6, 0x2d, 0x73, 0x69, 0x7a, 0x2d, 0x2d, 0x2d, 0x2d, 0x70, 0x72, 0x6f, + 0x70, 0x27, 0x29, 0x3b, 0x0d, 0x6c, 0x69, 0x66, 0x74, 0x54, 0x31, 0x39, 0x3a, + 0x76, 0x69, 0x63, 0x65, 0x61, 0x6e, 0x64, 0x79, 0x64, 0x65, 0x62, 0x74, 0x3e, + 0x52, 0x53, 0x53, 0x70, 0x6f, 0x6f, 0x6c, 0x6e, 0x65, 0x63, 0x6b, 0x62, 0x6c, + 0x6f, 0x77, 0x54, 0x31, 0x36, 0x3a, 0x64, 0x6f, 0x6f, 0x72, 0x65, 0x76, 0x61, + 0x6c, 0x54, 0x31, 0x37, 0x3a, 0x6c, 0x65, 0x74, 0x73, 0x66, 0x61, 0x69, 0x6c, + 0x6f, 0x72, 0x61, 0x6c, 0x70, 0x6f, 0x6c, 0x6c, 0x6e, 0x6f, 0x76, 0x61, 0x63, + 0x6f, 0x6c, 0x73, 0x67, 0x65, 0x6e, 0x65, 0x20, 0xe2, 0x80, 0x94, 0x73, 0x6f, + 0x66, 0x74, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x69, 0x6c, 0x6c, 0x72, 0x6f, 0x73, + 0x73, 0x3c, 0x68, 0x33, 0x3e, 0x70, 0x6f, 0x75, 0x72, 0x66, 0x61, 0x64, 0x65, + 0x70, 0x69, 0x6e, 0x6b, 0x3c, 0x74, 0x72, 0x3e, 0x6d, 0x69, 0x6e, 0x69, 0x29, + 0x7c, 0x21, 0x28, 0x6d, 0x69, 0x6e, 0x65, 0x7a, 0x68, 0x3a, 0xe8, 0x62, 0x61, + 0x72, 0x73, 0x68, 0x65, 0x61, 0x72, 0x30, 0x30, 0x29, 0x3b, 0x6d, 0x69, 0x6c, + 0x6b, 0x20, 0x2d, 0x2d, 0x3e, 0x69, 0x72, 0x6f, 0x6e, 0x66, 0x72, 0x65, 0x64, + 0x64, 0x69, 0x73, 0x6b, 0x77, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x69, 0x6c, 0x70, + 0x75, 0x74, 0x73, 0x2f, 0x6a, 0x73, 0x2f, 0x68, 0x6f, 0x6c, 0x79, 0x54, 0x32, + 0x32, 0x3a, 0x49, 0x53, 0x42, 0x4e, 0x54, 0x32, 0x30, 0x3a, 0x61, 0x64, 0x61, + 0x6d, 0x73, 0x65, 0x65, 0x73, 0x3c, 0x68, 0x32, 0x3e, 0x6a, 0x73, 0x6f, 0x6e, + 0x27, 0x2c, 0x20, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x54, 0x32, 0x31, 0x3a, 0x20, + 0x52, 0x53, 0x53, 0x6c, 0x6f, 0x6f, 0x70, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x6f, + 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x3e, 0x73, 0x6f, 0x75, 0x6c, 0x4c, 0x49, 0x4e, + 0x45, 0x66, 0x6f, 0x72, 0x74, 0x63, 0x61, 0x72, 0x74, 0x54, 0x31, 0x34, 0x3a, + 0x3c, 0x68, 0x31, 0x3e, 0x38, 0x30, 0x70, 0x78, 0x21, 0x2d, 0x2d, 0x3c, 0x39, + 0x70, 0x78, 0x3b, 0x54, 0x30, 0x34, 0x3a, 0x6d, 0x69, 0x6b, 0x65, 0x3a, 0x34, + 0x36, 0x5a, 0x6e, 0x69, 0x63, 0x65, 0x69, 0x6e, 0x63, 0x68, 0x59, 0x6f, 0x72, + 0x6b, 0x72, 0x69, 0x63, 0x65, 0x7a, 0x68, 0x3a, 0xe4, 0x27, 0x29, 0x29, 0x3b, + 0x70, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x67, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x6f, 0x6e, 0x65, 0x62, 0x6f, 0x6e, 0x64, 0x3a, 0x33, 0x37, 0x5a, 0x5f, 0x6f, + 0x66, 0x5f, 0x27, 0x5d, 0x29, 0x3b, 0x30, 0x30, 0x30, 0x2c, 0x7a, 0x68, 0x3a, + 0xe7, 0x74, 0x61, 0x6e, 0x6b, 0x79, 0x61, 0x72, 0x64, 0x62, 0x6f, 0x77, 0x6c, + 0x62, 0x75, 0x73, 0x68, 0x3a, 0x35, 0x36, 0x5a, 0x4a, 0x61, 0x76, 0x61, 0x33, + 0x30, 0x70, 0x78, 0x0a, 0x7c, 0x7d, 0x0a, 0x25, 0x43, 0x33, 0x25, 0x3a, 0x33, + 0x34, 0x5a, 0x6a, 0x65, 0x66, 0x66, 0x45, 0x58, 0x50, 0x49, 0x63, 0x61, 0x73, + 0x68, 0x76, 0x69, 0x73, 0x61, 0x67, 0x6f, 0x6c, 0x66, 0x73, 0x6e, 0x6f, 0x77, + 0x7a, 0x68, 0x3a, 0xe9, 0x71, 0x75, 0x65, 0x72, 0x2e, 0x63, 0x73, 0x73, 0x73, + 0x69, 0x63, 0x6b, 0x6d, 0x65, 0x61, 0x74, 0x6d, 0x69, 0x6e, 0x2e, 0x62, 0x69, + 0x6e, 0x64, 0x64, 0x65, 0x6c, 0x6c, 0x68, 0x69, 0x72, 0x65, 0x70, 0x69, 0x63, + 0x73, 0x72, 0x65, 0x6e, 0x74, 0x3a, 0x33, 0x36, 0x5a, 0x48, 0x54, 0x54, 0x50, + 0x2d, 0x32, 0x30, 0x31, 0x66, 0x6f, 0x74, 0x6f, 0x77, 0x6f, 0x6c, 0x66, 0x45, + 0x4e, 0x44, 0x20, 0x78, 0x62, 0x6f, 0x78, 0x3a, 0x35, 0x34, 0x5a, 0x42, 0x4f, + 0x44, 0x59, 0x64, 0x69, 0x63, 0x6b, 0x3b, 0x0a, 0x7d, 0x0a, 0x65, 0x78, 0x69, + 0x74, 0x3a, 0x33, 0x35, 0x5a, 0x76, 0x61, 0x72, 0x73, 0x62, 0x65, 0x61, 0x74, + 0x27, 0x7d, 0x29, 0x3b, 0x64, 0x69, 0x65, 0x74, 0x39, 0x39, 0x39, 0x3b, 0x61, + 0x6e, 0x6e, 0x65, 0x7d, 0x7d, 0x3c, 0x2f, 0x5b, 0x69, 0x5d, 0x2e, 0x4c, 0x61, + 0x6e, 0x67, 0x6b, 0x6d, 0xc2, 0xb2, 0x77, 0x69, 0x72, 0x65, 0x74, 0x6f, 0x79, + 0x73, 0x61, 0x64, 0x64, 0x73, 0x73, 0x65, 0x61, 0x6c, 0x61, 0x6c, 0x65, 0x78, + 0x3b, 0x0a, 0x09, 0x7d, 0x65, 0x63, 0x68, 0x6f, 0x6e, 0x69, 0x6e, 0x65, 0x2e, + 0x6f, 0x72, 0x67, 0x30, 0x30, 0x35, 0x29, 0x74, 0x6f, 0x6e, 0x79, 0x6a, 0x65, + 0x77, 0x73, 0x73, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x67, 0x73, 0x72, 0x6f, 0x6f, + 0x66, 0x30, 0x30, 0x30, 0x29, 0x20, 0x32, 0x30, 0x30, 0x77, 0x69, 0x6e, 0x65, + 0x67, 0x65, 0x61, 0x72, 0x64, 0x6f, 0x67, 0x73, 0x62, 0x6f, 0x6f, 0x74, 0x67, + 0x61, 0x72, 0x79, 0x63, 0x75, 0x74, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x6d, 0x6c, 0x63, 0x6f, 0x63, + 0x6b, 0x67, 0x61, 0x6e, 0x67, 0x24, 0x28, 0x27, 0x2e, 0x35, 0x30, 0x70, 0x78, + 0x50, 0x68, 0x2e, 0x44, 0x6d, 0x69, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x6e, 0x6c, + 0x6f, 0x61, 0x6e, 0x64, 0x65, 0x73, 0x6b, 0x6d, 0x69, 0x6c, 0x65, 0x72, 0x79, + 0x61, 0x6e, 0x75, 0x6e, 0x69, 0x78, 0x64, 0x69, 0x73, 0x63, 0x29, 0x3b, 0x7d, + 0x0a, 0x64, 0x75, 0x73, 0x74, 0x63, 0x6c, 0x69, 0x70, 0x29, 0x2e, 0x0a, 0x0a, + 0x37, 0x30, 0x70, 0x78, 0x2d, 0x32, 0x30, 0x30, 0x44, 0x56, 0x44, 0x73, 0x37, + 0x5d, 0x3e, 0x3c, 0x74, 0x61, 0x70, 0x65, 0x64, 0x65, 0x6d, 0x6f, 0x69, 0x2b, + 0x2b, 0x29, 0x77, 0x61, 0x67, 0x65, 0x65, 0x75, 0x72, 0x6f, 0x70, 0x68, 0x69, + 0x6c, 0x6f, 0x70, 0x74, 0x73, 0x68, 0x6f, 0x6c, 0x65, 0x46, 0x41, 0x51, 0x73, + 0x61, 0x73, 0x69, 0x6e, 0x2d, 0x32, 0x36, 0x54, 0x6c, 0x61, 0x62, 0x73, 0x70, + 0x65, 0x74, 0x73, 0x55, 0x52, 0x4c, 0x20, 0x62, 0x75, 0x6c, 0x6b, 0x63, 0x6f, + 0x6f, 0x6b, 0x3b, 0x7d, 0x0d, 0x0a, 0x48, 0x45, 0x41, 0x44, 0x5b, 0x30, 0x5d, + 0x29, 0x61, 0x62, 0x62, 0x72, 0x6a, 0x75, 0x61, 0x6e, 0x28, 0x31, 0x39, 0x38, + 0x6c, 0x65, 0x73, 0x68, 0x74, 0x77, 0x69, 0x6e, 0x3c, 0x2f, 0x69, 0x3e, 0x73, + 0x6f, 0x6e, 0x79, 0x67, 0x75, 0x79, 0x73, 0x66, 0x75, 0x63, 0x6b, 0x70, 0x69, + 0x70, 0x65, 0x7c, 0x2d, 0x0a, 0x21, 0x30, 0x30, 0x32, 0x29, 0x6e, 0x64, 0x6f, + 0x77, 0x5b, 0x31, 0x5d, 0x3b, 0x5b, 0x5d, 0x3b, 0x0a, 0x4c, 0x6f, 0x67, 0x20, + 0x73, 0x61, 0x6c, 0x74, 0x0d, 0x0a, 0x09, 0x09, 0x62, 0x61, 0x6e, 0x67, 0x74, + 0x72, 0x69, 0x6d, 0x62, 0x61, 0x74, 0x68, 0x29, 0x7b, 0x0d, 0x0a, 0x30, 0x30, + 0x70, 0x78, 0x0a, 0x7d, 0x29, 0x3b, 0x6b, 0x6f, 0x3a, 0xec, 0x66, 0x65, 0x65, + 0x73, 0x61, 0x64, 0x3e, 0x0d, 0x73, 0x3a, 0x2f, 0x2f, 0x20, 0x5b, 0x5d, 0x3b, + 0x74, 0x6f, 0x6c, 0x6c, 0x70, 0x6c, 0x75, 0x67, 0x28, 0x29, 0x7b, 0x0a, 0x7b, + 0x0d, 0x0a, 0x20, 0x2e, 0x6a, 0x73, 0x27, 0x32, 0x30, 0x30, 0x70, 0x64, 0x75, + 0x61, 0x6c, 0x62, 0x6f, 0x61, 0x74, 0x2e, 0x4a, 0x50, 0x47, 0x29, 0x3b, 0x0a, + 0x7d, 0x71, 0x75, 0x6f, 0x74, 0x29, 0x3b, 0x0a, 0x0a, 0x27, 0x29, 0x3b, 0x0a, + 0x0d, 0x0a, 0x7d, 0x0d, 0x32, 0x30, 0x31, 0x34, 0x32, 0x30, 0x31, 0x35, 0x32, + 0x30, 0x31, 0x36, 0x32, 0x30, 0x31, 0x37, 0x32, 0x30, 0x31, 0x38, 0x32, 0x30, + 0x31, 0x39, 0x32, 0x30, 0x32, 0x30, 0x32, 0x30, 0x32, 0x31, 0x32, 0x30, 0x32, + 0x32, 0x32, 0x30, 0x32, 0x33, 0x32, 0x30, 0x32, 0x34, 0x32, 0x30, 0x32, 0x35, + 0x32, 0x30, 0x32, 0x36, 0x32, 0x30, 0x32, 0x37, 0x32, 0x30, 0x32, 0x38, 0x32, + 0x30, 0x32, 0x39, 0x32, 0x30, 0x33, 0x30, 0x32, 0x30, 0x33, 0x31, 0x32, 0x30, + 0x33, 0x32, 0x32, 0x30, 0x33, 0x33, 0x32, 0x30, 0x33, 0x34, 0x32, 0x30, 0x33, + 0x35, 0x32, 0x30, 0x33, 0x36, 0x32, 0x30, 0x33, 0x37, 0x32, 0x30, 0x31, 0x33, + 0x32, 0x30, 0x31, 0x32, 0x32, 0x30, 0x31, 0x31, 0x32, 0x30, 0x31, 0x30, 0x32, + 0x30, 0x30, 0x39, 0x32, 0x30, 0x30, 0x38, 0x32, 0x30, 0x30, 0x37, 0x32, 0x30, + 0x30, 0x36, 0x32, 0x30, 0x30, 0x35, 0x32, 0x30, 0x30, 0x34, 0x32, 0x30, 0x30, + 0x33, 0x32, 0x30, 0x30, 0x32, 0x32, 0x30, 0x30, 0x31, 0x32, 0x30, 0x30, 0x30, + 0x31, 0x39, 0x39, 0x39, 0x31, 0x39, 0x39, 0x38, 0x31, 0x39, 0x39, 0x37, 0x31, + 0x39, 0x39, 0x36, 0x31, 0x39, 0x39, 0x35, 0x31, 0x39, 0x39, 0x34, 0x31, 0x39, + 0x39, 0x33, 0x31, 0x39, 0x39, 0x32, 0x31, 0x39, 0x39, 0x31, 0x31, 0x39, 0x39, + 0x30, 0x31, 0x39, 0x38, 0x39, 0x31, 0x39, 0x38, 0x38, 0x31, 0x39, 0x38, 0x37, + 0x31, 0x39, 0x38, 0x36, 0x31, 0x39, 0x38, 0x35, 0x31, 0x39, 0x38, 0x34, 0x31, + 0x39, 0x38, 0x33, 0x31, 0x39, 0x38, 0x32, 0x31, 0x39, 0x38, 0x31, 0x31, 0x39, + 0x38, 0x30, 0x31, 0x39, 0x37, 0x39, 0x31, 0x39, 0x37, 0x38, 0x31, 0x39, 0x37, + 0x37, 0x31, 0x39, 0x37, 0x36, 0x31, 0x39, 0x37, 0x35, 0x31, 0x39, 0x37, 0x34, + 0x31, 0x39, 0x37, 0x33, 0x31, 0x39, 0x37, 0x32, 0x31, 0x39, 0x37, 0x31, 0x31, + 0x39, 0x37, 0x30, 0x31, 0x39, 0x36, 0x39, 0x31, 0x39, 0x36, 0x38, 0x31, 0x39, + 0x36, 0x37, 0x31, 0x39, 0x36, 0x36, 0x31, 0x39, 0x36, 0x35, 0x31, 0x39, 0x36, + 0x34, 0x31, 0x39, 0x36, 0x33, 0x31, 0x39, 0x36, 0x32, 0x31, 0x39, 0x36, 0x31, + 0x31, 0x39, 0x36, 0x30, 0x31, 0x39, 0x35, 0x39, 0x31, 0x39, 0x35, 0x38, 0x31, + 0x39, 0x35, 0x37, 0x31, 0x39, 0x35, 0x36, 0x31, 0x39, 0x35, 0x35, 0x31, 0x39, + 0x35, 0x34, 0x31, 0x39, 0x35, 0x33, 0x31, 0x39, 0x35, 0x32, 0x31, 0x39, 0x35, + 0x31, 0x31, 0x39, 0x35, 0x30, 0x31, 0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x34, + 0x31, 0x33, 0x39, 0x34, 0x30, 0x30, 0x30, 0x30, 0x39, 0x39, 0x39, 0x39, 0x63, + 0x6f, 0x6d, 0x6f, 0x6d, 0xc3, 0xa1, 0x73, 0x65, 0x73, 0x74, 0x65, 0x65, 0x73, + 0x74, 0x61, 0x70, 0x65, 0x72, 0x6f, 0x74, 0x6f, 0x64, 0x6f, 0x68, 0x61, 0x63, + 0x65, 0x63, 0x61, 0x64, 0x61, 0x61, 0xc3, 0xb1, 0x6f, 0x62, 0x69, 0x65, 0x6e, + 0x64, 0xc3, 0xad, 0x61, 0x61, 0x73, 0xc3, 0xad, 0x76, 0x69, 0x64, 0x61, 0x63, + 0x61, 0x73, 0x6f, 0x6f, 0x74, 0x72, 0x6f, 0x66, 0x6f, 0x72, 0x6f, 0x73, 0x6f, + 0x6c, 0x6f, 0x6f, 0x74, 0x72, 0x61, 0x63, 0x75, 0x61, 0x6c, 0x64, 0x69, 0x6a, + 0x6f, 0x73, 0x69, 0x64, 0x6f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x69, 0x70, 0x6f, + 0x74, 0x65, 0x6d, 0x61, 0x64, 0x65, 0x62, 0x65, 0x61, 0x6c, 0x67, 0x6f, 0x71, + 0x75, 0xc3, 0xa9, 0x65, 0x73, 0x74, 0x6f, 0x6e, 0x61, 0x64, 0x61, 0x74, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x63, 0x6f, 0x63, 0x61, 0x73, 0x61, 0x62, 0x61, 0x6a, + 0x6f, 0x74, 0x6f, 0x64, 0x61, 0x73, 0x69, 0x6e, 0x6f, 0x61, 0x67, 0x75, 0x61, + 0x70, 0x75, 0x65, 0x73, 0x75, 0x6e, 0x6f, 0x73, 0x61, 0x6e, 0x74, 0x65, 0x64, + 0x69, 0x63, 0x65, 0x6c, 0x75, 0x69, 0x73, 0x65, 0x6c, 0x6c, 0x61, 0x6d, 0x61, + 0x79, 0x6f, 0x7a, 0x6f, 0x6e, 0x61, 0x61, 0x6d, 0x6f, 0x72, 0x70, 0x69, 0x73, + 0x6f, 0x6f, 0x62, 0x72, 0x61, 0x63, 0x6c, 0x69, 0x63, 0x65, 0x6c, 0x6c, 0x6f, + 0x64, 0x69, 0x6f, 0x73, 0x68, 0x6f, 0x72, 0x61, 0x63, 0x61, 0x73, 0x69, 0xd0, + 0xb7, 0xd0, 0xb0, 0xd0, 0xbd, 0xd0, 0xb0, 0xd0, 0xbe, 0xd0, 0xbc, 0xd1, 0x80, + 0xd0, 0xb0, 0xd1, 0x80, 0xd1, 0x83, 0xd1, 0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, 0x6f, 0x73, 0x65, 0x62, 0x6c, 0x61, + 0x63, 0x6b, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x75, 0x73, 0x69, + 0x63, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x68, 0x6f, 0x75, + 0x73, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x79, + 0x65, 0x61, 0x72, 0x73, 0x73, 0x74, 0x61, 0x74, 0x65, 0x74, 0x6f, 0x64, 0x61, + 0x79, 0x77, 0x61, 0x74, 0x65, 0x72, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x64, 0x65, 0x61, 0x74, 0x68, 0x70, 0x6f, 0x77, 0x65, 0x72, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x74, + 0x65, 0x72, 0x6d, 0x73, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x73, + 0x67, 0x61, 0x6d, 0x65, 0x73, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x67, 0x75, 0x69, 0x64, + 0x65, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x77, 0x6f, + 0x6d, 0x65, 0x6e, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x79, 0x6f, 0x75, + 0x6e, 0x67, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x66, 0x72, 0x6f, 0x6e, + 0x74, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x77, 0x61, 0x74, 0x63, 0x68, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x70, 0x72, 0x69, 0x63, 0x65, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x76, 0x69, 0x73, + 0x69, 0x74, 0x69, 0x73, 0x73, 0x75, 0x65, 0x61, 0x72, 0x65, 0x61, 0x73, 0x62, + 0x65, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x70, 0x72, + 0x69, 0x6e, 0x74, 0x70, 0x72, 0x65, 0x73, 0x73, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x73, 0x70, 0x65, 0x65, 0x64, 0x73, 0x74, 0x75, + 0x64, 0x79, 0x74, 0x72, 0x61, 0x64, 0x65, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x73, + 0x65, 0x6e, 0x73, 0x65, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x77, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x61, 0x64, + 0x64, 0x65, 0x64, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x6d, 0x6f, 0x76, 0x65, 0x64, + 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x66, 0x6c, 0x61, + 0x73, 0x68, 0x66, 0x69, 0x78, 0x65, 0x64, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x73, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x72, 0x69, 0x76, 0x65, 0x72, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x73, 0x68, 0x61, 0x70, 0x65, + 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x67, 0x6f, 0x69, + 0x6e, 0x67, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x74, 0x68, 0x69, 0x72, 0x64, 0x62, + 0x61, 0x73, 0x69, 0x63, 0x70, 0x65, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x77, 0x69, 0x64, 0x74, 0x68, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x69, 0x64, + 0x65, 0x61, 0x73, 0x77, 0x72, 0x6f, 0x74, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x76, + 0x6f, 0x69, 0x63, 0x65, 0x73, 0x69, 0x74, 0x65, 0x73, 0x6d, 0x6f, 0x6e, 0x74, + 0x68, 0x77, 0x68, 0x65, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x65, 0x61, 0x72, 0x74, 0x68, 0x66, 0x6f, 0x72, 0x75, 0x6d, + 0x74, 0x68, 0x72, 0x65, 0x65, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x6c, + 0x69, 0x76, 0x65, 0x73, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x75, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x63, 0x6f, 0x75, 0x72, 0x74, + 0x79, 0x6f, 0x75, 0x72, 0x20, 0x62, 0x69, 0x72, 0x74, 0x68, 0x70, 0x6f, 0x70, + 0x75, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x75, 0x70, 0x70, 0x65, + 0x72, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x65, 0x76, 0x65, 0x72, 0x79, 0x73, 0x68, + 0x6f, 0x77, 0x73, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x62, 0x65, 0x67, 0x61, 0x6e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x70, 0x61, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x74, + 0x68, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x6e, 0x61, + 0x6d, 0x65, 0x64, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x70, 0x61, 0x72, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x62, 0x72, 0x61, + 0x6e, 0x64, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x72, 0x65, 0x61, 0x64, 0x79, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x64, 0x63, 0x61, 0x73, 0x65, 0x73, + 0x64, 0x61, 0x69, 0x6c, 0x79, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x75, + 0x6e, 0x69, 0x74, 0x73, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x62, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x6f, 0x61, 0x73, 0x74, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x70, + 0x70, 0x6c, 0x65, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x73, 0x63, 0x65, 0x6e, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x63, 0x6c, 0x69, + 0x63, 0x6b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x71, 0x75, 0x65, 0x65, 0x6e, 0x70, + 0x69, 0x65, 0x63, 0x65, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x63, 0x61, 0x63, 0x68, 0x65, 0x63, 0x69, 0x76, 0x69, 0x6c, + 0x73, 0x63, 0x61, 0x6c, 0x65, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x68, 0x65, + 0x6d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x6f, 0x79, 0x61, 0x6c, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x61, 0x69, 0x74, 0x68, + 0x68, 0x65, 0x61, 0x72, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x6f, 0x66, 0x66, + 0x65, 0x72, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x6d, + 0x69, 0x67, 0x68, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x6d, 0x74, 0x68, 0x69, 0x6e, + 0x6b, 0x62, 0x6c, 0x6f, 0x6f, 0x64, 0x61, 0x72, 0x72, 0x61, 0x79, 0x6d, 0x61, + 0x6a, 0x6f, 0x72, 0x74, 0x72, 0x75, 0x73, 0x74, 0x63, 0x61, 0x6e, 0x6f, 0x6e, + 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x68, 0x61, 0x70, 0x70, 0x79, 0x6f, 0x63, 0x63, 0x75, + 0x72, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x66, 0x72, 0x65, 0x73, 0x68, 0x71, 0x75, + 0x69, 0x74, 0x65, 0x66, 0x69, 0x6c, 0x6d, 0x73, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x6e, 0x65, 0x65, 0x64, 0x73, 0x75, 0x72, 0x62, 0x61, 0x6e, 0x66, 0x69, 0x67, + 0x68, 0x74, 0x62, 0x61, 0x73, 0x69, 0x73, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x61, + 0x75, 0x74, 0x6f, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x68, 0x74, 0x6d, + 0x6c, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x59, 0x6f, + 0x75, 0x72, 0x20, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x62, 0x72, 0x6f, 0x77, 0x6e, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x64, 0x72, 0x61, + 0x77, 0x6e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x72, 0x65, 0x61, 0x63, 0x68, 0x52, + 0x69, 0x67, 0x68, 0x74, 0x64, 0x61, 0x74, 0x65, 0x73, 0x6d, 0x61, 0x72, 0x63, + 0x68, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x64, 0x6f, 0x75, 0x62, 0x74, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x63, 0x68, 0x69, + 0x65, 0x66, 0x79, 0x6f, 0x75, 0x74, 0x68, 0x6e, 0x6f, 0x76, 0x65, 0x6c, 0x31, + 0x30, 0x70, 0x78, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x75, 0x6e, 0x74, 0x69, + 0x6c, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6a, 0x61, 0x6d, 0x65, 0x73, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x74, 0x77, 0x69, 0x63, 0x65, 0x30, 0x2c, 0x30, + 0x30, 0x30, 0x53, 0x74, 0x61, 0x72, 0x74, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x73, + 0x6f, 0x6e, 0x67, 0x73, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x73, 0x68, 0x69, 0x66, 0x74, 0x77, 0x6f, 0x72, 0x74, 0x68, 0x70, 0x6f, + 0x73, 0x74, 0x73, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x77, 0x65, 0x65, 0x6b, 0x73, + 0x61, 0x76, 0x6f, 0x69, 0x64, 0x74, 0x68, 0x65, 0x73, 0x65, 0x6d, 0x69, 0x6c, + 0x65, 0x73, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x6d, 0x61, 0x72, 0x6b, + 0x73, 0x72, 0x61, 0x74, 0x65, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x73, 0x61, 0x6c, 0x65, 0x73, 0x74, 0x65, 0x78, 0x74, 0x73, + 0x73, 0x74, 0x61, 0x72, 0x73, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x3c, 0x2f, 0x68, + 0x33, 0x3e, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x6f, + 0x6c, 0x69, 0x64, 0x28, 0x74, 0x68, 0x69, 0x73, 0x62, 0x72, 0x69, 0x6e, 0x67, + 0x73, 0x68, 0x69, 0x70, 0x73, 0x73, 0x74, 0x61, 0x66, 0x66, 0x74, 0x72, 0x69, + 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x66, + 0x61, 0x63, 0x74, 0x73, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x68, 0x69, 0x73, + 0x20, 0x2f, 0x2f, 0x2d, 0x2d, 0x3e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x65, 0x67, + 0x79, 0x70, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x31, 0x35, 0x70, 0x78, 0x3b, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x72, 0x75, 0x65, 0x22, 0x63, 0x72, 0x6f, + 0x73, 0x73, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x62, 0x6c, 0x6f, 0x67, 0x73, 0x62, + 0x6f, 0x78, 0x22, 0x3e, 0x6e, 0x6f, 0x74, 0x65, 0x64, 0x6c, 0x65, 0x61, 0x76, + 0x65, 0x63, 0x68, 0x69, 0x6e, 0x61, 0x73, 0x69, 0x7a, 0x65, 0x73, 0x67, 0x75, + 0x65, 0x73, 0x74, 0x3c, 0x2f, 0x68, 0x34, 0x3e, 0x72, 0x6f, 0x62, 0x6f, 0x74, + 0x68, 0x65, 0x61, 0x76, 0x79, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x73, 0x65, 0x76, + 0x65, 0x6e, 0x67, 0x72, 0x61, 0x6e, 0x64, 0x63, 0x72, 0x69, 0x6d, 0x65, 0x73, + 0x69, 0x67, 0x6e, 0x73, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x70, 0x68, 0x61, 0x73, 0x65, 0x3e, 0x3c, 0x21, 0x2d, 0x2d, 0x65, 0x6e, + 0x5f, 0x55, 0x53, 0x26, 0x23, 0x33, 0x39, 0x3b, 0x32, 0x30, 0x30, 0x70, 0x78, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x6a, + 0x6f, 0x79, 0x61, 0x6a, 0x61, 0x78, 0x2e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x6d, 0x69, 0x74, 0x68, 0x55, 0x2e, 0x53, 0x2e, 0x20, 0x68, 0x6f, 0x6c, 0x64, + 0x73, 0x70, 0x65, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x61, + 0x76, 0x22, 0x3e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x64, 0x6f, 0x69, 0x6e, 0x67, 0x70, 0x72, 0x69, + 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x31, 0x39, 0x39, 0x30, 0x73, 0x72, + 0x6f, 0x6d, 0x61, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x6a, 0x61, 0x70, 0x61, + 0x6e, 0x66, 0x61, 0x6c, 0x6c, 0x73, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x61, 0x67, 0x72, 0x65, 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, + 0x61, 0x62, 0x75, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x63, 0x61, 0x72, 0x64, 0x73, 0x68, + 0x69, 0x6c, 0x6c, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x50, 0x68, 0x6f, 0x74, + 0x6f, 0x74, 0x72, 0x75, 0x74, 0x68, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x2e, 0x70, + 0x68, 0x70, 0x3f, 0x73, 0x61, 0x69, 0x6e, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x6c, + 0x6c, 0x6f, 0x75, 0x69, 0x73, 0x6d, 0x65, 0x61, 0x6e, 0x74, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x62, 0x72, 0x69, 0x65, 0x66, 0x72, 0x6f, 0x77, 0x22, 0x3e, 0x67, + 0x65, 0x6e, 0x72, 0x65, 0x74, 0x72, 0x75, 0x63, 0x6b, 0x6c, 0x6f, 0x6f, 0x6b, + 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x6e, + 0x65, 0x74, 0x2f, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x74, 0x72, 0x79, 0x20, 0x7b, + 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x63, 0x6f, 0x73, + 0x74, 0x73, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x61, 0x64, 0x75, 0x6c, 0x74, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x6c, 0x61, 0x62, 0x6f, + 0x72, 0x68, 0x65, 0x6c, 0x70, 0x73, 0x63, 0x61, 0x75, 0x73, 0x65, 0x6d, 0x61, + 0x67, 0x69, 0x63, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x69, 0x72, + 0x32, 0x35, 0x30, 0x70, 0x78, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x73, 0x74, 0x65, + 0x70, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x67, + 0x6c, 0x61, 0x73, 0x73, 0x73, 0x69, 0x64, 0x65, 0x73, 0x66, 0x75, 0x6e, 0x64, + 0x73, 0x68, 0x6f, 0x74, 0x65, 0x6c, 0x61, 0x77, 0x61, 0x72, 0x64, 0x6d, 0x6f, + 0x75, 0x74, 0x68, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x70, 0x61, 0x72, 0x69, 0x73, + 0x67, 0x69, 0x76, 0x65, 0x73, 0x64, 0x75, 0x74, 0x63, 0x68, 0x74, 0x65, 0x78, + 0x61, 0x73, 0x66, 0x72, 0x75, 0x69, 0x74, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x7c, + 0x7c, 0x5b, 0x5d, 0x3b, 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, + 0x2d, 0x50, 0x4f, 0x53, 0x54, 0x22, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x3c, 0x62, + 0x72, 0x2f, 0x3e, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x73, 0x70, 0x65, 0x61, 0x6b, + 0x64, 0x65, 0x70, 0x74, 0x68, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x62, 0x61, 0x6e, + 0x6b, 0x73, 0x63, 0x61, 0x74, 0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x74, 0x32, + 0x30, 0x70, 0x78, 0x3b, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x64, 0x65, 0x61, 0x6c, + 0x73, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x35, 0x30, 0x70, 0x78, 0x3b, 0x75, 0x72, + 0x6c, 0x3d, 0x22, 0x70, 0x61, 0x72, 0x6b, 0x73, 0x6d, 0x6f, 0x75, 0x73, 0x65, + 0x4d, 0x6f, 0x73, 0x74, 0x20, 0x2e, 0x2e, 0x2e, 0x3c, 0x2f, 0x61, 0x6d, 0x6f, + 0x6e, 0x67, 0x62, 0x72, 0x61, 0x69, 0x6e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6e, + 0x6f, 0x6e, 0x65, 0x3b, 0x62, 0x61, 0x73, 0x65, 0x64, 0x63, 0x61, 0x72, 0x72, + 0x79, 0x64, 0x72, 0x61, 0x66, 0x74, 0x72, 0x65, 0x66, 0x65, 0x72, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x68, 0x6f, 0x6d, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x64, 0x65, 0x6c, 0x61, 0x79, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x64, + 0x72, 0x75, 0x67, 0x73, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x61, 0x70, 0x72, 0x69, + 0x6c, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x65, 0x78, + 0x61, 0x63, 0x74, 0x66, 0x6f, 0x72, 0x74, 0x68, 0x63, 0x6f, 0x64, 0x65, 0x73, + 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x56, 0x69, 0x65, 0x77, 0x20, 0x73, 0x65, 0x65, + 0x6d, 0x73, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, + 0x28, 0x32, 0x30, 0x30, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x67, 0x6f, 0x61, 0x6c, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x67, 0x72, + 0x65, 0x65, 0x6b, 0x68, 0x6f, 0x6d, 0x65, 0x73, 0x72, 0x69, 0x6e, 0x67, 0x73, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x33, 0x30, 0x70, 0x78, 0x3b, 0x77, 0x68, 0x6f, + 0x73, 0x65, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x29, 0x3b, 0x22, 0x20, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x6a, 0x6f, 0x6e, 0x65, + 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x27, 0x29, 0x3b, 0x22, 0x3e, 0x29, 0x3b, + 0x69, 0x66, 0x28, 0x2d, 0x6c, 0x65, 0x66, 0x74, 0x64, 0x61, 0x76, 0x69, 0x64, + 0x68, 0x6f, 0x72, 0x73, 0x65, 0x46, 0x6f, 0x63, 0x75, 0x73, 0x72, 0x61, 0x69, + 0x73, 0x65, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x65, 0x6d, 0x3e, 0x62, 0x61, 0x72, 0x22, + 0x3e, 0x2e, 0x73, 0x72, 0x63, 0x3d, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x61, 0x6c, + 0x74, 0x3d, 0x22, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x68, 0x65, 0x6e, 0x72, 0x79, + 0x32, 0x34, 0x70, 0x78, 0x3b, 0x73, 0x65, 0x74, 0x75, 0x70, 0x69, 0x74, 0x61, + 0x6c, 0x79, 0x73, 0x68, 0x61, 0x72, 0x70, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x74, + 0x61, 0x73, 0x74, 0x65, 0x77, 0x61, 0x6e, 0x74, 0x73, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x72, 0x65, 0x73, 0x65, 0x74, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x67, 0x69, + 0x72, 0x6c, 0x73, 0x2f, 0x63, 0x73, 0x73, 0x2f, 0x31, 0x30, 0x30, 0x25, 0x3b, + 0x63, 0x6c, 0x75, 0x62, 0x73, 0x73, 0x74, 0x75, 0x66, 0x66, 0x62, 0x69, 0x62, + 0x6c, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x6b, + 0x6f, 0x72, 0x65, 0x61, 0x7d, 0x29, 0x3b, 0x0d, 0x0a, 0x62, 0x61, 0x6e, 0x64, + 0x73, 0x71, 0x75, 0x65, 0x75, 0x65, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x38, 0x30, + 0x70, 0x78, 0x3b, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x7b, 0x0d, 0x0a, 0x09, 0x09, + 0x61, 0x68, 0x65, 0x61, 0x64, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x72, 0x69, + 0x73, 0x68, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x6d, 0x22, 0x79, 0x61, 0x68, 0x6f, + 0x6f, 0x29, 0x5b, 0x30, 0x5d, 0x3b, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x66, 0x69, + 0x6e, 0x64, 0x73, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x55, 0x52, 0x4c, 0x20, 0x3d, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x31, 0x32, 0x70, 0x78, 0x3b, 0x70, + 0x72, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x6c, 0x6c, 0x73, 0x74, 0x75, 0x72, 0x6e, + 0x73, 0x30, 0x78, 0x36, 0x30, 0x30, 0x2e, 0x6a, 0x70, 0x67, 0x22, 0x73, 0x70, + 0x61, 0x69, 0x6e, 0x62, 0x65, 0x61, 0x63, 0x68, 0x74, 0x61, 0x78, 0x65, 0x73, + 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x2d, 0x2d, 0x3e, + 0x3c, 0x2f, 0x67, 0x69, 0x66, 0x74, 0x73, 0x73, 0x74, 0x65, 0x76, 0x65, 0x2d, + 0x6c, 0x69, 0x6e, 0x6b, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x7d, 0x29, 0x3b, 0x0a, + 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x28, 0x31, 0x39, 0x39, 0x46, 0x41, + 0x51, 0x3c, 0x2f, 0x72, 0x6f, 0x67, 0x65, 0x72, 0x66, 0x72, 0x61, 0x6e, 0x6b, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x32, 0x38, 0x70, 0x78, 0x3b, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x3c, 0x68, 0x31, 0x3e, 0x3c, 0x73, 0x63, 0x6f, 0x74, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x73, 0x32, 0x32, 0x70, 0x78, 0x3b, 0x64, 0x72, 0x69, 0x6e, + 0x6b, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x6c, 0x65, 0x77, 0x69, 0x73, 0x73, 0x68, + 0x61, 0x6c, 0x6c, 0x23, 0x30, 0x33, 0x39, 0x3b, 0x20, 0x66, 0x6f, 0x72, 0x20, + 0x6c, 0x6f, 0x76, 0x65, 0x64, 0x77, 0x61, 0x73, 0x74, 0x65, 0x30, 0x30, 0x70, + 0x78, 0x3b, 0x6a, 0x61, 0x3a, 0xe3, 0x82, 0x73, 0x69, 0x6d, 0x6f, 0x6e, 0x3c, + 0x66, 0x6f, 0x6e, 0x74, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x6d, 0x65, 0x65, 0x74, + 0x73, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x61, 0x70, 0x74, 0x69, + 0x67, 0x68, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x64, 0x29, 0x20, 0x21, 0x3d, 0x20, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x63, 0x6c, 0x69, 0x70, 0x73, 0x72, 0x6f, 0x6f, + 0x6d, 0x73, 0x6f, 0x6e, 0x6b, 0x65, 0x79, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x6d, + 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x66, 0x75, 0x6e, 0x6e, 0x79, 0x74, 0x72, 0x65, 0x65, 0x73, 0x63, 0x6f, + 0x6d, 0x2f, 0x22, 0x31, 0x2e, 0x6a, 0x70, 0x67, 0x77, 0x6d, 0x6f, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x53, 0x54, 0x41, 0x52, 0x54, 0x6c, 0x65, 0x66, + 0x74, 0x20, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x2c, 0x20, 0x32, 0x30, 0x31, 0x29, + 0x3b, 0x0a, 0x7d, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x69, 0x72, 0x75, + 0x73, 0x63, 0x68, 0x61, 0x69, 0x72, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x77, 0x6f, + 0x72, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x3c, 0x21, 0x2d, 0x2d, 0x0a, 0x6f, 0x2d, 0x63, + 0x61, 0x63, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x74, 0x6f, 0x75, 0x72, 0x73, 0x2c, + 0x30, 0x30, 0x30, 0x20, 0x61, 0x73, 0x69, 0x61, 0x6e, 0x69, 0x2b, 0x2b, 0x29, + 0x7b, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x27, 0x29, 0x5b, 0x30, 0x5d, 0x69, 0x64, + 0x3d, 0x31, 0x30, 0x62, 0x6f, 0x74, 0x68, 0x3b, 0x6d, 0x65, 0x6e, 0x75, 0x20, + 0x2e, 0x32, 0x2e, 0x6d, 0x69, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x6b, 0x65, 0x76, + 0x69, 0x6e, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x62, + 0x72, 0x75, 0x63, 0x65, 0x32, 0x2e, 0x6a, 0x70, 0x67, 0x55, 0x52, 0x4c, 0x29, + 0x2b, 0x2e, 0x6a, 0x70, 0x67, 0x7c, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x6c, + 0x69, 0x63, 0x65, 0x68, 0x61, 0x72, 0x72, 0x79, 0x31, 0x32, 0x30, 0x22, 0x20, + 0x73, 0x77, 0x65, 0x65, 0x74, 0x74, 0x72, 0x3e, 0x0d, 0x0a, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x64, 0x69, 0x65, 0x67, 0x6f, 0x70, 0x61, 0x67, 0x65, 0x20, 0x73, + 0x77, 0x69, 0x73, 0x73, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x23, 0x66, 0x66, 0x66, + 0x3b, 0x22, 0x3e, 0x4c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x74, 0x72, + 0x65, 0x61, 0x74, 0x73, 0x68, 0x65, 0x65, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x31, 0x34, 0x70, 0x78, 0x3b, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x64, 0x6a, 0x61, 0x3a, 0xe3, 0x83, 0x69, + 0x64, 0x3d, 0x22, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x77, 0x6f, 0x72, 0x73, + 0x65, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2d, 0x62, 0x6f, 0x78, 0x2d, 0x64, 0x65, + 0x6c, 0x74, 0x61, 0x0a, 0x26, 0x6c, 0x74, 0x3b, 0x62, 0x65, 0x61, 0x72, 0x73, + 0x3a, 0x34, 0x38, 0x5a, 0x3c, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x72, 0x75, 0x72, + 0x61, 0x6c, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x62, + 0x61, 0x6b, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x70, 0x73, 0x3d, 0x20, 0x22, 0x22, + 0x3b, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x33, + 0x70, 0x78, 0x3b, 0x62, 0x72, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, + 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x6f, 0x3d, 0x25, 0x32, 0x46, 0x20, 0x6a, 0x6f, + 0x69, 0x6e, 0x6d, 0x61, 0x79, 0x62, 0x65, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x69, + 0x6d, 0x67, 0x22, 0x3e, 0x2c, 0x20, 0x66, 0x6a, 0x73, 0x69, 0x6d, 0x67, 0x22, + 0x20, 0x22, 0x29, 0x5b, 0x30, 0x5d, 0x4d, 0x54, 0x6f, 0x70, 0x42, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x6e, 0x65, 0x77, 0x6c, 0x79, 0x44, 0x61, 0x6e, 0x73, 0x6b, + 0x63, 0x7a, 0x65, 0x63, 0x68, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x6b, 0x6e, 0x6f, + 0x77, 0x73, 0x3c, 0x2f, 0x68, 0x35, 0x3e, 0x66, 0x61, 0x71, 0x22, 0x3e, 0x7a, + 0x68, 0x2d, 0x63, 0x6e, 0x31, 0x30, 0x29, 0x3b, 0x0a, 0x2d, 0x31, 0x22, 0x29, + 0x3b, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x62, 0x6c, 0x75, 0x65, 0x73, 0x74, 0x72, + 0x75, 0x6c, 0x79, 0x64, 0x61, 0x76, 0x69, 0x73, 0x2e, 0x6a, 0x73, 0x27, 0x3b, + 0x3e, 0x0d, 0x0a, 0x3c, 0x21, 0x73, 0x74, 0x65, 0x65, 0x6c, 0x20, 0x79, 0x6f, + 0x75, 0x20, 0x68, 0x32, 0x3e, 0x0d, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6a, + 0x65, 0x73, 0x75, 0x73, 0x31, 0x30, 0x30, 0x25, 0x20, 0x6d, 0x65, 0x6e, 0x75, + 0x2e, 0x0d, 0x0a, 0x09, 0x0d, 0x0a, 0x77, 0x61, 0x6c, 0x65, 0x73, 0x72, 0x69, + 0x73, 0x6b, 0x73, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x62, 0x2d, 0x6c, 0x69, 0x6b, 0x74, 0x65, 0x61, 0x63, 0x68, 0x67, 0x69, 0x66, + 0x22, 0x20, 0x76, 0x65, 0x67, 0x61, 0x73, 0x64, 0x61, 0x6e, 0x73, 0x6b, 0x65, + 0x65, 0x73, 0x74, 0x69, 0x73, 0x68, 0x71, 0x69, 0x70, 0x73, 0x75, 0x6f, 0x6d, + 0x69, 0x73, 0x6f, 0x62, 0x72, 0x65, 0x64, 0x65, 0x73, 0x64, 0x65, 0x65, 0x6e, + 0x74, 0x72, 0x65, 0x74, 0x6f, 0x64, 0x6f, 0x73, 0x70, 0x75, 0x65, 0x64, 0x65, + 0x61, 0xc3, 0xb1, 0x6f, 0x73, 0x65, 0x73, 0x74, 0xc3, 0xa1, 0x74, 0x69, 0x65, + 0x6e, 0x65, 0x68, 0x61, 0x73, 0x74, 0x61, 0x6f, 0x74, 0x72, 0x6f, 0x73, 0x70, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x75, 0x65, 0x76, + 0x6f, 0x68, 0x61, 0x63, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6d, 0x69, + 0x73, 0x6d, 0x6f, 0x6d, 0x65, 0x6a, 0x6f, 0x72, 0x6d, 0x75, 0x6e, 0x64, 0x6f, + 0x61, 0x71, 0x75, 0xc3, 0xad, 0x64, 0xc3, 0xad, 0x61, 0x73, 0x73, 0xc3, 0xb3, + 0x6c, 0x6f, 0x61, 0x79, 0x75, 0x64, 0x61, 0x66, 0x65, 0x63, 0x68, 0x61, 0x74, + 0x6f, 0x64, 0x61, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x65, 0x6e, 0x6f, + 0x73, 0x64, 0x61, 0x74, 0x6f, 0x73, 0x6f, 0x74, 0x72, 0x61, 0x73, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6d, 0x75, 0x63, 0x68, 0x6f, 0x61, 0x68, 0x6f, 0x72, 0x61, + 0x6c, 0x75, 0x67, 0x61, 0x72, 0x6d, 0x61, 0x79, 0x6f, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x73, 0x68, 0x6f, 0x72, 0x61, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x6e, 0x74, 0x65, 0x73, 0x66, 0x6f, 0x74, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x61, + 0x73, 0x70, 0x61, 0xc3, 0xad, 0x73, 0x6e, 0x75, 0x65, 0x76, 0x61, 0x73, 0x61, + 0x6c, 0x75, 0x64, 0x66, 0x6f, 0x72, 0x6f, 0x73, 0x6d, 0x65, 0x64, 0x69, 0x6f, + 0x71, 0x75, 0x69, 0x65, 0x6e, 0x6d, 0x65, 0x73, 0x65, 0x73, 0x70, 0x6f, 0x64, + 0x65, 0x72, 0x63, 0x68, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0xc3, 0xa1, 0x76, + 0x65, 0x63, 0x65, 0x73, 0x64, 0x65, 0x63, 0x69, 0x72, 0x6a, 0x6f, 0x73, 0xc3, + 0xa9, 0x65, 0x73, 0x74, 0x61, 0x72, 0x76, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x72, + 0x75, 0x70, 0x6f, 0x68, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x6c, 0x6c, 0x6f, 0x73, + 0x74, 0x65, 0x6e, 0x67, 0x6f, 0x61, 0x6d, 0x69, 0x67, 0x6f, 0x63, 0x6f, 0x73, + 0x61, 0x73, 0x6e, 0x69, 0x76, 0x65, 0x6c, 0x67, 0x65, 0x6e, 0x74, 0x65, 0x6d, + 0x69, 0x73, 0x6d, 0x61, 0x61, 0x69, 0x72, 0x65, 0x73, 0x6a, 0x75, 0x6c, 0x69, + 0x6f, 0x74, 0x65, 0x6d, 0x61, 0x73, 0x68, 0x61, 0x63, 0x69, 0x61, 0x66, 0x61, + 0x76, 0x6f, 0x72, 0x6a, 0x75, 0x6e, 0x69, 0x6f, 0x6c, 0x69, 0x62, 0x72, 0x65, + 0x70, 0x75, 0x6e, 0x74, 0x6f, 0x62, 0x75, 0x65, 0x6e, 0x6f, 0x61, 0x75, 0x74, + 0x6f, 0x72, 0x61, 0x62, 0x72, 0x69, 0x6c, 0x62, 0x75, 0x65, 0x6e, 0x61, 0x74, + 0x65, 0x78, 0x74, 0x6f, 0x6d, 0x61, 0x72, 0x7a, 0x6f, 0x73, 0x61, 0x62, 0x65, + 0x72, 0x6c, 0x69, 0x73, 0x74, 0x61, 0x6c, 0x75, 0x65, 0x67, 0x6f, 0x63, 0xc3, + 0xb3, 0x6d, 0x6f, 0x65, 0x6e, 0x65, 0x72, 0x6f, 0x6a, 0x75, 0x65, 0x67, 0x6f, + 0x70, 0x65, 0x72, 0xc3, 0xba, 0x68, 0x61, 0x62, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x79, 0x6e, 0x75, 0x6e, 0x63, 0x61, 0x6d, 0x75, 0x6a, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x6f, 0x72, 0x66, 0x75, 0x65, 0x72, 0x61, 0x6c, 0x69, 0x62, 0x72, + 0x6f, 0x67, 0x75, 0x73, 0x74, 0x61, 0x69, 0x67, 0x75, 0x61, 0x6c, 0x76, 0x6f, + 0x74, 0x6f, 0x73, 0x63, 0x61, 0x73, 0x6f, 0x73, 0x67, 0x75, 0xc3, 0xad, 0x61, + 0x70, 0x75, 0x65, 0x64, 0x6f, 0x73, 0x6f, 0x6d, 0x6f, 0x73, 0x61, 0x76, 0x69, + 0x73, 0x6f, 0x75, 0x73, 0x74, 0x65, 0x64, 0x64, 0x65, 0x62, 0x65, 0x6e, 0x6e, + 0x6f, 0x63, 0x68, 0x65, 0x62, 0x75, 0x73, 0x63, 0x61, 0x66, 0x61, 0x6c, 0x74, + 0x61, 0x65, 0x75, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x72, 0x69, 0x65, 0x64, 0x69, + 0x63, 0x68, 0x6f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x63, 0x6c, 0x61, 0x76, 0x65, + 0x63, 0x61, 0x73, 0x61, 0x73, 0x6c, 0x65, 0xc3, 0xb3, 0x6e, 0x70, 0x6c, 0x61, + 0x7a, 0x6f, 0x6c, 0x61, 0x72, 0x67, 0x6f, 0x6f, 0x62, 0x72, 0x61, 0x73, 0x76, + 0x69, 0x73, 0x74, 0x61, 0x61, 0x70, 0x6f, 0x79, 0x6f, 0x6a, 0x75, 0x6e, 0x74, + 0x6f, 0x74, 0x72, 0x61, 0x74, 0x61, 0x76, 0x69, 0x73, 0x74, 0x6f, 0x63, 0x72, + 0x65, 0x61, 0x72, 0x63, 0x61, 0x6d, 0x70, 0x6f, 0x68, 0x65, 0x6d, 0x6f, 0x73, + 0x63, 0x69, 0x6e, 0x63, 0x6f, 0x63, 0x61, 0x72, 0x67, 0x6f, 0x70, 0x69, 0x73, + 0x6f, 0x73, 0x6f, 0x72, 0x64, 0x65, 0x6e, 0x68, 0x61, 0x63, 0x65, 0x6e, 0xc3, + 0xa1, 0x72, 0x65, 0x61, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x72, + 0x6f, 0x63, 0x65, 0x72, 0x63, 0x61, 0x70, 0x75, 0x65, 0x64, 0x61, 0x70, 0x61, + 0x70, 0x65, 0x6c, 0x6d, 0x65, 0x6e, 0x6f, 0x72, 0xc3, 0xba, 0x74, 0x69, 0x6c, + 0x63, 0x6c, 0x61, 0x72, 0x6f, 0x6a, 0x6f, 0x72, 0x67, 0x65, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x70, 0x6f, 0x6e, 0x65, 0x72, 0x74, 0x61, 0x72, 0x64, 0x65, 0x6e, + 0x61, 0x64, 0x69, 0x65, 0x6d, 0x61, 0x72, 0x63, 0x61, 0x73, 0x69, 0x67, 0x75, + 0x65, 0x65, 0x6c, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6c, 0x6f, 0x63, 0x6f, + 0x63, 0x68, 0x65, 0x6d, 0x6f, 0x74, 0x6f, 0x73, 0x6d, 0x61, 0x64, 0x72, 0x65, + 0x63, 0x6c, 0x61, 0x73, 0x65, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x6e, 0x69, 0xc3, + 0xb1, 0x6f, 0x71, 0x75, 0x65, 0x64, 0x61, 0x70, 0x61, 0x73, 0x61, 0x72, 0x62, + 0x61, 0x6e, 0x63, 0x6f, 0x68, 0x69, 0x6a, 0x6f, 0x73, 0x76, 0x69, 0x61, 0x6a, + 0x65, 0x70, 0x61, 0x62, 0x6c, 0x6f, 0xc3, 0xa9, 0x73, 0x74, 0x65, 0x76, 0x69, + 0x65, 0x6e, 0x65, 0x72, 0x65, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x6a, 0x61, 0x72, + 0x66, 0x6f, 0x6e, 0x64, 0x6f, 0x63, 0x61, 0x6e, 0x61, 0x6c, 0x6e, 0x6f, 0x72, + 0x74, 0x65, 0x6c, 0x65, 0x74, 0x72, 0x61, 0x63, 0x61, 0x75, 0x73, 0x61, 0x74, + 0x6f, 0x6d, 0x61, 0x72, 0x6d, 0x61, 0x6e, 0x6f, 0x73, 0x6c, 0x75, 0x6e, 0x65, + 0x73, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x70, 0x65, 0x73, 0x61, 0x72, 0x74, 0x69, 0x70, 0x6f, 0x73, + 0x74, 0x65, 0x6e, 0x67, 0x61, 0x6d, 0x61, 0x72, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x76, 0x61, 0x70, 0x61, 0x64, 0x72, 0x65, 0x75, 0x6e, 0x69, 0x64, 0x6f, 0x76, + 0x61, 0x6d, 0x6f, 0x73, 0x7a, 0x6f, 0x6e, 0x61, 0x73, 0x61, 0x6d, 0x62, 0x6f, + 0x73, 0x62, 0x61, 0x6e, 0x64, 0x61, 0x6d, 0x61, 0x72, 0x69, 0x61, 0x61, 0x62, + 0x75, 0x73, 0x6f, 0x6d, 0x75, 0x63, 0x68, 0x61, 0x73, 0x75, 0x62, 0x69, 0x72, + 0x72, 0x69, 0x6f, 0x6a, 0x61, 0x76, 0x69, 0x76, 0x69, 0x72, 0x67, 0x72, 0x61, + 0x64, 0x6f, 0x63, 0x68, 0x69, 0x63, 0x61, 0x61, 0x6c, 0x6c, 0xc3, 0xad, 0x6a, + 0x6f, 0x76, 0x65, 0x6e, 0x64, 0x69, 0x63, 0x68, 0x61, 0x65, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x61, 0x6c, 0x65, 0x73, 0x73, 0x61, 0x6c, 0x69, 0x72, 0x73, 0x75, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x6f, 0x73, 0x66, 0x69, 0x6e, 0x65, 0x73, + 0x6c, 0x6c, 0x61, 0x6d, 0x61, 0x62, 0x75, 0x73, 0x63, 0x6f, 0xc3, 0xa9, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x67, 0x61, 0x6e, 0x65, 0x67, 0x72, 0x6f, 0x70, + 0x6c, 0x61, 0x7a, 0x61, 0x68, 0x75, 0x6d, 0x6f, 0x72, 0x70, 0x61, 0x67, 0x61, + 0x72, 0x6a, 0x75, 0x6e, 0x74, 0x61, 0x64, 0x6f, 0x62, 0x6c, 0x65, 0x69, 0x73, + 0x6c, 0x61, 0x73, 0x62, 0x6f, 0x6c, 0x73, 0x61, 0x62, 0x61, 0xc3, 0xb1, 0x6f, + 0x68, 0x61, 0x62, 0x6c, 0x61, 0x6c, 0x75, 0x63, 0x68, 0x61, 0xc3, 0x81, 0x72, + 0x65, 0x61, 0x64, 0x69, 0x63, 0x65, 0x6e, 0x6a, 0x75, 0x67, 0x61, 0x72, 0x6e, + 0x6f, 0x74, 0x61, 0x73, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x61, 0x6c, 0x6c, 0xc3, + 0xa1, 0x63, 0x61, 0x72, 0x67, 0x61, 0x64, 0x6f, 0x6c, 0x6f, 0x72, 0x61, 0x62, + 0x61, 0x6a, 0x6f, 0x65, 0x73, 0x74, 0xc3, 0xa9, 0x67, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x69, 0x6f, 0x66, 0x69, 0x72, + 0x6d, 0x61, 0x63, 0x6f, 0x73, 0x74, 0x6f, 0x66, 0x69, 0x63, 0x68, 0x61, 0x70, + 0x6c, 0x61, 0x74, 0x61, 0x68, 0x6f, 0x67, 0x61, 0x72, 0x61, 0x72, 0x74, 0x65, + 0x73, 0x6c, 0x65, 0x79, 0x65, 0x73, 0x61, 0x71, 0x75, 0x65, 0x6c, 0x6d, 0x75, + 0x73, 0x65, 0x6f, 0x62, 0x61, 0x73, 0x65, 0x73, 0x70, 0x6f, 0x63, 0x6f, 0x73, + 0x6d, 0x69, 0x74, 0x61, 0x64, 0x63, 0x69, 0x65, 0x6c, 0x6f, 0x63, 0x68, 0x69, + 0x63, 0x6f, 0x6d, 0x69, 0x65, 0x64, 0x6f, 0x67, 0x61, 0x6e, 0x61, 0x72, 0x73, + 0x61, 0x6e, 0x74, 0x6f, 0x65, 0x74, 0x61, 0x70, 0x61, 0x64, 0x65, 0x62, 0x65, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x61, 0x72, 0x65, 0x64, 0x65, 0x73, 0x73, 0x69, + 0x65, 0x74, 0x65, 0x63, 0x6f, 0x72, 0x74, 0x65, 0x63, 0x6f, 0x72, 0x65, 0x61, + 0x64, 0x75, 0x64, 0x61, 0x73, 0x64, 0x65, 0x73, 0x65, 0x6f, 0x76, 0x69, 0x65, + 0x6a, 0x6f, 0x64, 0x65, 0x73, 0x65, 0x61, 0x61, 0x67, 0x75, 0x61, 0x73, 0x26, + 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x61, 0x6e, 0x6e, 0x65, + 0x72, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x63, 0x72, 0x6f, 0x6c, 0x6c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x6d, + 0x65, 0x64, 0x69, 0x75, 0x6d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x73, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x74, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, + 0x70, 0x72, 0x69, 0x6e, 0x67, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x6d, 0x6f, + 0x62, 0x69, 0x6c, 0x65, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x70, 0x68, 0x6f, + 0x74, 0x6f, 0x73, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x69, 0x74, 0x73, 0x65, 0x6c, 0x66, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x6c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x65, 0x76, 0x69, 0x65, + 0x77, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x65, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x70, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x6c, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x73, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x6c, 0x65, 0x74, 0x74, 0x65, + 0x72, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x73, 0x73, 0x63, 0x68, + 0x6f, 0x6f, 0x6c, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x64, 0x65, 0x62, 0x61, 0x74, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x6c, 0x65, 0x61, 0x67, 0x75, 0x65, 0x63, + 0x68, 0x72, 0x6f, 0x6d, 0x65, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6e, 0x6f, + 0x74, 0x69, 0x63, 0x65, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x71, 0x75, 0x61, 0x72, + 0x65, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x77, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x46, 0x72, + 0x61, 0x6e, 0x63, 0x65, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x74, 0x72, + 0x6f, 0x6e, 0x67, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x6f, 0x6e, 0x64, + 0x6f, 0x6e, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, + 0x64, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x73, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x63, 0x69, 0x74, 0x69, 0x65, 0x73, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x79, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x66, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3e, + 0x6f, 0x70, 0x65, 0x6e, 0x65, 0x64, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x76, + 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x63, 0x61, 0x75, 0x73, 0x65, 0x73, 0x6c, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x76, 0x69, + 0x73, 0x75, 0x61, 0x6c, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x6d, 0x75, 0x73, 0x65, + 0x75, 0x6d, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6d, 0x6f, 0x73, 0x74, 0x6c, 0x79, + 0x6d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x63, 0x68, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x75, 0x72, 0x76, 0x65, 0x79, 0x62, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x6d, 0x6f, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x45, 0x75, + 0x72, 0x6f, 0x70, 0x65, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x65, 0x6e, 0x6f, 0x75, + 0x67, 0x68, 0x63, 0x61, 0x72, 0x65, 0x65, 0x72, 0x61, 0x6e, 0x73, 0x77, 0x65, + 0x72, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x74, + 0x68, 0x65, 0x72, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x79, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x65, 0x73, 0x63, 0x61, 0x70, + 0x65, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x63, 0x68, 0x75, 0x72, 0x63, 0x68, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x63, + 0x6f, 0x72, 0x6e, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x6f, 0x66, 0x66, 0x65, 0x72, + 0x73, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x65, 0x64, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x73, + 0x69, 0x6c, 0x76, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x62, 0x72, 0x6f, + 0x77, 0x73, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x47, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x77, 0x69, 0x64, 0x67, 0x65, + 0x74, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x6e, 0x6f, 0x77, 0x72, 0x61, 0x70, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x61, + 0x66, 0x65, 0x74, 0x79, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x70, 0x69, + 0x72, 0x69, 0x74, 0x2d, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x70, 0x72, 0x65, + 0x61, 0x64, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x65, 0x64, 0x65, + 0x64, 0x72, 0x75, 0x73, 0x73, 0x69, 0x61, 0x70, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x62, + 0x72, 0x6f, 0x6b, 0x65, 0x6e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x63, 0x68, + 0x61, 0x72, 0x67, 0x65, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x64, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x64, + 0x68, 0x65, 0x6c, 0x70, 0x65, 0x64, 0x43, 0x68, 0x75, 0x72, 0x63, 0x68, 0x69, + 0x6d, 0x70, 0x61, 0x63, 0x74, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x61, 0x6c, + 0x77, 0x61, 0x79, 0x73, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x20, 0x62, 0x6f, 0x74, + 0x74, 0x6f, 0x6d, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x3e, 0x29, 0x7b, 0x76, 0x61, + 0x72, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x28, + 0x63, 0x6f, 0x75, 0x70, 0x6c, 0x65, 0x67, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x52, 0x65, + 0x76, 0x69, 0x65, 0x77, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x6c, 0x69, 0x74, 0x74, 0x6c, 0x65, 0x64, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x62, 0x65, 0x61, 0x75, 0x74, + 0x79, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x66, 0x6f, 0x72, 0x67, 0x6f, 0x74, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x61, + 0x6c, 0x6d, 0x6f, 0x73, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x72, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x62, 0x69, + 0x6c, 0x65, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x75, 0x70, 0x70, 0x6c, + 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x76, 0x69, 0x65, 0x77, 0x65, 0x64, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x63, + 0x6f, 0x75, 0x72, 0x73, 0x65, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x73, + 0x6c, 0x61, 0x6e, 0x64, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6d, 0x61, 0x7a, + 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x72, 0x6e, 0x61, 0x64, 0x76, 0x69, 0x63, + 0x65, 0x69, 0x6e, 0x3c, 0x2f, 0x61, 0x3e, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x73, 0x42, + 0x45, 0x47, 0x49, 0x4e, 0x20, 0x4d, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x49, 0x73, 0x6c, 0x61, + 0x6e, 0x64, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x45, 0x6d, 0x70, 0x69, 0x72, + 0x65, 0x53, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x74, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6e, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x6d, + 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x2e, 0x0a, + 0x0a, 0x4f, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x6d, 0x65, 0x6e, + 0x75, 0x22, 0x3e, 0x50, 0x68, 0x69, 0x6c, 0x69, 0x70, 0x61, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x69, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x4f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x73, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x77, 0x65, + 0x65, 0x6b, 0x6c, 0x79, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x62, 0x65, 0x68, + 0x69, 0x6e, 0x64, 0x64, 0x6f, 0x63, 0x74, 0x6f, 0x72, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x64, 0x75, 0x6e, 0x69, 0x74, 0x65, 0x64, 0x3c, 0x2f, 0x62, 0x3e, 0x3c, + 0x2f, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x73, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x73, + 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x73, 0x73, 0x75, 0x65, 0x64, 0x33, 0x30, 0x30, 0x70, 0x78, 0x7c, 0x63, 0x61, + 0x6e, 0x61, 0x64, 0x61, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x72, 0x61, 0x7a, + 0x69, 0x6c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x6c, 0x6f, 0x67, 0x6f, 0x22, + 0x3e, 0x62, 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x2d, 0x73, 0x63, 0x61, 0x6c, 0x65, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x6d, + 0x61, 0x72, 0x69, 0x6e, 0x65, 0x46, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x63, 0x61, + 0x6d, 0x65, 0x72, 0x61, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x0a, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x22, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x73, 0x74, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x0d, 0x0a, 0x2e, 0x67, 0x69, 0x66, 0x22, + 0x20, 0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, + 0x4f, 0x78, 0x66, 0x6f, 0x72, 0x64, 0x73, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x75, 0x72, 0x76, 0x69, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x66, 0x65, + 0x6d, 0x61, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x69, 0x7a, + 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x74, 0x65, 0x78, 0x74, + 0x22, 0x3e, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x74, 0x68, 0x61, 0x6e, 0x6b, + 0x73, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, + 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x41, + 0x66, 0x72, 0x69, 0x63, 0x61, 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x72, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x3c, 0x62, 0x72, + 0x20, 0x2f, 0x3e, 0x77, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x7c, 0x7c, 0x20, 0x7b, 0x7d, + 0x3b, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x3e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x73, 0x75, 0x6e, 0x64, 0x61, 0x79, 0x77, 0x72, 0x61, 0x70, 0x22, 0x3e, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x6d, 0x69, + 0x6e, 0x75, 0x74, 0x65, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x73, 0x31, 0x35, 0x30, 0x70, 0x78, 0x7c, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3b, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x31, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x70, 0x72, + 0x69, 0x6e, 0x63, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x2e, 0x70, 0x6e, + 0x67, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x73, 0x73, 0x6f, 0x75, 0x6e, 0x64, + 0x73, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x26, + 0x61, 0x6d, 0x70, 0x3b, 0x20, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2e, 0x20, + 0x57, 0x69, 0x74, 0x68, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x74, 0x6a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x61, 0x6e, 0x6e, 0x75, 0x61, + 0x6c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x62, 0x6f, 0x75, 0x67, 0x68, 0x74, + 0x66, 0x61, 0x6d, 0x6f, 0x75, 0x73, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6c, + 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x69, 0x2b, 0x2b, 0x29, 0x20, 0x7b, 0x69, 0x73, + 0x72, 0x61, 0x65, 0x6c, 0x73, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x63, + 0x69, 0x64, 0x65, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x3e, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3b, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x3c, 0x72, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x2d, 0x2d, + 0x26, 0x67, 0x74, 0x3b, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x73, 0x65, 0x78, + 0x75, 0x61, 0x6c, 0x62, 0x75, 0x72, 0x65, 0x61, 0x75, 0x2e, 0x6a, 0x70, 0x67, + 0x22, 0x20, 0x31, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x6f, 0x62, 0x74, 0x61, 0x69, + 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x64, 0x79, 0x6d, + 0x65, 0x6e, 0x75, 0x22, 0x20, 0x6c, 0x79, 0x72, 0x69, 0x63, 0x73, 0x74, 0x6f, + 0x64, 0x61, 0x79, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x65, 0x64, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x79, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x46, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x6c, 0x6f, 0x6f, 0x6b, 0x65, 0x64, 0x4d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x74, 0x75, 0x72, 0x6b, 0x65, 0x79, 0x29, 0x3b, 0x76, 0x61, 0x72, 0x20, 0x66, + 0x6f, 0x72, 0x65, 0x73, 0x74, 0x67, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x65, 0x6c, + 0x73, 0x65, 0x7b, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x67, + 0x3c, 0x2f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x6c, 0x6f, 0x67, 0x69, 0x6e, + 0x2e, 0x66, 0x61, 0x73, 0x74, 0x65, 0x72, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x31, 0x30, 0x70, 0x78, 0x20, 0x30, 0x70, + 0x72, 0x61, 0x67, 0x6d, 0x61, 0x66, 0x72, 0x69, 0x64, 0x61, 0x79, 0x6a, 0x75, + 0x6e, 0x69, 0x6f, 0x72, 0x64, 0x6f, 0x6c, 0x6c, 0x61, 0x72, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x64, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x35, 0x2c, 0x30, 0x30, 0x30, 0x20, 0x70, 0x61, 0x67, 0x65, 0x22, + 0x3e, 0x62, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x28, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, 0x66, 0x69, 0x6c, + 0x6c, 0x65, 0x64, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x72, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x28, 0x61, 0x70, 0x70, 0x65, 0x61, + 0x72, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, + 0x62, 0x6f, 0x64, 0x79, 0x22, 0x3e, 0x0a, 0x2a, 0x20, 0x54, 0x68, 0x65, 0x54, + 0x68, 0x6f, 0x75, 0x67, 0x68, 0x73, 0x65, 0x65, 0x69, 0x6e, 0x67, 0x6a, 0x65, + 0x72, 0x73, 0x65, 0x79, 0x4e, 0x65, 0x77, 0x73, 0x3c, 0x2f, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x65, 0x78, 0x70, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x6a, 0x75, + 0x72, 0x79, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x43, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x53, 0x54, 0x41, 0x52, 0x54, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x73, + 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x6e, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x6f, + 0x78, 0x22, 0x3e, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x44, 0x61, + 0x76, 0x69, 0x64, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x70, 0x72, 0x69, 0x6c, + 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x69, 0x74, 0x65, 0x6d, 0x22, 0x3e, 0x6d, 0x6f, 0x72, 0x65, 0x22, 0x3e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x73, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x63, 0x61, + 0x6d, 0x70, 0x75, 0x73, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x7c, 0x7c, 0x20, + 0x5b, 0x5d, 0x3b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x2e, 0x67, 0x75, 0x69, 0x74, + 0x61, 0x72, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x65, 0x64, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x20, + 0x2e, 0x70, 0x68, 0x70, 0x22, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x73, 0x77, 0x69, 0x6c, 0x73, 0x6f, 0x6e, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x73, 0x72, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x73, 0x77, 0x65, + 0x64, 0x65, 0x6e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x61, 0x73, 0x69, + 0x6c, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x0a, 0x0a, 0x57, 0x68, 0x69, 0x6c, 0x74, 0x61, 0x79, 0x6c, 0x6f, 0x72, + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x72, 0x74, 0x66, + 0x72, 0x65, 0x6e, 0x63, 0x68, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x22, 0x29, + 0x20, 0x2b, 0x20, 0x22, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x62, 0x75, 0x79, + 0x69, 0x6e, 0x67, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x73, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x6f, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x73, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x70, 0x78, 0x3b, 0x22, 0x3e, + 0x76, 0x73, 0x70, 0x61, 0x63, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x72, 0x6d, + 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x66, 0x66, 0x65, 0x65, 0x6d, 0x61, + 0x72, 0x74, 0x69, 0x6e, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x65, 0x68, 0x61, 0x70, + 0x70, 0x65, 0x6e, 0x3c, 0x2f, 0x6e, 0x61, 0x76, 0x3e, 0x6b, 0x61, 0x6e, 0x73, + 0x61, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x3e, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x73, 0x3d, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, + 0x68, 0x73, 0x70, 0x61, 0x63, 0x65, 0x30, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x20, + 0x0a, 0x0a, 0x49, 0x6e, 0x20, 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x50, 0x6f, + 0x6c, 0x73, 0x6b, 0x69, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x6a, 0x6f, 0x72, + 0x64, 0x61, 0x6e, 0x42, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x20, 0x2d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x2e, 0x68, 0x74, 0x6d, + 0x6c, 0x6e, 0x65, 0x77, 0x73, 0x22, 0x3e, 0x30, 0x31, 0x2e, 0x6a, 0x70, 0x67, + 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6d, + 0x69, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x69, 0x6f, 0x72, 0x49, 0x53, + 0x42, 0x4e, 0x20, 0x30, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x20, 0x67, 0x75, 0x69, + 0x64, 0x65, 0x73, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x72, 0x65, 0x70, 0x61, 0x69, 0x72, 0x2e, 0x78, 0x6d, 0x6c, 0x22, + 0x20, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x2e, 0x68, 0x74, 0x6d, 0x6c, + 0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x72, 0x65, 0x67, 0x45, 0x78, 0x70, 0x3a, + 0x68, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x76, 0x69, + 0x72, 0x67, 0x69, 0x6e, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x73, 0x3c, 0x2f, 0x74, + 0x72, 0x3e, 0x0d, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x0a, 0x09, 0x76, 0x61, + 0x72, 0x20, 0x3e, 0x27, 0x29, 0x3b, 0x0a, 0x09, 0x3c, 0x2f, 0x74, 0x64, 0x3e, + 0x0a, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x0a, 0x62, 0x61, 0x68, 0x61, 0x73, 0x61, + 0x62, 0x72, 0x61, 0x73, 0x69, 0x6c, 0x67,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0xe5, 0x8c, 0xbf, 0xe5, 0x90, 0x8d, + 0x63, 0x75, 0x61, 0x6e, 0x64, 0x6f, 0x65, 0x6e, 0x76, 0x69, 0x61, 0x72, 0x6d, + 0x61, 0x64, 0x72, 0x69, 0x64, 0x62, 0x75, 0x73, 0x63, 0x61, 0x72, 0x69, 0x6e, + 0x69, 0x63, 0x69, 0x6f, 0x74, 0x69, 0x65, 0x6d, 0x70, 0x6f, 0x70, 0x6f, 0x72, + 0x71, 0x75, 0x65, 0x63, 0x75, 0x65, 0x6e, 0x74, 0x61, 0x65, 0x73, 0x74, 0x61, + 0x64, 0x6f, 0x70, 0x75, 0x65, 0x64, 0x65, 0x6e, 0x6a, 0x75, 0x65, 0x67, 0x6f, + 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x73, 0x74, 0xc3, 0xa1, 0x6e, + 0x6e, 0x6f, 0x6d, 0x62, 0x72, 0x65, 0x74, 0x69, 0x65, 0x6e, 0x65, 0x6e, 0x70, + 0x65, 0x72, 0x66, 0x69, 0x6c, 0x6d, 0x61, 0x6e, 0x65, 0x72, 0x61, 0x61, 0x6d, + 0x69, 0x67, 0x6f, 0x73, 0x63, 0x69, 0x75, 0x64, 0x61, 0x64, 0x63, 0x65, 0x6e, + 0x74, 0x72, 0x6f, 0x61, 0x75, 0x6e, 0x71, 0x75, 0x65, 0x70, 0x75, 0x65, 0x64, + 0x65, 0x73, 0x64, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x6d, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x63, 0x69, 0x6f, 0x73, 0x65, 0x67, 0xc3, 0xba, 0x6e, + 0x62, 0x75, 0x65, 0x6e, 0x6f, 0x73, 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x70, + 0x75, 0x6e, 0x74, 0x6f, 0x73, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x68, 0x61, + 0x62, 0xc3, 0xad, 0x61, 0x61, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x6e, 0x75, 0x65, + 0x76, 0x6f, 0x73, 0x75, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x63, 0x61, 0x72, 0x6c, + 0x6f, 0x73, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6f, 0x6e, 0x69, 0xc3, 0xb1, 0x6f, + 0x73, 0x6d, 0x75, 0x63, 0x68, 0x6f, 0x73, 0x61, 0x6c, 0x67, 0x75, 0x6e, 0x61, + 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x6e, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x72, 0x61, 0x72, 0x72, 0x69, 0x62, 0x61, 0x6d, 0x61, + 0x72, 0xc3, 0xad, 0x61, 0x68, 0x6f, 0x6d, 0x62, 0x72, 0x65, 0x65, 0x6d, 0x70, + 0x6c, 0x65, 0x6f, 0x76, 0x65, 0x72, 0x64, 0x61, 0x64, 0x63, 0x61, 0x6d, 0x62, + 0x69, 0x6f, 0x6d, 0x75, 0x63, 0x68, 0x61, 0x73, 0x66, 0x75, 0x65, 0x72, 0x6f, + 0x6e, 0x70, 0x61, 0x73, 0x61, 0x64, 0x6f, 0x6c, 0xc3, 0xad, 0x6e, 0x65, 0x61, + 0x70, 0x61, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x75, 0x65, 0x76, 0x61, 0x73, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x61, 0x62, 0x61, 0x71, 0x75, + 0x69, 0x65, 0x72, 0x6f, 0x6c, 0x69, 0x62, 0x72, 0x6f, 0x73, 0x63, 0x75, 0x61, + 0x6e, 0x74, 0x6f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x6f, 0x6d, 0x69, 0x67, 0x75, + 0x65, 0x6c, 0x76, 0x61, 0x72, 0x69, 0x6f, 0x73, 0x63, 0x75, 0x61, 0x74, 0x72, + 0x6f, 0x74, 0x69, 0x65, 0x6e, 0x65, 0x73, 0x67, 0x72, 0x75, 0x70, 0x6f, 0x73, + 0x73, 0x65, 0x72, 0xc3, 0xa1, 0x6e, 0x65, 0x75, 0x72, 0x6f, 0x70, 0x61, 0x6d, + 0x65, 0x64, 0x69, 0x6f, 0x73, 0x66, 0x72, 0x65, 0x6e, 0x74, 0x65, 0x61, 0x63, + 0x65, 0x72, 0x63, 0x61, 0x64, 0x65, 0x6d, 0xc3, 0xa1, 0x73, 0x6f, 0x66, 0x65, + 0x72, 0x74, 0x61, 0x63, 0x6f, 0x63, 0x68, 0x65, 0x73, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x6f, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x6c, 0x65, 0x74, 0x72, 0x61, + 0x73, 0x61, 0x6c, 0x67, 0xc3, 0xba, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x61, + 0x63, 0x75, 0x61, 0x6c, 0x65, 0x73, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x63, + 0x75, 0x65, 0x72, 0x70, 0x6f, 0x73, 0x69, 0x65, 0x6e, 0x64, 0x6f, 0x70, 0x72, + 0x65, 0x6e, 0x73, 0x61, 0x6c, 0x6c, 0x65, 0x67, 0x61, 0x72, 0x76, 0x69, 0x61, + 0x6a, 0x65, 0x73, 0x64, 0x69, 0x6e, 0x65, 0x72, 0x6f, 0x6d, 0x75, 0x72, 0x63, + 0x69, 0x61, 0x70, 0x6f, 0x64, 0x72, 0xc3, 0xa1, 0x70, 0x75, 0x65, 0x73, 0x74, + 0x6f, 0x64, 0x69, 0x61, 0x72, 0x69, 0x6f, 0x70, 0x75, 0x65, 0x62, 0x6c, 0x6f, + 0x71, 0x75, 0x69, 0x65, 0x72, 0x65, 0x6d, 0x61, 0x6e, 0x75, 0x65, 0x6c, 0x70, + 0x72, 0x6f, 0x70, 0x69, 0x6f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x63, 0x69, + 0x65, 0x72, 0x74, 0x6f, 0x73, 0x65, 0x67, 0x75, 0x72, 0x6f, 0x6d, 0x75, 0x65, + 0x72, 0x74, 0x65, 0x66, 0x75, 0x65, 0x6e, 0x74, 0x65, 0x63, 0x65, 0x72, 0x72, + 0x61, 0x72, 0x67, 0x72, 0x61, 0x6e, 0x64, 0x65, 0x65, 0x66, 0x65, 0x63, 0x74, + 0x6f, 0x70, 0x61, 0x72, 0x74, 0x65, 0x73, 0x6d, 0x65, 0x64, 0x69, 0x64, 0x61, + 0x70, 0x72, 0x6f, 0x70, 0x69, 0x61, 0x6f, 0x66, 0x72, 0x65, 0x63, 0x65, 0x74, + 0x69, 0x65, 0x72, 0x72, 0x61, 0x65, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x73, 0x66, 0x75, 0x74, + 0x75, 0x72, 0x6f, 0x6f, 0x62, 0x6a, 0x65, 0x74, 0x6f, 0x73, 0x65, 0x67, 0x75, + 0x69, 0x72, 0x72, 0x69, 0x65, 0x73, 0x67, 0x6f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, + 0x73, 0x6d, 0x69, 0x73, 0x6d, 0x6f, 0x73, 0xc3, 0xba, 0x6e, 0x69, 0x63, 0x6f, + 0x63, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x73, 0x72, + 0x61, 0x7a, 0xc3, 0xb3, 0x6e, 0x64, 0x65, 0x62, 0x69, 0x64, 0x6f, 0x70, 0x72, + 0x75, 0x65, 0x62, 0x61, 0x74, 0x6f, 0x6c, 0x65, 0x64, 0x6f, 0x74, 0x65, 0x6e, + 0xc3, 0xad, 0x61, 0x6a, 0x65, 0x73, 0xc3, 0xba, 0x73, 0x65, 0x73, 0x70, 0x65, + 0x72, 0x6f, 0x63, 0x6f, 0x63, 0x69, 0x6e, 0x61, 0x6f, 0x72, 0x69, 0x67, 0x65, + 0x6e, 0x74, 0x69, 0x65, 0x6e, 0x64, 0x61, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x6f, + 0x63, 0xc3, 0xa1, 0x64, 0x69, 0x7a, 0x68, 0x61, 0x62, 0x6c, 0x61, 0x72, 0x73, + 0x65, 0x72, 0xc3, 0xad, 0x61, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x61, 0x66, 0x75, + 0x65, 0x72, 0x7a, 0x61, 0x65, 0x73, 0x74, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, + 0x72, 0x72, 0x61, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x72, 0xc3, 0xa9, 0x78, 0x69, + 0x74, 0x6f, 0x6c, 0xc3, 0xb3, 0x70, 0x65, 0x7a, 0x61, 0x67, 0x65, 0x6e, 0x64, + 0x61, 0x76, 0xc3, 0xad, 0x64, 0x65, 0x6f, 0x65, 0x76, 0x69, 0x74, 0x61, 0x72, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x72, 0x6f, 0x73, 0x6a, + 0x61, 0x76, 0x69, 0x65, 0x72, 0x70, 0x61, 0x64, 0x72, 0x65, 0x73, 0x66, 0xc3, + 0xa1, 0x63, 0x69, 0x6c, 0x63, 0x61, 0x62, 0x65, 0x7a, 0x61, 0xc3, 0xa1, 0x72, + 0x65, 0x61, 0x73, 0x73, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x65, 0x6e, 0x76, 0xc3, + 0xad, 0x6f, 0x6a, 0x61, 0x70, 0xc3, 0xb3, 0x6e, 0x61, 0x62, 0x75, 0x73, 0x6f, + 0x73, 0x62, 0x69, 0x65, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x78, 0x74, 0x6f, 0x73, + 0x6c, 0x6c, 0x65, 0x76, 0x61, 0x72, 0x70, 0x75, 0x65, 0x64, 0x61, 0x6e, 0x66, + 0x75, 0x65, 0x72, 0x74, 0x65, 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, 0xd8, 0xa3, 0xd9, 0x87, 0xd9, 0x84, 0xd8, 0xb4, 0xd9, + 0x87, 0xd8, 0xb1, 0xd9, 0x82, 0xd8, 0xb7, 0xd8, 0xb1, 0xd8, 0xb7, 0xd9, 0x84, + 0xd8, 0xa8, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x68, 0x69, 0x6d, + 0x73, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x61, 0x73, 0x68, 0x69, 0x6f, + 0x6e, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, + 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, + 0x65, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x63, 0x79, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, + 0x65, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x73, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x77, 0x6f, 0x72, 0x6b, + 0x69, 0x6e, 0x67, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x6d, 0x69, 0x6c, + 0x6c, 0x69, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x76, + 0x69, 0x73, 0x69, 0x74, 0x65, 0x64, 0x77, 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, + 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x66, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x64, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x6c, + 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, + 0x72, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x6d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x61, 0x6d, 0x73, 0x6f, 0x63, 0x69, 0x65, 0x74, 0x79, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x70, 0x65, 0x72, 0x66, + 0x65, 0x63, 0x74, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x6b, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x67, 0x63, 0x75, + 0x6c, 0x74, 0x75, 0x72, 0x65, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2c, 0x6a, + 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x26, 0x71, 0x75, 0x6f, 0x74, + 0x3b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x72, 0x65, 0x76, 0x69, 0x65, + 0x77, 0x73, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x6e, 0x67, 0x6c, + 0x69, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x74, 0x68, 0x72, + 0x6f, 0x75, 0x67, 0x68, 0x50, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x70, + 0x69, 0x6e, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x61, + 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x69, 0x73, + 0x68, 0x67, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x79, 0x64, 0x65, 0x63, 0x6c, 0x69, + 0x6e, 0x65, 0x6d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x71, 0x75, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x73, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x64, 0x69, 0x73, + 0x70, 0x75, 0x74, 0x65, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x72, 0x65, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x70, + 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, + 0x6d, 0x61, 0x72, 0x72, 0x69, 0x65, 0x64, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x76, 0x69, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x73, 0x73, 0x74, 0x75, 0x64, 0x69, 0x65, 0x73, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x73, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, + 0x79, 0x65, 0x70, 0x69, 0x73, 0x6f, 0x64, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x69, + 0x6e, 0x67, 0x67, 0x72, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x6f, 0x62, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, + 0x75, 0x6c, 0x3e, 0x0d, 0x0a, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x61, + 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, + 0x72, 0x65, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x64, 0x65, 0x73, 0x6b, 0x74, + 0x6f, 0x70, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x75, 0x6e, 0x75, 0x73, 0x75, 0x61, 0x6c, 0x44, 0x69, 0x67, + 0x69, 0x74, 0x61, 0x6c, 0x63, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x57, 0x65, + 0x62, 0x73, 0x69, 0x74, 0x65, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, + 0x41, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x64, 0x65, 0x63, 0x61, 0x64, 0x65, + 0x73, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x26, 0x61, 0x6d, 0x70, + 0x3b, 0x20, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x72, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x67, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x6e, 0x6f, + 0x74, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x63, + 0x61, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, + 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x45, 0x6e, 0x67, 0x6c, 0x61, 0x6e, 0x64, 0x3d, 0x31, 0x26, 0x61, + 0x6d, 0x70, 0x3b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x3d, 0x20, + 0x6e, 0x65, 0x77, 0x20, 0x43, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x67, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x62, + 0x61, 0x72, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x62, 0x65, 0x63, 0x61, + 0x75, 0x73, 0x65, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x44, 0x65, 0x75, + 0x74, 0x73, 0x63, 0x68, 0x66, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x77, 0x6f, + 0x72, 0x6b, 0x65, 0x72, 0x73, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x6c, 0x79, 0x62, + 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x65, 0x78, 0x61, 0x63, 0x74, 0x6c, 0x79, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x64, 0x69, 0x73, 0x65, 0x61, 0x73, + 0x65, 0x53, 0x6f, 0x63, 0x69, 0x65, 0x74, 0x79, 0x77, 0x65, 0x61, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x78, 0x68, 0x69, 0x62, 0x69, 0x74, 0x26, 0x6c, 0x74, 0x3b, + 0x21, 0x2d, 0x2d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x65, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x6f, 0x75, + 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x73, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, + 0x22, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x20, 0x6b, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x73, 0x68, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x49, 0x74, 0x61, 0x6c, + 0x69, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x68, 0x65, 0x61, + 0x76, 0x69, 0x6c, 0x79, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x2d, 0x31, + 0x27, 0x5d, 0x29, 0x3b, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, + 0x67, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x62, 0x69, 0x6c, 0x6c, 0x69, + 0x6f, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x47, 0x65, 0x72, 0x6d, + 0x61, 0x6e, 0x79, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x3c, 0x2f, 0x66, + 0x6f, 0x72, 0x6d, 0x3e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x77, 0x68, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x53, + 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x73, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x73, 0x74, 0x75, 0x6e, 0x69, 0x66, 0x6f, + 0x72, 0x6d, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x69, 0x64, 0x65, + 0x62, 0x61, 0x72, 0x43, 0x68, 0x69, 0x63, 0x61, 0x67, 0x6f, 0x68, 0x6f, 0x6c, + 0x69, 0x64, 0x61, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x70, 0x61, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x61, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x66, 0x65, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x61, 0x72, 0x72, 0x69, 0x76, 0x65, 0x64, 0x70, 0x61, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x72, 0x6f, 0x75, 0x67, 0x68, + 0x6c, 0x79, 0x2e, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x62, 0x75, 0x74, 0x20, + 0x6e, 0x6f, 0x74, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x42, 0x72, 0x69, + 0x74, 0x61, 0x69, 0x6e, 0x43, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x65, 0x6c, 0x61, + 0x63, 0x6b, 0x20, 0x6f, 0x66, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x49, + 0x72, 0x65, 0x6c, 0x61, 0x6e, 0x64, 0x22, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2d, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x20, 0x66, + 0x61, 0x63, 0x74, 0x61, 0x66, 0x66, 0x61, 0x69, 0x72, 0x73, 0x43, 0x68, 0x61, + 0x72, 0x6c, 0x65, 0x73, 0x72, 0x61, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x72, + 0x6f, 0x75, 0x67, 0x68, 0x74, 0x66, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x6c, + 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x70, 0x72, 0x65, 0x6d, 0x69, + 0x75, 0x6d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x41, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x61, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x6c, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, + 0x65, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x2d, 0x6d, 0x6f, 0x62, 0x69, + 0x6c, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x77, 0x61, 0x6e, 0x74, + 0x20, 0x74, 0x6f, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x46, 0x69, 0x72, + 0x65, 0x66, 0x6f, 0x78, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x73, 0x69, + 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x73, 0x74, 0x75, 0x64, 0x69, 0x65, 0x64, 0x6d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x72, 0x61, 0x70, 0x69, 0x64, 0x6c, 0x79, 0x63, 0x6c, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x6b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x65, 0x6d, 0x65, 0x72, 0x67, + 0x65, 0x64, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x70, 0x69, 0x6f, 0x6e, 0x65, 0x65, 0x72, 0x66, 0x6f, 0x72, + 0x6d, 0x75, 0x6c, 0x61, 0x64, 0x79, 0x6e, 0x61, 0x73, 0x74, 0x79, 0x68, 0x6f, + 0x77, 0x20, 0x74, 0x6f, 0x20, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x72, + 0x65, 0x76, 0x65, 0x6e, 0x75, 0x65, 0x65, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x62, 0x72, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x73, 0x6f, 0x6c, 0x64, 0x69, 0x65, 0x72, 0x6c, 0x61, 0x72, 0x67, 0x65, + 0x6c, 0x79, 0x63, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x26, 0x71, 0x75, + 0x6f, 0x74, 0x3b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x64, 0x77, + 0x61, 0x72, 0x64, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x62, 0x65, 0x72, 0x74, 0x20, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x74, 0x73, 0x50, + 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, + 0x75, 0x70, 0x20, 0x77, 0x69, 0x74, 0x68, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x41, 0x6e, 0x67, 0x65, 0x6c, + 0x65, 0x73, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x61, 0x63, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x64, 0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x74, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x62, 0x69, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x64, 0x72, 0x69, 0x76, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x75, 0x64, 0x69, 0x65, 0x73, 0x6d, 0x69, 0x6e, 0x69, 0x6d, + 0x75, 0x6d, 0x70, 0x65, 0x72, 0x68, 0x61, 0x70, 0x73, 0x6d, 0x6f, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x73, 0x65, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x69, 0x73, 0x20, + 0x75, 0x73, 0x65, 0x64, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x3d, 0x22, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, + 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, + 0x74, 0x73, 0x6f, 0x6d, 0x65, 0x6f, 0x6e, 0x65, 0x65, 0x78, 0x74, 0x72, 0x65, + 0x6d, 0x65, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x6f, 0x74, 0x74, + 0x6f, 0x6d, 0x3a, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x61, 0x6c, 0x6c, + 0x20, 0x74, 0x68, 0x65, 0x73, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x70, 0x65, 0x6e, + 0x67, 0x6c, 0x69, 0x73, 0x68, 0x77, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x20, + 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x73, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x61, 0x67, 0x61, 0x69, 0x6e, + 0x73, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x7d, 0x29, 0x28, 0x29, + 0x3b, 0x0d, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x74, 0x72, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, + 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x20, 0x27, 0x27, 0x54, 0x68, 0x65, + 0x20, 0x77, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x65, 0x78, 0x70, 0x6c, 0x6f, + 0x72, 0x65, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x64, 0x47, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x79, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x63, 0x61, + 0x72, 0x65, 0x65, 0x72, 0x73, 0x29, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, + 0x61, 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x65, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x43, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x69, 0x6c, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x6e, + 0x65, 0x75, 0x74, 0x72, 0x61, 0x6c, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x73, 0x65, 0x74, 0x74, 0x6c, + 0x65, 0x64, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x63, 0x61, 0x75, 0x73, + 0x69, 0x6e, 0x67, 0x2d, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x65, 0x64, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x63, 0x65, 0x63, 0x68, + 0x61, 0x70, 0x74, 0x65, 0x72, 0x76, 0x69, 0x63, 0x74, 0x69, 0x6d, 0x73, 0x54, + 0x68, 0x6f, 0x6d, 0x61, 0x73, 0x20, 0x6d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, + 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x75, 0x74, 0x73, 0x69, + 0x64, 0x65, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x68, 0x75, 0x6e, 0x64, + 0x72, 0x65, 0x64, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x69, 0x63, 0x5f, 0x62, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x72, 0x65, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x64, + 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x61, 0x64, 0x6f, 0x70, 0x74, 0x65, + 0x64, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x65, 0x69, 0x74, 0x68, + 0x65, 0x72, 0x67, 0x72, 0x65, 0x61, 0x74, 0x6c, 0x79, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x61, 0x6c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x77, + 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x75, 0x74, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x43, 0x75, 0x6c, 0x74, + 0x75, 0x72, 0x65, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x63, 0x6c, 0x65, + 0x61, 0x72, 0x6c, 0x79, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x42, 0x72, + 0x6f, 0x77, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x65, 0x72, 0x61, 0x6c, 0x7d, + 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x68, 0x69, 0x64, 0x65, 0x28, 0x29, + 0x3b, 0x46, 0x6c, 0x6f, 0x72, 0x69, 0x64, 0x61, 0x61, 0x6e, 0x73, 0x77, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x45, 0x6d, 0x70, 0x65, + 0x72, 0x6f, 0x72, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x65, 0x72, + 0x69, 0x6f, 0x75, 0x73, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x61, 0x6c, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x46, + 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x21, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x65, + 0x64, 0x44, 0x65, 0x6e, 0x6d, 0x61, 0x72, 0x6b, 0x76, 0x6f, 0x69, 0x64, 0x28, + 0x30, 0x29, 0x2f, 0x61, 0x6c, 0x6c, 0x2e, 0x6a, 0x73, 0x70, 0x72, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x65, + 0x70, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0d, 0x0a, 0x4d, + 0x6f, 0x64, 0x65, 0x72, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x73, 0x2e, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x20, 0x0a, 0x0a, 0x4d, 0x61, 0x6e, + 0x79, 0x20, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x73, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x65, 0x64, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x66, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x6d, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x6c, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x6f, + 0x70, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6c, + 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x63, + 0x65, 0x47, 0x65, 0x6f, 0x72, 0x67, 0x65, 0x20, 0x42, 0x65, 0x6c, 0x67, 0x69, + 0x75, 0x6d, 0x2e, 0x2e, 0x2e, 0x3c, 0x2f, 0x61, 0x3e, 0x74, 0x77, 0x69, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x79, 0x77, 0x61, 0x69, + 0x74, 0x69, 0x6e, 0x67, 0x77, 0x61, 0x72, 0x66, 0x61, 0x72, 0x65, 0x20, 0x4f, + 0x74, 0x68, 0x65, 0x72, 0x20, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x70, + 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x73, 0x63, 0x68, 0x6f, 0x6c, 0x61, + 0x72, 0x3c, 0x2f, 0x70, 0x3e, 0x0d, 0x0a, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x6c, 0x6f, 0x73, 0x73, + 0x20, 0x6f, 0x66, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x73, 0x47, 0x65, 0x6f, + 0x72, 0x67, 0x69, 0x61, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x3c, 0x68, + 0x65, 0x61, 0x64, 0x3e, 0x3c, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x31, + 0x27, 0x5d, 0x29, 0x3b, 0x0d, 0x0a, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, + 0x6e, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x63, 0x61, 0x72, 0x72, 0x69, + 0x65, 0x64, 0x31, 0x30, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x3c, 0x2f, 0x68, 0x33, + 0x3e, 0x0a, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x62, 0x65, 0x63, + 0x6f, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x77, 0x65, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x30, 0x30, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x6d, + 0x6f, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x6f, 0x66, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x79, + 0x20, 0x62, 0x69, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x6c, 0x69, 0x66, 0x65, 0x20, + 0x6f, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x72, 0x69, 0x73, 0x65, + 0x20, 0x6f, 0x66, 0x26, 0x72, 0x61, 0x71, 0x75, 0x6f, 0x3b, 0x70, 0x6c, 0x75, + 0x73, 0x6f, 0x6e, 0x65, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x28, 0x74, + 0x68, 0x6f, 0x75, 0x67, 0x68, 0x44, 0x6f, 0x75, 0x67, 0x6c, 0x61, 0x73, 0x6a, + 0x6f, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x73, + 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x41, 0x6e, 0x63, 0x69, 0x65, 0x6e, + 0x74, 0x56, 0x69, 0x65, 0x74, 0x6e, 0x61, 0x6d, 0x76, 0x65, 0x68, 0x69, 0x63, + 0x6c, 0x65, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x63, 0x72, 0x79, 0x73, + 0x74, 0x61, 0x6c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x57, 0x69, 0x6e, + 0x64, 0x6f, 0x77, 0x73, 0x65, 0x6e, 0x6a, 0x6f, 0x79, 0x65, 0x64, 0x61, 0x20, + 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x3c, + 0x61, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, + 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x72, 0x65, 0x74, 0x69, 0x72, + 0x65, 0x64, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x68, 0x69, 0x64, 0x64, + 0x65, 0x6e, 0x3b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x73, 0x65, 0x65, + 0x6b, 0x69, 0x6e, 0x67, 0x63, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x77, 0x61, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x61, 0x74, 0x63, + 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, + 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, + 0x73, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x61, 0x3a, 0x68, 0x6f, 0x76, + 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x46, 0x72, 0x65, 0x6e, + 0x63, 0x68, 0x20, 0x6c, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x74, 0x79, 0x70, + 0x69, 0x63, 0x61, 0x6c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x6e, + 0x65, 0x6d, 0x69, 0x65, 0x73, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x66, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, + 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x66, 0x73, 0x2d, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x3a, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x3e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x76, 0x69, 0x6f, 0x6c, 0x65, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x3e, 0x63, + 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x46, 0x69, 0x6e, 0x6c, 0x61, 0x6e, 0x64, + 0x63, 0x68, 0x65, 0x6d, 0x69, 0x73, 0x74, 0x73, 0x68, 0x65, 0x20, 0x77, 0x61, + 0x73, 0x31, 0x30, 0x70, 0x78, 0x3b, 0x22, 0x3e, 0x61, 0x73, 0x20, 0x73, 0x75, + 0x63, 0x68, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, 0x64, 0x3c, 0x2f, 0x73, 0x70, + 0x61, 0x6e, 0x3e, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x20, 0x6f, 0x66, 0x61, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x66, + 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, + 0x72, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x67, + 0x65, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x64, 0x65, 0x73, 0x63, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6e, 0x75, 0x63, 0x6c, + 0x65, 0x61, 0x72, 0x4a, 0x65, 0x77, 0x69, 0x73, 0x68, 0x20, 0x70, 0x72, 0x6f, + 0x74, 0x65, 0x73, 0x74, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x66, 0x6c, + 0x6f, 0x77, 0x65, 0x72, 0x73, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x72, + 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, + 0x77, 0x68, 0x6f, 0x20, 0x77, 0x61, 0x73, 0x6c, 0x65, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x75, 0x69, 0x63, 0x69, + 0x64, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x73, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x6f, 0x63, + 0x69, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x63, 0x6f, + 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x77, + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x3c, 0x62, 0x72, 0x20, 0x2f, 0x3e, 0x3c, + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4e, 0x61, 0x74, 0x75, 0x72, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x63, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x73, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x53, 0x77, 0x65, 0x64, 0x69, 0x73, 0x68, 0x62, 0x72, 0x69, + 0x65, 0x66, 0x6c, 0x79, 0x50, 0x65, 0x72, 0x73, 0x69, 0x61, 0x6e, 0x73, 0x6f, + 0x20, 0x6d, 0x75, 0x63, 0x68, 0x43, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, 0x64, + 0x65, 0x70, 0x69, 0x63, 0x74, 0x73, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x68, 0x6f, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x73, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x74, 0x6f, 0x62, 0x65, 0x61, 0x72, 0x69, + 0x6e, 0x67, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x76, 0x69, + 0x73, 0x65, 0x64, 0x6a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x28, 0x2d, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e, 0x74, 0x6f, + 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x64, + 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x54, 0x75, 0x72, 0x6b, 0x69, 0x73, 0x68, + 0x79, 0x6f, 0x75, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x28, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x0a, 0x0a, 0x62, 0x75, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x65, 0x67, 0x72, + 0x65, 0x65, 0x73, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x52, 0x69, 0x63, + 0x68, 0x61, 0x72, 0x64, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x6c, 0x79, 0x70, 0x6c, + 0x61, 0x73, 0x74, 0x69, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3c, + 0x2f, 0x74, 0x72, 0x3e, 0x0d, 0x0a, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, + 0x75, 0x6c, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, + 0x73, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x70, 0x68, 0x79, 0x73, 0x69, + 0x63, 0x73, 0x66, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, + 0x6b, 0x20, 0x74, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3c, 0x62, + 0x72, 0x20, 0x2f, 0x3e, 0x0a, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x63, + 0x68, 0x61, 0x72, 0x74, 0x65, 0x72, 0x74, 0x6f, 0x75, 0x72, 0x69, 0x73, 0x6d, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x65, + 0x64, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x3c, 0x2f, 0x68, 0x31, 0x3e, + 0x0d, 0x0a, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x3f, 0x78, 0x6d, 0x6c, + 0x20, 0x76, 0x65, 0x68, 0x65, 0x6c, 0x70, 0x69, 0x6e, 0x67, 0x64, 0x69, 0x61, + 0x6d, 0x6f, 0x6e, 0x64, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x61, 0x69, + 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x65, 0x6e, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x29, + 0x2e, 0x61, 0x74, 0x74, 0x72, 0x28, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x68, 0x6f, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x56, 0x69, 0x6e, 0x63, 0x65, + 0x6e, 0x74, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x20, 0x73, 0x72, 0x63, + 0x3d, 0x22, 0x2f, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x64, 0x65, 0x73, + 0x70, 0x69, 0x74, 0x65, 0x64, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x74, 0x65, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x68, + 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x4a, 0x6f, 0x73, 0x65, 0x70, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x61, 0x74, 0x72, 0x65, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x73, 0x3c, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e, 0x61, 0x20, 0x6c, 0x61, 0x72, + 0x67, 0x65, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x2c, 0x20, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x66, 0x61, 0x76, + 0x69, 0x63, 0x6f, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x75, + 0x6e, 0x67, 0x61, 0x72, 0x79, 0x41, 0x69, 0x72, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, + 0x4d, 0x69, 0x63, 0x68, 0x61, 0x65, 0x6c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x65, 0x26, 0x71, 0x75, + 0x6f, 0x74, 0x3b, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x66, + 0x74, 0x22, 0x3e, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x47, 0x6f, + 0x6c, 0x64, 0x65, 0x6e, 0x20, 0x41, 0x66, 0x66, 0x61, 0x69, 0x72, 0x73, 0x67, + 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67, + 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x69, 0x64, 0x65, 0x61, 0x20, 0x6f, + 0x66, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x73, + 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x2e, 0x73, 0x72, 0x63, + 0x20, 0x3d, 0x20, 0x63, 0x61, 0x72, 0x74, 0x6f, 0x6f, 0x6e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x4d, 0x75, + 0x73, 0x6c, 0x69, 0x6d, 0x73, 0x57, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x69, + 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, + 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x65, 0x64, + 0x2c, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x2f, 0x73, 0x68, 0x6f, 0x77, + 0x5f, 0x61, 0x6f, 0x75, 0x74, 0x64, 0x6f, 0x6f, 0x72, 0x65, 0x73, 0x63, 0x61, + 0x70, 0x65, 0x28, 0x41, 0x75, 0x73, 0x74, 0x72, 0x69, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x74, 0x69, 0x63, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x49, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, + 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, + 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x0a, 0x09, 0x09, 0x3c, 0x21, 0x2d, + 0x2d, 0x44, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x20, 0x62, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x69, 0x6d, 0x70, 0x6f, + 0x73, 0x65, 0x64, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x62, 0x72, + 0x61, 0x68, 0x61, 0x6d, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x7b, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3a, 0x70, 0x75, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x29, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x28, 0x7c, 0x7c, 0x20, 0x5b, 0x5d, 0x3b, 0x0a, + 0x44, 0x41, 0x54, 0x41, 0x5b, 0x20, 0x2a, 0x6b, 0x69, 0x74, 0x63, 0x68, 0x65, + 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x61, 0x63, 0x74, 0x75, 0x61, + 0x6c, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x69, 0x6e, + 0x6c, 0x79, 0x20, 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x27, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x74, 0x73, 0x69, 0x66, + 0x28, 0x74, 0x79, 0x70, 0x65, 0x49, 0x74, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x26, + 0x63, 0x6f, 0x70, 0x79, 0x3b, 0x20, 0x22, 0x3e, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x62, 0x6f, 0x72, 0x6e, 0x20, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x65, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x74, 0x61, 0x6c, 0x6b, 0x69, + 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x72, 0x6e, 0x67, 0x61, 0x69, 0x6e, + 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x6a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x79, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x73, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x69, 0x74, 0x73, 0x20, 0x6f, 0x77, 0x6e, 0x61, + 0x73, 0x73, 0x61, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x77, + 0x6e, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x20, 0x72, 0x65, 0x6c, + 0x3d, 0x22, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x63, 0x6f, 0x6e, 0x63, + 0x65, 0x72, 0x74, 0x64, 0x69, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x64, 0x6f, 0x6c, + 0x6c, 0x61, 0x72, 0x73, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x70, 0x68, + 0x70, 0x3f, 0x69, 0x64, 0x3d, 0x61, 0x6c, 0x63, 0x6f, 0x68, 0x6f, 0x6c, 0x29, + 0x3b, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, + 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x76, 0x65, 0x73, 0x73, 0x65, 0x6c, + 0x73, 0x72, 0x65, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x61, 0x6d, 0x61, 0x74, 0x65, 0x75, 0x72, 0x61, 0x6e, 0x64, 0x72, + 0x6f, 0x69, 0x64, 0x61, 0x6c, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x69, 0x6c, 0x6c, + 0x6e, 0x65, 0x73, 0x73, 0x77, 0x61, 0x6c, 0x6b, 0x69, 0x6e, 0x67, 0x63, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x73, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x79, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x75, 0x6e, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x65, 0x78, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, + 0x65, 0x64, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x0a, 0x09, 0x3c, 0x21, 0x2d, + 0x2d, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x6c, 0x69, 0x6e, 0x6b, + 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x42, 0x6f, 0x6f, + 0x6b, 0x20, 0x6f, 0x66, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x6d, 0x69, + 0x6e, 0x2e, 0x6a, 0x73, 0x3f, 0x61, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6b, + 0x6f, 0x6e, 0x74, 0x61, 0x6b, 0x74, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x27, 0x73, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x3d, 0x77, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x6c, 0x6c, 0x20, 0x52, + 0x69, 0x67, 0x3b, 0x0a, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x72, 0x61, 0x69, 0x73, + 0x69, 0x6e, 0x67, 0x20, 0x41, 0x6c, 0x73, 0x6f, 0x2c, 0x20, 0x63, 0x72, 0x75, + 0x63, 0x69, 0x61, 0x6c, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x22, 0x3e, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x65, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x73, 0x63, 0x66, + 0x69, 0x72, 0x65, 0x66, 0x6f, 0x78, 0x61, 0x73, 0x20, 0x6d, 0x75, 0x63, 0x68, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2c, + 0x20, 0x73, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, + 0x3d, 0x20, 0x0a, 0x0d, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x74, 0x6f, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x50, 0x72, + 0x65, 0x6d, 0x69, 0x65, 0x72, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, + 0x64, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x3b, 0x70, 0x6f, 0x76, 0x65, 0x72, + 0x74, 0x79, 0x63, 0x68, 0x61, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x69, + 0x6e, 0x67, 0x20, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x41, 0x6e, 0x74, + 0x68, 0x6f, 0x6e, 0x79, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x20, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x72, + 0x65, 0x61, 0x63, 0x68, 0x65, 0x73, 0x63, 0x75, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x6c, 0x69, 0x66, 0x65, 0x20, 0x69, + 0x6e, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2d, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x4e, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3c, 0x2f, 0x74, 0x64, + 0x3e, 0x0d, 0x0a, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x74, 0x61, + 0x64, 0x69, 0x75, 0x6d, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x76, 0x61, + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x74, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x73, 0x68, + 0x65, 0x6c, 0x64, 0x20, 0x62, 0x79, 0x77, 0x68, 0x6f, 0x20, 0x61, 0x72, 0x65, + 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x66, 0x61, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x77, 0x68, 0x6f, 0x20, 0x68, + 0x61, 0x64, 0x61, 0x69, 0x72, 0x70, 0x6f, 0x72, 0x74, 0x74, 0x6f, 0x77, 0x6e, + 0x20, 0x6f, 0x66, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, 0x65, 0x20, 0x27, 0x63, 0x6c, + 0x69, 0x63, 0x6b, 0x27, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x73, 0x6b, 0x65, + 0x79, 0x77, 0x6f, 0x72, 0x64, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x63, + 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x3b, + 0x41, 0x6e, 0x64, 0x72, 0x65, 0x77, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x6f, 0x72, 0x20, 0x6d, 0x6f, + 0x72, 0x65, 0x33, 0x30, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x3b, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x68, 0x65, + 0x72, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x6c, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, + 0x6f, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x73, 0x73, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x66, 0x69, 0x6e, 0x67, + 0x65, 0x72, 0x73, 0x44, 0x75, 0x6b, 0x65, 0x20, 0x6f, 0x66, 0x70, 0x65, 0x6f, + 0x70, 0x6c, 0x65, 0x2c, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x77, 0x68, + 0x61, 0x74, 0x20, 0x69, 0x73, 0x68, 0x61, 0x72, 0x6d, 0x6f, 0x6e, 0x79, 0x61, + 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x22, 0x3a, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x69, 0x6e, 0x20, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x3e, + 0x0a, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x6f, 0x66, 0x66, 0x69, 0x63, + 0x65, 0x72, 0x63, 0x6f, 0x75, 0x6e, 0x63, 0x69, 0x6c, 0x67, 0x61, 0x69, 0x6e, + 0x69, 0x6e, 0x67, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x6c, 0x6f, + 0x79, 0x61, 0x6c, 0x74, 0x79, 0x66, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x61, + 0x6e, 0x64, 0x20, 0x77, 0x61, 0x73, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x6f, 0x72, + 0x73, 0x75, 0x70, 0x72, 0x65, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x20, 0x68, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x73, 0x73, 0x69, + 0x61, 0x6e, 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x62, 0x65, + 0x72, 0x74, 0x61, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x65, 0x74, + 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x22, 0x3e, 0x2e, 0x61, + 0x70, 0x70, 0x65, 0x6e, 0x64, 0x64, 0x6f, 0x20, 0x77, 0x69, 0x74, 0x68, 0x66, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x6c, 0x62, 0x61, 0x6e, 0x6b, 0x20, 0x6f, 0x66, + 0x62, 0x65, 0x6e, 0x65, 0x61, 0x74, 0x68, 0x44, 0x65, 0x73, 0x70, 0x69, 0x74, + 0x65, 0x43, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x73, 0x29, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x63, 0x6c, 0x6f, + 0x73, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x49, 0x6e, + 0x73, 0x74, 0x65, 0x61, 0x64, 0x66, 0x69, 0x66, 0x74, 0x65, 0x65, 0x6e, 0x61, + 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x2e, 0x79, 0x61, 0x68, 0x6f, 0x6f, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x72, 0x6f, 0x62, 0x73, 0x63, 0x75, 0x72, 0x65, 0x72, 0x65, 0x66, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x63, 0x3d, 0x20, 0x4d, 0x61, + 0x74, 0x68, 0x2e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x6f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x61, 0x20, + 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x79, + 0x65, 0x61, 0x72, 0x20, 0x6f, 0x66, 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, + 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x69, + 0x74, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x68, 0x6f, 0x6d, 0x65, 0x20, + 0x6f, 0x66, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x72, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x64, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x68, 0x65, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x66, 0x72, 0x77, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x4d, + 0x61, 0x72, 0x63, 0x68, 0x20, 0x31, 0x6b, 0x6e, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x69, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, + 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x6e, 0x73, 0x63, 0x6c, 0x6f, 0x73, 0x65, + 0x73, 0x74, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x6b, + 0x73, 0x22, 0x3e, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x65, 0x64, 0x45, 0x4e, 0x44, + 0x20, 0x2d, 0x2d, 0x3e, 0x66, 0x61, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x61, 0x77, + 0x61, 0x72, 0x64, 0x65, 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x20, 0x66, 0x61, 0x69, 0x72, 0x6c, 0x79, 0x20, + 0x77, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x61, + 0x6c, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x65, + 0x74, 0x65, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x73, 0x69, 0x6e, 0x67, + 0x69, 0x6e, 0x67, 0x66, 0x61, 0x72, 0x6d, 0x65, 0x72, 0x73, 0x42, 0x72, 0x61, + 0x73, 0x69, 0x6c, 0x29, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x72, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x47, 0x72, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x66, + 0x6f, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x75, 0x72, 0x73, 0x75, 0x65, 0x64, + 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x75, + 0x70, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x62, 0x6f, 0x74, 0x68, 0x20, + 0x6f, 0x66, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x73, 0x61, 0x77, 0x20, + 0x74, 0x68, 0x65, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x73, 0x63, 0x6f, 0x6c, + 0x6f, 0x75, 0x72, 0x73, 0x69, 0x66, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x68, 0x65, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x70, + 0x75, 0x73, 0x68, 0x28, 0x66, 0x75, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x20, + 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x3e, 0x46, 0x61, 0x6e, 0x74, 0x61, 0x73, + 0x79, 0x69, 0x6e, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x69, 0x6e, 0x6a, 0x75, 0x72, + 0x65, 0x64, 0x55, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x66, 0x61, 0x72, 0x6d, + 0x69, 0x6e, 0x67, 0x63, 0x6c, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x20, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x63, 0x65, 0x75, 0x73, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x61, 0x6c, 0x3c, + 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x73, 0x69, 0x78, 0x74, 0x65, 0x65, 0x6e, 0x49, 0x73, 0x6c, 0x61, 0x6d, + 0x69, 0x63, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x65, 0x6e, 0x74, 0x69, + 0x72, 0x65, 0x20, 0x77, 0x69, 0x64, 0x65, 0x6c, 0x79, 0x20, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x6f, 0x6e, + 0x65, 0x20, 0x63, 0x61, 0x6e, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x73, + 0x70, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, + 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x73, 0x74, 0x65, 0x72, 0x72, 0x61, 0x69, + 0x6e, 0x3c, 0x74, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x66, 0x75, 0x6e, 0x65, 0x72, + 0x61, 0x6c, 0x76, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x20, 0x63, 0x72, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x70, 0x72, 0x6f, + 0x70, 0x68, 0x65, 0x74, 0x73, 0x68, 0x69, 0x66, 0x74, 0x65, 0x64, 0x64, 0x6f, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x75, 0x73, 0x73, 0x65, 0x6c, 0x6c, 0x20, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, + 0x61, 0x6c, 0x67, 0x65, 0x62, 0x72, 0x61, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, + 0x2d, 0x62, 0x75, 0x6c, 0x6b, 0x20, 0x6f, 0x66, 0x6d, 0x61, 0x6e, 0x20, 0x61, + 0x6e, 0x64, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x0a, 0x20, 0x68, 0x65, 0x20, 0x6c, + 0x65, 0x66, 0x74, 0x29, 0x2e, 0x76, 0x61, 0x6c, 0x28, 0x29, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x29, 0x3b, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x61, + 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x68, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x6e, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x61, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x29, 0x3b, 0x0a, 0x7d, 0x29, 0x3b, + 0x0a, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x20, 0x74, 0x75, + 0x72, 0x6e, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x73, 0x62, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x20, 0x42, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x63, 0x68, 0x61, + 0x72, 0x67, 0x65, 0x64, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e, 0x43, 0x61, + 0x70, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x67, + 0x6f, 0x64, 0x64, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x20, 0x2d, 0x2d, 0x3e, + 0x41, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x62, 0x75, 0x74, 0x20, 0x77, 0x61, + 0x73, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x69, 0x6e, 0x3d, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x26, 0x4c, 0x69, 0x6e, 0x63, 0x6f, 0x6c, 0x6e, 0x77, 0x65, 0x20, + 0x6b, 0x6e, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x4a, 0x75, + 0x64, 0x61, 0x69, 0x73, 0x6d, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x27, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, + 0x68, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x75, 0x6e, 0x63, 0x6c, 0x65, 0x61, + 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x27, 0x2c, 0x62, 0x6f, 0x74, 0x68, 0x20, + 0x69, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x0a, 0x0a, 0x3c, 0x21, + 0x2d, 0x2d, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x68, 0x61, 0x72, + 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x6f, + 0x72, 0x74, 0x20, 0x6f, 0x66, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x73, + 0x74, 0x72, 0x65, 0x65, 0x74, 0x73, 0x42, 0x65, 0x72, 0x6e, 0x61, 0x72, 0x64, + 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x73, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, + 0x6f, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x20, + 0x69, 0x6e, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x75, 0x72, 0x46, 0x72, 0x65, 0x65, + 0x64, 0x6f, 0x6d, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x2f, 0x61, 0x62, + 0x6f, 0x75, 0x74, 0x2e, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x6c, 0x65, + 0x67, 0x65, 0x6e, 0x64, 0x73, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x6d, + 0x6f, 0x64, 0x65, 0x72, 0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, + 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, + 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x20, 0x70, 0x61, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x72, 0x61, 0x72, 0x65, + 0x6c, 0x79, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x79, 0x6d, 0x64, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x30, 0x30, + 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x61, 0x73, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x2f, 0x2a, 0x20, 0x3c, 0x21, 0x5b, 0x43, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x73, 0x74, 0x20, 0x70, 0x69, 0x63, 0x6b, 0x65, + 0x64, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x75, 0x73, 0x65, 0x73, + 0x20, 0x6f, 0x66, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x73, 0x20, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4d, 0x61, 0x74, 0x74, 0x68, 0x65, 0x77, 0x74, 0x61, + 0x63, 0x74, 0x69, 0x63, 0x73, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x64, 0x77, + 0x61, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6c, 0x61, 0x77, 0x73, 0x20, 0x6f, 0x66, + 0x65, 0x61, 0x73, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x20, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x7d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x73, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x68, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6f, 0x78, 0x77, 0x65, 0x6e, + 0x74, 0x20, 0x74, 0x6f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x63, 0x69, + 0x74, 0x69, 0x7a, 0x65, 0x6e, 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x72, + 0x65, 0x74, 0x72, 0x65, 0x61, 0x74, 0x2e, 0x20, 0x53, 0x6f, 0x6d, 0x65, 0x20, + 0x77, 0x77, 0x2e, 0x22, 0x29, 0x3b, 0x0a, 0x62, 0x6f, 0x6d, 0x62, 0x69, 0x6e, + 0x67, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x6f, 0x3a, 0x6d, 0x61, 0x64, 0x65, 0x20, + 0x69, 0x6e, 0x2e, 0x20, 0x4d, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x61, 0x72, 0x72, + 0x69, 0x65, 0x73, 0x7c, 0x7c, 0x7b, 0x7d, 0x3b, 0x77, 0x69, 0x77, 0x6f, 0x72, + 0x6b, 0x20, 0x6f, 0x66, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x64, 0x65, + 0x66, 0x65, 0x61, 0x74, 0x73, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x65, 0x64, 0x6f, + 0x70, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x70, 0x61, 0x67, 0x65, 0x54, 0x72, 0x61, + 0x75, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x3c, 0x63, 0x6f, 0x6d, 0x53, 0x63, + 0x6f, 0x72, 0x41, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x63, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x57, 0x69, + 0x6c, 0x68, 0x65, 0x6c, 0x6d, 0x73, 0x75, 0x62, 0x75, 0x72, 0x62, 0x73, 0x67, + 0x65, 0x6e, 0x75, 0x69, 0x6e, 0x65, 0x62, 0x69, 0x73, 0x68, 0x6f, 0x70, 0x73, + 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x28, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x62, 0x6f, 0x64, 0x79, 0x20, + 0x6f, 0x66, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x63, 0x74, 0x73, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x6c, 0x65, 0x66, + 0x74, 0x20, 0x74, 0x6f, 0x63, 0x68, 0x69, 0x65, 0x66, 0x6c, 0x79, 0x2d, 0x68, + 0x69, 0x64, 0x64, 0x65, 0x6e, 0x2d, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x3c, + 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x0a, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, + 0x69, 0x6e, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, + 0x73, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x61, 0x6c, 0x77, 0x61, 0x79, + 0x73, 0x20, 0x76, 0x69, 0x61, 0x20, 0x74, 0x68, 0x65, 0x73, 0x70, 0x61, 0xc3, + 0xb1, 0x6f, 0x6c, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x72, 0x75, 0x6c, + 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x63, 0x61, + 0x70, 0x74, 0x61, 0x69, 0x6e, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x6e, 0x72, + 0x75, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x6f, 0x6b, + 0x69, 0x74, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x3d, 0x30, 0x26, 0x61, 0x6d, 0x70, + 0x3b, 0x28, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x73, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x73, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x61, 0x67, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x20, 0x4b, 0x65, 0x6e, + 0x6e, 0x65, 0x64, 0x79, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x66, 0x75, + 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x42, + 0x65, 0x73, 0x69, 0x64, 0x65, 0x73, 0x2f, 0x2f, 0x2d, 0x2d, 0x3e, 0x3c, 0x2f, + 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x73, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x68, 0x69, 0x6d, 0x20, 0x74, + 0x6f, 0x20, 0x69, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x74, 0x6f, 0x20, + 0x74, 0x61, 0x6b, 0x65, 0x77, 0x61, 0x79, 0x73, 0x20, 0x74, 0x6f, 0x73, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x61, 0x64, 0x76, 0x69, 0x73, 0x65, 0x64, 0x70, + 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x3a, + 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x79, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, + 0x73, 0x61, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x72, 0x62, 0x65, + 0x72, 0x74, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x73, 0x20, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x66, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x73, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x73, 0x6c, + 0x6f, 0x77, 0x6c, 0x79, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x09, 0x09, + 0x69, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x64, + 0x20, 0x72, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x75, 0x6c, 0x3e, 0x0d, 0x0a, + 0x20, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x70, 0x61, 0x69, 0x72, + 0x20, 0x6f, 0x66, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x4b, 0x6f, 0x6e, + 0x74, 0x61, 0x6b, 0x74, 0x41, 0x6e, 0x74, 0x6f, 0x6e, 0x69, 0x6f, 0x68, 0x61, + 0x76, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x22, 0x29, 0x2e, 0x63, 0x73, 0x73, + 0x28, 0x68, 0x6f, 0x73, 0x74, 0x69, 0x6c, 0x65, 0x6c, 0x65, 0x61, 0x64, 0x20, + 0x74, 0x6f, 0x6c, 0x69, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x2c, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2d, 0x2d, 0x3e, + 0x0d, 0x0a, 0x0d, 0x0a, 0x20, 0x72, 0x6f, 0x77, 0x73, 0x3d, 0x22, 0x20, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x3c, + 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, + 0x3e, 0x3c, 0x5c, 0x2f, 0x73, 0x63, 0x72, 0x73, 0x6f, 0x6c, 0x76, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x61, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x6c, 0x61, 0x76, 0x65, + 0x72, 0x79, 0x77, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x61, 0x73, 0x21, 0x3d, 0x20, 0x27, 0x75, 0x6e, 0x64, 0x66, 0x6f, 0x72, + 0x20, 0x61, 0x6c, 0x6c, 0x70, 0x61, 0x72, 0x74, 0x6c, 0x79, 0x20, 0x2d, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x3a, 0x41, 0x72, 0x61, 0x62, 0x69, 0x61, 0x6e, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, + 0x75, 0x6e, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, + 0x2d, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x2c, 0x69, 0x73, 0x20, 0x68, 0x6f, + 0x6d, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x20, 0x6f, 0x66, 0x64, 0x65, 0x73, 0x69, + 0x72, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x6e, 0x74, 0x6f, 0x6e, 0x63, 0x6f, 0x73, + 0x74, 0x20, 0x6f, 0x66, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x62, 0x65, + 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x70, + 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x20, + 0x65, 0x61, 0x64, 0x27, 0x29, 0x5b, 0x30, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, + 0x73, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x73, 0x3e, 0x26, 0x63, 0x6f, 0x70, + 0x79, 0x3b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x3e, 0x61, 0x73, 0x73, 0x65, + 0x6d, 0x62, 0x6c, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x73, + 0x3a, 0x22, 0x20, 0x3f, 0x20, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x62, + 0x79, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x20, + 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, + 0x64, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x68, 0x61, 0x64, 0x20, 0x74, + 0x68, 0x65, 0x70, 0x75, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x62, 0x75, 0x74, 0x20, 0x61, 0x72, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x62, 0x6f, + 0x74, 0x74, 0x6f, 0x6d, 0x20, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, + 0x41, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, + 0x73, 0x61, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x64, 0x65, 0x6e, 0x6f, 0x74, + 0x65, 0x73, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x69, 0x6e, 0x48, 0x6f, 0x75, 0x73, + 0x74, 0x6f, 0x6e, 0x32, 0x30, 0x70, 0x78, 0x3b, 0x22, 0x3e, 0x61, 0x63, 0x63, + 0x75, 0x73, 0x65, 0x64, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x67, 0x6f, + 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x46, 0x61, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x29, + 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x70, 0x72, 0x69, 0x65, 0x73, 0x74, 0x73, + 0x20, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x69, 0x6e, 0x20, 0x4a, 0x75, 0x6c, + 0x79, 0x73, 0x74, 0x20, 0x2b, 0x20, 0x22, 0x67, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x74, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x68, 0x65, 0x6c, 0x70, + 0x66, 0x75, 0x6c, 0x72, 0x65, 0x76, 0x69, 0x76, 0x65, 0x64, 0x69, 0x73, 0x20, + 0x76, 0x65, 0x72, 0x79, 0x72, 0x27, 0x2b, 0x27, 0x69, 0x70, 0x74, 0x6c, 0x6f, + 0x73, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x65, 0x6d, 0x61, 0x6c, 0x65, 0x73, 0x69, + 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, + 0x64, 0x61, 0x79, 0x73, 0x20, 0x6f, 0x66, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, + 0x6c, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3c, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x28, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x09, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x69, 0x73, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x2e, 0x20, + 0x20, 0x54, 0x68, 0x65, 0x20, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f, 0x6e, 0x64, + 0x6f, 0x6e, 0x65, 0x20, 0x62, 0x79, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x6c, 0x61, 0x77, 0x20, 0x6f, 0x66, + 0x20, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x61, 0x61, 0x76, 0x6f, 0x69, 0x64, + 0x65, 0x64, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x32, 0x70, 0x78, 0x20, + 0x33, 0x70, 0x78, 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x20, 0x61, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6d, 0x65, + 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2d, 0x3d, + 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x66, 0x6f, 0x72, 0x20, 0x75, 0x73, 0x65, + 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, + 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x20, 0x26, 0x6e, 0x62, + 0x73, 0x70, 0x3b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x73, 0x6e, 0x6f, + 0x74, 0x69, 0x63, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x7d, + 0x29, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x6f, 0x72, 0x65, + 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x69, 0x73, 0x20, 0x6a, 0x75, + 0x73, 0x74, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x77, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x77, 0x68, 0x79, + 0x20, 0x74, 0x68, 0x65, 0x73, 0x68, 0x69, 0x70, 0x70, 0x65, 0x64, 0x62, 0x72, + 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x6f, 0x66, + 0x63, 0x75, 0x69, 0x73, 0x69, 0x6e, 0x65, 0x69, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x61, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x41, 0x64, 0x6d, 0x69, 0x72, + 0x61, 0x6c, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x3b, 0x6e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x20, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, + 0x73, 0x73, 0x2c, 0x20, 0x6f, 0x6e, 0x74, 0x61, 0x72, 0x69, 0x6f, 0x63, 0x68, + 0x61, 0x72, 0x73, 0x65, 0x74, 0x74, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x69, + 0x6e, 0x76, 0x61, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, + 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x69, 0x73, 0x20, 0x6d, 0x6f, 0x73, + 0x74, 0x61, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x6c, 0x79, 0x66, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x7d, 0x29, 0x3b, 0x0d, + 0x0a, 0x20, 0x20, 0x69, 0x6d, 0x6d, 0x65, 0x6e, 0x73, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x73, 0x61, + 0x74, 0x69, 0x73, 0x66, 0x79, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x64, + 0x6f, 0x77, 0x6e, 0x20, 0x74, 0x6f, 0x6c, 0x6f, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x69, 0x6e, 0x20, 0x4a, 0x75, 0x6e, + 0x65, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x6e, 0x6f, 0x74, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x64, 0x69, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x6e, 0x69, 0x73, 0x68, 0x73, 0x72, 0x63, + 0x20, 0x3d, 0x20, 0x28, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x68, 0x65, + 0x6c, 0x70, 0x20, 0x6f, 0x66, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x20, 0x6c, + 0x61, 0x77, 0x20, 0x61, 0x6e, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x64, + 0x66, 0x6f, 0x72, 0x65, 0x73, 0x74, 0x73, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3e, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2d, 0x77, 0x65, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x53, 0x74, 0x61, 0x6e, + 0x6c, 0x65, 0x79, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x2f, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x43, 0x72, 0x6f, 0x61, 0x74, 0x69, 0x61, 0x20, 0x41, + 0x62, 0x6f, 0x75, 0x74, 0x20, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x69, + 0x74, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, + 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x29, 0x7b, 0x74, 0x68, 0x72, 0x6f, + 0x77, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x65, 0x72, 0x65, 0x74, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x22, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x22, 0x6c, 0x69, 0x6b, + 0x65, 0x20, 0x61, 0x20, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x73, 0x6c, 0x69, + 0x76, 0x65, 0x20, 0x69, 0x6e, 0x61, 0x73, 0x20, 0x73, 0x65, 0x65, 0x6e, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x75, 0x62, 0x2d, 0x6c, 0x69, 0x6e, 0x6b, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x22, 0x3e, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x66, 0x65, 0x65, 0x64, + 0x69, 0x6e, 0x67, 0x4e, 0x75, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x6f, 0x20, 0x68, 0x65, 0x6c, 0x70, 0x57, 0x6f, + 0x6d, 0x65, 0x6e, 0x27, 0x73, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x4d, + 0x65, 0x78, 0x69, 0x63, 0x61, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x69, 0x6e, + 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x61, 0x6e, + 0x79, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x6c, 0x61, 0x77, 0x73, 0x75, + 0x69, 0x74, 0x64, 0x65, 0x76, 0x69, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x75, 0x73, + 0x68, 0x28, 0x7b, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x73, 0x69, 0x6d, + 0x70, 0x6c, 0x79, 0x20, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x2e, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x20, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x28, 0x6f, + 0x6c, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x75, 0x73, 0x2e, 0x6a, 0x73, 0x22, 0x3e, + 0x20, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, + 0x74, 0x6f, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x6c, 0x69, 0x65, 0x73, + 0x20, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x3b, 0x0d, 0x0a, 0x20, 0x20, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x77, 0x68, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x28, 0x22, + 0x44, 0x4f, 0x4d, 0x43, 0x6f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x6f, + 0x6e, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, + 0x4b, 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, + 0x73, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x74, 0x6f, 0x20, 0x73, 0x68, + 0x6f, 0x77, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x6d, 0x61, 0x64, 0x65, + 0x20, 0x69, 0x74, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x77, 0x65, 0x72, + 0x65, 0x20, 0x69, 0x6e, 0x6d, 0x69, 0x78, 0x74, 0x75, 0x72, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x65, 0x61, 0x72, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x73, + 0x72, 0x63, 0x20, 0x3d, 0x20, 0x27, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x61, 0x20, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x64, 0x42, 0x61, 0x70, 0x74, 0x69, 0x73, + 0x74, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x0a, 0x09, 0x09, 0x76, 0x61, + 0x72, 0x20, 0x4d, 0x61, 0x72, 0x63, 0x68, 0x20, 0x32, 0x67, 0x72, 0x65, 0x77, + 0x20, 0x75, 0x70, 0x43, 0x6c, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x77, 0x61, + 0x79, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x66, + 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x61, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, + 0x6b, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x73, 0x68, 0x61, 0x73, 0x20, 0x68, + 0x61, 0x64, 0x65, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x73, 0x68, 0x6f, 0x77, + 0x28, 0x29, 0x3b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x62, 0x6f, 0x6f, + 0x6b, 0x20, 0x6f, 0x66, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x65, 0x61, 0x3d, 0x3d, + 0x20, 0x22, 0x68, 0x74, 0x74, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x0a, + 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, + 0x2e, 0x72, 0x65, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x68, 0x6f, 0x73, 0x74, 0x65, + 0x64, 0x20, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x68, 0x65, 0x20, 0x77, + 0x65, 0x6e, 0x74, 0x62, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x73, 0x70, 0x72, + 0x65, 0x61, 0x64, 0x20, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x20, 0x61, 0x20, + 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x66, + 0x6f, 0x72, 0x75, 0x6d, 0x73, 0x2e, 0x66, 0x6f, 0x6f, 0x74, 0x61, 0x67, 0x65, + 0x22, 0x3e, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x43, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x61, 0x73, 0x20, 0x68, 0x69, + 0x67, 0x68, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x2d, 0x3e, 0x3c, + 0x21, 0x2d, 0x2d, 0x66, 0x65, 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, + 0x73, 0x65, 0x65, 0x6e, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x73, 0x65, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x61, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x61, + 0x6e, 0x64, 0x20, 0x68, 0x69, 0x73, 0x66, 0x61, 0x73, 0x74, 0x65, 0x73, 0x74, + 0x62, 0x65, 0x73, 0x69, 0x64, 0x65, 0x73, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x69, 0x6d, + 0x67, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x62, 0x6f, 0x78, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2c, 0x61, 0x20, 0x79, 0x6f, 0x75, 0x6e, 0x67, 0x61, 0x6e, 0x64, + 0x20, 0x61, 0x72, 0x65, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x63, 0x68, + 0x65, 0x61, 0x70, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x61, + 0x6e, 0x64, 0x20, 0x68, 0x61, 0x73, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, + 0x77, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x28, 0x6d, 0x6f, 0x73, 0x74, 0x6c, + 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, + 0x61, 0x20, 0x2d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x69, 0x6e, + 0x63, 0x65, 0x20, 0x61, 0x72, 0x65, 0x61, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x72, + 0x65, 0x20, 0x6f, 0x66, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x2c, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x6c, 0x79, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x66, + 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x64, 0x75, 0x63, 0x65, + 0x64, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6c, 0x65, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x67, 0x61, 0x69, + 0x6e, 0x73, 0x74, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61, 0x79, 0x6b, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x70, 0x78, 0x3b, 0x22, 0x3e, 0x0d, 0x0a, 0x70, 0x75, + 0x73, 0x68, 0x65, 0x64, 0x20, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x6e, + 0x75, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, + 0x49, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x69, + 0x6e, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, + 0x69, 0x73, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x72, 0x6f, 0x77, + 0x6e, 0x65, 0x64, 0x49, 0x53, 0x42, 0x4e, 0x20, 0x30, 0x2d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x73, 0x4f, 0x63, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x6d, 0x61, + 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x6c, + 0x61, 0x74, 0x65, 0x20, 0x69, 0x6e, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x63, 0x65, + 0x65, 0x6e, 0x61, 0x63, 0x74, 0x65, 0x64, 0x77, 0x69, 0x73, 0x68, 0x20, 0x74, + 0x6f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x6c, 0x79, 0x63, 0x6f, 0x6f, 0x6c, 0x69, + 0x6e, 0x67, 0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x3d, 0x69, 0x74, 0x2e, 0x20, + 0x54, 0x68, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x61, 0x73, + 0x73, 0x75, 0x6d, 0x65, 0x73, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x20, 0x6f, 0x6e, 0x65, 0x20, + 0x3d, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, + 0x5f, 0x61, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x72, 0x65, 0x6b, 0x6c, 0x61, + 0x6d, 0x61, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x2c, 0x74, 0x6f, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x70, 0x61, 0x6e, + 0x65, 0x6c, 0x22, 0x3e, 0x4c, 0x6f, 0x6e, 0x64, 0x6f, 0x6e, 0x2c, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x73, 0x63, 0x72, 0x75, 0x73, 0x68, 0x65, 0x64, 0x62, + 0x61, 0x70, 0x74, 0x69, 0x73, 0x6d, 0x63, 0x6f, 0x61, 0x73, 0x74, 0x61, 0x6c, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, + 0x20, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x6c, 0x6f, 0x73, 0x74, 0x20, + 0x69, 0x6e, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x69, 0x6d, 0x70, 0x6c, + 0x69, 0x65, 0x73, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x72, 0x79, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x65, + 0x72, 0x68, 0x61, 0x70, 0x73, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x66, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x6c, 0x61, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, 0x69, 0x73, 0x65, 0x20, 0x69, + 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x76, 0x69, 0x65, 0x77, 0x20, + 0x6f, 0x66, 0x72, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x65, 0x65, 0x6d, + 0x20, 0x74, 0x6f, 0x62, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x68, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x67, 0x69, + 0x76, 0x65, 0x6e, 0x20, 0x61, 0x67, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x63, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x6f, 0x66, + 0x20, 0x4c, 0x61, 0x74, 0x65, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x75, + 0x74, 0x48, 0x69, 0x67, 0x68, 0x77, 0x61, 0x79, 0x6f, 0x6e, 0x6c, 0x79, 0x20, + 0x62, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x6f, 0x66, 0x68, 0x65, 0x20, 0x64, + 0x6f, 0x65, 0x73, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x73, 0x62, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x79, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6c, 0x61, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x73, 0x74, 0x68, 0x72, 0x65, 0x61, 0x74, 0x73, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x6f, 0x6e, + 0x72, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, + 0x20, 0x3d, 0x55, 0x53, 0x26, 0x61, 0x6d, 0x70, 0x53, 0x65, 0x65, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x62, 0x79, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x20, 0x6f, 0x66, 0x3a, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x2c, 0x6c, 0x65, + 0x73, 0x62, 0x69, 0x61, 0x6e, 0x73, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x61, + 0x6e, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x48, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x2f, 0x70, 0x69, 0x78, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x6a, 0x6f, 0x69, + 0x6e, 0x74, 0x6c, 0x79, 0x73, 0x6b, 0x79, 0x73, 0x63, 0x72, 0x61, 0x55, 0x6e, + 0x69, 0x63, 0x6f, 0x64, 0x65, 0x62, 0x72, 0x20, 0x2f, 0x3e, 0x0d, 0x0a, 0x41, + 0x74, 0x6c, 0x61, 0x6e, 0x74, 0x61, 0x6e, 0x75, 0x63, 0x6c, 0x65, 0x75, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x79, 0x2c, 0x70, 0x75, 0x72, 0x65, 0x6c, 0x79, + 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3e, 0x65, 0x61, 0x73, 0x69, 0x6c, + 0x79, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x61, 0x6f, 0x6e, 0x63, 0x6c, + 0x69, 0x63, 0x6b, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x68, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6e, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, + 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6d, 0x61, 0x6e, 0x20, 0x77, 0x68, + 0x6f, 0x6f, 0x72, 0x67, 0x2f, 0x57, 0x65, 0x62, 0x6f, 0x6e, 0x65, 0x20, 0x61, + 0x6e, 0x64, 0x63, 0x61, 0x76, 0x61, 0x6c, 0x72, 0x79, 0x48, 0x65, 0x20, 0x64, + 0x69, 0x65, 0x64, 0x73, 0x65, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x30, 0x30, 0x2c, + 0x30, 0x30, 0x30, 0x20, 0x7b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x74, 0x6f, 0x69, 0x66, 0x28, 0x77, 0x69, 0x6e, 0x64, 0x61, + 0x6e, 0x64, 0x20, 0x69, 0x74, 0x73, 0x73, 0x6f, 0x6c, 0x65, 0x6c, 0x79, 0x20, + 0x6d, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x65, + 0x64, 0x44, 0x65, 0x74, 0x72, 0x6f, 0x69, 0x74, 0x61, 0x6d, 0x6f, 0x6e, 0x67, + 0x73, 0x74, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6d, + 0x20, 0x69, 0x6e, 0x53, 0x65, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x3c, + 0x2f, 0x61, 0x3e, 0x3c, 0x4b, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x46, 0x72, + 0x61, 0x6e, 0x63, 0x69, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x68, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x61, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, + 0x68, 0x69, 0x6d, 0x20, 0x61, 0x6e, 0x64, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x73, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x61, 0x74, 0x20, 0x68, 0x6f, + 0x6d, 0x65, 0x74, 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x66, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x61, 0x6c, 0x6f, 0x6c, 0x69, + 0x6e, 0x6b, 0x22, 0x3e, 0x3c, 0x77, 0x68, 0x61, 0x74, 0x20, 0x68, 0x65, 0x66, + 0x72, 0x65, 0x65, 0x20, 0x74, 0x6f, 0x43, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, + 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x64, + 0x61, 0x79, 0x6e, 0x65, 0x72, 0x76, 0x6f, 0x75, 0x73, 0x73, 0x71, 0x75, 0x61, + 0x72, 0x65, 0x20, 0x7d, 0x3b, 0x69, 0x66, 0x28, 0x67, 0x6f, 0x69, 0x6e, 0x20, + 0x77, 0x68, 0x61, 0x74, 0x69, 0x6d, 0x67, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x73, + 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x74, + 0x75, 0x65, 0x73, 0x64, 0x61, 0x79, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x6c, 0x79, + 0x53, 0x6f, 0x6c, 0x6f, 0x6d, 0x6f, 0x6e, 0x73, 0x65, 0x78, 0x75, 0x61, 0x6c, + 0x20, 0x2d, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x75, + 0x6d, 0x22, 0x44, 0x4f, 0x20, 0x4e, 0x4f, 0x54, 0x20, 0x46, 0x72, 0x61, 0x6e, + 0x63, 0x65, 0x2c, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x77, 0x61, 0x72, + 0x20, 0x61, 0x6e, 0x64, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x74, 0x61, + 0x6b, 0x65, 0x20, 0x61, 0x20, 0x3e, 0x0d, 0x0a, 0x0d, 0x0a, 0x0d, 0x0a, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x69, 0x67, 0x68, 0x77, 0x61, 0x79, + 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x22, 0x3e, 0x6f, 0x62, 0x6c, 0x69, 0x67, + 0x65, 0x64, 0x72, 0x69, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x22, 0x75, 0x6e, 0x64, + 0x65, 0x66, 0x69, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x45, 0x61, + 0x72, 0x6c, 0x79, 0x20, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65, 0x64, 0x69, 0x6e, + 0x20, 0x69, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x68, 0x69, 0x73, 0x61, + 0x74, 0x68, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x75, 0x70, 0x69, 0x74, 0x65, 0x72, + 0x59, 0x61, 0x68, 0x6f, 0x6f, 0x21, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, + 0x20, 0x73, 0x6f, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x72, 0x65, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x61, 0x20, 0x77, 0x6f, + 0x6d, 0x61, 0x6e, 0x3f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x62, 0x69, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x64, + 0x61, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, + 0x20, 0x4f, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, + 0x6f, 0x77, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x61, 0x20, 0x70, 0x61, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6f, 0x6e, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x2d, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x3e, 0x3b, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x61, + 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4e, 0x65, 0x77, + 0x70, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x20, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x20, 0x74, 0x6f, 0x61, 0x20, 0x62, 0x72, 0x69, + 0x65, 0x66, 0x28, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x2e, 0x3b, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x65, 0x6e, 0x7a, + 0x79, 0x6d, 0x65, 0x73, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x6e, + 0x20, 0x6c, 0x61, 0x74, 0x65, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x74, + 0x68, 0x65, 0x72, 0x61, 0x70, 0x79, 0x61, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x62, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x3e, + 0x0a, 0x28, 0x29, 0x3b, 0x22, 0x20, 0x72, 0x65, 0x61, 0x20, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x5c, 0x75, 0x30, 0x30, 0x33, 0x43, 0x61, 0x61, 0x62, 0x6f, 0x75, + 0x74, 0x20, 0x61, 0x74, 0x72, 0x3e, 0x0d, 0x0a, 0x09, 0x09, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x20, 0x67, 0x69, 0x76, 0x65, 0x73, 0x20, 0x61, 0x3c, 0x53, + 0x43, 0x52, 0x49, 0x50, 0x54, 0x52, 0x61, 0x69, 0x6c, 0x77, 0x61, 0x79, 0x74, + 0x68, 0x65, 0x6d, 0x65, 0x73, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x62, 0x6f, 0x78, + 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x78, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x73, + 0x2c, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x69, 0x6e, 0x20, 0x73, 0x6f, + 0x6d, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x77, 0x69, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x20, 0x55, 0x6e, + 0x64, 0x65, 0x72, 0x20, 0x62, 0x75, 0x74, 0x20, 0x68, 0x61, 0x73, 0x68, 0x61, + 0x6e, 0x64, 0x65, 0x64, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x62, 0x79, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x65, 0x61, 0x72, 0x20, 0x6f, 0x66, + 0x64, 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x64, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x74, 0x61, + 0x67, 0x65, 0x69, 0x6e, 0x20, 0x65, 0x61, 0x63, 0x68, 0x61, 0x26, 0x71, 0x75, + 0x6f, 0x74, 0x3b, 0x62, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x49, 0x6e, 0x20, + 0x6d, 0x61, 0x6e, 0x79, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x6f, 0x72, 0x65, + 0x67, 0x69, 0x6d, 0x65, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3c, + 0x2f, 0x70, 0x3e, 0x0d, 0x0a, 0x3c, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x61, + 0x3b, 0x26, 0x67, 0x74, 0x3b, 0x3c, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x6d, 0x6f, 0x73, 0x74, 0x6c, + 0x79, 0x20, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x72, 0x65, 0x20, 0x73, 0x69, 0x7a, + 0x65, 0x3d, 0x22, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x68, 0x61, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x48, 0x6f, + 0x73, 0x74, 0x20, 0x3d, 0x20, 0x57, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x66, + 0x65, 0x72, 0x74, 0x69, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x6f, 0x75, 0x73, + 0x3d, 0x5b, 0x5d, 0x3b, 0x28, 0x66, 0x75, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, + 0x73, 0x2f, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x61, 0x63, 0x74, 0x73, 0x20, + 0x61, 0x73, 0x49, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x3e, 0x0d, 0x0a, 0x0d, + 0x0a, 0x3c, 0x21, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x20, 0x3c, 0x62, + 0x72, 0x20, 0x2f, 0x3e, 0x42, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0xc3, 0xa0, 0x64, 0x65, 0x75, 0x74, 0x73, 0x63, 0x68, 0x65, + 0x75, 0x72, 0x6f, 0x70, 0x65, 0x75, 0x65, 0x75, 0x73, 0x6b, 0x61, 0x72, 0x61, + 0x67, 0x61, 0x65, 0x69, 0x6c, 0x67, 0x65, 0x73, 0x76, 0x65, 0x6e, 0x73, 0x6b, + 0x61, 0x65, 0x73, 0x70, 0x61, 0xc3, 0xb1, 0x61, 0x6d, 0x65, 0x6e, 0x73, 0x61, + 0x6a, 0x65, 0x75, 0x73, 0x75, 0x61, 0x72, 0x69, 0x6f, 0x74, 0x72, 0x61, 0x62, + 0x61, 0x6a, 0x6f, 0x6d, 0xc3, 0xa9, 0x78, 0x69, 0x63, 0x6f, 0x70, 0xc3, 0xa1, + 0x67, 0x69, 0x6e, 0x61, 0x73, 0x69, 0x65, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6d, 0x61, 0x6f, 0x63, 0x74, 0x75, 0x62, 0x72, 0x65, 0x64, + 0x75, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x61, 0xc3, 0xb1, 0x61, 0x64, 0x69, 0x72, + 0x65, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x61, 0x6d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, + 0x6f, 0x6e, 0x75, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x6d, 0x65, + 0x72, 0x61, 0x74, 0x72, 0x61, 0x76, 0xc3, 0xa9, 0x73, 0x67, 0x72, 0x61, 0x63, + 0x69, 0x61, 0x73, 0x6e, 0x75, 0x65, 0x73, 0x74, 0x72, 0x61, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x6f, 0x65, 0x73, 0x74, 0x61, 0x64, 0x6f, 0x73, 0x63, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x64, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6e, + 0xc3, 0xba, 0x6d, 0x65, 0x72, 0x6f, 0x61, 0x63, 0x75, 0x65, 0x72, 0x64, 0x6f, + 0x6d, 0xc3, 0xba, 0x73, 0x69, 0x63, 0x61, 0x6d, 0x69, 0x65, 0x6d, 0x62, 0x72, + 0x6f, 0x6f, 0x66, 0x65, 0x72, 0x74, 0x61, 0x73, 0x61, 0x6c, 0x67, 0x75, 0x6e, + 0x6f, 0x73, 0x70, 0x61, 0xc3, 0xad, 0x73, 0x65, 0x73, 0x65, 0x6a, 0x65, 0x6d, + 0x70, 0x6c, 0x6f, 0x64, 0x65, 0x72, 0x65, 0x63, 0x68, 0x6f, 0x61, 0x64, 0x65, + 0x6d, 0xc3, 0xa1, 0x73, 0x70, 0x72, 0x69, 0x76, 0x61, 0x64, 0x6f, 0x61, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x72, 0x65, 0x6e, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x70, + 0x6f, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x68, 0x6f, 0x74, 0x65, 0x6c, 0x65, 0x73, + 0x73, 0x65, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x72, + 0x6f, 0xc3, 0xba, 0x6c, 0x74, 0x69, 0x6d, 0x6f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x73, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x6f, 0x63, 0x75, 0x6c, 0x74, + 0x75, 0x72, 0x61, 0x6d, 0x75, 0x6a, 0x65, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x61, 0x64, 0x61, 0x61, 0x6e, 0x75, 0x6e, 0x63, 0x69, 0x6f, 0x65, 0x6d, + 0x62, 0x61, 0x72, 0x67, 0x6f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x64, 0x6f, 0x67, + 0x72, 0x61, 0x6e, 0x64, 0x65, 0x73, 0x65, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, + 0x6d, 0x65, 0x6a, 0x6f, 0x72, 0x65, 0x73, 0x66, 0x65, 0x62, 0x72, 0x65, 0x72, + 0x6f, 0x64, 0x69, 0x73, 0x65, 0xc3, 0xb1, 0x6f, 0x74, 0x75, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x63, 0xc3, 0xb3, 0x64, 0x69, 0x67, 0x6f, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x64, 0x61, 0x65, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6f, 0x66, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x61, 0x61, 0x6e, 0x74, 0x6f, 0x6e, 0x69, 0x6f, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x74, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x61, 0x72, 0x61, + 0x6c, 0x67, 0x75, 0x6e, 0x61, 0x73, 0x70, 0x72, 0x65, 0x63, 0x69, 0x6f, 0x73, + 0x61, 0x6c, 0x67, 0x75, 0x69, 0x65, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x64, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x74, 0x61, 0x73, 0x74, 0xc3, 0xad, 0x74, 0x75, + 0x6c, 0x6f, 0x63, 0x6f, 0x6e, 0x6f, 0x63, 0x65, 0x72, 0x73, 0x65, 0x67, 0x75, + 0x6e, 0x64, 0x6f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6a, 0x6f, 0x66, 0x72, 0x61, + 0x6e, 0x63, 0x69, 0x61, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x6f, 0x73, 0x73, 0x65, + 0x67, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x65, 0x6e, 0x65, 0x6d, 0x6f, 0x73, 0x65, + 0x66, 0x65, 0x63, 0x74, 0x6f, 0x73, 0x6d, 0xc3, 0xa1, 0x6c, 0x61, 0x67, 0x61, + 0x73, 0x65, 0x73, 0x69, 0xc3, 0xb3, 0x6e, 0x72, 0x65, 0x76, 0x69, 0x73, 0x74, + 0x61, 0x67, 0x72, 0x61, 0x6e, 0x61, 0x64, 0x61, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x61, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x6f, 0x67, 0x61, 0x72, 0x63, + 0xc3, 0xad, 0x61, 0x61, 0x63, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x65, 0x63, 0x75, + 0x61, 0x64, 0x6f, 0x72, 0x71, 0x75, 0x69, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x73, 0x6f, 0x64, 0x65, 0x62, 0x65, 0x72, 0xc3, 0xa1, 0x6d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x68, 0x6f, 0x6d, 0x62, 0x72, 0x65, 0x73, + 0x6d, 0x75, 0x65, 0x73, 0x74, 0x72, 0x61, 0x70, 0x6f, 0x64, 0x72, 0xc3, 0xad, + 0x61, 0x6d, 0x61, 0xc3, 0xb1, 0x61, 0x6e, 0x61, 0xc3, 0xba, 0x6c, 0x74, 0x69, + 0x6d, 0x61, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x6f, 0x73, 0x6f, 0x66, 0x69, 0x63, + 0x69, 0x61, 0x6c, 0x74, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0xc3, 0xba, 0x6e, 0x73, 0x61, 0x6c, 0x75, 0x64, 0x6f, 0x73, 0x70, 0x6f, + 0x64, 0x65, 0x6d, 0x6f, 0x73, 0x6d, 0x65, 0x6a, 0x6f, 0x72, 0x61, 0x72, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, + 0x73, 0x73, 0x68, 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x63, 0x61, 0x6d, 0x70, 0x61, + 0x69, 0x67, 0x6e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x72, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, + 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, + 0x74, 0x65, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x6d, 0x69, 0x6c, + 0x69, 0x74, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x6d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x7a, 0x2d, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, + 0x65, 0x73, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x6d, 0x6f, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x74, + 0x69, 0x63, 0x73, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x72, 0x65, + 0x6c, 0x69, 0x67, 0x69, 0x6f, 0x6e, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, + 0x6c, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x6c, 0x65, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x61, 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x61, 0x62, + 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x6d, 0x61, 0x67, 0x61, + 0x7a, 0x69, 0x6e, 0x65, 0x65, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x72, 0x65, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x76, 0x61, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x3c, 0x73, 0x74, + 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x67, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x6f, 0x74, + 0x62, 0x61, 0x6c, 0x6c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x72, 0x65, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x74, 0x72, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x73, 0x74, 0x75, 0x64, 0x65, + 0x6e, 0x74, 0x73, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x66, 0x69, + 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x72, + 0x6e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x66, 0x65, 0x73, 0x74, + 0x69, 0x76, 0x61, 0x6c, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x64, 0x72, 0x6f, 0x70, 0x64, 0x6f, 0x77, 0x6e, 0x70, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x63, 0x65, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x72, 0x72, 0x69, + 0x61, 0x67, 0x65, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x70, 0x72, + 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x73, 0x69, 0x73, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x62, + 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x3e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, + 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, + 0x61, 0x72, 0x6b, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x72, 0x63, 0x68, + 0x65, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x65, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, + 0x72, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x64, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x79, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x6f, 0x62, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x3d, 0x20, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x3b, 0x66, 0x6f, 0x72, 0x28, 0x76, 0x61, 0x72, 0x20, 0x61, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, + 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x61, 0x69, 0x72, 0x63, 0x72, 0x61, 0x66, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x64, 0x64, 0x6f, 0x6d, 0x65, 0x73, 0x74, 0x69, 0x63, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, + 0x68, 0x6f, 0x73, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x73, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x3e, 0x3c, 0x61, 0x64, 0x61, 0x75, 0x67, + 0x68, 0x74, 0x65, 0x72, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x20, 0x63, + 0x75, 0x6c, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, + 0x65, 0x73, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x6d, 0x62, 0x6c, 0x79, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x66, 0x75, 0x6c, + 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x63, 0x72, + 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x63, 0x67, 0x69, 0x2d, 0x62, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x73, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x62, + 0x65, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x73, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x69, 0x63, 0x65, 0x78, 0x65, + 0x72, 0x63, 0x69, 0x73, 0x65, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, + 0x6d, 0x65, 0x64, 0x69, 0x63, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x61, 0x63, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4d, 0x61, + 0x67, 0x61, 0x7a, 0x69, 0x6e, 0x65, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x62, 0x6f, 0x74, 0x74, + 0x6f, 0x6d, 0x22, 0x3e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x3a, + 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x53, 0x6f, 0x66, + 0x74, 0x77, 0x61, 0x72, 0x65, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x73, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x65, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x68, 0x65, 0x72, 0x69, 0x74, 0x61, 0x67, 0x65, + 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x61, 0x62, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x65, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x72, 0x65, + 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x74, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, + 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x61, 0x6e, 0x79, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x74, 0x73, 0x6c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, + 0x6c, 0x79, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x66, 0x6f, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x64, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x24, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, + 0x2e, 0x72, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x3e, 0x3c, 0x74, 0x72, + 0x3e, 0x3c, 0x74, 0x64, 0x63, 0x6f, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x75, 0x6c, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x48, 0x6f, 0x6d, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x77, 0x65, 0x62, 0x73, 0x69, + 0x74, 0x65, 0x73, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x61, 0x6c, + 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x6c, + 0x79, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x3e, 0x73, 0x6f, 0x6d, 0x65, 0x77, 0x68, + 0x61, 0x74, 0x76, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x57, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x6e, 0x20, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x76, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x0a, 0x6d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x73, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x76, + 0x65, 0x64, 0x76, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69, 0x61, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x65, 0x64, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, + 0x64, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x61, 0x63, 0x63, 0x75, + 0x72, 0x61, 0x74, 0x65, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, + 0x61, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x63, 0x72, 0x69, + 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x79, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x61, 0x6c, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, + 0x64, 0x2e, 0x6a, 0x70, 0x67, 0x22, 0x20, 0x2f, 0x3e, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x20, 0x20, 0x6b, + 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x6c, 0x79, 0x62, 0x72, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x6d, + 0x62, 0x69, 0x6e, 0x65, 0x64, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x65, 0x78, 0x70, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x61, 0x64, 0x65, 0x71, 0x75, 0x61, 0x74, 0x65, 0x70, 0x61, + 0x6b, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x22, + 0x20, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x62, 0x6c, 0x65, 0x3c, 0x2f, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x3e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x62, + 0x72, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, + 0x73, 0x65, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x22, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x22, 0x20, 0x28, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x67, 0x72, + 0x61, 0x64, 0x75, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6c, 0x61, + 0x79, 0x73, 0x69, 0x61, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x3b, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x74, 0x6f, 0x20, + 0x63, 0x61, 0x74, 0x68, 0x6f, 0x6c, 0x69, 0x63, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x73, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x73, 0x74, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x73, 0x72, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x3c, 0x2f, 0x75, 0x6c, + 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x63, + 0x69, 0x74, 0x69, 0x7a, 0x65, 0x6e, 0x73, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x69, + 0x6e, 0x67, 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x3c, 0x6c, 0x69, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x63, 0x61, 0x72, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x73, 0x65, 0x6e, 0x74, 0x65, + 0x6e, 0x63, 0x65, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, + 0x67, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x73, 0x6f, 0x75, 0x74, + 0x68, 0x65, 0x72, 0x6e, 0x4d, 0x69, 0x63, 0x68, 0x61, 0x65, 0x6c, 0x20, 0x6d, + 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x63, 0x61, 0x72, 0x6f, 0x75, 0x73, + 0x65, 0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x69, 0x6f, 0x72, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x28, 0x22, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x63, 0x74, 0x6f, 0x62, + 0x65, 0x72, 0x20, 0x29, 0x7b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6d, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x2d, 0x2d, 0x26, 0x67, 0x74, 0x3b, 0x0a, + 0x0a, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x63, 0x68, 0x61, 0x69, + 0x72, 0x6d, 0x61, 0x6e, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x2f, 0x3e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x69, 0x63, 0x68, 0x61, 0x72, + 0x64, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, + 0x62, 0x61, 0x62, 0x6c, 0x79, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x62, 0x61, 0x73, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x6a, 0x75, 0x64, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x2e, 0x63, + 0x73, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x20, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, + 0x65, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0d, 0x0a, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x73, 0x63, 0x6f, 0x74, 0x6c, 0x61, + 0x6e, 0x64, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x71, 0x75, 0x61, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x20, 0x49, 0x53, 0x42, 0x4e, 0x20, 0x30, + 0x64, 0x69, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2d, 0x22, 0x20, + 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x65, 0x72, + 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x73, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x73, 0x6d, + 0x69, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x74, 0x61, + 0x6c, 0x69, 0x61, 0x6e, 0x6f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x6c, 0x79, 0x3a, 0x20, 0x27, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x27, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, + 0x67, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x65, 0x64, 0x42, 0x72, 0x69, 0x74, + 0x69, 0x73, 0x68, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x46, + 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x6f, + 0x75, 0x73, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x63, 0x6f, 0x6e, + 0x63, 0x65, 0x72, 0x6e, 0x73, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x6e, + 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x69, 0x76, 0x20, 0x69, + 0x64, 0x3d, 0x22, 0x57, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x6d, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x73, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x66, + 0x6c, 0x65, 0x78, 0x69, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x6c, 0x61, 0x77, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x3c, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3e, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x3d, 0x22, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x2f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x68, 0x61, 0x6d, 0x69, 0x6c, 0x74, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x61, 0x64, 0x69, 0x61, 0x6e, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x74, 0x68, 0x65, 0x6d, 0x65, + 0x73, 0x2f, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x61, 0x6c, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x77, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x64, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x20, 0x6d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x64, 0x74, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x73, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x26, 0x68, 0x65, 0x6c, 0x6c, 0x69, + 0x70, 0x3b, 0x6e, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, 0x22, 0x20, 0x73, + 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x22, 0x20, 0x22, 0x20, 0x2f, 0x3e, 0x3c, + 0x2f, 0x61, 0x3e, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x3e, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x6f, 0x69, 0x73, 0x6c, + 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x3e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x61, 0x74, + 0x75, 0x72, 0x64, 0x61, 0x79, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x64, 0x65, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x45, 0x73, 0x70, 0x61, + 0xc3, 0xb1, 0x6f, 0x6c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x65, 0x72, 0x26, 0x71, 0x75, 0x6f, + 0x74, 0x3b, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x79, 0x6d, + 0x70, 0x74, 0x6f, 0x6d, 0x73, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x64, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x72, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x3e, 0x3c, 0x70, 0x6c, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x6c, 0x65, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x20, 0x62, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x3d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x63, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x2e, 0x0a, 0x0a, 0x53, 0x6f, 0x6d, + 0x65, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x73, 0x75, 0x69, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x62, 0x75, 0x6c, 0x67, 0x61, 0x72, 0x69, 0x61, + 0x2e, 0x73, 0x68, 0x6f, 0x77, 0x28, 0x29, 0x3b, 0x64, 0x65, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x63, 0x6f, + 0x6e, 0x63, 0x65, 0x70, 0x74, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x77, 0x69, 0x6c, 0x6c, 0x69, 0x61, 0x6d, 0x73, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x3e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x61, 0x20, 0x26, + 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x79, 0x6f, + 0x75, 0x72, 0x73, 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x20, 0x6d, 0x69, 0x63, 0x68, 0x69, 0x67, 0x61, 0x6e, 0x45, 0x6e, 0x67, 0x6c, + 0x69, 0x73, 0x68, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x61, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, + 0x6e, 0x67, 0x64, 0x72, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x66, 0x61, 0x63, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, + 0x65, 0x72, 0x73, 0x52, 0x75, 0x73, 0x73, 0x69, 0x61, 0x6e, 0x20, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, 0x31, + 0x22, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x66, 0x61, 0x6d, 0x69, + 0x6c, 0x69, 0x61, 0x72, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x30, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x76, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x73, 0x2d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e, + 0x70, 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x20, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x69, 0x6e, + 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x73, 0x61, 0x74, 0x6c, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x67, 0x6c, 0x6f, 0x73, 0x73, 0x61, + 0x72, 0x79, 0x0a, 0x0a, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x67, 0x75, 0x69, + 0x64, 0x61, 0x6e, 0x63, 0x65, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x6d, 0x69, 0x64, 0x64, 0x6c, + 0x65, 0x22, 0x3e, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x73, 0x63, 0x6f, 0x74, 0x74, 0x69, 0x73, + 0x68, 0x6a, 0x6f, 0x6e, 0x61, 0x74, 0x68, 0x61, 0x6e, 0x6d, 0x61, 0x6a, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6c, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x74, 0x68, 0x61, 0x69, 0x6c, 0x61, + 0x6e, 0x64, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x73, 0x3c, 0x68, 0x65, + 0x61, 0x64, 0x3e, 0x0a, 0x09, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x3b, 0x74, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3c, 0x2f, + 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x3e, 0x6f, 0x6b, 0x6c, 0x61, 0x68, 0x6f, 0x6d, + 0x61, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x68, + 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x79, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x20, 0x28, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x2e, 0x20, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, + 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x76, 0x69, 0x73, 0x69, 0x74, + 0x69, 0x6e, 0x67, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, + 0x20, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x71, 0x75, 0x69, 0x63, + 0x6b, 0x6c, 0x79, 0x20, 0x6d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x65, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x20, 0x3b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x20, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x3d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, + 0x2c, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x20, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x6a, 0x73, 0x22, 0x6d, 0x61, + 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, + 0x68, 0x66, 0x6f, 0x72, 0x65, 0x63, 0x61, 0x73, 0x74, 0x2e, 0x20, 0x57, 0x68, + 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x75, 0x72, 0x73, 0x64, 0x61, 0x79, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x26, 0x65, 0x61, 0x63, 0x75, 0x74, + 0x65, 0x3b, 0x68, 0x61, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x65, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x70, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x73, 0x20, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x61, 0x64, 0x6f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x63, 0x61, 0x6d, 0x70, 0x62, 0x65, 0x6c, 0x6c, 0x3c, 0x21, 0x2d, 0x2d, + 0x20, 0x65, 0x6e, 0x64, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x3c, + 0x62, 0x72, 0x20, 0x2f, 0x3e, 0x0d, 0x0a, 0x5f, 0x70, 0x6f, 0x70, 0x75, 0x70, + 0x73, 0x7c, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2c, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x61, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x3c, 0x62, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6c, 0x65, 0x26, 0x71, 0x75, 0x6f, 0x74, + 0x3b, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x20, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x3c, + 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, + 0x65, 0x73, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x6d, 0x61, 0x72, + 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x6c, 0x79, 0x29, 0x2e, 0x0a, 0x0a, 0x54, + 0x68, 0x65, 0x20, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x6d, 0x75, + 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, + 0x0a, 0x22, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x73, 0x72, 0x74, 0x75, 0x67, + 0x75, 0xc3, 0xaa, 0x73, 0x73, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x54, 0x6f, 0x20, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, + 0x0d, 0x0a, 0x61, 0x74, 0x74, 0x6f, 0x72, 0x6e, 0x65, 0x79, 0x65, 0x6d, 0x70, + 0x68, 0x61, 0x73, 0x69, 0x73, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0x66, 0x61, 0x6e, 0x63, 0x79, 0x62, 0x6f, 0x78, 0x77, 0x6f, 0x72, 0x6c, 0x64, + 0x27, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x64, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x65, 0x64, 0x3d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x70, 0x78, 0x3b, 0x66, + 0x6f, 0x6e, 0x74, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6a, + 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, + 0x65, 0x64, 0x76, 0x61, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x68, 0x6f, + 0x6d, 0x70, 0x73, 0x6f, 0x6e, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, + 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x30, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x74, 0x62, 0x6f, 0x64, 0x79, + 0x3e, 0x3c, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x66, 0x69, 0x78, 0x0a, + 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, + 0x65, 0x20, 0x3c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x20, + 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x20, 0x4f, 0x63, 0x74, 0x6f, + 0x62, 0x65, 0x72, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x20, 0x65, 0x78, + 0x70, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x20, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x20, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x6f, 0x6e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x6d, 0x61, 0x72, 0x79, 0x6c, 0x61, 0x6e, 0x64, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x63, 0x74, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x49, 0x6e, 0x61, + 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, + 0x67, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x73, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x29, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x62, 0x6f, 0x78, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x73, 0x70, 0x72, + 0x65, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x74, 0x6f, 0x6d, 0x6f, 0x72, 0x72, 0x6f, + 0x77, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x69, 0x63, 0x6f, 0x6e, + 0x2e, 0x70, 0x6e, 0x67, 0x6a, 0x61, 0x70, 0x61, 0x6e, 0x65, 0x73, 0x65, 0x63, + 0x6f, 0x64, 0x65, 0x62, 0x61, 0x73, 0x65, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, + 0x22, 0x3e, 0x67, 0x61, 0x6d, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x75, 0x63, + 0x68, 0x20, 0x61, 0x73, 0x20, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, + 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x20, 0x6d, 0x69, 0x73, 0x73, 0x6f, + 0x75, 0x72, 0x69, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x74, 0x6f, + 0x70, 0x3a, 0x31, 0x70, 0x78, 0x20, 0x2e, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, + 0x3e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x3d, 0x22, 0x32, 0x6c, 0x61, 0x7a, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x6e, + 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, + 0x6e, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, + 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x20, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x20, 0x26, 0x6c, 0x74, 0x3b, + 0x21, 0x2d, 0x2d, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e, 0x3c, 0x2f, + 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, + 0x3e, 0x0a, 0x28, 0xe7, 0xae, 0x80, 0xe4, 0xbd, 0x93, 0x29, 0x28, 0xe7, 0xb9, + 0x81, 0xe9, 0xab, 0x94, 0x29, 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x69, + 0x69, 0x74, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x6f, 0x72, 0x6f, 0x6d, 0xc3, 0xa2, + 0x6e, 0xc4, 0x83, 0x74, 0xc3, 0xbc, 0x72, 0x6b, 0xc3, 0xa7, 0x65, 0xd8, 0xa7, + 0xd8, 0xb1, 0xd8, 0xaf, 0xd9, 0x88, 0x74, 0x61, 0x6d, 0x62, 0x69, 0xc3, 0xa9, + 0x6e, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x69, 0x61, 0x73, 0x6d, 0x65, 0x6e, 0x73, + 0x61, 0x6a, 0x65, 0x73, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x73, 0x64, + 0x65, 0x72, 0x65, 0x63, 0x68, 0x6f, 0x73, 0x6e, 0x61, 0x63, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x69, 0x6f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x6f, 0x75, 0x73, 0x75, 0x61, 0x72, 0x69, 0x6f, 0x73, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x61, 0x67, 0x6f, 0x62, 0x69, 0x65, + 0x72, 0x6e, 0x6f, 0x65, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x61, 0x73, 0x61, 0x6e, + 0x75, 0x6e, 0x63, 0x69, 0x6f, 0x73, 0x76, 0x61, 0x6c, 0x65, 0x6e, 0x63, 0x69, + 0x61, 0x63, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x64, 0x65, 0x73, 0x70, + 0x75, 0xc3, 0xa9, 0x73, 0x64, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x73, 0x70, + 0x72, 0x6f, 0x79, 0x65, 0x63, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x6f, 0x70, 0xc3, 0xba, 0x62, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x6f, 0x73, + 0x6f, 0x74, 0x72, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x61, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x6d, 0x69, 0x6c, 0x6c, 0x6f, + 0x6e, 0x65, 0x73, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x74, 0x65, 0x70, 0x72, + 0x65, 0x67, 0x75, 0x6e, 0x74, 0x61, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x69, 0x6f, + 0x72, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x73, 0x70, 0x72, 0x6f, 0x62, + 0x6c, 0x65, 0x6d, 0x61, 0x73, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x67, 0x6f, 0x6e, + 0x75, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x73, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0xc3, + 0xb3, 0x6e, 0x69, 0x6d, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x72, 0x6d, 0x69, 0x65, + 0x6e, 0x74, 0x72, 0x61, 0x73, 0x61, 0x6d, 0xc3, 0xa9, 0x72, 0x69, 0x63, 0x61, + 0x76, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x6f, 0x72, 0x73, 0x6f, 0x63, 0x69, 0x65, + 0x64, 0x61, 0x64, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x65, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x72, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x6f, 0x70, 0x61, 0x6c, 0x61, 0x62, 0x72, 0x61, 0x73, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0xc3, 0xa9, 0x73, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x65, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6d, 0x69, 0x65, 0x6d, 0x62, 0x72, + 0x6f, 0x73, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x64, 0x63, 0xc3, 0xb3, + 0x72, 0x64, 0x6f, 0x62, 0x61, 0x7a, 0x61, 0x72, 0x61, 0x67, 0x6f, 0x7a, 0x61, + 0x70, 0xc3, 0xa1, 0x67, 0x69, 0x6e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x6c, 0x65, 0x73, 0x62, 0x6c, 0x6f, 0x71, 0x75, 0x65, 0x61, 0x72, 0x67, 0x65, + 0x73, 0x74, 0x69, 0xc3, 0xb3, 0x6e, 0x61, 0x6c, 0x71, 0x75, 0x69, 0x6c, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6d, 0x61, 0x73, 0x63, 0x69, 0x65, 0x6e, + 0x63, 0x69, 0x61, 0x73, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x6f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x61, 0x65, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x73, 0x70, 0xc3, 0xba, + 0x62, 0x6c, 0x69, 0x63, 0x61, 0x6f, 0x62, 0x6a, 0x65, 0x74, 0x69, 0x76, 0x6f, + 0x61, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x62, 0x75, 0x73, 0x63, 0x61, + 0x64, 0x6f, 0x72, 0x63, 0x61, 0x6e, 0x74, 0x69, 0x64, 0x61, 0x64, 0x65, 0x6e, + 0x74, 0x72, 0x61, 0x64, 0x61, 0x73, 0x61, 0x63, 0x63, 0x69, 0x6f, 0x6e, 0x65, + 0x73, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x6f, 0x73, 0x73, 0x75, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x72, 0x6d, 0x61, 0x79, 0x6f, 0x72, 0xc3, 0xad, 0x61, 0x61, + 0x6c, 0x65, 0x6d, 0x61, 0x6e, 0x69, 0x61, 0x66, 0x75, 0x6e, 0x63, 0x69, 0xc3, + 0xb3, 0x6e, 0xc3, 0xba, 0x6c, 0x74, 0x69, 0x6d, 0x6f, 0x73, 0x68, 0x61, 0x63, + 0x69, 0x65, 0x6e, 0x64, 0x6f, 0x61, 0x71, 0x75, 0x65, 0x6c, 0x6c, 0x6f, 0x73, + 0x65, 0x64, 0x69, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x66, 0x65, 0x72, 0x6e, 0x61, + 0x6e, 0x64, 0x6f, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x66, 0x61, + 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x6e, 0x75, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x73, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x6f, 0x73, 0x62, 0x61, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x65, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x72, 0x63, 0x6f, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x6f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x61, 0x72, 0x63, 0x6f, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x6f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x6a, 0xc3, 0xb3, 0x76, 0x65, + 0x6e, 0x65, 0x73, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x74, 0x6f, 0x74, 0xc3, + 0xa9, 0x63, 0x6e, 0x69, 0x63, 0x61, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x6e, 0x74, + 0x6f, 0x65, 0x6e, 0x65, 0x72, 0x67, 0xc3, 0xad, 0x61, 0x74, 0x72, 0x61, 0x62, + 0x61, 0x6a, 0x61, 0x72, 0x61, 0x73, 0x74, 0x75, 0x72, 0x69, 0x61, 0x73, 0x72, + 0x65, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, + 0x61, 0x72, 0x62, 0x6f, 0x6c, 0x65, 0x74, 0xc3, 0xad, 0x6e, 0x73, 0x61, 0x6c, + 0x76, 0x61, 0x64, 0x6f, 0x72, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x61, + 0x74, 0x72, 0x61, 0x62, 0x61, 0x6a, 0x6f, 0x73, 0x70, 0x72, 0x69, 0x6d, 0x65, + 0x72, 0x6f, 0x73, 0x6e, 0x65, 0x67, 0x6f, 0x63, 0x69, 0x6f, 0x73, 0x6c, 0x69, + 0x62, 0x65, 0x72, 0x74, 0x61, 0x64, 0x64, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x73, 0x70, 0x61, 0x6e, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x70, 0x72, 0xc3, 0xb3, + 0x78, 0x69, 0x6d, 0x6f, 0x61, 0x6c, 0x6d, 0x65, 0x72, 0xc3, 0xad, 0x61, 0x61, + 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x65, 0x73, 0x71, 0x75, 0x69, 0xc3, 0xa9, 0x6e, + 0x65, 0x73, 0x63, 0x6f, 0x72, 0x61, 0x7a, 0xc3, 0xb3, 0x6e, 0x73, 0x65, 0x63, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x62, 0x75, 0x73, 0x63, 0x61, 0x6e, 0x64, 0x6f, + 0x6f, 0x70, 0x63, 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x69, 0x6f, 0x72, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x6f, 0x74, 0x6f, + 0x64, 0x61, 0x76, 0xc3, 0xad, 0x61, 0x67, 0x61, 0x6c, 0x65, 0x72, 0xc3, 0xad, + 0x61, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x69, + 0x63, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x74, 0x61, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x6f, 0x73, 0x63, 0x72, 0xc3, 0xad, 0x74, 0x69, 0x63, 0x61, 0x64, 0xc3, 0xb3, + 0x6c, 0x61, 0x72, 0x65, 0x73, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x63, 0x69, 0x61, + 0x64, 0x65, 0x62, 0x65, 0x72, 0xc3, 0xa1, 0x6e, 0x70, 0x65, 0x72, 0xc3, 0xad, + 0x6f, 0x64, 0x6f, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x69, 0x74, 0x61, 0x6d, 0x61, + 0x6e, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x70, 0x65, 0x71, 0x75, 0x65, 0xc3, 0xb1, + 0x6f, 0x72, 0x65, 0x63, 0x69, 0x62, 0x69, 0x64, 0x61, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x6e, 0x61, 0x6c, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x66, 0x65, 0x63, + 0x61, 0x6e, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x69, + 0x61, 0x73, 0x64, 0x65, 0x73, 0x63, 0x61, 0x72, 0x67, 0x61, 0x64, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x6f, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x63, 0x61, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x65, 0x72, 0x65, 0x74, 0xc3, 0xa9, 0x63, 0x6e, + 0x69, 0x63, 0x6f, 0x64, 0x65, 0x62, 0x65, 0x72, 0xc3, 0xad, 0x61, 0x76, 0x69, + 0x76, 0x69, 0x65, 0x6e, 0x64, 0x61, 0x66, 0x69, 0x6e, 0x61, 0x6e, 0x7a, 0x61, + 0x73, 0x61, 0x64, 0x65, 0x6c, 0x61, 0x6e, 0x74, 0x65, 0x66, 0x75, 0x6e, 0x63, + 0x69, 0x6f, 0x6e, 0x61, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6a, 0x6f, 0x73, 0x64, + 0x69, 0x66, 0xc3, 0xad, 0x63, 0x69, 0x6c, 0x63, 0x69, 0x75, 0x64, 0x61, 0x64, + 0x65, 0x73, 0x61, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x61, 0x73, 0x61, 0x76, 0x61, + 0x6e, 0x7a, 0x61, 0x64, 0x61, 0x74, 0xc3, 0xa9, 0x72, 0x6d, 0x69, 0x6e, 0x6f, + 0x75, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x65, 0x73, 0x73, 0xc3, 0xa1, 0x6e, 0x63, + 0x68, 0x65, 0x7a, 0x63, 0x61, 0x6d, 0x70, 0x61, 0xc3, 0xb1, 0x61, 0x73, 0x6f, + 0x66, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x72, 0x65, 0x76, 0x69, 0x73, 0x74, 0x61, + 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x6e, 0x65, 0x73, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x65, 0x73, 0x6d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x73, 0x66, + 0x61, 0x63, 0x75, 0x6c, 0x74, 0x61, 0x64, 0x63, 0x72, 0xc3, 0xa9, 0x64, 0x69, + 0x74, 0x6f, 0x64, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x73, 0x73, 0x75, 0x70, + 0x75, 0x65, 0x73, 0x74, 0x6f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x67, 0x75, 0x6e, 0x64, 0x6f, 0x73, 0x70, 0x65, 0x71, 0x75, 0x65, + 0xc3, 0xb1, 0x61, 0xd0, 0xb3, 0xd0, 0xbe, 0xd0, 0xb4, 0xd0, 0xb0, 0xd0, 0xb5, + 0xd1, 0x81, 0xd0, 0xbb, 0xd0, 0xb8, 0xd0, 0xb5, 0xd1, 0x81, 0xd1, 0x82, 0xd1, + 0x8c, 0xd0, 0xb1, 0xd1, 0x8b, 0xd0, 0xbb, 0xd0, 0xbe, 0xd0, 0xb1, 0xd1, 0x8b, + 0xd1, 0x82, 0xd1, 0x8c, 0xd1, 0x8d, 0xd1, 0x82, 0xd0, 0xbe, 0xd0, 0xbc, 0xd0, + 0x95, 0xd1, 0x81, 0xd0, 0xbb, 0xd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, 0xd8, 0xa7, 0xd9, + 0x86, 0xd9, 0x85, 0xd8, 0xb9, 0xd8, 0xb1, 0xd8, 0xb6, 0xd8, 0xaa, 0xd8, 0xb9, + 0xd9, 0x84, 0xd9, 0x85, 0xd8, 0xaf, 0xd8, 0xa7, 0xd8, 0xae, 0xd9, 0x84, 0xd9, + 0x85, 0xd9, 0x85, 0xd9, 0x83, 0xd9, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, + 0x00, 0x02, 0x00, 0x02, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x06, 0x05, 0x04, 0x03, + 0x02, 0x01, 0x00, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x0f, 0x0e, + 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x17, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0xff, + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, + 0x07, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x63, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, + 0x54, 0x44, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x69, 0x6e, 0x67, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, + 0x65, 0x72, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x3c, 0x2f, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3e, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, + 0x6c, 0x69, 0x61, 0x22, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, + 0x69, 0x74, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x61, 0x6e, 0x6f, + 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x65, 0x73, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x65, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x61, 0x72, 0x79, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, + 0x74, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x0d, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x79, 0x7d, + 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x73, 0x6f, 0x6c, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x64, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x6f, 0x75, + 0x73, 0x73, 0x61, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x74, 0x65, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x26, 0x72, 0x61, 0x71, 0x75, 0x6f, 0x3b, 0x3c, 0x2f, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x62, 0x65, 0x61, 0x75, 0x74, 0x69, 0x66, 0x75, 0x6c, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, + 0x64, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x70, 0x72, 0x6f, + 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x4e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x2e, 0x66, 0x6f, 0x63, 0x75, 0x73, + 0x28, 0x29, 0x3b, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6e, 0x6e, 0x6f, 0x75, + 0x6e, 0x63, 0x65, 0x64, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x0a, + 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x76, + 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x74, 0x65, 0x72, 0x72, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, + 0x61, 0x6d, 0x65, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x69, 0x73, 0x6d, 0x74, + 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x6c, 0x73, 0x65, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x41, 0x6c, 0x65, 0x78, 0x61, 0x6e, 0x64, 0x65, 0x72, + 0x61, 0x70, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x73, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x61, 0x66, 0x66, + 0x69, 0x6c, 0x69, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x3e, 0x74, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x64, 0x69, + 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x6f, + 0x6e, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x3d, 0x22, 0x62, 0x69, 0x6f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x79, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, + 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6e, + 0xc3, 0xa7, 0x61, 0x69, 0x73, 0x48, 0x6f, 0x6c, 0x6c, 0x79, 0x77, 0x6f, 0x6f, + 0x64, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x64, 0x61, 0x72, 0x64, 0x73, 0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3e, 0x0a, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x72, 0x65, 0x64, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x6f, + 0x70, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x75, 0x73, 0x69, 0x6e, + 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, + 0x3e, 0x0a, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x6e, 0x74, 0x65, 0x64, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x65, + 0x64, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x77, 0x69, 0x64, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6e, 0x65, + 0x77, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x3e, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x6c, + 0x69, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x73, 0x73, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x66, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x3d, 0x22, 0x2f, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x65, + 0x64, 0x45, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x61, 0x72, + 0x73, 0x65, 0x49, 0x6e, 0x74, 0x28, 0x73, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x75, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x3c, 0x2f, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x65, + 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x6d, 0x65, 0x64, 0x74, 0x77, 0x6f, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, + 0x53, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x66, 0x6f, 0x72, 0x65, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x22, + 0x3e, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x69, 0x6e, 0x63, + 0x72, 0x65, 0x61, 0x73, 0x65, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x20, + 0x6f, 0x66, 0x70, 0x65, 0x72, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x74, 0x72, + 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, + 0x61, 0x72, 0x79, 0x70, 0x6f, 0x72, 0x74, 0x72, 0x61, 0x79, 0x65, 0x64, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6c, 0x69, 0x7a, 0x61, + 0x62, 0x65, 0x74, 0x68, 0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x3e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x69, 0x6e, 0x73, 0x75, + 0x72, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x3b, 0x6c, 0x65, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x47, 0x65, 0x6f, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x79, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x6f, + 0x6d, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x3c, + 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x79, 0x72, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x6f, 0x75, 0x73, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, + 0x73, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x6e, 0x6f, 0x20, + 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x63, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x79, 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x69, + 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x3b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x70, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x71, 0x75, + 0x65, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x69, 0x74, 0x20, + 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x63, 0x65, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x70, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x73, 0x61, 0x64, 0x76, 0x61, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x29, 0x3b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x46, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x6d, 0x6f, 0x63, 0x72, 0x61, 0x63, + 0x79, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x73, 0x75, 0x66, 0x66, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x73, + 0x61, 0x69, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x74, 0x20, 0x6d, 0x61, + 0x79, 0x20, 0x62, 0x65, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x3c, 0x2f, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x3c, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3e, 0x0a, 0x73, 0x75, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, + 0x20, 0x30, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x75, 0x61, 0x6c, 0x3c, 0x2f, + 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x0a, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x6f, 0x66, 0x74, 0x67, 0x72, 0x61, 0x64, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x64, + 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x65, 0x64, 0x68, 0x65, 0x20, 0x62, 0x65, + 0x63, 0x61, 0x6d, 0x65, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, + 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x6a, 0x73, 0x68, 0x6f, 0x75, 0x73, + 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, + 0x64, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x64, 0x6c, 0x69, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x79, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, + 0x65, 0x64, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, + 0x69, 0x6e, 0x67, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x63, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x69, 0x65, 0x73, 0x4a, 0x61, 0x70, 0x61, 0x6e, + 0x65, 0x73, 0x65, 0x20, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x61, 0x6c, 0x67, 0x6f, + 0x72, 0x69, 0x74, 0x68, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x73, 0x72, 0x65, 0x62, 0x65, 0x6c, 0x6c, 0x69, 0x6f, 0x6e, 0x75, 0x6e, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x6f, 0x75, 0x72, 0x61, + 0x67, 0x65, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x61, 0x62, 0x6c, 0x65, 0x69, 0x6e, + 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x6c, 0x74, 0x68, + 0x6f, 0x75, 0x67, 0x68, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x69, 0x6e, 0x67, + 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, + 0x64, 0x2d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x46, 0x65, 0x62, + 0x72, 0x75, 0x61, 0x72, 0x79, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x6f, 0x75, + 0x73, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x65, 0x78, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x6e, 0x74, 0x63, + 0x6f, 0x6c, 0x73, 0x70, 0x61, 0x6e, 0x3d, 0x22, 0x74, 0x65, 0x63, 0x68, 0x6e, + 0x69, 0x63, 0x61, 0x6c, 0x6e, 0x65, 0x61, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x20, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x20, 0x6f, 0x66, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x48, 0x6f, 0x6e, 0x67, 0x20, 0x4b, 0x6f, 0x6e, 0x67, 0x20, 0x46, 0x61, + 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x65, 0x20, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x65, 0x6c, + 0x65, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x73, + 0x69, 0x76, 0x65, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x0a, 0x09, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x6f, 0x72, 0x65, 0x64, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x6f, 0x72, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x74, 0x68, 0x6f, 0x73, + 0x65, 0x20, 0x77, 0x68, 0x6f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x64, 0x69, 0x66, + 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x64, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x63, 0x6f, + 0x6e, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x2e, + 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x63, 0x6f, 0x61, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x65, 0x76, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x22, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x6f, 0x61, 0x6c, + 0x6f, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, + 0x72, 0x65, 0x64, 0x2d, 0x2d, 0x3e, 0x0d, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x41, + 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, + 0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e, 0x3c, 0x66, 0x75, 0x72, 0x6e, + 0x69, 0x74, 0x75, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x20, 0x20, 0x6f, 0x6e, 0x62, 0x6c, 0x75, 0x72, 0x3d, 0x22, 0x73, 0x75, 0x73, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x4d, 0x6f, + 0x72, 0x65, 0x6f, 0x76, 0x65, 0x72, 0x2c, 0x61, 0x62, 0x6f, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x77, + 0x65, 0x72, 0x65, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x65, 0x6d, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, + 0x6e, 0x61, 0x72, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x61, 0x64, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x65, 0x73, 0x70, 0x78, 0x3b, 0x62, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x64, 0x69, 0x72, + 0x3d, 0x22, 0x6c, 0x74, 0x72, 0x22, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, + 0x65, 0x73, 0x72, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x20, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x53, 0x65, 0x70, 0x74, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x61, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, + 0x46, 0x61, 0x63, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x20, 0x73, 0x75, 0x67, 0x67, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x65, 0x6c, 0x61, + 0x62, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x63, 0x65, + 0x72, 0x74, 0x61, 0x69, 0x6e, 0x6c, 0x79, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x4a, + 0x65, 0x72, 0x75, 0x73, 0x61, 0x6c, 0x65, 0x6d, 0x74, 0x68, 0x65, 0x79, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x6e, 0x63, 0x65, 0x73, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x65, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x72, 0x65, 0x63, + 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x70, 0x78, 0x3b, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x74, 0x68, + 0x65, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x75, 0x72, 0x57, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x65, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x62, 0x65, 0x67, 0x61, 0x6e, + 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x20, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, + 0x6d, 0x61, 0x67, 0x6e, 0x69, 0x74, 0x75, 0x64, 0x65, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x61, + 0x72, 0x79, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x6c, 0x79, 0x6f, 0x63, + 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x3c, 0x2f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x3e, 0x3c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x6b, 0x69, 0x6e, 0x64, + 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x63, 0x69, 0x65, 0x74, 0x69, 0x65, + 0x73, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x69, 0x64, 0x65, 0x20, 0x2d, 0x2d, + 0x26, 0x67, 0x74, 0x3b, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x77, 0x65, + 0x73, 0x74, 0x74, 0x68, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x72, 0x61, + 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x79, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x73, + 0x70, 0x6f, 0x6b, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x22, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x65, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x61, 0x20, 0x73, + 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x65, + 0x72, 0x65, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x4e, 0x6f, + 0x72, 0x77, 0x65, 0x67, 0x69, 0x61, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x70, + 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x28, 0x6e, 0x65, 0x77, 0x20, + 0x44, 0x61, 0x74, 0x65, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, + 0x66, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x66, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x65, 0x71, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x72, 0x65, 0x67, + 0x75, 0x6c, 0x61, 0x72, 0x6c, 0x79, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6c, 0x69, + 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x70, 0x68, 0x65, 0x6e, 0x6f, 0x6d, + 0x65, 0x6e, 0x61, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x6f, 0x66, 0x74, + 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x22, 0x3e, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, + 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x41, 0x6d, 0x6f, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x73, 0x41, 0x69, 0x72, + 0x20, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, + 0x6f, 0x66, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x69, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x20, 0x69, 0x74, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x63, + 0x6f, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x65, 0x64, 0x61, 0x72, 0x65, 0x20, 0x73, + 0x74, 0x69, 0x6c, 0x6c, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, + 0x67, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x61, 0x6e, + 0x20, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x6d, 0x6f, 0x6c, + 0x65, 0x63, 0x75, 0x6c, 0x65, 0x73, 0x66, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x69, + 0x73, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x74, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x68, + 0x6f, 0x6f, 0x64, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x64, 0x64, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x73, 0x69, 0x6e, 0x67, 0x61, + 0x70, 0x6f, 0x72, 0x65, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x20, 0x6f, 0x66, + 0x66, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x70, 0x3e, + 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x77, 0x65, 0x72, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x6e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x6d, + 0x6f, 0x72, 0x65, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x69, 0x61, 0x6e, 0x73, + 0x64, 0x65, 0x6c, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x70, 0x72, 0x69, 0x73, + 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x61, 0x64, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x6f, + 0x66, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x21, 0x5b, + 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x61, + 0x63, 0x74, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x20, 0x62, 0x67, + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x20, 0x6f, 0x66, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, 0x69, + 0x6e, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x64, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x6f, 0x66, 0x66, 0x69, + 0x63, 0x69, 0x61, 0x6c, 0x73, 0x73, 0x65, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x6c, + 0x79, 0x2d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x6c, 0x6f, 0x6e, 0x67, 0x2d, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x63, 0x68, 0x20, 0x74, + 0x68, 0x61, 0x74, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x6d, + 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x62, 0x79, 0x3c, 0x2f, 0x62, 0x75, 0x74, + 0x74, 0x6f, 0x6e, 0x3e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x62, 0x75, 0x74, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x61, 0x73, 0x65, 0x73, 0x64, 0x6f, 0x77, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, + 0x2d, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x57, 0x69, + 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, + 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x77, + 0x61, 0x73, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x56, 0x65, 0x6e, 0x65, 0x7a, + 0x75, 0x65, 0x6c, 0x61, 0x28, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x6c, 0x79, + 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x70, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, + 0x63, 0x66, 0x61, 0x76, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6b, 0x69, 0x70, 0x65, 0x64, + 0x69, 0x61, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x76, 0x69, + 0x72, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x77, 0x61, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x6c, 0x65, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x73, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x61, 0x74, + 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x61, 0x77, 0x61, 0x79, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x6d, 0x6f, 0x6c, 0x65, 0x63, 0x75, 0x6c, 0x61, + 0x72, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x65, 0x6c, 0x79, 0x64, 0x69, 0x73, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x65, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x3e, 0x26, + 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x77, + 0x69, 0x6c, 0x6c, 0x20, 0x68, 0x61, 0x76, 0x65, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x73, 0x6d, 0x73, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x69, 0x65, 0x64, 0x72, 0x69, 0x63, 0x68, 0x77, 0x61, 0x73, 0x20, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, + 0x20, 0x66, 0x61, 0x63, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x69, + 0x6e, 0x67, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x70, 0x68, + 0x79, 0x73, 0x69, 0x63, 0x69, 0x73, 0x74, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x73, + 0x20, 0x69, 0x6e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x73, 0x70, 0x61, 0x6e, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x73, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x20, 0x74, 0x6f, + 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x73, 0x75, 0x72, 0x76, + 0x69, 0x76, 0x69, 0x6e, 0x67, 0x7d, 0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3e, 0x68, 0x69, 0x73, 0x20, 0x64, 0x65, 0x61, 0x74, 0x68, 0x61, 0x73, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x65, 0x77, 0x61, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x61, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x73, 0x20, 0x6f, 0x66, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, + 0x4f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x6d, + 0x69, 0x73, 0x73, 0x65, 0x64, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, + 0x74, 0x72, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x65, 0x73, 0x64, 0x75, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, + 0x76, 0x65, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x61, 0x6c, + 0x6c, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x67, 0x61, 0x6c, 0x6c, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x7b, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x69, 0x6d, 0x67, 0x20, + 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x69, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x72, + 0x6e, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x6e, 0x65, + 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x74, 0x68, 0x65, 0x20, 0x47, 0x72, + 0x65, 0x61, 0x74, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x65, 0x65, 0x6d, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x76, 0x69, 0x65, 0x77, 0x65, + 0x64, 0x20, 0x61, 0x73, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x20, 0x6f, 0x6e, + 0x69, 0x64, 0x65, 0x61, 0x20, 0x74, 0x68, 0x61, 0x74, 0x74, 0x68, 0x65, 0x20, + 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6f, + 0x66, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x68, 0x65, + 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x22, 0x3e, 0x63, 0x61, 0x72, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x6d, 0x61, + 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, + 0x20, 0x6f, 0x66, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x70, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x74, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x3e, 0x0d, 0x0a, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x74, + 0x65, 0x6e, 0x20, 0x20, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x0d, 0x0a, 0x70, 0x72, + 0x6f, 0x62, 0x61, 0x62, 0x6c, 0x79, 0x20, 0x50, 0x72, 0x6f, 0x66, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x73, 0x61, 0x79, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x68, 0x61, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x48, 0x75, 0x6e, 0x67, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, + 0x66, 0x73, 0x65, 0x72, 0x76, 0x65, 0x73, 0x20, 0x61, 0x73, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x66, 0x6f, + 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x69, 0x6e, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x67, 0x72, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x68, + 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, + 0x61, 0x72, 0x22, 0x3e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x6f, 0x6e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x61, 0x6c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x20, 0x6f, + 0x66, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x20, 0x74, 0x6f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, + 0x63, 0x74, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, 0x61, 0x6e, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x6c, 0x69, 0x76, 0x69, 0x6e, 0x67, + 0x20, 0x69, 0x6e, 0x65, 0x61, 0x73, 0x69, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x70, + 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x0a, 0x26, 0x6c, 0x74, 0x3b, + 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x77, 0x61, 0x73, 0x20, + 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, + 0x65, 0x74, 0x6f, 0x6f, 0x6b, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x65, 0x6c, + 0x69, 0x65, 0x66, 0x20, 0x69, 0x6e, 0x41, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x61, + 0x6e, 0x73, 0x61, 0x73, 0x20, 0x66, 0x61, 0x72, 0x20, 0x61, 0x73, 0x70, 0x72, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x3c, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x65, 0x74, 0x43, 0x68, 0x72, 0x69, 0x73, + 0x74, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, + 0x0a, 0x0a, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6b, + 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, + 0x74, 0x6d, 0x61, 0x67, 0x61, 0x7a, 0x69, 0x6e, 0x65, 0x73, 0x3e, 0x3c, 0x73, + 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x20, 0x6f, 0x66, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, + 0x20, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x61, + 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x69, 0x74, 0x73, 0x20, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x6f, 0x77, 0x6e, + 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x61, 0x6e, 0x20, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x61, 0x72, 0x69, 0x62, 0x62, 0x65, 0x61, + 0x6e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x73, 0x77, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x6e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x3b, 0x20, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x69, 0x6e, 0x68, 0x61, 0x62, 0x69, + 0x74, 0x65, 0x64, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x73, 0x74, 0x4a, + 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x20, 0x31, 0x3c, 0x2f, 0x66, 0x6f, 0x6f, + 0x74, 0x65, 0x72, 0x3e, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x6c, 0x79, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, + 0x73, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x20, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x54, 0x68, 0x65, + 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x3b, 0x20, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x64, 0x65, + 0x61, 0x6c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x63, + 0x6f, 0x6e, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x2e, 0x70, 0x68, 0x70, 0x61, 0x73, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, + 0x65, 0x6e, 0x67, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x72, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x2c, 0x66, 0x65, 0x77, 0x20, 0x79, 0x65, 0x61, 0x72, + 0x73, 0x77, 0x65, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x0a, 0x3c, 0x68, + 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x61, 0x72, 0x65, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x63, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6b, 0x65, 0x79, 0x63, 0x6f, 0x6e, 0x64, 0x65, 0x6d, 0x6e, 0x65, 0x64, 0x61, + 0x6c, 0x73, 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2c, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x20, 0x6f, 0x66, + 0x53, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x74, 0x65, 0x64, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x6d, 0x69, 0x6e, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x3e, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, + 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x61, 0x64, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, + 0x68, 0x65, 0x79, 0x20, 0x77, 0x65, 0x72, 0x65, 0x61, 0x6e, 0x79, 0x20, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3d, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x75, 0x63, 0x68, + 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x77, 0x61, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x61, 0x20, 0x74, 0x79, 0x70, 0x69, 0x63, + 0x61, 0x6c, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x79, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, + 0x6e, 0x6f, 0x74, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x77, + 0x65, 0x64, 0x6e, 0x65, 0x73, 0x64, 0x61, 0x79, 0x74, 0x68, 0x65, 0x20, 0x74, + 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, + 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x20, 0x32, 0x77, 0x68, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x79, 0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, + 0x6e, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x68, + 0x69, 0x73, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x3e, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x22, 0x3e, 0x0a, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x66, + 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x74, 0x65, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x65, + 0x65, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x68, 0x61, 0x73, 0x20, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, + 0x20, 0x3c, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3e, 0x67, 0x69, + 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x69, 0x61, 0x6e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x22, 0x3e, 0x70, + 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x30, 0x76, 0x69, 0x65, 0x77, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x2c, + 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, + 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x20, 0x6f, + 0x66, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x6e, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2c, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, + 0x6f, 0x66, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x61, 0x6c, 0x6c, 0x65, 0x67, 0x65, + 0x64, 0x6c, 0x79, 0x43, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x61, 0x6e, 0x64, 0x77, + 0x61, 0x73, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x20, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x61, 0x72, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, + 0x77, 0x61, 0x73, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x6f, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x6f, + 0x66, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x75, 0x63, + 0x68, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, + 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x2c, 0x20, + 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x4d, 0x75, 0x73, 0x65, 0x75, 0x6d, + 0x20, 0x6f, 0x66, 0x6c, 0x6f, 0x75, 0x69, 0x73, 0x69, 0x61, 0x6e, 0x61, 0x28, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x69, 0x6e, 0x6e, 0x65, + 0x73, 0x6f, 0x74, 0x61, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x73, + 0x61, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x6d, 0x69, + 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x20, 0x6f, + 0x66, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x66, + 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x30, 0x30, 0x70, 0x78, 0x7c, 0x72, 0x69, + 0x67, 0x68, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x6d, 0x6f, + 0x75, 0x73, 0x65, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x28, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x73, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x69, 0x73, 0x63, 0x6f, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x20, 0x61, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x6d, + 0x65, 0x77, 0x68, 0x6f, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x61, 0x20, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, + 0x6f, 0x66, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x69, 0x74, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x6d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x69, 0x6e, 0x67, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, + 0x70, 0x61, 0x70, 0x65, 0x72, 0x62, 0x61, 0x63, 0x6b, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x0d, 0x0a, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x3e, 0x3d, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x64, 0x65, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x26, 0x71, 0x75, 0x6f, 0x74, + 0x3b, 0x20, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x20, 0x62, 0x79, 0x61, 0x6e, + 0x64, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x3e, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x74, + 0x68, 0x65, 0x20, 0x74, 0x68, 0x72, 0x65, 0x65, 0x70, 0x6f, 0x77, 0x65, 0x72, + 0x20, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x48, 0x54, 0x4d, 0x4c, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x79, 0x3a, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x3b, 0x43, 0x68, 0x75, 0x72, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, + 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x79, 0x20, 0x68, 0x69, + 0x67, 0x68, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x2d, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x3d, 0x22, 0x2f, 0x63, 0x67, 0x69, 0x2d, 0x62, 0x69, 0x6e, 0x2f, 0x74, + 0x6f, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x61, 0x66, 0x72, 0x69, 0x6b, + 0x61, 0x61, 0x6e, 0x73, 0x65, 0x73, 0x70, 0x65, 0x72, 0x61, 0x6e, 0x74, 0x6f, + 0x66, 0x72, 0x61, 0x6e, 0xc3, 0xa7, 0x61, 0x69, 0x73, 0x6c, 0x61, 0x74, 0x76, + 0x69, 0x65, 0xc5, 0xa1, 0x75, 0x6c, 0x69, 0x65, 0x74, 0x75, 0x76, 0x69, 0xc5, + 0xb3, 0xc4, 0x8c, 0x65, 0xc5, 0xa1, 0x74, 0x69, 0x6e, 0x61, 0xc4, 0x8d, 0x65, + 0xc5, 0xa1, 0x74, 0x69, 0x6e, 0x61, 0xe0, 0xb9, 0x84, 0xe0, 0xb8, 0x97, 0xe0, + 0xb8, 0xa2, 0xe6, 0x97, 0xa5, 0xe6, 0x9c, 0xac, 0xe8, 0xaa, 0x9e, 0xe7, 0xae, + 0x80, 0xe4, 0xbd, 0x93, 0xe5, 0xad, 0x97, 0xe7, 0xb9, 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, 0xae, 0xa8, 0xe8, 0xae, 0xba, 0xe5, 0x8c, + 0xba, 0xe6, 0xb7, 0xb1, 0xe5, 0x9c, 0xb3, 0xe5, 0xb8, 0x82, 0xe6, 0x92, 0xad, + 0xe6, 0x94, 0xbe, 0xe5, 0x99, 0xa8, 0xe5, 0x8c, 0x97, 0xe4, 0xba, 0xac, 0xe5, + 0xb8, 0x82, 0xe5, 0xa4, 0xa7, 0xe5, 0xad, 0xa6, 0xe7, 0x94, 0x9f, 0xe8, 0xb6, + 0x8a, 0xe6, 0x9d, 0xa5, 0xe8, 0xb6, 0x8a, 0xe7, 0xae, 0xa1, 0xe7, 0x90, 0x86, + 0xe5, 0x91, 0x98, 0xe4, 0xbf, 0xa1, 0xe6, 0x81, 0xaf, 0xe7, 0xbd, 0x91, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x69, 0x6f, 0x73, 0x61, 0x72, 0x74, 0xc3, 0xad, + 0x63, 0x75, 0x6c, 0x6f, 0x61, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, + 0x62, 0x61, 0x72, 0x63, 0x65, 0x6c, 0x6f, 0x6e, 0x61, 0x63, 0x75, 0x61, 0x6c, + 0x71, 0x75, 0x69, 0x65, 0x72, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x64, + 0x6f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x73, 0x70, 0x6f, 0x6c, + 0xc3, 0xad, 0x74, 0x69, 0x63, 0x61, 0x72, 0x65, 0x73, 0x70, 0x75, 0x65, 0x73, + 0x74, 0x61, 0x77, 0x69, 0x6b, 0x69, 0x70, 0x65, 0x64, 0x69, 0x61, 0x73, 0x69, + 0x67, 0x75, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x62, 0xc3, 0xba, 0x73, 0x71, 0x75, + 0x65, 0x64, 0x61, 0x63, 0x6f, 0x6d, 0x75, 0x6e, 0x69, 0x64, 0x61, 0x64, 0x73, + 0x65, 0x67, 0x75, 0x72, 0x69, 0x64, 0x61, 0x64, 0x70, 0x72, 0x69, 0x6e, 0x63, + 0x69, 0x70, 0x61, 0x6c, 0x70, 0x72, 0x65, 0x67, 0x75, 0x6e, 0x74, 0x61, 0x73, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x69, 0x64, 0x6f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x65, 0x7a, 0x75, 0x65, 0x6c, + 0x61, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x61, 0x73, 0x64, 0x69, 0x63, + 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x65, 0x6c, 0x61, 0x63, 0x69, 0xc3, + 0xb3, 0x6e, 0x6e, 0x6f, 0x76, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x73, 0x69, + 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x79, 0x65, 0x63, + 0x74, 0x6f, 0x73, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x61, 0x73, 0x69, + 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x6f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x64, 0x61, 0x64, 0x65, 0x6e, 0x63, 0x75, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x65, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0xc3, 0xad, 0x61, 0x69, 0x6d, 0xc3, 0xa1, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x61, + 0x72, 0x64, 0x65, 0x73, 0x63, 0x61, 0x72, 0x67, 0x61, 0x72, 0x6e, 0x65, 0x63, + 0x65, 0x73, 0x61, 0x72, 0x69, 0x6f, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x69, 0xc3, + 0xb3, 0x6e, 0x74, 0x65, 0x6c, 0xc3, 0xa9, 0x66, 0x6f, 0x6e, 0x6f, 0x63, 0x6f, + 0x6d, 0x69, 0x73, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x61, 0x6e, 0x63, 0x69, 0x6f, + 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x64, 0x61, 0x64, 0x65, + 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x72, 0x61, 0x6e, 0xc3, 0xa1, 0x6c, + 0x69, 0x73, 0x69, 0x73, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x6f, 0x73, + 0x74, 0xc3, 0xa9, 0x72, 0x6d, 0x69, 0x6e, 0x6f, 0x73, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x6e, 0x63, 0x69, 0x61, 0x65, 0x74, 0x69, 0x71, 0x75, 0x65, 0x74, 0x61, + 0x73, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x73, 0x66, 0x75, 0x6e, + 0x63, 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x61, + 0x64, 0x6f, 0x63, 0x61, 0x72, 0xc3, 0xa1, 0x63, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x6f, 0x70, 0x69, 0x65, 0x64, 0x61, 0x64, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x69, 0x6f, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x69, 0x64, 0x61, 0x64, 0x6d, + 0x75, 0x6e, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x63, 0x72, 0x65, 0x61, 0x63, + 0x69, 0xc3, 0xb3, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x61, 0x72, 0x67, 0x61, 0x73, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x63, 0x6f, 0x6d, 0x65, + 0x72, 0x63, 0x69, 0x61, 0x6c, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x6f, 0x6e, 0x65, + 0x73, 0x65, 0x6a, 0x65, 0x72, 0x63, 0x69, 0x63, 0x69, 0x6f, 0x65, 0x64, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x61, 0x6c, 0x61, 0x6d, 0x61, 0x6e, + 0x63, 0x61, 0x67, 0x6f, 0x6e, 0x7a, 0xc3, 0xa1, 0x6c, 0x65, 0x7a, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x70, 0x65, 0x6c, 0xc3, 0xad, 0x63, + 0x75, 0x6c, 0x61, 0x72, 0x65, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x73, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x72, 0x72, 0x61, + 0x67, 0x6f, 0x6e, 0x61, 0x70, 0x72, 0xc3, 0xa1, 0x63, 0x74, 0x69, 0x63, 0x61, + 0x6e, 0x6f, 0x76, 0x65, 0x64, 0x61, 0x64, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x70, + 0x75, 0x65, 0x73, 0x74, 0x61, 0x70, 0x61, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x65, + 0x73, 0x74, 0xc3, 0xa9, 0x63, 0x6e, 0x69, 0x63, 0x61, 0x73, 0x6f, 0x62, 0x6a, + 0x65, 0x74, 0x69, 0x76, 0x6f, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x6f, 0x73, 0xe0, 0xa4, 0xae, 0xe0, 0xa5, 0x87, 0xe0, 0xa4, 0x82, 0xe0, 0xa4, + 0xb2, 0xe0, 0xa4, 0xbf, 0xe0, 0xa4, 0x8f, 0xe0, 0xa4, 0xb9, 0xe0, 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, + 0x74, 0x68, 0x69, 0x6e, 0x67, 0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x61, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x26, 0x63, 0x6f, 0x70, 0x79, 0x3b, 0x20, 0x32, 0x30, 0x31, + 0x6a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x63, 0x68, 0x61, + 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x62, 0x72, 0x65, 0x61, 0x64, 0x63, + 0x72, 0x75, 0x6d, 0x62, 0x74, 0x68, 0x65, 0x6d, 0x73, 0x65, 0x6c, 0x76, 0x65, + 0x73, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x67, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x69, 0x66, + 0x6f, 0x72, 0x6e, 0x69, 0x61, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x4e, + 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x3c, 0x2f, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x6d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x62, + 0x6f, 0x78, 0x22, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x73, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x70, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x61, 0x73, 0x20, 0x77, 0x65, + 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x75, 0x6e, 0x74, 0x27, 0x2c, 0x20, 0x27, 0x55, + 0x41, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, + 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x20, 0x3d, 0x20, + 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x69, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x26, 0x6c, 0x74, 0x3b, 0x62, 0x72, 0x26, 0x67, 0x74, + 0x3b, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x70, 0x6f, + 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x67, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, + 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x77, 0x73, + 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x65, 0x63, + 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x61, 0x72, 0x6c, 0x69, 0x61, + 0x6d, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, + 0x6e, 0x75, 0x6c, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x2e, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x22, 0x63, 0x6f, 0x6e, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x62, + 0x69, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x6f, 0x64, + 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x61, 0x74, 0x6d, 0x6f, 0x73, 0x70, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x6f, 0x6e, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x3d, 0x22, 0x3c, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x75, 0x62, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x77, 0x65, 0x6c, 0x6c, 0x2d, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x68, 0x65, + 0x6e, 0x6f, 0x6d, 0x65, 0x6e, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x69, 0x70, + 0x6c, 0x69, 0x6e, 0x65, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x6e, 0x67, 0x22, + 0x20, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x61, 0x72, 0x69, 0x65, 0x73, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x6f, + 0x75, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x28, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x22, 0x20, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x22, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x20, 0x64, 0x65, 0x6d, + 0x6f, 0x63, 0x72, 0x61, 0x74, 0x69, 0x63, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x22, 0x3e, + 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x6c, 0x69, + 0x6e, 0x67, 0x75, 0x69, 0x73, 0x74, 0x69, 0x63, 0x70, 0x78, 0x3b, 0x70, 0x61, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, 0x70, + 0x68, 0x79, 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x75, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, 0x66, 0x61, 0x63, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, + 0x7a, 0x65, 0x64, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x69, 0x66, 0x20, 0x28, 0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x76, 0x6f, 0x63, 0x61, 0x62, 0x75, + 0x6c, 0x61, 0x72, 0x79, 0x68, 0x79, 0x70, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x69, + 0x73, 0x2e, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x28, 0x29, 0x3b, 0x26, 0x61, + 0x6d, 0x70, 0x3b, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x20, 0x74, + 0x68, 0x65, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x22, 0x61, 0x73, 0x73, 0x75, + 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x64, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x73, 0x74, 0x73, 0x65, 0x78, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, + 0x64, 0x20, 0x6f, 0x66, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x20, 0x6f, 0x6e, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x3d, 0x22, 0x63, 0x6f, + 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x6f, 0x6f, 0x6e, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x69, + 0x6e, 0x76, 0x65, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x6e, + 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x64, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x67, 0x65, 0x6f, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3d, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, + 0x22, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x28, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x70, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x72, + 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x61, 0x64, 0x61, 0x70, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x77, 0x65, 0x6c, 0x6c, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x64, 0x65, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x68, 0x31, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x22, 0x30, 0x70, 0x78, 0x3b, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x63, 0x65, 0x6c, 0x65, 0x62, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x0a, 0x0a, 0x44, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x64, + 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x77, 0x65, 0x72, + 0x65, 0x4e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x65, + 0x79, 0x6f, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x69, + 0x73, 0x74, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x61, + 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6c, 0x61, 0x6e, 0x67, + 0x3d, 0x22, 0x65, 0x6e, 0x22, 0x20, 0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3e, 0x0d, 0x0a, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x20, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x65, 0x78, 0x74, + 0x72, 0x65, 0x6d, 0x65, 0x6c, 0x79, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, + 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x65, 0x6d, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x3e, 0x0d, 0x0a, 0x20, 0x63, 0x6f, 0x6c, 0x73, 0x70, 0x61, 0x6e, + 0x3d, 0x22, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x0a, 0x20, 0x20, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x62, 0x6f, 0x75, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x22, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, 0x65, 0x6e, 0x50, 0x6f, 0x72, + 0x74, 0x75, 0x67, 0x75, 0x65, 0x73, 0x65, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x65, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, + 0x6c, 0x69, 0x6d, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x61, 0x6c, 0x6d, 0x6f, 0x73, + 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, + 0x20, 0x23, 0x61, 0x70, 0x61, 0x72, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x69, 0x6e, 0x20, 0x45, + 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x69, + 0x7a, 0x65, 0x64, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x66, 0x6f, 0x72, + 0x67, 0x75, 0x69, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, + 0x61, 0x62, 0x6c, 0x65, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x68, 0x32, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x61, + 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x28, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x65, 0x64, 0x3d, + 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x64, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x70, 0x65, 0x72, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x78, 0x3b, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x66, 0x75, 0x6c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x73, 0x6d, 0x69, 0x6c, 0x6c, 0x65, 0x6e, 0x6e, 0x69, 0x75, 0x6d, 0x68, 0x69, + 0x73, 0x20, 0x66, 0x61, 0x74, 0x68, 0x65, 0x72, 0x74, 0x68, 0x65, 0x20, 0x26, + 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6e, 0x6f, 0x2d, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, 0x6c, 0x69, + 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x65, 0x6e, 0x63, 0x6f, + 0x75, 0x72, 0x61, 0x67, 0x65, 0x64, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, + 0x6f, 0x66, 0x20, 0x75, 0x6e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, + 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, + 0x72, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x69, 0x6e, 0x67, 0x63, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x6c, 0x65, 0x67, 0x69, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x73, + 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x30, 0x22, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x6c, 0x79, 0x69, 0x6c, 0x6c, 0x75, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x66, 0x69, 0x76, 0x65, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x31, 0x22, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x70, 0x73, 0x79, 0x63, 0x68, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, + 0x6f, 0x66, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x6a, + 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x6c, 0x79, 0x3e, 0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x3e, + 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x62, 0x75, 0x74, + 0x20, 0x72, 0x61, 0x74, 0x68, 0x65, 0x72, 0x69, 0x6d, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, + 0x2c, 0x61, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6f, 0x66, 0x4c, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x55, 0x6e, 0x6c, 0x69, 0x6b, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x26, 0x6e, 0x62, 0x73, + 0x70, 0x3b, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, + 0x74, 0x20, 0x77, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6f, 0x62, + 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x76, 0x65, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x69, 0x6d, 0x69, 0x6c, 0x61, + 0x72, 0x6c, 0x79, 0x2c, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, + 0x3e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0d, 0x0a, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x69, 0x73, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, + 0x6f, 0x66, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x65, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x75, 0x6e, 0x64, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x6e, 0x65, 0x64, 0x2a, 0x3c, 0x21, 0x5b, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b, + 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x69, 0x6e, 0x20, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0x0a, 0x3c, + 0x2f, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x28, 0x27, 0x69, 0x20, + 0x3d, 0x20, 0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x64, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x66, 0x6f, 0x72, 0x75, 0x6c, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x73, 0x6f, 0x2d, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x7d, 0x0a, 0x3c, + 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x6d, 0x70, 0x68, 0x61, 0x73, 0x69, 0x7a, 0x65, + 0x64, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x3c, 0x2f, + 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, + 0x74, 0x68, 0x4d, 0x65, 0x61, 0x6e, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x2c, 0x69, + 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x62, 0x72, 0x20, 0x2f, 0x3e, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x63, + 0x6f, 0x6d, 0x65, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x66, + 0x54, 0x65, 0x6c, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, + 0x62, 0x61, 0x6c, 0x6c, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x73, 0x69, 0x64, 0x65, + 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x69, 0x6e, 0x67, 0x61, 0x6e, + 0x20, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x3c, 0x69, 0x6d, 0x67, 0x20, + 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x61, 0x64, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x6c, 0x65, 0x73, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, + 0x6c, 0x61, 0x72, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x79, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x64, 0x65, 0x63, + 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x72, + 0x6f, 0x6e, 0x67, 0x3e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x73, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x66, 0x61, 0x63, 0x69, 0x6c, + 0x69, 0x74, 0x61, 0x74, 0x65, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x63, 0x73, 0x73, 0x22, 0x09, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x6e, 0x6f, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x73, 0x69, 0x74, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x62, 0x75, 0x73, + 0x69, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x73, 0x44, 0x69, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x72, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x20, 0x4a, 0x61, + 0x6e, 0x75, 0x61, 0x72, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x69, 0x73, 0x69, + 0x6e, 0x67, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x09, 0x64, + 0x69, 0x70, 0x6c, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x69, 0x6e, 0x67, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x63, 0x6f, 0x6e, + 0x63, 0x65, 0x70, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x6e, 0x63, 0x6c, 0x69, + 0x63, 0x6b, 0x3d, 0x22, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, + 0x6f, 0x66, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x6d, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x4c, 0x75, 0x78, 0x65, 0x6d, + 0x62, 0x6f, 0x75, 0x72, 0x67, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x65, + 0x6e, 0x67, 0x61, 0x67, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x22, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x22, 0x29, 0x3b, 0x62, 0x75, 0x74, 0x20, 0x69, 0x74, 0x20, + 0x77, 0x61, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x3d, 0x22, 0x0a, 0x3c, 0x21, + 0x2d, 0x2d, 0x20, 0x45, 0x6e, 0x64, 0x20, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x69, 0x63, 0x61, 0x6c, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x6c, + 0x79, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x6f, + 0x70, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x75, 0x6e, 0x6c, 0x69, 0x6b, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, + 0x61, 0x6e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x0a, 0x3c, 0x2f, 0x68, + 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, + 0x73, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x41, 0x6c, 0x65, + 0x78, 0x61, 0x6e, 0x64, 0x72, 0x69, 0x61, 0x72, 0x65, 0x74, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x66, 0x6f, 0x75, 0x72, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x0a, 0x0a, + 0x26, 0x6c, 0x74, 0x3b, 0x21, 0x2d, 0x2d, 0x20, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x61, 0x73, 0x69, 0x6e, 0x67, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x68, 0x33, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x6f, 0x62, 0x6c, 0x69, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x64, 0x76, + 0x61, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6e, + 0x73, 0x3c, 0x62, 0x61, 0x73, 0x65, 0x20, 0x68, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x6c, 0x79, 0x77, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x6e, + 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x76, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x72, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, + 0x6f, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x61, 0x75, + 0x74, 0x6f, 0x6e, 0x6f, 0x6d, 0x6f, 0x75, 0x73, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x75, 0x72, 0x61, 0x6e, 0x74, 0x74, + 0x77, 0x6f, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x46, 0x65, 0x62, 0x72, + 0x75, 0x61, 0x72, 0x79, 0x20, 0x32, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x20, 0x6f, 0x66, 0x73, 0x77, 0x66, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x6e, 0x65, 0x61, + 0x72, 0x6c, 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, + 0x6e, 0x20, 0x62, 0x79, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, + 0x73, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x69, 0x73, 0x20, 0x75, 0x73, 0x75, 0x61, 0x6c, + 0x6c, 0x79, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x6e, + 0x65, 0x77, 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x73, 0x6d, 0x79, 0x73, 0x74, + 0x65, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x62, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x70, 0x61, 0x72, 0x6c, 0x69, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x75, 0x70, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, + 0x69, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x65, + 0x64, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x68, 0x61, 0x73, 0x20, 0x6c, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x6e, + 0x64, 0x61, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x69, + 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x63, 0x65, 0x72, 0x65, + 0x6d, 0x6f, 0x6e, 0x69, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x6c, 0x69, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x53, 0x63, 0x69, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x6e, 0x6f, 0x2d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, 0x61, 0x72, 0x6b, + 0x73, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x77, 0x69, + 0x64, 0x65, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x62, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x6f, 0x6f, 0x6b, 0x20, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x64, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, + 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x69, 0x6d, 0x70, 0x72, + 0x69, 0x73, 0x6f, 0x6e, 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x6d, + 0x4c, 0x61, 0x62, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x76, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x32, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69, 0x61, + 0x6c, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x44, 0x75, 0x72, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, 0x73, 0x65, 0x73, 0x73, 0x6d, 0x65, + 0x6e, 0x74, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x64, + 0x65, 0x61, 0x6c, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x2f, 0x75, 0x6c, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x66, 0x69, 0x78, 0x22, 0x3e, 0x74, 0x68, 0x65, + 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x79, + 0x65, 0x61, 0x72, 0x73, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x77, 0x65, 0x72, + 0x65, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2c, 0x73, 0x79, + 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x70, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, + 0x6c, 0x79, 0x68, 0x69, 0x73, 0x20, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x75, + 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x75, 0x6e, 0x65, 0x78, + 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x64, + 0x61, 0x20, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x75, 0x6e, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x22, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, + 0x73, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x69, 0x6e, 0x20, 0x4f, 0x63, 0x74, 0x6f, 0x62, 0x65, 0x72, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x73, 0x61, 0x69, 0x64, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x72, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x6f, 0x75, + 0x73, 0x20, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x72, 0x6f, 0x77, 0x73, 0x70, 0x61, 0x6e, 0x3d, 0x22, 0x6f, 0x6e, 0x6c, 0x79, + 0x20, 0x61, 0x20, 0x66, 0x65, 0x77, 0x6d, 0x65, 0x61, 0x6e, 0x74, 0x20, 0x74, + 0x68, 0x61, 0x74, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x2d, 0x2d, 0x3e, 0x0d, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x3c, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x65, 0x74, 0x3e, 0x41, 0x72, 0x63, 0x68, 0x62, 0x69, + 0x73, 0x68, 0x6f, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6e, + 0x6f, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, 0x64, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x65, 0x73, 0x70, 0x72, 0x69, 0x76, 0x69, + 0x6c, 0x65, 0x67, 0x65, 0x73, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x6d, + 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x74, 0x68, 0x65, 0x45, 0x61, 0x73, 0x74, + 0x65, 0x72, 0x20, 0x65, 0x67, 0x67, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, + 0x73, 0x6d, 0x73, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x22, 0x3e, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, + 0x0d, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x68, 0x70, 0x61, 0x72, + 0x72, 0x69, 0x76, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x2d, 0x6a, 0x73, 0x73, 0x64, + 0x6b, 0x27, 0x29, 0x29, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, + 0x61, 0x73, 0x75, 0x61, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, + 0x61, 0x6e, 0x73, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, + 0x61, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x65, 0x74, 0x69, 0x63, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x73, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x69, 0x74, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x50, 0x68, + 0x69, 0x6c, 0x6f, 0x73, 0x6f, 0x70, 0x68, 0x79, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x73, 0x68, 0x69, 0x70, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x6f, 0x67, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x74, + 0x6f, 0x77, 0x61, 0x72, 0x64, 0x20, 0x74, 0x68, 0x65, 0x67, 0x75, 0x61, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x65, 0x64, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x65, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x30, 0x30, 0x30, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x20, 0x67, 0x61, 0x6d, 0x65, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6e, 0x67, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, + 0x65, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x73, 0x61, + 0x6e, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x69, 0x66, 0x6f, 0x6e, 0x6b, 0x65, 0x79, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x3b, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, + 0x67, 0x3a, 0x48, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x75, + 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x74, 0x79, 0x70, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x73, 0x72, 0x63, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x76, 0x65, 0x73, 0x69, 0x6e, + 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, + 0x20, 0x62, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, + 0x67, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x73, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6c, 0x6f, 0x77, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x73, 0x68, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x0a, 0x09, 0x09, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x61, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x6f, 0x6d, 0x65, 0x72, + 0x68, 0x65, 0x20, 0x64, 0x69, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x64, 0x75, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x73, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x61, 0x6e, 0x20, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x61, 0x74, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x20, 0x74, 0x6f, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x2c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x77, 0x61, 0x73, 0x20, + 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, + 0x6e, 0x69, 0x63, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, + 0x72, 0x6d, 0x65, 0x72, 0x69, 0x6e, 0x64, 0x69, 0x67, 0x65, 0x6e, 0x6f, 0x75, + 0x73, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x75, + 0x62, 0x73, 0x69, 0x64, 0x69, 0x61, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x73, 0x70, + 0x69, 0x72, 0x61, 0x63, 0x79, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x20, + 0x6f, 0x66, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x61, + 0x66, 0x66, 0x6f, 0x72, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, + 0x66, 0x6f, 0x72, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x69, 0x74, 0x65, 0x6d, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x62, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x6c, 0x79, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x73, + 0x65, 0x64, 0x6c, 0x79, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, + 0x61, 0x61, 0x74, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x74, 0x72, + 0x61, 0x76, 0x65, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x65, 0x70, 0x61, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x79, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x65, 0x73, 0x20, + 0x6f, 0x6e, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, + 0x65, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x75, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, + 0x2d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x28, 0x73, 0x6f, 0x6d, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, + 0x6c, 0x69, 0x6e, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x75, 0x6e, + 0x64, 0x65, 0x72, 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x71, 0x75, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x20, 0x6f, 0x66, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x68, 0x70, 0x3f, 0x3c, 0x2f, 0x62, 0x75, + 0x74, 0x74, 0x6f, 0x6e, 0x3e, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x62, 0x65, 0x73, 0x74, 0x2d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x22, 0x20, 0x64, + 0x69, 0x72, 0x3d, 0x22, 0x6c, 0x74, 0x72, 0x4c, 0x69, 0x65, 0x75, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x6d, 0x61, 0x64, 0x65, 0x20, + 0x75, 0x70, 0x20, 0x6f, 0x66, 0x6e, 0x6f, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, + 0x72, 0x67, 0x75, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x74, 0x6f, 0x20, 0x61, + 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x27, 0x73, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, + 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x62, 0x61, 0x73, + 0x65, 0x64, 0x20, 0x75, 0x70, 0x6f, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, + 0x66, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x70, 0x6f, + 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x49, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x74, + 0x68, 0x65, 0x61, 0x66, 0x74, 0x65, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x63, 0x72, 0x6f, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x2e, + 0x63, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x73, 0x6d, 0x69, 0x6e, 0x20, + 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2d, + 0x77, 0x69, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x53, 0x6f, 0x63, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x70, 0x6f, + 0x6c, 0x69, 0x74, 0x69, 0x63, 0x69, 0x61, 0x6e, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x77, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x20, + 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x75, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, + 0x65, 0x6e, 0x20, 0x61, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x74, 0x65, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x20, 0x66, 0x6f, 0x72, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, + 0x63, 0x65, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x62, 0x75, 0x74, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, + 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x6c, 0x61, 0x62, + 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, + 0x69, 0x62, 0x6c, 0x65, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x20, 0x6f, + 0x66, 0x2c, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x62, 0x65, + 0x67, 0x61, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x75, 0x73, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x66, + 0x72, 0x6f, 0x6d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x2f, 0x22, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x67, 0x65, 0x6f, 0x6c, 0x6f, 0x67, 0x69, + 0x63, 0x61, 0x6c, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x6f, 0x66, + 0x64, 0x65, 0x6c, 0x69, 0x62, 0x65, 0x72, 0x61, 0x74, 0x65, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x74, 0x6f, 0x70, 0x74, 0x68, + 0x65, 0x20, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x6f, 0x75, 0x74, 0x73, 0x69, + 0x64, 0x65, 0x20, 0x6f, 0x66, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x72, 0x65, 0x65, 0x72, 0x73, + 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x3d, 0x22, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x77, 0x61, 0x73, 0x20, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x72, 0x74, 0x68, + 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x65, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x61, 0x63, 0x63, 0x75, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x79, 0x77, 0x65, 0x72, 0x65, 0x20, 0x62, 0x75, 0x69, + 0x6c, 0x74, 0x77, 0x61, 0x73, 0x20, 0x6b, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x61, + 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x6d, 0x75, 0x63, 0x68, + 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x44, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x31, 0x30, 0x30, + 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4b, 0x69, 0x6e, + 0x67, 0x64, 0x6f, 0x6d, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, + 0x74, 0x69, 0x72, 0x65, 0x66, 0x61, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x74, 0x68, 0x65, 0x20, 0x46, + 0x72, 0x65, 0x6e, 0x63, 0x68, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x61, + 0x6e, 0x64, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x64, 0x22, 0x3e, 0x69, + 0x73, 0x20, 0x73, 0x61, 0x69, 0x64, 0x20, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x64, 0x75, 0x6d, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, + 0x61, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x2d, 0x3e, 0x0a, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x20, 0x4f, 0x66, 0x66, 0x69, 0x63, + 0x69, 0x61, 0x6c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x77, 0x69, 0x64, 0x65, + 0x2e, 0x61, 0x72, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x61, 0x6e, 0x64, 0x20, 0x69, + 0x74, 0x20, 0x77, 0x61, 0x73, 0x64, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3d, 0x22, 0x6c, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x74, 0x62, + 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x61, 0x72, 0x65, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x6c, 0x79, + 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x72, 0x6e, 0x77, 0x6f, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x6e, 0x6e, 0x6f, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x3c, 0x2f, + 0x61, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x73, 0x6f, 0x75, 0x6e, 0x64, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x6f, + 0x72, 0x6d, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x65, 0x64, 0x61, 0x64, 0x6f, 0x70, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x74, 0x68, 0x65, + 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x61, 0x6e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x73, 0x20, 0x6f, 0x66, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x20, 0x6f, + 0x66, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, 0x61, 0x6e, 0x20, 0x76, 0x65, + 0x72, 0x79, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6f, 0x74, 0x69, 0x76, 0x65, 0x62, 0x79, 0x20, 0x66, 0x61, 0x72, 0x20, 0x74, + 0x68, 0x65, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x70, + 0x75, 0x72, 0x73, 0x75, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x66, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x62, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x74, + 0x20, 0x74, 0x6f, 0x69, 0x6e, 0x20, 0x45, 0x6e, 0x67, 0x6c, 0x61, 0x6e, 0x64, + 0x61, 0x67, 0x72, 0x65, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x63, 0x63, + 0x75, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x68, 0x69, + 0x73, 0x20, 0x6f, 0x72, 0x20, 0x68, 0x65, 0x72, 0x74, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x64, 0x6f, 0x75, 0x73, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x20, + 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x30, + 0x20, 0x31, 0x65, 0x6d, 0x20, 0x31, 0x65, 0x6d, 0x3b, 0x42, 0x61, 0x73, 0x6b, + 0x65, 0x74, 0x62, 0x61, 0x6c, 0x6c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, + 0x63, 0x73, 0x73, 0x61, 0x6e, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x72, + 0x65, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x2f, 0x22, 0x20, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x65, 0x70, 0x69, 0x74, 0x74, 0x73, 0x62, 0x75, 0x72, 0x67, 0x68, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0d, 0x3c, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3e, 0x28, 0x66, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x6f, + 0x75, 0x74, 0x68, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x3c, + 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x0d, 0x0a, 0x20, 0x6f, 0x63, 0x63, 0x61, + 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, + 0x20, 0x69, 0x74, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x3e, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, + 0x2c, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x74, 0x61, + 0x62, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x61, 0x73, + 0x74, 0x72, 0x6f, 0x75, 0x73, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x3e, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x3c, 0x2f, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3e, 0x0a, 0x3c, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, + 0x66, 0x6f, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, + 0x2e, 0x73, 0x72, 0x63, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6c, + 0x79, 0x69, 0x73, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x64, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x65, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x6e, + 0x64, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x75, 0xc3, 0xaa, 0x73, 0xd7, + 0xa2, 0xd7, 0x91, 0xd7, 0xa8, 0xd7, 0x99, 0xd7, 0xaa, 0xd9, 0x81, 0xd8, 0xa7, + 0xd8, 0xb1, 0xd8, 0xb3, 0xdb, 0x8c, 0x64, 0x65, 0x73, 0x61, 0x72, 0x72, 0x6f, + 0x6c, 0x6c, 0x6f, 0x63, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x69, 0x6f, + 0x65, 0x64, 0x75, 0x63, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x73, 0x65, 0x70, + 0x74, 0x69, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x64, 0x6f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x63, 0x69, 0xc3, 0xb3, + 0x6e, 0x75, 0x62, 0x69, 0x63, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x69, 0x64, 0x61, 0x64, 0x72, 0x65, 0x73, 0x70, 0x75, + 0x65, 0x73, 0x74, 0x61, 0x73, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x61, 0x64, + 0x6f, 0x73, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x65, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x64, 0x6f, 0x73, 0x61, 0x72, 0x74, 0xc3, + 0xad, 0x63, 0x75, 0x6c, 0x6f, 0x73, 0x64, 0x69, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x74, 0x65, 0x73, 0x73, 0x69, 0x67, 0x75, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x73, + 0x72, 0x65, 0x70, 0xc3, 0xba, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x69, 0x74, + 0x75, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x69, 0x6f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x69, 0x64, 0x61, + 0x64, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x6f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x70, 0x6f, 0x62, 0x6c, 0x61, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x70, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x69, 0x64, 0x6f, 0x73, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x6f, 0x72, 0x69, 0x6f, 0x73, 0x74, 0x65, 0x63, 0x68, + 0x6e, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x65, 0x73, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0xc3, 0xad, 0x61, + 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x65, 0x73, 0x64, 0x69, 0x73, + 0x70, 0x6f, 0x6e, 0x69, 0x62, 0x6c, 0x65, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x64, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x69, + 0x61, 0x76, 0x61, 0x6c, 0x6c, 0x61, 0x64, 0x6f, 0x6c, 0x69, 0x64, 0x62, 0x69, + 0x62, 0x6c, 0x69, 0x6f, 0x74, 0x65, 0x63, 0x61, 0x72, 0x65, 0x6c, 0x61, 0x63, + 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, + 0x69, 0x6f, 0x70, 0x6f, 0x6c, 0xc3, 0xad, 0x74, 0x69, 0x63, 0x61, 0x73, 0x61, + 0x6e, 0x74, 0x65, 0x72, 0x69, 0x6f, 0x72, 0x65, 0x73, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x73, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, + 0x65, 0x7a, 0x61, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x65, 0x73, + 0x64, 0x69, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x65, 0x63, 0x6f, + 0x6e, 0xc3, 0xb3, 0x6d, 0x69, 0x63, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x6f, 0x64, 0x72, 0xc3, 0xad, 0x67, 0x75, 0x65, + 0x7a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x63, 0x75, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x75, + 0x73, 0x69, 0xc3, 0xb3, 0x6e, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, + 0x72, 0x61, 0x66, 0x75, 0x6e, 0x64, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x66, + 0x72, 0x65, 0x63, 0x75, 0x65, 0x6e, 0x74, 0x65, 0x73, 0x70, 0x65, 0x72, 0x6d, + 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x65, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0xd0, 0xbc, 0xd0, 0xbe, 0xd0, 0xb6, 0xd0, 0xbd, 0xd0, 0xbe, + 0xd0, 0xb1, 0xd1, 0x83, 0xd0, 0xb4, 0xd0, 0xb5, 0xd1, 0x82, 0xd0, 0xbc, 0xd0, + 0xbe, 0xd0, 0xb6, 0xd0, 0xb5, 0xd1, 0x82, 0xd0, 0xb2, 0xd1, 0x80, 0xd0, 0xb5, + 0xd0, 0xbc, 0xd1, 0x8f, 0xd1, 0x82, 0xd0, 0xb0, 0xd0, 0xba, 0xd0, 0xb6, 0xd0, + 0xb5, 0xd1, 0x87, 0xd1, 0x82, 0xd0, 0xbe, 0xd0, 0xb1, 0xd1, 0x8b, 0xd0, 0xb1, + 0xd0, 0xbe, 0xd0, 0xbb, 0xd0, 0xb5, 0xd0, 0xb5, 0xd0, 0xbe, 0xd1, 0x87, 0xd0, + 0xb5, 0xd0,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a, 0x70, 0x67, 0x22, 0x20, + 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x31, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, + 0x64, 0x20, 0x23, 0x2e, 0x67, 0x69, 0x66, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, + 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x69, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x6f, 0x6e, 0x63, + 0x6c, 0x69, 0x63, 0x6b, 0x3d, 0x22, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6d, + 0x64, 0x61, 0x73, 0x68, 0x3b, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x6c, 0x79, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x3c, + 0x2f, 0x72, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, + 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x64, 0x65, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6d, 0x70, 0x65, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, + 0x6c, 0x64, 0x65, 0x72, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x3a, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, + 0x30, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x65, 0x76, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x3c, 0x75, 0x6c, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x73, 0x70, 0x65, 0x72, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x65, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x75, 0x72, 0x6c, 0x28, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x73, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x74, 0x6f, 0x70, 0x3a, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x6e, 0x6f, + 0x2d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x50, 0x47, 0x7c, 0x74, 0x68, 0x75, + 0x6d, 0x62, 0x7c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x65, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x3c, 0x6c, 0x69, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, 0x75, 0x6e, 0x64, 0x72, + 0x65, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x0a, 0x48, 0x6f, 0x77, 0x65, 0x76, + 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x3a, 0x62, 0x6f, 0x74, 0x68, 0x3b, + 0x63, 0x6f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x77, 0x69, + 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x3d, 0x22, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x4e, 0x65, 0x77, 0x20, 0x5a, 0x65, 0x61, 0x6c, + 0x61, 0x6e, 0x64, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x79, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x26, 0x6c, 0x74, + 0x3b, 0x73, 0x75, 0x70, 0x26, 0x67, 0x74, 0x3b, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x73, 0x79, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, + 0x61, 0x6e, 0x64, 0x73, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x6d, 0x61, 0x78, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3d, 0x22, + 0x73, 0x77, 0x69, 0x74, 0x7a, 0x65, 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x44, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x73, 0x73, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x0a, 0x0a, 0x41, 0x6c, 0x74, 0x68, + 0x6f, 0x75, 0x67, 0x68, 0x20, 0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, + 0x65, 0x61, 0x3e, 0x74, 0x68, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x69, 0x72, + 0x64, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x26, + 0x61, 0x6d, 0x70, 0x3b, 0x6e, 0x64, 0x61, 0x73, 0x68, 0x3b, 0x73, 0x70, 0x65, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x6c, 0x65, 0x67, 0x69, 0x73, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, + 0x63, 0x73, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, + 0x69, 0x6c, 0x6c, 0x75, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x65, 0x72, 0x72, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x64, 0x36, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, + 0x22, 0x73, 0x61, 0x6e, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x69, 0x66, 0x3b, 0x63, + 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x73, + 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, + 0x20, 0x66, 0x6f, 0x72, 0x69, 0x74, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, + 0x62, 0x65, 0x41, 0x66, 0x67, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x77, 0x61, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x61, + 0x74, 0x68, 0x2e, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x28, 0x73, 0x75, 0x72, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x6c, + 0x73, 0x6f, 0x20, 0x62, 0x65, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x65, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x64, 0x3c, + 0x68, 0x32, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x6f, 0x72, + 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x20, 0x68, 0x61, + 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x69, 0x6e, 0x76, 0x61, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x28, 0x29, 0x66, 0x75, 0x6e, 0x64, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, + 0x44, 0x65, 0x73, 0x70, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x22, 0x3e, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x69, 0x6e, 0x73, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x3c, + 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x20, 0x3d, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, + 0x2f, 0x2f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x2e, 0x73, + 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x65, 0x61, 0x63, 0x68, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x64, + 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, + 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x6f, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x20, + 0x45, 0x61, 0x73, 0x74, 0x3c, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x3c, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, + 0x70, 0x65, 0x72, 0x68, 0x61, 0x70, 0x73, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, + 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x20, 0x44, + 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x66, 0x61, 0x6d, + 0x6f, 0x75, 0x73, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x73, 0x6f, 0x76, 0x65, 0x72, + 0x65, 0x69, 0x67, 0x6e, 0x74, 0x79, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x22, 0x3e, 0x0a, 0x3c, 0x74, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x20, 0x74, 0x6f, 0x64, 0x6f, + 0x63, 0x74, 0x72, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x6f, 0x63, 0x63, 0x75, + 0x70, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x6e, 0x61, 0x69, 0x73, 0x73, 0x61, + 0x6e, 0x63, 0x65, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, + 0x66, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x65, + 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x63, + 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x72, 0x65, 0x64, 0x65, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, + 0x63, 0x3d, 0x22, 0x2f, 0x3c, 0x68, 0x31, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x6d, 0x61, 0x79, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x3c, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x65, 0x74, 0x3e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x76, 0x65, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x6f, 0x6e, 0x73, + 0x20, 0x6f, 0x66, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x65, + 0x20, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x61, 0x67, 0x72, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x72, 0x65, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x73, + 0x74, 0x6f, 0x77, 0x61, 0x72, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x4d, 0x6f, + 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x6e, 0x79, + 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x28, 0x65, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x3c, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x3d, 0x22, 0x3b, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x31, 0x30, 0x30, + 0x25, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x3c, + 0x68, 0x33, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x20, 0x6f, 0x6e, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x3d, 0x22, 0x29, 0x2e, 0x61, 0x64, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x64, 0x61, 0x75, 0x67, 0x68, 0x74, 0x65, 0x72, 0x20, 0x6f, 0x66, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x0d, 0x0a, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, + 0x72, 0x67, 0x65, 0x73, 0x74, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x20, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x3c, 0x68, 0x65, 0x61, + 0x64, 0x3e, 0x0a, 0x3c, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, + 0x22, 0x31, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x3b, + 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x69, 0x6d, 0x70, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, + 0x20, 0x73, 0x65, 0x65, 0x6e, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, + 0x73, 0x20, 0x61, 0x64, 0x65, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x68, 0x65, + 0x20, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x77, 0x61, 0x73, 0x20, 0x77, + 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x21, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x6e, 0x74, 0x3b, 0x70, 0x78, 0x3b, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x2d, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, + 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x64, 0x75, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6d, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x3c, 0x68, 0x34, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x67, 0x6f, 0x76, + 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, 0x4e, 0x6f, 0x76, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x65, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x61, 0x63, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x73, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7b, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, + 0x7a, 0x65, 0x3a, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x65, 0x64, 0x20, 0x69, + 0x6e, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x67, 0x61, 0x74, 0x65, 0x65, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x6d, 0x6f, 0x73, + 0x74, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, 0x77, 0x69, 0x64, 0x65, 0x6c, + 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x49, 0x74, + 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x69, 0x74, 0x20, 0x64, + 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x72, 0x79, 0x20, 0x74, 0x6f, 0x69, 0x6e, 0x68, 0x61, 0x62, 0x69, 0x74, 0x61, + 0x6e, 0x74, 0x73, 0x69, 0x6d, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x63, 0x68, 0x6f, 0x6c, 0x61, 0x72, 0x73, 0x68, 0x69, 0x70, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x20, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, + 0x6d, 0x6f, 0x72, 0x65, 0x70, 0x78, 0x3b, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, + 0x6e, 0x67, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x61, 0x20, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x61, 0x72, + 0x65, 0x20, 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x72, 0x6f, 0x6c, 0x65, + 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x6c, 0x79, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x73, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, + 0x66, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x3d, 0x22, 0x68, 0x69, 0x67, 0x68, 0x20, 0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x63, 0x6f, + 0x6d, 0x66, 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x64, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x72, 0x65, 0x65, 0x20, + 0x79, 0x65, 0x61, 0x72, 0x73, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x69, 0x6e, 0x20, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, + 0x79, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x3c, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x69, 0x6e, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, + 0x6f, 0x66, 0x61, 0x70, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x53, 0x4f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, 0x31, 0x22, 0x77, 0x61, + 0x73, 0x20, 0x62, 0x6f, 0x72, 0x6e, 0x20, 0x69, 0x6e, 0x68, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, + 0x65, 0x64, 0x20, 0x61, 0x73, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x69, 0x73, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, + 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x3a, + 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x69, 0x67, + 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x63, 0x65, 0x6c, 0x65, 0x62, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x64, 0x2f, 0x6a, 0x73, 0x2f, 0x6a, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x69, 0x73, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, + 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x74, + 0x61, 0x62, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3d, 0x22, 0x69, 0x74, 0x20, 0x63, + 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x3c, 0x6e, 0x6f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x68, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x62, + 0x65, 0x65, 0x6e, 0x0d, 0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, + 0x3c, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x54, 0x68, 0x65, 0x20, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x68, 0x65, 0x20, + 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, + 0x70, 0x68, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x74, 0x6f, 0x20, 0x73, + 0x61, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x65, 0x72, 0x69, 0x6e, 0x67, 0x61, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x74, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, + 0x6f, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x62, + 0x65, 0x6c, 0x69, 0x65, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x70, 0x68, 0x6f, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x20, 0x6f, 0x66, 0x20, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, + 0x6f, 0x66, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x69, 0x6c, 0x79, + 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x74, 0x65, + 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x6c, 0x65, 0x61, 0x76, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x61, + 0x63, 0x75, 0x6c, 0x61, 0x72, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x69, 0x74, + 0x79, 0x68, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x75, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x65, 0x6d, 0x70, 0x68, 0x61, + 0x73, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x72, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x73, 0x68, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x73, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, + 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x69, 0x74, 0x20, 0x69, + 0x73, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x22, 0x3e, 0x3c, 0x2f, 0x69, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x3e, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, + 0x77, 0x73, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x6f, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x76, 0x69, 0x65, 0x77, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x73, 0x65, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x70, + 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x59, + 0x6f, 0x72, 0x6b, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, + 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x69, 0x6e, 0x63, + 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x65, 0x3b, 0x3c, 0x2f, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x5f, + 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x53, 0x6f, + 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x63, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, + 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x22, 0x3e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x68, 0x65, 0x72, 0x4d, + 0x75, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x6f, 0x66, 0x22, 0x20, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x3d, 0x22, 0x32, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, + 0x66, 0x20, 0x6d, 0x69, 0x78, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x65, 0x64, 0x75, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6f, 0x6e, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x3d, 0x22, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6f, + 0x66, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2f, + 0x44, 0x54, 0x44, 0x20, 0x58, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x20, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, + 0x65, 0x20, 0x6f, 0x66, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x77, 0x6f, 0x75, + 0x6c, 0x64, 0x64, 0x65, 0x73, 0x70, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x20, 0x6c, 0x65, + 0x67, 0x69, 0x73, 0x6c, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x69, 0x6e, 0x6e, + 0x65, 0x72, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x61, 0x6c, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x41, 0x67, 0x72, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x75, 0x72, 0x65, 0x77, 0x61, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, + 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x61, 0x63, 0x68, 0x20, 0x74, 0x6f, 0x69, + 0x6e, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x79, 0x65, 0x61, + 0x72, 0x73, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x2c, 0x73, 0x61, 0x6e, 0x73, + 0x2d, 0x73, 0x65, 0x72, 0x69, 0x66, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, + 0x63, 0x65, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x66, 0x6f, + 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0x62, 0x62, 0x72, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x65, 0x64, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, + 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x66, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, + 0x7a, 0x65, 0x3a, 0x31, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, + 0x6f, 0x66, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, + 0x68, 0x69, 0x73, 0x20, 0x62, 0x72, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x61, 0x6e, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x72, 0x79, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x20, 0x75, 0x6c, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x6c, 0x79, + 0x20, 0x69, 0x6e, 0x6e, 0x6f, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x69, + 0x74, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x63, 0x61, 0x6e, + 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x6f, 0x47, 0x4d, 0x54, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x41, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, + 0x6f, 0x66, 0x69, 0x6d, 0x67, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x2c, 0x77, 0x61, + 0x73, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x6f, 0x63, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, + 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, + 0x69, 0x73, 0x68, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x68, 0x65, 0x20, 0x77, 0x61, + 0x73, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x74, + 0x65, 0x72, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, + 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x72, 0x67, 0x75, 0x65, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x6e, 0x20, 0x41, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x61, 0x6e, 0x63, 0x6f, 0x6e, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, + 0x6f, 0x66, 0x77, 0x69, 0x64, 0x65, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x20, + 0x77, 0x65, 0x72, 0x65, 0x20, 0x6b, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x73, 0x63, + 0x72, 0x65, 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x49, 0x6e, 0x20, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x61, + 0x6e, 0x74, 0x73, 0x61, 0x72, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x6c, 0x65, 0x67, 0x69, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x61, + 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x6d, 0x6f, 0x73, 0x74, 0x20, + 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x79, 0x65, 0x61, 0x72, 0x73, 0x20, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, + 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x61, 0x72, 0x67, 0x75, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x68, 0x6f, 0x77, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x70, 0x72, 0x65, 0x64, 0x6f, 0x6d, 0x69, 0x6e, + 0x61, 0x6e, 0x74, 0x74, 0x68, 0x65, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, + 0x6c, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x63, + 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x2d, 0x6c, 0x69, 0x76, 0x65, 0x64, 0x3c, 0x2f, 0x73, 0x70, 0x61, + 0x6e, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, + 0x75, 0x73, 0x65, 0x64, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x69, 0x74, 0x74, + 0x6c, 0x65, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x68, 0x61, 0x64, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x63, 0x6f, 0x6d, 0x6d, + 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x65, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x2c, 0x3c, 0x2f, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x22, + 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x33, 0x49, 0x6e, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x70, 0x6f, 0x70, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x2d, 0x73, + 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x20, 0x41, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, + 0x68, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x64, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x6f, + 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x77, 0x6f, 0x20, 0x6f, 0x72, + 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x73, 0x75, 0x62, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x3c, 0x2f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x62, 0x65, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x6f, 0x66, + 0x69, 0x6e, 0x20, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x73, 0x69, + 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x6e, 0x73, 0x75, + 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x20, 0x61, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x73, 0x73, 0x69, + 0x70, 0x70, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x6c, + 0x79, 0x6f, 0x75, 0x74, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, + 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x77, 0x68, 0x61, + 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x73, 0x69, 0x74, 0x75, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x22, 0x54, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x61, 0x74, 0x6d, 0x6f, + 0x73, 0x70, 0x68, 0x65, 0x72, 0x69, 0x63, 0x69, 0x64, 0x65, 0x6f, 0x6c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x73, 0x65, 0x73, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x6d, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x70, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x2e, 0x70, 0x68, 0x70, 0x3f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x65, + 0x64, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x65, 0x64, 0x48, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, + 0x77, 0x61, 0x73, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x20, 0x66, + 0x61, 0x76, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x4d, 0x69, 0x6e, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x20, 0x6f, 0x66, 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x3c, + 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x54, 0x68, 0x69, + 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x20, + 0x69, 0x6e, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6d, 0x61, + 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x65, 0x6d, + 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x50, 0x61, 0x6c, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x69, 0x61, 0x6e, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x69, 0x74, 0x20, 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x6d, + 0x6f, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x74, 0x6f, 0x20, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x62, 0x75, 0x74, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x76, 0x65, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x69, + 0x6c, 0x79, 0x49, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2c, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x73, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x75, 0x62, 0x64, + 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, + 0x79, 0x77, 0x61, 0x73, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x6c, 0x79, 0x6f, + 0x75, 0x74, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x74, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, + 0x77, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, + 0x6f, 0x67, 0x3d, 0x22, 0x3e, 0x3c, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, + 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x6d, 0x61, 0x6e, 0x75, + 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, + 0x62, 0x65, 0x69, 0x6e, 0x67, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x66, 0x69, 0x78, + 0x22, 0x3e, 0x0a, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, + 0x66, 0x77, 0x61, 0x73, 0x20, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x74, + 0x6f, 0x20, 0x62, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x61, 0x62, 0x65, 0x63, + 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, + 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x69, 0x6e, 0x73, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, + 0x6c, 0x20, 0x61, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x61, 0x6d, + 0x6f, 0x6e, 0x67, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x20, 0x6f, + 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, + 0x31, 0x30, 0x30, 0x25, 0x3b, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x2c, 0x77, 0x61, 0x73, 0x20, 0x61, 0x64, 0x6f, 0x70, 0x74, 0x65, + 0x64, 0x74, 0x6f, 0x20, 0x6b, 0x65, 0x65, 0x70, 0x20, 0x74, 0x68, 0x65, 0x73, + 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x6c, 0x69, 0x76, + 0x65, 0x20, 0x62, 0x69, 0x72, 0x74, 0x68, 0x73, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x63, 0x75, 0x74, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x3b, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x61, 0x6c, + 0x69, 0x67, 0x6e, 0x3d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x74, 0x68, 0x65, 0x20, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x20, 0x74, 0x6f, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x42, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x71, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x61, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x20, 0x6f, 0x66, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x22, 0x20, + 0x2f, 0x3e, 0x69, 0x73, 0x20, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x0d, 0x0a, + 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x6c, 0x79, 0x2c, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3d, 0x22, 0x31, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x6c, + 0x79, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x74, 0x68, 0x65, + 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x63, 0x69, 0x74, 0x69, 0x7a, + 0x65, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, + 0x69, 0x61, 0x6e, 0x73, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, + 0x68, 0x65, 0x61, 0x73, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x20, 0x61, 0x73, + 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x3c, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x6f, 0x6e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, + 0x6f, 0x77, 0x6e, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, + 0x73, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x77, 0x61, 0x73, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x61, 0x63, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x64, 0x61, 0x74, 0x65, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x20, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, + 0x74, 0x65, 0x74, 0x68, 0x65, 0x20, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, + 0x64, 0x65, 0x6c, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x22, 0x3e, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x74, 0x68, 0x65, 0x20, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x79, 0x20, 0x61, 0x72, 0x65, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x6c, 0x79, 0x61, 0x20, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x6f, + 0x66, 0x0d, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x0d, + 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x66, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x6d, 0x61, 0x6a, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x69, 0x6d, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x61, 0x77, + 0x61, 0x72, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x65, 0x72, 0x22, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, + 0x65, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x20, 0x6f, 0x66, 0x74, + 0x68, 0x65, 0x69, 0x72, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x44, 0x75, 0x72, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x20, 0x6f, 0x66, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, + 0x29, 0x7b, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x20, + 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x2f, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, + 0x65, 0x6e, 0x74, 0x77, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x65, + 0x64, 0x65, 0x71, 0x75, 0x69, 0x6c, 0x69, 0x62, 0x72, 0x69, 0x75, 0x6d, 0x61, + 0x73, 0x73, 0x75, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x73, 0x20, + 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x62, 0x79, 0x6e, 0x65, 0x65, 0x64, 0x73, + 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x72, 0x69, 0x6f, + 0x75, 0x73, 0x61, 0x72, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, + 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x69, 0x73, 0x20, 0x61, + 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x65, 0x64, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x2d, 0x64, 0x61, 0x79, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x74, + 0x68, 0x65, 0x62, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, + 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x69, 0x73, 0x20, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x74, + 0x68, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x6d, 0x61, 0x64, + 0x65, 0x77, 0x61, 0x73, 0x20, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x62, 0x75, 0x74, + 0x20, 0x64, 0x69, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x4d, 0x6f, 0x75, + 0x73, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x61, 0x73, 0x20, 0x70, 0x6f, 0x73, 0x73, + 0x69, 0x62, 0x6c, 0x65, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x6f, 0x6d, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x66, 0x6f, 0x72, 0x20, + 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x61, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x20, 0x6f, 0x66, 0x61, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, + 0x6f, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x74, 0x73, + 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x6d, 0x75, 0x63, + 0x68, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x0a, 0x09, 0x3c, 0x2f, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x61, 0x64, 0x6f, 0x70, 0x74, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x65, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, + 0x6f, 0x66, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x77, 0x61, + 0x73, 0x20, 0x62, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x6d, 0x61, 0x6e, 0x75, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x73, 0x77, 0x61, 0x72, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, 0x62, + 0x79, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x61, 0x6e, 0x64, + 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x73, 0x69, 0x6d, 0x69, 0x6c, + 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x65, + 0x74, 0x61, 0x72, 0x79, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x70, 0x72, 0x65, 0x73, 0x74, 0x69, 0x67, 0x69, 0x6f, 0x75, 0x73, + 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x6f, 0x20, 0x6d, + 0x61, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x49, 0x74, 0x20, 0x77, 0x61, 0x73, + 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, + 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x6f, 0x72, + 0x73, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x2e, 0x53, 0x2e, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x62, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x74, 0x20, 0x74, 0x68, 0x65, 0x63, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x6c, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, + 0x69, 0x6e, 0x20, 0x68, 0x6f, 0x6e, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x72, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x72, 0x65, 0x73, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6f, + 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x6f, 0x31, 0x73, 0x74, 0x20, 0x45, 0x61, 0x72, 0x6c, 0x20, 0x6f, 0x66, 0x63, + 0x75, 0x6c, 0x74, 0x75, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x6c, 0x79, 0x3c, 0x2f, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x3e, 0x0a, 0x20, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x63, 0x61, + 0x6e, 0x20, 0x62, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x74, 0x6f, 0x20, 0x74, + 0x68, 0x65, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x69, 0x73, + 0x65, 0x78, 0x70, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x61, 0x72, + 0x65, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x64, 0x64, 0x46, 0x61, 0x76, + 0x6f, 0x72, 0x69, 0x74, 0x65, 0x63, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x70, 0x61, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, + 0x6e, 0x20, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x74, 0x6f, 0x20, + 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x26, 0x61, 0x6d, 0x70, 0x3b, + 0x6d, 0x69, 0x6e, 0x75, 0x73, 0x3b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, + 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x66, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x6c, 0x61, 0x79, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, + 0x30, 0x22, 0x20, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x73, 0x20, 0x62, 0x6f, 0x6f, + 0x6b, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x66, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x68, 0x65, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, + 0x2f, 0x74, 0x64, 0x3e, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, + 0x73, 0x74, 0x74, 0x68, 0x65, 0x20, 0x69, 0x64, 0x65, 0x61, 0x20, 0x6f, 0x66, + 0x61, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x77, 0x65, + 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x22, 0x62, 0x74, 0x6e, 0x64, 0x61, 0x79, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x20, 0x69, 0x6e, 0x73, 0x68, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x69, + 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x74, 0x75, 0x72, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x68, + 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x4c, 0x6f, 0x72, 0x64, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, + 0x6c, 0x79, 0x68, 0x61, 0x73, 0x20, 0x69, 0x74, 0x73, 0x20, 0x6f, 0x77, 0x6e, + 0x45, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x73, 0x6f, 0x6d, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x2c, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x20, 0x6f, 0x66, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, + 0x65, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x61, 0x72, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x62, 0x6c, 0x61, 0x63, 0x6b, + 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6d, 0x61, 0x79, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, + 0x27, 0x73, 0x63, 0x61, 0x6e, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x74, 0x6f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x67, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x65, 0x64, + 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x2c, 0x74, + 0x68, 0x65, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x63, 0x69, 0x74, + 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x3e, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0d, 0x0a, 0x09, 0x09, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x6f, 0x72, 0x65, + 0x72, 0x61, 0x64, 0x69, 0x6f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x72, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x77, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e, 0x79, 0x68, 0x69, 0x73, 0x20, 0x66, 0x61, + 0x74, 0x68, 0x65, 0x72, 0x2c, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x6f, + 0x75, 0x6c, 0x64, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x61, + 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x69, 0x74, 0x75, 0x74, 0x65, 0x73, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x65, 0x72, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, + 0x69, 0x3e, 0x6f, 0x66, 0x20, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x66, 0x65, + 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x65, 0x64, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x64, 0x74, 0x68, 0x70, 0x72, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x4c, 0x65, 0x67, 0x69, 0x73, 0x6c, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x74, 0x6c, 0x79, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x69, + 0x6e, 0x68, 0x61, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x66, + 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x66, 0x6f, 0x75, 0x6e, 0x64, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, + 0x6f, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, + 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x77, 0x68, 0x65, 0x72, + 0x65, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x74, 0x68, 0x65, 0x6d, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, + 0x2c, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x68, 0x65, 0x74, + 0x68, 0x61, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x74, 0x72, 0x61, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x72, 0x6f, 0x6c, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x77, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x53, 0x6f, + 0x6d, 0x65, 0x20, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x73, 0x69, 0x64, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x65, 0x77, 0x73, 0x6c, 0x65, 0x74, 0x74, + 0x65, 0x72, 0x73, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, + 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x61, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x6c, 0x69, 0x76, + 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x61, 0x74, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x69, + 0x65, 0x73, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, + 0x67, 0x68, 0x20, 0x69, 0x74, 0x77, 0x61, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, + 0x20, 0x6f, 0x66, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x72, 0x69, 0x6f, 0x75, + 0x73, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x74, + 0x68, 0x65, 0x20, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x3e, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x74, 0x68, 0x65, 0x20, 0x65, 0x63, 0x6f, + 0x6e, 0x6f, 0x6d, 0x79, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, + 0x73, 0x74, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x77, 0x69, 0x64, 0x65, 0x6c, 0x79, + 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6e, + 0x64, 0x20, 0x70, 0x65, 0x72, 0x68, 0x61, 0x70, 0x73, 0x72, 0x69, 0x73, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x73, + 0x20, 0x77, 0x68, 0x65, 0x6e, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x68, 0x65, 0x20, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x74, + 0x68, 0x65, 0x6f, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x73, 0x20, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x74, 0x68, 0x65, 0x20, 0x63, + 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x68, 0x65, 0x73, 0x65, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x6d, 0x61, + 0x6e, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x69, 0x73, 0x61, 0x72, 0x65, 0x61, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x74, 0x68, 0x65, 0x20, 0x57, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x54, + 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x63, 0x6f, 0x6c, 0x73, 0x70, 0x61, 0x6e, + 0x3d, 0x32, 0x20, 0x7c, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, + 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x63, 0x72, + 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x61, 0x20, 0x43, 0x68, 0x72, 0x69, + 0x73, 0x74, 0x69, 0x61, 0x6e, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x74, 0x6f, 0x69, 0x73, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x54, + 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x6d, 0x65, 0x72, + 0x63, 0x68, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x65, 0x66, 0x6f, 0x72, 0x20, 0x6d, + 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x6e, 0x6f, 0x20, 0x65, 0x76, 0x69, 0x64, + 0x65, 0x6e, 0x63, 0x65, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, + 0x6f, 0x66, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e, + 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x63, 0x6f, + 0x6d, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, + 0x74, 0x68, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x2c, 0x69, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x74, + 0x68, 0x65, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x74, 0x68, 0x65, + 0x20, 0x61, 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x62, 0x6c, + 0x65, 0x6d, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x61, 0x20, 0x66, 0x65, 0x77, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x6d, 0x75, + 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, + 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6f, 0x66, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, + 0x72, 0x6e, 0x69, 0x61, 0x2c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x61, + 0x73, 0x20, 0x61, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x09, 0x09, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x69, 0x74, 0x22, 0x20, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x20, 0x6f, 0x66, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x61, + 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x69, 0x6e, + 0x69, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x65, 0x78, + 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x64, 0x69, 0x76, 0x3e, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x09, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, + 0x2f, 0x77, 0x61, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x63, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x77, 0x61, 0x73, 0x20, 0x73, + 0x65, 0x65, 0x6e, 0x20, 0x61, 0x73, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, + 0x6f, 0x66, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x73, 0x74, 0x65, 0x61, + 0x63, 0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x65, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x73, + 0x20, 0x6f, 0x66, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x77, 0x61, 0x73, 0x20, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x61, + 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x61, 0x75, 0x6e, 0x63, + 0x68, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x65, + 0x73, 0x74, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x61, 0x6e, 0x64, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x62, 0x65, + 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, 0x77, 0x6f, 0x69, 0x73, 0x20, 0x61, + 0x6c, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, + 0x68, 0x20, 0x61, 0x6e, 0x64, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2c, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x61, + 0x73, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x74, + 0x68, 0x65, 0x6d, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x2e, 0x71, 0x75, 0x61, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, + 0x65, 0x20, 0x61, 0x73, 0x74, 0x6f, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x54, 0x68, + 0x69, 0x73, 0x20, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x61, 0x20, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x73, 0x74, 0x20, 0x74, 0x6f, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x4f, 0x66, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x68, 0x69, + 0x73, 0x69, 0x73, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x74, + 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x20, 0x69, 0x73, 0x69, 0x73, 0x20, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x67, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, + 0x2f, 0x6c, 0x69, 0x3e, 0x54, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x74, 0x65, 0x20, 0x6f, 0x66, + 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2c, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x57, 0x65, 0x73, 0x74, 0x74, 0x68, 0x65, 0x79, 0x20, 0x73, + 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x73, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0xc4, 0x8d, + 0x69, 0x6e, 0x61, 0x63, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x69, 0x6f, + 0x73, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x64, 0x61, 0x64, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x63, 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x64, 0x61, 0x64, 0x65, 0x73, 0x65, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x74, 0x65, 0x63, 0x6e, 0x6f, 0x6c, 0x6f, + 0x67, 0xc3, 0xad, 0x61, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x63, 0x69, 0xc3, + 0xb3, 0x6e, 0x70, 0x75, 0x6e, 0x74, 0x75, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, + 0x61, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x73, 0x65, 0xc3, 0xb1, 0x61, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0xc3, 0xad, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x72, 0x73, 0x65, 0x70, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x61, 0x6d, 0x69, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x65, 0x67, 0xc3, 0xad, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x61, 0x72, 0xc3, 0xad, 0x61, 0x70, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x65, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, + 0x6e, 0x74, 0x65, 0x73, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, + 0x69, 0x61, 0x70, 0x6f, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x64, 0x61, 0x64, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x61, 0x6e, 0x74, 0x65, 0x63, 0x72, + 0x65, 0x63, 0x69, 0x6d, 0x69, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x65, 0x63, 0x65, + 0x73, 0x69, 0x64, 0x61, 0x64, 0x65, 0x73, 0x73, 0x75, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x69, 0x72, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x63, 0x69, + 0xc3, 0xb3, 0x6e, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x6e, 0x69, 0x62, 0x6c, 0x65, + 0x73, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x65, + 0x73, 0x74, 0x75, 0x64, 0x69, 0x61, 0x6e, 0x74, 0x65, 0x73, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x75, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x67, 0x75, 0x61, 0x64, 0x61, 0x6c, 0x61, + 0x6a, 0x61, 0x72, 0x61, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x64, + 0x6f, 0x73, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x69, 0x64, 0x61, 0x64, + 0x63, 0x6f, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, 0x6c, 0x65, 0x73, 0x66, 0x6f, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x66, 0xc3, 0xad, 0x61, 0x61, 0x75, 0x74, 0x6f, + 0x72, 0x69, 0x64, 0x61, 0x64, 0x65, 0x73, 0x69, 0x6e, 0x67, 0x65, 0x6e, 0x69, + 0x65, 0x72, 0xc3, 0xad, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x76, 0x69, 0x73, 0x69, + 0xc3, 0xb3, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x65, 0x6e, 0x63, 0x69, + 0x61, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x63, 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x65, + 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x63, 0x69, 0x64, 0x6f, 0x73, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x61, 0x63, 0x74, 0x75, 0x61, + 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x76, 0x65, 0x67, 0x61, 0x63, + 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x64, + 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x3a, + 0x22, 0x20, 0x3a, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6c, 0x69, + 0x6e, 0x6b, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x2f, 0x2f, 0x3c, 0x21, + 0x5b, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b, 0x0a, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x3a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x3c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x3d, + 0x22, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x3c, 0x2f, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x20, 0x21, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x3b, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x22, 0x69, 0x6e, 0x74, 0x65, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x75, 0x61, 0x6c, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x31, + 0x38, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, 0x61, 0x6e, + 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x73, + 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0x62, 0x62, 0x72, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x69, 0x6d, 0x67, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x39, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x79, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x32, 0x30, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x79, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3e, + 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x79, 0x2f, + 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x75, 0x6e, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x27, 0x29, 0x46, 0x75, 0x72, 0x74, + 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x72, 0x65, 0x2c, 0x62, 0x65, 0x6c, 0x69, 0x65, + 0x76, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x48, + 0x54, 0x4d, 0x4c, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x6c, 0x79, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x6f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x65, 0x61, 0x64, 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, + 0x73, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, + 0x75, 0x6e, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x50, + 0x65, 0x6e, 0x6e, 0x73, 0x79, 0x6c, 0x76, 0x61, 0x6e, 0x69, 0x61, 0x41, 0x73, + 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c, 0x3c, 0x68, 0x74, + 0x6d, 0x6c, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, 0x26, 0x6c, 0x74, 0x3b, + 0x2f, 0x73, 0x75, 0x70, 0x26, 0x67, 0x74, 0x3b, 0x64, 0x65, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x70, 0x68, 0x69, 0x6c, 0x61, 0x64, + 0x65, 0x6c, 0x70, 0x68, 0x69, 0x61, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x29, 0x3b, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3e, 0x0a, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x74, + 0x6f, 0x70, 0x3a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x67, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x65, 0x73, 0x70, + 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3d, 0x66, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6c, 0x2e, 0x64, 0x74, + 0x64, 0x22, 0x3e, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x67, 0x65, 0x6f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x61, 0x67, 0x72, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x75, + 0x72, 0x61, 0x6c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x20, 0x31, + 0x61, 0x20, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x45, 0x6e, + 0x63, 0x79, 0x63, 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x69, 0x61, 0x69, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x64, 0x65, 0x6d, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x61, 0x63, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x74, 0x69, 0x65, 0x73, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x73, 0x29, 0x3b, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3e, 0x3c, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x20, 0x74, 0x6f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x20, + 0x6f, 0x66, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x6c, 0x79, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x45, + 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x28, 0x55, 0x53, 0x29, 0x61, 0x70, + 0x70, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x28, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x20, 0x48, + 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6c, + 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x20, 0x74, 0x61, 0x62, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x3d, 0x22, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x3b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x77, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x72, 0x61, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x66, + 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, + 0x68, 0x65, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, + 0x65, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x65, 0x6e, 0x63, 0x79, 0x63, 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x69, 0x61, 0x3b, + 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x31, 0x6a, 0x75, + 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x74, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3e, 0x3c, 0x61, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x49, 0x6e, 0x20, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2b, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x69, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x6c, 0x6c, 0x79, 0x72, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x3d, 0x22, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x26, 0x6c, 0x74, 0x3b, 0x6d, 0x61, 0x74, 0x68, 0x26, 0x67, 0x74, 0x3b, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, + 0x63, 0x63, 0x61, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x3c, 0x69, + 0x6d, 0x67, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x6e, 0x61, 0x76, + 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x63, 0x6f, 0x6d, 0x70, + 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x6d, 0x70, + 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3d, + 0x22, 0x61, 0x6c, 0x6c, 0x22, 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x20, 0x74, 0x6f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, + 0x75, 0x65, 0x3b, 0x53, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2f, 0x2f, 0x45, 0x4e, + 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x69, 0x65, 0x73, 0x43, 0x68, 0x61, + 0x6d, 0x70, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x3c, 0x21, 0x5b, 0x65, 0x6e, + 0x64, 0x69, 0x66, 0x5d, 0x2d, 0x2d, 0x3e, 0x7d, 0x0a, 0x3c, 0x2f, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x69, + 0x61, 0x6e, 0x69, 0x74, 0x79, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2c, 0x50, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x77, 0x61, 0x73, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, + 0x28, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x28, 0x75, 0x6e, + 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x74, 0x68, 0x65, + 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x2f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x47, + 0x75, 0x69, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x76, + 0x65, 0x72, 0x77, 0x68, 0x65, 0x6c, 0x6d, 0x69, 0x6e, 0x67, 0x61, 0x67, 0x61, + 0x69, 0x6e, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x63, + 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2c, 0x0a, 0x2e, 0x6e, 0x6f, + 0x6e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x20, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x66, 0x20, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x20, 0x31, + 0x70, 0x78, 0x20, 0x7b, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, + 0x3a, 0x31, 0x74, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, + 0x66, 0x30, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x69, + 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x61, 0x63, 0x68, 0x69, + 0x65, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x73, 0x74, 0x61, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x74, 0x68, + 0x65, 0x6c, 0x65, 0x73, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x6e, 0x63, 0x65, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, 0x74, + 0x64, 0x3e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3e, + 0x0a, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x61, + 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x73, 0x72, + 0x63, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6e, 0x61, 0x76, + 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x68, 0x61, 0x6c, 0x66, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x20, 0x6f, 0x66, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x20, 0x6f, 0x66, 0x66, 0x75, 0x6e, 0x64, 0x61, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x72, 0x6f, 0x70, 0x6f, 0x6c, 0x69, 0x74, + 0x61, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x3a, 0x6c, 0x61, 0x6e, 0x67, 0x3d, 0x22, + 0x64, 0x65, 0x6c, 0x69, 0x62, 0x65, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x61, + 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x76, + 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6d, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x65, 0x67, 0x69, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x4a, 0x65, 0x73, 0x75, 0x73, 0x20, + 0x43, 0x68, 0x72, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x64, 0x69, 0x73, 0x61, 0x67, 0x72, 0x65, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, + 0x6e, 0x3a, 0x72, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x28, 0x29, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, + 0x69, 0x73, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x73, + 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x61, 0x6e, 0x79, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x77, 0x3a, + 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x3b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, + 0x65, 0x20, 0x6f, 0x66, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x09, 0x3c, 0x75, 0x6c, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x68, 0x6f, 0x6f, 0x64, 0x61, + 0x72, 0x6d, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x73, 0x72, 0x65, + 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x4e, 0x6f, 0x6e, 0x65, + 0x74, 0x68, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x2c, 0x74, 0x65, 0x6d, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x0a, 0x09, 0x09, 0x3c, 0x61, 0x20, + 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x69, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x28, 0x73, 0x65, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, + 0x29, 0x2e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x70, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x69, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x74, + 0x68, 0x65, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x09, 0x09, + 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x09, 0x09, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x61, 0x63, 0x63, 0x65, + 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x61, 0x6c, 0x6c, 0x20, 0x6f, + 0x66, 0x20, 0x46, 0x61, 0x6d, 0x65, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, 0x78, + 0x74, 0x2f, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x20, 0x79, 0x65, 0x61, 0x72, + 0x73, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, + 0x76, 0x65, 0x72, 0x79, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x7b, + 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x74, 0x72, + 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x6d, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x65, 0x78, 0x70, 0x6c, 0x6f, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x20, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x20, 0x6f, 0x66, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x6e, 0x74, 0x20, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x64, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x3e, 0x3c, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, + 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x62, + 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x6e, 0x65, 0x69, + 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x77, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x09, 0x3c, 0x6c, 0x69, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x53, 0x6f, 0x76, 0x69, 0x65, 0x74, 0x20, 0x55, + 0x6e, 0x69, 0x6f, 0x6e, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x64, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x20, + 0x62, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, + 0x65, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, + 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, + 0x20, 0x66, 0x61, 0x63, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x6c, 0x69, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x61, 0x69, 0x6d, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x75, 0x69, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x63, 0x68, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x42, 0x75, 0x62, + 0x62, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, + 0x72, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, + 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x69, 0x6e, + 0x20, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x74, + 0x65, 0x6c, 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x72, 0x63, 0x3d, + 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x78, 0x3b, 0x20, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x72, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x20, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x61, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x68, + 0x75, 0x6d, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x73, 0x6e, 0x61, + 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x65, + 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x61, 0x72, 0x65, 0x20, + 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x73, 0x6d, 0x61, 0x6c, 0x6c, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x61, 0x20, 0x70, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x6f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x61, 0x72, 0x67, 0x75, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x6e, 0x6f, 0x77, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x20, 0x61, 0x73, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x61, 0x72, + 0x6c, 0x79, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, + 0x53, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x61, 0x76, 0x69, 0x61, 0x6e, 0x3c, + 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x63, 0x6f, + 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x20, + 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x74, 0x68, 0x65, 0x20, + 0x4e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x3c, 0x64, 0x69, 0x76, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x6f, 0x75, + 0x73, 0x20, 0x74, 0x6f, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, + 0x3e, 0x0a, 0x77, 0x61, 0x73, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, + 0x6e, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x61, + 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x74, + 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x22, 0x20, 0x77, 0x61, + 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x64, 0x6e, 0x6f, 0x20, + 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x72, 0x65, 0x73, 0x70, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x3e, 0x0d, 0x0a, 0x3c, 0x68, 0x65, + 0x61, 0x64, 0x3e, 0x0d, 0x0a, 0x3c, 0x77, 0x65, 0x72, 0x65, 0x20, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x6c, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, + 0x68, 0x65, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6d, 0x70, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x78, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x6c, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, + 0x20, 0x69, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x6e, + 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x68, 0x6f, 0x77, + 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x79, + 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x72, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, + 0x69, 0x73, 0x6d, 0x20, 0x6f, 0x66, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x6c, 0x79, + 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x73, 0x20, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x6c, 0x65, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, + 0x29, 0x7b, 0x49, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, + 0x65, 0x61, 0x6e, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x63, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x64, + 0x69, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x72, + 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x62, 0x65, 0x74, + 0x74, 0x65, 0x72, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x61, 0x72, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x69, 0x6e, 0x66, 0x6c, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x70, 0x61, 0x73, 0x73, 0x20, 0x74, 0x68, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x78, 0x6d, 0x6c, 0x22, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x3d, 0x22, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x62, 0x6f, 0x6c, 0x64, + 0x3b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x69, + 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6c, + 0x64, 0x20, 0x57, 0x61, 0x72, 0x20, 0x49, 0x49, 0x74, 0x65, 0x73, 0x74, 0x69, + 0x6d, 0x6f, 0x6e, 0x69, 0x61, 0x6c, 0x73, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x79, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x20, + 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x73, 0x73, 0x22, 0x20, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x3d, 0x22, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x20, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x20, 0x62, 0x65, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x77, 0x61, 0x73, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, + 0x73, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, + 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x69, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x66, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x75, 0x70, + 0x6c, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, + 0x65, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x20, 0x62, 0x65, 0x63, + 0x61, 0x6d, 0x65, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, + 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x3e, + 0x3c, 0x6c, 0x69, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x65, 0x76, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x65, 0x78, 0x70, + 0x6c, 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x61, + 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x61, 0x20, 0x77, 0x69, 0x64, 0x65, 0x20, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6f, 0x6e, 0x20, 0x62, 0x65, 0x68, 0x61, 0x6c, 0x66, 0x20, + 0x6f, 0x66, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, + 0x22, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x66, + 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2c, 0x3c, + 0x2f, 0x6e, 0x6f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x73, 0x61, + 0x69, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x77, 0x68, 0x69, 0x6c, + 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x68, 0x79, 0x70, 0x6f, 0x74, + 0x68, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, + 0x6f, 0x70, 0x68, 0x65, 0x72, 0x73, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x64, 0x20, 0x69, 0x6e, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, + 0x20, 0x62, 0x79, 0x69, 0x6e, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, + 0x74, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, + 0x6e, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, + 0x68, 0x65, 0x20, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, 0x6d, 0x70, 0x6c, + 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, + 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x77, 0x61, 0x73, 0x20, 0x70, 0x72, 0x6f, + 0x62, 0x61, 0x62, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x62, 0x65, 0x74, + 0x77, 0x65, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x65, 0x49, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x20, 0x4f, 0x63, 0x65, 0x61, 0x6e, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x27, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x79, 0x65, 0x61, + 0x72, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x54, 0x68, 0x69, 0x73, + 0x20, 0x77, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x72, 0x65, + 0x6d, 0x65, 0x6c, 0x79, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, + 0x0a, 0x61, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x73, 0x70, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x3e, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x74, 0x68, 0x65, 0x20, + 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x61, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x64, 0x69, 0x64, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, + 0x65, 0x78, 0x74, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x65, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x61, 0x6e, + 0x64, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, + 0x61, 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x61, + 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, + 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x67, 0x69, 0x76, + 0x65, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x65, 0x78, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, + 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x61, 0x73, 0x69, 0x73, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, + 0x6e, 0x67, 0x3d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, + 0x6f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, + 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x61, + 0x73, 0x73, 0x61, 0x73, 0x73, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x73, 0x22, + 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x6e, 0x6f, 0x72, 0x74, + 0x68, 0x77, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6e, 0x3c, 0x2f, 0x64, 0x69, 0x76, + 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x22, 0x3e, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0d, 0x0a, 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, + 0x79, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, + 0x62, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, + 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x74, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x73, 0x75, + 0x70, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x69, 0x73, 0x20, 0x6d, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x77, 0x61, 0x73, 0x20, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x68, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x73, + 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x20, 0x61, 0x74, 0x73, 0x74, 0x75, 0x64, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, + 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x20, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x74, + 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x72, 0x65, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x61, 0x6e, 0x64, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x64, 0x65, 0x66, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x72, + 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, + 0x79, 0x20, 0x61, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, + 0x72, 0x20, 0x6f, 0x66, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x79, 0x65, 0x61, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, + 0x67, 0x65, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x75, 0x64, 0x79, 0x20, 0x6f, + 0x66, 0x3c, 0x75, 0x6c, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x77, + 0x68, 0x65, 0x72, 0x65, 0x20, 0x68, 0x65, 0x20, 0x77, 0x61, 0x73, 0x3c, 0x6c, + 0x69, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x66, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x68, 0x65, 0x20, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3a, 0x74, 0x65, 0x72, 0x72, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, + 0x6f, 0x66, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x3e, 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x20, 0x45, 0x6d, 0x70, 0x69, 0x72, 0x65, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x49, + 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x73, 0x74, 0x2c, 0x68, 0x6f, + 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x20, + 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x61, 0x6e, 0x64, 0x20, + 0x68, 0x69, 0x73, 0x20, 0x77, 0x69, 0x66, 0x65, 0x28, 0x61, 0x6c, 0x73, 0x6f, + 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x3e, 0x3c, 0x75, 0x6c, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x6c, 0x79, 0x20, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x20, + 0x69, 0x6e, 0x74, 0x6f, 0x73, 0x65, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x68, + 0x61, 0x76, 0x65, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6e, + 0x6f, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x49, 0x6e, + 0x20, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x62, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x63, 0x68, 0x61, 0x72, + 0x67, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x72, 0x65, 0x66, 0x6c, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x6d, 0x69, 0x6c, 0x69, 0x74, 0x61, 0x72, + 0x79, 0x20, 0x61, 0x6e, 0x64, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x63, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x61, + 0x6c, 0x6c, 0x79, 0x73, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, + 0x6e, 0x67, 0x61, 0x72, 0x65, 0x20, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, + 0x79, 0x76, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x76, 0x65, 0x72, + 0x28, 0x29, 0x3b, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x6e, 0x20, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6e, 0x6f, 0x72, 0x74, 0x68, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x77, 0x61, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, + 0x77, 0x69, 0x73, 0x65, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, + 0x20, 0x6f, 0x66, 0x68, 0x61, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, + 0x65, 0x6e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x64, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x74, 0x68, 0x65, 0x20, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x61, 0x72, 0x65, 0x20, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x20, 0x6f, 0x66, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, + 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x66, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x64, + 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x61, 0x72, + 0x65, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x63, 0x6f, 0x72, + 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x77, 0x61, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x6e, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x70, + 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x74, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x6f, + 0x72, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x20, 0x6f, 0x66, + 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x79, 0x73, + 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x69, 0x7a, 0x65, 0x64, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x77, 0x61, 0x73, + 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, 0x73, 0x75, 0x6d, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x72, 0x65, 0x61, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x69, + 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x73, 0x69, + 0x73, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, + 0x6e, 0x73, 0x65, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x66, + 0x6f, 0x72, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x74, 0x77, 0x6f, + 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x63, + 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x61, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x61, 0x70, 0x70, + 0x65, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x31, 0x2f, 0x5e, 0x5c, 0x73, 0x2b, + 0x7c, 0x5c, 0x73, 0x2b, 0x24, 0x2f, 0x67, 0x65, 0x29, 0x7b, 0x74, 0x68, 0x72, + 0x6f, 0x77, 0x20, 0x65, 0x7d, 0x3b, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x20, 0x6f, 0x66, 0x74, 0x77, 0x6f, 0x20, 0x73, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x20, + 0x61, 0x6e, 0x64, 0x77, 0x68, 0x6f, 0x20, 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, + 0x65, 0x6e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, + 0x66, 0x64, 0x65, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x61, 0x6c, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x09, + 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, + 0x20, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6d, 0x70, + 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x67, 0x6c, 0x69, + 0x73, 0x68, 0x20, 0x28, 0x55, 0x4b, 0x29, 0x65, 0x6e, 0x67, 0x6c, 0x69, 0x73, + 0x68, 0x20, 0x28, 0x55, 0x53, 0x29, 0xd0, 0x9c, 0xd0, 0xbe, 0xd0, 0xbd, 0xd0, + 0xb3, 0xd0, 0xbe, 0xd0, 0xbb, 0xd0, 0xa1, 0xd1, 0x80, 0xd0, 0xbf, 0xd1, 0x81, + 0xd0, 0xba, 0xd0, 0xb8, 0xd1, 0x81, 0xd1, 0x80, 0xd0, 0xbf, 0xd1, 0x81, 0xd0, + 0xba, 0xd0, 0xb8, 0xd1, 0x81, 0xd1, 0x80, 0xd0, 0xbf, 0xd1, 0x81, 0xd0, 0xba, + 0xd0, 0xbe, 0xd9, 0x84, 0xd8, 0xb9, 0xd8, 0xb1, 0xd8, 0xa8, 0xd9, 0x8a, 0xd8, + 0xa9, 0xe6, 0xad, 0xa3, 0xe9, 0xab, 0x94, 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87, + 0xe7, 0xae, 0x80, 0xe4, 0xbd, 0x93, 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87, 0xe7, + 0xb9, 0x81, 0xe4, 0xbd, 0x93, 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87, 0xe6, 0x9c, + 0x89, 0xe9, 0x99, 0x90, 0xe5, 0x85, 0xac, 0xe5, 0x8f, 0xb8, 0xe4, 0xba, 0xba, + 0xe6, 0xb0, 0x91, 0xe6, 0x94, 0xbf, 0xe5, 0xba, 0x9c, 0xe9, 0x98, 0xbf, 0xe9, + 0x87, 0x8c, 0xe5, 0xb7, 0xb4, 0xe5, 0xb7, 0xb4, 0xe7, 0xa4, 0xbe, 0xe4, 0xbc, + 0x9a, 0xe4, 0xb8, 0xbb, 0xe4, 0xb9, 0x89, 0xe6, 0x93, 0x8d, 0xe4, 0xbd, 0x9c, + 0xe7, 0xb3, 0xbb, 0xe7, 0xbb, 0x9f, 0xe6, 0x94, 0xbf, 0xe7, 0xad, 0x96, 0xe6, + 0xb3, 0x95, 0xe8, 0xa7, 0x84, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x63, + 0x69, 0xc3, 0xb3, 0x6e, 0x68, 0x65, 0x72, 0x72, 0x61, 0x6d, 0x69, 0x65, 0x6e, + 0x74, 0x61, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0xc3, 0xb3, 0x6e, 0x69, + 0x63, 0x6f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x63, 0x69, 0xc3, 0xb3, + 0x6e, 0x63, 0x6c, 0x61, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x64, 0x6f, 0x73, + 0x63, 0x6f, 0x6e, 0x6f, 0x63, 0x69, 0x6d, 0x69, 0x65, 0x6e, 0x74, 0x6f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x72, 0x65, + 0x6c, 0x61, 0x63, 0x69, 0x6f, 0x6e, 0x61, 0x64, 0x61, 0x73, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0xc3, 0xa1, 0x74, 0x69, 0x63, 0x61, 0x72, 0x65, 0x6c, 0x61, + 0x63, 0x69, 0x6f, 0x6e, 0x61, 0x64, 0x6f, 0x73, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x6f, 0x74, 0x72, 0x61, 0x62, 0x61, 0x6a, + 0x61, 0x64, 0x6f, 0x72, 0x65, 0x73, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x61, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x61, 0x79, 0x75, 0x6e, 0x74, 0x61, 0x6d, 0x69, + 0x65, 0x6e, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x63, 0x61, 0x64, 0x6f, 0x4c, 0x69, + 0x62, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0xc3, 0xa1, 0x63, 0x74, 0x65, 0x6e, + 0x6f, 0x73, 0x68, 0x61, 0x62, 0x69, 0x74, 0x61, 0x63, 0x69, 0x6f, 0x6e, 0x65, + 0x73, 0x63, 0x75, 0x6d, 0x70, 0x6c, 0x69, 0x6d, 0x69, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x65, 0x73, 0x74, 0x61, 0x75, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x73, 0x64, + 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x63, 0x75, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x72, 0xc3, 0xb3, 0x6e, 0x69, 0x63, 0x61, 0x61, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x63, 0x69, 0x6f, 0x6e, 0x65, 0x73, 0x64, 0x65, 0x73, 0x63, 0x6f, + 0x6e, 0x65, 0x63, 0x74, 0x61, 0x64, 0x6f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x63, + 0x69, 0xc3, 0xb3, 0x6e, 0x65, 0x6e, 0x63, 0x69, 0x63, 0x6c, 0x6f, 0x70, 0x65, + 0x64, 0x69, 0x61, 0x65, 0x6e, 0x66, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x61, 0x64, + 0x65, 0x73, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x6f, + 0x73, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x69, 0x61, 0x73, + 0x69, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x73, 0x75, + 0x62, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x61, 0xd1, 0x82, 0xd0, + 0xbe, 0xd0, 0xbb, 0xd1, 0x8c, 0xd0, 0xba, 0xd0, 0xbe, 0xd0, 0xa0, 0xd0, 0xbe, + 0xd1, 0x81, 0xd1, 0x81, 0xd0, 0xb8, 0xd0, 0xb8, 0xd1, 0x80, 0xd0, 0xb0, 0xd0, + 0xb1, 0xd0, 0xbe, 0xd1, 0x82, 0xd1, 0x8b, 0xd0, 0xb1, 0xd0, 0xbe, 0xd0, 0xbb, + 0xd1, 0x8c, 0xd1, 0x88, 0xd0, 0xb5, 0xd0, 0xbf, 0xd1, 0x80, 0xd0, 0xbe, 0xd1, + 0x81, 0xd1, 0x82, 0xd0, 0x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x64, 0x74, 0x68, 0x3d, 0x22, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, + 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6d, 0x70, 0x6f, + 0x72, 0x61, 0x72, 0x79, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x64, 0x20, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x28, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, + 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x74, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, + 0x73, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x22, 0x3e, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x2e, + 0x69, 0x63, 0x6f, 0x22, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x3a, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x61, 0x73, 0x73, 0x61, 0x63, 0x68, 0x75, + 0x73, 0x65, 0x74, 0x74, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x3d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x20, 0x61, 0x73, 0x70, 0x72, 0x6f, 0x6e, 0x75, 0x6e, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x3a, 0x23, 0x66, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, + 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x6d, 0x69, 0x73, 0x63, 0x65, 0x6c, 0x6c, 0x61, + 0x6e, 0x65, 0x6f, 0x75, 0x73, 0x26, 0x6c, 0x74, 0x3b, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x26, 0x67, 0x74, 0x3b, 0x70, 0x73, 0x79, 0x63, 0x68, 0x6f, 0x6c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x75, 0x6c, 0x61, 0x72, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x3d, 0x22, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x61, 0x73, 0x20, 0x6f, 0x70, 0x70, 0x6f, 0x73, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x53, 0x75, 0x70, 0x72, 0x65, 0x6d, 0x65, 0x20, + 0x43, 0x6f, 0x75, 0x72, 0x74, 0x6f, 0x63, 0x63, 0x61, 0x73, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x6c, 0x79, 0x2c, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x20, 0x41, 0x6d, + 0x65, 0x72, 0x69, 0x63, 0x61, 0x70, 0x78, 0x3b, 0x62, 0x61, 0x63, 0x6b, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x6f, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x6e, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x74, 0x6f, 0x4c, 0x6f, 0x77, 0x65, 0x72, + 0x43, 0x61, 0x73, 0x65, 0x28, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, + 0x75, 0x72, 0x69, 0x6e, 0x67, 0x70, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x46, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x22, 0x20, 0x6d, 0x61, 0x78, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x3d, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x63, 0x69, 0x6f, 0x75, + 0x73, 0x6e, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x64, 0x69, 0x74, 0x65, 0x72, 0x72, + 0x61, 0x6e, 0x65, 0x61, 0x6e, 0x65, 0x78, 0x74, 0x72, 0x61, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x73, 0x73, 0x61, 0x73, 0x73, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, + 0x6e, 0x73, 0x69, 0x76, 0x65, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, 0x70, + 0x68, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x68, 0x72, 0x65, 0x66, 0x77, 0x61, 0x73, 0x20, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, + 0x63, 0x69, 0x73, 0x63, 0x6f, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x28, 0x29, 0x7b, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x70, 0x68, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, + 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x73, 0x6d, 0x61, 0x79, 0x20, 0x68, 0x61, 0x76, 0x65, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x28, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x54, 0x68, 0x69, 0x73, 0x20, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, + 0x63, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x47, 0x72, 0x65, 0x61, 0x74, 0x20, 0x42, 0x72, + 0x69, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, + 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x3d, 0x22, 0x3b, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, + 0x69, 0x7a, 0x65, 0x3a, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x73, + 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x61, 0x72, 0x65, 0x20, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x09, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, + 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x22, + 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x72, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x6c, 0x6c, 0x79, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x70, 0x6f, 0x70, + 0x75, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x3a, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x73, 0x70, + 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x2e, 0x67, 0x69, 0x66, 0x22, 0x20, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x3d, 0x22, 0x3c, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x20, + 0x73, 0x72, 0x63, 0x3d, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x6c, 0x79, 0x70, 0x61, 0x72, 0x6c, 0x69, 0x61, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x72, 0x79, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, + 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x70, 0x72, 0x65, 0x64, 0x6f, 0x6d, 0x69, 0x6e, + 0x61, 0x6e, 0x74, 0x6c, 0x79, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x7c, 0x26, + 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, + 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6f, 0x72, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x3d, 0x22, 0x6f, 0x67, 0x3a, 0x2f, 0x78, 0x2d, 0x73, 0x68, 0x6f, 0x63, 0x6b, + 0x77, 0x61, 0x76, 0x65, 0x2d, 0x64, 0x65, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x72, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x4e, 0x65, 0x76, 0x65, 0x72, 0x74, 0x68, 0x65, + 0x6c, 0x65, 0x73, 0x73, 0x2c, 0x77, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, + 0x61, 0x62, 0x6c, 0x65, 0x20, 0x41, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x62, 0x65, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6c, 0x79, 0x20, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x64, 0x20, 0x61, 0x73, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, + 0x62, 0x6f, 0x64, 0x79, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x61, 0x63, 0x74, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, + 0x69, 0x64, 0x75, 0x61, 0x6c, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, + 0x74, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x76, 0x69, 0x65, 0x77, 0x68, 0x6f, 0x6d, 0x6f, 0x73, 0x65, 0x78, 0x75, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x20, 0x6f, 0x66, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x72, 0x73, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, + 0x20, 0x75, 0x73, 0x65, 0x64, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x20, 0x6f, 0x66, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x3a, 0x20, 0x23, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x6e, 0x74, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x3d, 0x22, 0x30, 0x22, 0x3e, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x6c, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x72, 0x65, 0x64, 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x6f, 0x2d, 0x45, 0x75, 0x72, + 0x6f, 0x70, 0x65, 0x61, 0x6e, 0x76, 0x75, 0x6c, 0x6e, 0x65, 0x72, 0x61, 0x62, + 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x20, 0x6f, 0x66, 0x61, 0x72, 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x72, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, + 0x20, 0x43, 0x69, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x69, 0x61, 0x6e, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x3d, 0x22, 0x30, 0x22, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x28, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x21, 0x5b, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, + 0x2d, 0x2d, 0x3e, 0x0d, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x6c, 0x79, 0x2e, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x66, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x69, 0x73, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, + 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6e, 0x64, + 0x61, 0x73, 0x68, 0x3b, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x73, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x65, 0x71, 0x75, 0x69, 0x70, 0x70, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, + 0x67, 0x65, 0x20, 0x6f, 0x66, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x20, 0x69, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, + 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x26, + 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x20, 0x6f, 0x66, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x20, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x6a, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x74, 0x77, 0x6f, 0x20, 0x64, 0x69, 0x66, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x74, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x20, 0x66, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x69, 0x64, 0x65, 0x20, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x20, 0x6f, 0x66, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x77, 0x61, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6d, 0x64, + 0x61, 0x73, 0x68, 0x3b, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x63, 0x68, 0x61, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x66, 0x61, 0x63, 0x74, 0x20, 0x74, 0x68, 0x61, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x6e, 0x74, 0x6c, 0x79, 0x6f, 0x6e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6f, + 0x76, 0x65, 0x72, 0x3d, 0x22, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x79, 0x20, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x20, 0x3d, 0x20, + 0x74, 0x72, 0x75, 0x65, 0x3b, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x73, 0x65, 0x65, 0x6d, 0x73, 0x20, 0x74, 0x6f, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x61, 0x72, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x28, 0x29, 0x20, 0x7b, 0x74, 0x6f, 0x6f, 0x6b, 0x20, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x20, 0x69, 0x6e, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6f, 0x6d, 0x65, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, + 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x69, 0x73, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, + 0x20, 0x75, 0x73, 0x65, 0x64, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x67, 0x72, 0x65, 0x61, 0x74, 0x20, 0x64, 0x65, + 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, + 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x32, 0x30, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x79, 0x2c, 0x70, 0x72, 0x6f, 0x66, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x73, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, + 0x79, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, + 0x69, 0x74, 0x20, 0x69, 0x73, 0x44, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x72, 0x79, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x54, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x20, 0x74, 0x6f, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x2c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, + 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x6f, 0x75, + 0x6c, 0x64, 0x20, 0x62, 0x65, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x27, 0x73, 0x20, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x20, 0x61, 0x73, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x28, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, + 0x6c, 0x61, 0x72, 0x6c, 0x79, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, + 0x65, 0x66, 0x74, 0x22, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x62, 0x61, 0x73, 0x69, 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x69, + 0x74, 0x79, 0x20, 0x6f, 0x66, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, + 0x65, 0x20, 0x74, 0x68, 0x65, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x6d, 0x6f, 0x75, 0x73, 0x65, + 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x54, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, + 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, + 0x6e, 0x69, 0x74, 0x65, 0x64, 0x66, 0x69, 0x6c, 0x6d, 0x20, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2e, + 0x64, 0x74, 0x64, 0x22, 0x3e, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, + 0x20, 0x75, 0x73, 0x65, 0x64, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x69, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x61, 0x72, 0x65, 0x75, 0x6e, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x65, 0x64, 0x69, 0x73, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, + 0x61, 0x72, 0x20, 0x74, 0x6f, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, + 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, + 0x62, 0x6f, 0x6c, 0x64, 0x3b, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x09, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x6e, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x20, 0x6f, 0x66, 0x72, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x61, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, + 0x79, 0x20, 0x66, 0x6f, 0x72, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, + 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x20, 0x74, 0x6f, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, + 0x20, 0x79, 0x65, 0x61, 0x72, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, + 0x79, 0x65, 0x61, 0x72, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x09, 0x09, 0x3c, 0x75, 0x6c, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x39, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x79, 0x2c, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x65, 0x72, 0x73, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x65, 0x20, + 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x65, 0x64, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x65, 0x64, 0x20, 0x61, 0x73, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, + 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x62, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x20, + 0x61, 0x62, 0x6f, 0x75, 0x74, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x6c, + 0x65, 0x66, 0x74, 0x3a, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x74, 0x20, + 0x6f, 0x66, 0x20, 0x61, 0x73, 0x53, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x73, 0x65, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x72, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x61, 0x73, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x70, 0x61, + 0x72, 0x74, 0x20, 0x6f, 0x66, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, + 0x65, 0x20, 0x66, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x2d, 0x63, + 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x63, 0x61, 0x73, 0x65, 0x2c, 0x77, 0x61, 0x73, 0x20, 0x61, 0x70, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x65, 0x64, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, + 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x6f, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, + 0x61, 0x72, 0x6c, 0x79, 0x20, 0x64, 0x65, 0x61, 0x6c, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x61, + 0x6c, 0x77, 0x61, 0x79, 0x73, 0x61, 0x72, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, 0x70, + 0x68, 0x79, 0x20, 0x6f, 0x66, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x63, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, + 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x20, 0x69, 0x6e, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, + 0x22, 0x22, 0x20, 0x2f, 0x3e, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x4d, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x73, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, + 0x6e, 0x69, 0x74, 0x65, 0x64, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x64, 0x69, 0x73, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x6f, + 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x6c, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x69, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x52, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x69, 0x73, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6f, 0x6c, 0x69, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, + 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x61, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x69, 0x74, 0x73, 0x77, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x61, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, + 0x65, 0x64, 0x20, 0x61, 0x73, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x61, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x65, 0x64, 0x68, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x72, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x20, 0x74, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x67, 0x72, 0x61, + 0x64, 0x75, 0x61, 0x74, 0x65, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, + 0x65, 0x20, 0x74, 0x77, 0x6f, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x61, + 0x73, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x66, 0x75, 0x6e, 0x64, 0x61, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x77, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x6c, 0x79, 0x2c, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x6c, 0x69, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x20, 0x6f, 0x66, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x69, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x32, 0x30, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x79, 0x2e, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x68, 0x61, 0x72, + 0x74, 0x62, 0x65, 0x61, 0x74, 0x74, 0x6f, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x68, 0x61, + 0x6c, 0x66, 0x20, 0x6f, 0x66, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x20, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, + 0x74, 0x75, 0x72, 0x61, 0x6c, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x72, 0x65, 0x64, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, + 0x72, 0x69, 0x7a, 0x65, 0x64, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x77, 0x61, 0x73, 0x20, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x65, 0x64, 0x65, 0x64, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x61, 0x72, 0x65, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x65, 0x73, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x66, 0x72, 0x65, 0x65, 0x20, 0x73, 0x6f, 0x66, + 0x74, 0x77, 0x61, 0x72, 0x65, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x65, 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x73, 0x74, + 0x72, 0x6f, 0x79, 0x65, 0x64, 0x61, 0x77, 0x61, 0x79, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x74, 0x68, 0x65, 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, + 0x20, 0x74, 0x68, 0x65, 0x79, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x20, 0x62, 0x79, 0x20, 0x61, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x66, 0x75, 0x6c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x65, 0x64, + 0x20, 0x69, 0x6e, 0x20, 0x61, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x74, 0x79, 0x20, 0x6f, 0x66, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, + 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, + 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x69, 0x73, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x67, + 0x68, 0x74, 0x20, 0x74, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x65, 0x6e, 0x64, 0x77, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x6e, 0x6f, + 0x75, 0x6e, 0x63, 0x65, 0x64, 0x61, 0x72, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x61, 0x6e, 0x74, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x73, 0x3e, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x3d, 0x74, 0x68, 0x65, 0x20, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x4f, 0x20, 0x4e, 0x4f, 0x54, 0x20, + 0x41, 0x4c, 0x54, 0x45, 0x52, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x2f, 0x3f, + 0x73, 0x6f, 0x72, 0x74, 0x3d, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x64, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x73, 0x69, + 0x73, 0x20, 0x66, 0x6f, 0x72, 0x68, 0x61, 0x73, 0x20, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, + 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x6c, 0x79, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x65, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, + 0x74, 0x68, 0x6f, 0x73, 0x65, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x73, + 0x73, 0x69, 0x62, 0x6c, 0x65, 0x76, 0x61, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x20, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x20, 0x41, 0x66, + 0x72, 0x69, 0x63, 0x61, 0x6e, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x73, 0x61, 0x6d, 0x65, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x6e, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x63, 0x61, 0x73, 0x65, 0x3b, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, + 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x20, 0x61, 0x6e, 0x64, 0x3b, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x74, 0x68, 0x65, 0x62, 0x61, 0x68, 0x61, 0x73, 0x61, 0x20, 0x4d, + 0x65, 0x6c, 0x61, 0x79, 0x75, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x62, 0x6f, + 0x6b, 0x6d, 0xc3, 0xa5, 0x6c, 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x20, 0x6e, 0x79, + 0x6e, 0x6f, 0x72, 0x73, 0x6b, 0x73, 0x6c, 0x6f, 0x76, 0x65, 0x6e, 0xc5, 0xa1, + 0xc4, 0x8d, 0x69, 0x6e, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x63, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x63, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x22, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x61, 0x6d, 0x62, 0x69, + 0x67, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x27, 0x2c, 0x20, 0x27, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x69, 0x6d, 0x75, + 0x6c, 0x74, 0x61, 0x6e, 0x65, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3a, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x3c, 0x21, 0x5b, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, 0x2d, 0x2d, 0x3e, + 0x0a, 0x3c, 0x2f, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, + 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3a, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, + 0x3e, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3d, 0x68, 0x74, 0x74, 0x70, + 0x25, 0x33, 0x41, 0x25, 0x32, 0x46, 0x25, 0x32, 0x46, 0x3c, 0x66, 0x6f, 0x72, + 0x6d, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x2f, 0x66, + 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x2e, 0x69, 0x63, 0x6f, 0x22, 0x20, 0x7d, + 0x29, 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, + 0x2e, 0x73, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x28, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x41, 0x72, 0x72, 0x61, 0x79, + 0x28, 0x29, 0x3b, 0x3c, 0x21, 0x5b, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, 0x2d, + 0x2d, 0x3e, 0x0d, 0x0a, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x3b, 0x55, 0x6e, 0x66, 0x6f, 0x72, 0x74, 0x75, 0x6e, + 0x61, 0x74, 0x65, 0x6c, 0x79, 0x2c, 0x22, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, + 0x3b, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x2f, 0x66, 0x61, 0x76, 0x69, 0x63, + 0x6f, 0x6e, 0x2e, 0x69, 0x63, 0x6f, 0x22, 0x3e, 0x3d, 0x27, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x27, 0x20, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x3c, 0x6c, + 0x69, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x61, + 0x6e, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x61, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, + 0x66, 0x70, 0x74, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x22, 0x20, 0x0a, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x28, 0x29, 0x20, 0x7b, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x41, 0x63, 0x63, + 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x68, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, + 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x6c, 0x79, + 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x3d, 0x22, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x2d, 0x2d, 0x3c, 0x21, 0x5b, 0x65, 0x6e, 0x64, 0x69, + 0x66, 0x5d, 0x2d, 0x2d, 0x3e, 0x50, 0x72, 0x69, 0x6d, 0x65, 0x20, 0x4d, 0x69, + 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, + 0x65, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, + 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x74, 0x68, 0x65, 0x20, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x6e, 0x6d, + 0x6f, 0x75, 0x73, 0x65, 0x6f, 0x76, 0x65, 0x72, 0x3d, 0x22, 0x74, 0x68, 0x65, + 0x20, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x61, 0x73, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, + 0x77, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, + 0x64, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, + 0x65, 0x72, 0x65, 0x64, 0x3c, 0x21, 0x5b, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, + 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x20, + 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, + 0x3a, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, + 0x7b, 0x42, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x2d, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2e, 0x64, 0x74, 0x64, + 0x22, 0x3e, 0x0a, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x73, 0x29, 0x3b, + 0x20, 0x6a, 0x73, 0x2e, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x69, 0x64, 0x22, 0x20, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x30, 0x30, 0x25, 0x22, 0x72, + 0x65, 0x67, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x20, 0x43, 0x61, 0x74, 0x68, 0x6f, 0x6c, 0x69, + 0x63, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x2e, 0x67, 0x69, 0x66, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x3d, 0x22, 0x31, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, + 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x61, 0x65, 0x6f, + 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x70, 0x72, 0x69, 0x6d, 0x65, 0x20, + 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x6a, 0x73, 0x22, 0x3e, + 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x63, 0x6f, 0x6d, 0x62, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x77, + 0x2e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x28, + 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, + 0x3e, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x61, 0x49, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, + 0x61, 0x72, 0x2c, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, + 0x66, 0x74, 0x22, 0x20, 0x43, 0x7a, 0x65, 0x63, 0x68, 0x20, 0x52, 0x65, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x64, 0x20, 0x4b, + 0x69, 0x6e, 0x67, 0x64, 0x6f, 0x6d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x6c, + 0x22, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3d, 0x22, 0x28, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x29, 0x20, 0x7b, 0x63, 0x6f, 0x6d, + 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x3c, + 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, + 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, + 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x27, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x27, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, + 0x3c, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x28, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x09, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, + 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x65, 0x70, 0x61, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x73, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22, 0x3e, 0x66, + 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, + 0x20, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x20, 0x64, 0x69, 0x6f, 0x78, 0x69, + 0x64, 0x65, 0x0a, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2d, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x6f, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x6e, + 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, + 0x3e, 0x0d, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x54, 0x69, 0xe1, 0xba, + 0xbf, 0x6e, 0x67, 0x20, 0x56, 0x69, 0xe1, 0xbb, 0x87, 0x74, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x30, + 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, + 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x3c, 0x77, 0x61, 0x73, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x65, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, + 0x74, 0x22, 0x20, 0x29, 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x3e, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x63, 0x63, 0x6c, 0x65, 0x73, 0x69, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x68, + 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x69, 0x6e, 0x67, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x3c, 0x2f, 0x62, 0x6f, 0x64, + 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x68, 0x61, 0x73, 0x20, + 0x6e, 0x65, 0x76, 0x65, 0x72, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x74, 0x68, 0x65, + 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x69, 0x6e, + 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, + 0x69, 0x77, 0x61, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, + 0x65, 0x64, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x74, 0x6f, 0x20, 0x62, 0x65, + 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x27, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6e, + 0x6f, 0x74, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, + 0x6c, 0x73, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, + 0x6d, 0x61, 0x6e, 0x79, 0x61, 0x20, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x20, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, + 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x69, 0x6d, 0x70, 0x6f, 0x73, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x2e, 0x20, 0x48, 0x6f, + 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x61, 0x6e, 0x64, + 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x62, + 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, + 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x3d, 0x22, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x70, 0x6f, + 0x73, 0x74, 0x22, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x6f, 0x73, 0x73, + 0x69, 0x62, 0x6c, 0x65, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, + 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x61, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x6c, + 0x73, 0x6f, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x61, 0x6e, 0x6e, 0x6f, 0x75, + 0x6e, 0x63, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x6c, 0x69, 0x67, + 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x6d, 0x61, 0x6e, + 0x79, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x66, 0x6f, + 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x77, 0x61, + 0x73, 0x70, 0x74, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x0d, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, + 0x70, 0x22, 0x20, 0x69, 0x6e, 0x68, 0x61, 0x62, 0x69, 0x74, 0x61, 0x6e, 0x74, + 0x73, 0x20, 0x6f, 0x66, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x20, 0x79, 0x65, 0x61, 0x72, 0x0d, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x6f, 0x6e, + 0x20, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65, + 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x61, 0x72, 0x67, 0x75, + 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x67, 0x6f, 0x76, + 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x61, 0x20, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x3a, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x62, 0x65, 0x73, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x20, 0x66, 0x6f, 0x72, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x63, + 0x69, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x20, 0x3c, + 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x45, 0x6e, + 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, + 0x77, 0x61, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x3b, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, + 0x6f, 0x66, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x69, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x61, 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, + 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x3c, 0x73, 0x70, 0x61, 0x6e, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x64, 0x65, 0x73, 0x63, 0x65, + 0x6e, 0x64, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x3c, 0x73, 0x70, 0x61, + 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x20, 0x61, 0x6c, + 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3c, 0x2f, + 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x61, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x68, 0x61, 0x73, 0x20, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x65, 0x65, + 0x6e, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x61, 0x6e, 0x20, 0x55, 0x6e, 0x69, + 0x6f, 0x6e, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x63, 0x65, 0x6e, 0x74, + 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x69, + 0x63, 0x75, 0x6c, 0x74, 0x56, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x65, 0x73, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, + 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x66, 0x6f, 0x6e, 0x74, 0x2d, + 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x31, 0x31, 0x70, 0x78, 0x65, 0x78, 0x70, 0x6c, + 0x61, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, + 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x20, 0x6f, 0x66, 0x77, 0x72, + 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x09, + 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, + 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x20, + 0x74, 0x6f, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x73, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x73, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x69, + 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x73, + 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x74, 0x28, + 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, + 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, + 0x74, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x6e, 0x6f, + 0x70, 0x6c, 0x65, 0x77, 0x65, 0x72, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x73, 0x65, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x31, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x64, 0x65, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, + 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, + 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x6f, + 0x66, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x75, 0x73, + 0x65, 0x64, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x68, + 0x61, 0x76, 0x65, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, + 0x74, 0x6f, 0x20, 0x62, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, + 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x3a, 0x62, 0x0d, 0x0a, 0x3c, 0x2f, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x3c, 0x77, 0x61, 0x73, 0x20, 0x66, + 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x69, 0x65, 0x77, 0x20, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x69, 0x64, + 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x63, 0x61, + 0x70, 0x69, 0x74, 0x61, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0d, + 0x0a, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x78, 0x4d, 0x4c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x75, 0x62, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x6c, 0x61, + 0x72, 0x67, 0x65, 0x73, 0x74, 0x76, 0x65, 0x72, 0x79, 0x20, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x66, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x65, + 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x65, 0x73, + 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x69, + 0x73, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x49, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x6f, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x69, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x6e, 0x74, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x65, 0x66, + 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, + 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x3c, 0x73, 0x70, + 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x70, 0x65, + 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x28, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0d, + 0x69, 0x66, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69, + 0x66, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x64, 0x20, 0x4e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x79, 0x70, 0x65, 0x22, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x3c, 0x2f, 0x68, + 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, + 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x28, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, + 0x61, 0x6c, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, + 0x6f, 0x73, 0x74, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x2f, 0x3e, 0x0a, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, + 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x72, + 0x70, 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x3a, 0x23, 0x66, 0x66, 0x66, 0x7d, 0x0a, 0x2e, 0x0a, 0x3c, 0x73, 0x70, + 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x74, 0x68, 0x65, + 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x3e, + 0x0d, 0x0a, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x68, 0x61, 0x76, 0x65, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x64, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x3d, 0x22, 0x63, 0x65, 0x6c, 0x65, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x62, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x20, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x75, 0x6e, 0x64, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x3e, 0x3c, 0x21, + 0x5b, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x5d, 0x2d, 0x2d, 0x3e, 0x0a, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x69, + 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x20, + 0x6f, 0x66, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x65, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x20, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, + 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x77, 0x61, 0x73, 0x20, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x68, 0x69, 0x73, 0x74, 0x68, 0x65, 0x20, + 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x6f, 0x6d, + 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x70, + 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x73, + 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x6c, 0x79, 0x20, + 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x0d, + 0x0a, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, + 0x75, 0x73, 0x65, 0x64, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x66, 0x6f, 0x72, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, + 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, 0x20, 0x65, 0x73, 0x73, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x77, 0x65, 0x72, 0x65, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x73, 0x74, 0x68, 0x61, 0x76, 0x65, + 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x22, 0x20, 0x73, + 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x6f, 0x66, + 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x6e, 0x6f, 0x22, + 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, + 0x6f, 0x66, 0x49, 0x49, 0x2c, 0x20, 0x48, 0x6f, 0x6c, 0x79, 0x20, 0x52, 0x6f, + 0x6d, 0x61, 0x6e, 0x69, 0x73, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x6f, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x69, + 0x72, 0x20, 0x6f, 0x77, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, + 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x74, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x64, + 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x61, 0x72, 0x65, 0x20, 0x6f, + 0x66, 0x74, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x74, 0x6f, 0x20, 0x65, + 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x67, 0x72, + 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x61, + 0x72, 0x65, 0x20, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x6c, 0x79, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, + 0x6e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, + 0x6e, 0x20, 0x61, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, + 0x2f, 0x75, 0x6c, 0x3e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x66, + 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x62, + 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, + 0x3e, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x3e, 0x0a, 0x3c, 0x6d, + 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6e, + 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x63, 0x61, + 0x72, 0x72, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x79, 0x48, + 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, + 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, + 0x66, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x63, 0x61, 0x70, 0x69, 0x74, 0x61, + 0x6c, 0x20, 0x6f, 0x66, 0x77, 0x61, 0x73, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, + 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x68, 0x61, + 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x74, 0x68, 0x65, 0x20, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x64, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x74, 0x6f, 0x20, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x20, + 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, + 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x68, + 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x74, 0x79, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x70, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x71, 0x22, 0x09, 0x09, 0x3c, 0x64, 0x69, + 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x74, 0x68, 0x65, 0x20, + 0x73, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x63, 0x72, 0x65, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x6d, 0x61, + 0x74, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x69, 0x61, 0x6e, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, + 0x6e, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x22, 0x63, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x69, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, + 0x6c, 0x61, 0x72, 0x2c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, + 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x29, 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, + 0x70, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x6f, + 0x68, 0x72, 0x76, 0x61, 0x74, 0x73, 0x6b, 0x69, 0x74, 0x69, 0xe1, 0xba, 0xbf, + 0x6e, 0x67, 0x20, 0x56, 0x69, 0xe1, 0xbb, 0x87, 0x74, 0xd0, 0xa0, 0xd1, 0x83, + 0xd1, 0x81, 0xd1, 0x81, 0xd0, 0xba, 0xd0, 0xb8, 0xd0, 0xb9, 0xd1, 0x80, 0xd1, + 0x83, 0xd1, 0x81, 0xd1, 0x81, 0xd0, 0xba, 0xd0, 0xb8, 0xd0, 0xb9, 0x69, 0x6e, + 0x76, 0x65, 0x73, 0x74, 0x69, 0x67, 0x61, 0x63, 0x69, 0xc3, 0xb3, 0x6e, 0x70, + 0x61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 0xd8, 0xad, 0xd8, 0xaf, 0xd8, 0xa9, 0xd8, 0xa7, 0xd9, 0x84, + 0xd8, 0xa7, 0xd8, 0xba, 0xd8, 0xa7, 0xd9, 0x86, 0xd9, 0x8a, 0x63, 0x75, 0x72, + 0x73, 0x6f, 0x72, 0x3a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x3c, + 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, + 0x20, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x2f, 0x2f, 0x22, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x2f, 0x61, + 0x3e, 0x20, 0x7c, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, + 0x3c, 0x21, 0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65, 0x20, 0x68, 0x74, 0x6d, + 0x6c, 0x3e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3d, 0x22, 0x73, 0x63, 0x72, 0x65, + 0x65, 0x6e, 0x22, 0x20, 0x3c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, + 0x2e, 0x69, 0x63, 0x6f, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x68, 0x61, + 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, + 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, + 0x20, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, + 0x6c, 0x3e, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x20, 0x69, + 0x63, 0x6f, 0x6e, 0x22, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x28, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, + 0x67, 0x2d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3a, 0x72, 0x65, 0x70, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x73, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, + 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x22, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x6f, 0x75, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x66, + 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, + 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x22, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6f, 0x6e, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, + 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22, 0x3e, + 0x3c, 0x77, 0x61, 0x73, 0x20, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x29, 0x3b, 0x0d, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x22, 0x3e, 0x29, 0x2e, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x65, 0x63, 0x61, + 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, + 0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, + 0x22, 0x2f, 0x7d, 0x62, 0x6f, 0x64, 0x79, 0x7b, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x3a, 0x30, 0x3b, 0x45, 0x6e, 0x63, 0x79, 0x63, 0x6c, 0x6f, 0x70, 0x65, + 0x64, 0x69, 0x61, 0x20, 0x6f, 0x66, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, + 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, + 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, + 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x49, 0x6e, 0x20, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x20, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x2c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3b, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x2f, 0x3e, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20, + 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x63, + 0x65, 0x6e, 0x74, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x0d, 0x0a, 0x09, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, + 0x69, 0x6e, 0x73, 0x70, 0x69, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, + 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x2e, 0x6a, 0x73, + 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, 0x20, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, + 0x65, 0x65, 0x6e, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x20, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, + 0x69, 0x73, 0x74, 0x20, 0x50, 0x61, 0x72, 0x74, 0x79, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, 0x6c, + 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3d, 0x22, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x20, 0x6f, 0x66, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, + 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, + 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x4f, 0x72, 0x74, + 0x68, 0x6f, 0x64, 0x6f, 0x78, 0x20, 0x43, 0x68, 0x75, 0x72, 0x63, 0x68, 0x73, + 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x2f, 0x3e, 0x0a, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, + 0x3d, 0x22, 0x73, 0x77, 0x61, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x68, 0x69, + 0x73, 0x20, 0x64, 0x65, 0x61, 0x74, 0x68, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x0a, + 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6c, + 0x61, 0x6e, 0x64, 0x73, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x3a, 0x75, 0x72, 0x6c, 0x28, 0x61, 0x72, 0x67, 0x75, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x63, 0x72, + 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x20, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, + 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, + 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, + 0x61, 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x76, 0x65, 0x72, 0x79, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, + 0x72, 0x20, 0x74, 0x6f, 0x73, 0x75, 0x72, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x61, 0x6c, 0x69, 0x67, 0x6e, + 0x3d, 0x22, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x77, 0x6f, 0x75, + 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x3d, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, + 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x76, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x73, 0x20, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x6e, 0x61, + 0x6d, 0x65, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, + 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, + 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x6d, 0x6f, 0x73, + 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x69, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, + 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x61, + 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x77, 0x61, 0x73, 0x20, + 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x69, 0x6e, 0x73, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, + 0x6f, 0x72, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, + 0x73, 0x20, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x61, 0x20, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, + 0x65, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, + 0x64, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x55, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x64, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, + 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x74, + 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x20, 0x6f, 0x66, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, 0x74, + 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, + 0x6d, 0x61, 0x67, 0x6e, 0x65, 0x74, 0x69, 0x63, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x28, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x49, + 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, + 0x74, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, + 0x7b, 0x76, 0x61, 0x72, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x61, 0x73, 0x20, 0x61, 0x20, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x46, 0x6f, + 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6e, + 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x74, + 0x22, 0x20, 0x77, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6d, 0x64, 0x61, 0x73, + 0x68, 0x3b, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, + 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x75, 0x6c, 0x3e, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x61, 0x74, + 0x68, 0x77, 0x69, 0x74, 0x68, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x20, 0x74, 0x6f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x75, 0x6c, 0x61, 0x72, 0x6c, 0x79, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x3a, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x3b, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x69, 0x73, + 0x20, 0x64, 0x69, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, + 0xe4, 0xb8, 0xad, 0xe6, 0x96, 0x87, 0x20, 0x28, 0xe7, 0xae, 0x80, 0xe4, 0xb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c, 0x65, 0x3d, 0x22, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x22, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x61, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x3e, 0x0a, 0x3c, 0x22, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, + 0x22, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, + 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x74, + 0x2f, 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x6a, + 0x73, 0x22, 0x3e, 0x2e, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x28, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, + 0x22, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x7d, 0x29, 0x28, 0x29, + 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, + 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x29, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x3b, 0x74, 0x65, 0x78, 0x74, 0x2d, + 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x73, + 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x6e, 0x6f, 0x22, + 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x70, 0x73, 0x65, 0x3a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, + 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42, 0x61, 0x68, 0x61, 0x73, 0x61, + 0x20, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0x45, 0x6e, 0x67, + 0x6c, 0x69, 0x73, 0x68, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x3c, 0x74, 0x65, 0x78, 0x74, 0x20, 0x78, 0x6d, 0x6c, 0x3a, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x3d, 0x2e, 0x67, 0x69, 0x66, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, + 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x6f, 0x76, 0x65, 0x72, + 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x3b, 0x69, + 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, + 0x2f, 0x2f, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x2e, 0x6a, 0x73, 0x22, + 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x2f, 0x66, + 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x2e, 0x69, 0x63, 0x6f, 0x22, 0x20, 0x2f, + 0x3e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x31, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x3d, 0x22, 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x22, 0x3e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, + 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x6c, 0x65, + 0x66, 0x74, 0x3b, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x28, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x29, + 0x3b, 0x0d, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, + 0x0a, 0x3c, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x3a, 0x3b, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, + 0x77, 0x3a, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x6d, 0x6f, 0x72, 0x65, 0x20, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6e, + 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x61, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, + 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, + 0x3b, 0x22, 0x3e, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, + 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x0a, 0x20, 0x20, 0x28, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x74, 0x68, 0x65, 0x20, + 0x31, 0x35, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x28, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x20, 0x6f, 0x66, 0x20, 0x42, 0x79, 0x7a, 0x61, 0x6e, 0x74, 0x69, 0x6e, + 0x65, 0x20, 0x45, 0x6d, 0x70, 0x69, 0x72, 0x65, 0x2e, 0x6a, 0x70, 0x67, 0x7c, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x7c, 0x6c, 0x65, 0x66, 0x74, 0x7c, 0x76, 0x61, + 0x73, 0x74, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x6f, + 0x66, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x63, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x74, 0x79, 0x20, 0x50, 0x72, 0x65, 0x73, 0x73, 0x64, 0x6f, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, + 0x57, 0x61, 0x72, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x6e, 0x6f, 0x66, 0x6f, 0x6c, + 0x6c, 0x6f, 0x77, 0x22, 0x3e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x73, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x72, 0x61, 0x74, 0x68, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x20, + 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, + 0x66, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3a, 0x31, 0x30, 0x30, 0x45, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x2d, 0x73, + 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x72, 0x20, 0x73, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x62, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, + 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, + 0x20, 0x6f, 0x66, 0x44, 0x65, 0x6d, 0x6f, 0x63, 0x72, 0x61, 0x74, 0x69, 0x63, + 0x20, 0x50, 0x61, 0x72, 0x74, 0x79, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x46, 0x6f, 0x72, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2c, 0x2e, + 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, + 0x0a, 0x09, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, + 0x73, 0x29, 0x5b, 0x30, 0x5d, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x3c, 0x2e, 0x6a, 0x73, 0x22, 0x3e, + 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x6c, 0x69, + 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x69, 0x63, 0x6f, 0x6e, 0x22, + 0x20, 0x27, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x27, 0x27, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x27, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x2f, 0x61, + 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x2f, 0x70, 0x61, 0x67, 0x65, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x70, 0x61, 0x67, + 0x65, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x62, 0x61, 0x68, 0x61, + 0x73, 0x61, 0x20, 0x49, 0x6e, 0x64, 0x6f, 0x6e, 0x65, 0x73, 0x69, 0x61, 0x65, + 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x28, 0x73, 0x69, 0x6d, 0x70, 0x6c, + 0x65, 0x29, 0xce, 0x95, 0xce, 0xbb, 0xce, 0xbb, 0xce, 0xb7, 0xce, 0xbd, 0xce, + 0xb9, 0xce, 0xba, 0xce, 0xac, 0xd1, 0x85, 0xd1, 0x80, 0xd0, 0xb2, 0xd0, 0xb0, + 0xd1, 0x82, 0xd1, 0x81, 0xd0, 0xba, 0xd0, 0xb8, 0xd0, 0xba, 0xd0, 0xbe, 0xd0, + 0xbc, 0xd0, 0xbf, 0xd0, 0xb0, 0xd0, 0xbd, 0xd0, 0xb8, 0xd0, 0xb8, 0xd1, 0x8f, + 0xd0, 0xb2, 0xd0, 0xbb, 0xd1, 0x8f, 0xd0, 0xb5, 0xd1, 0x82, 0xd1, 0x81, 0xd1, + 0x8f, 0xd0, 0x94, 0xd0, 0xbe, 0xd0, 0xb1, 0xd0, 0xb0, 0xd0, 0xb2, 0xd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6f, 0x62, 0x6f, + 0x74, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, + 0x65, 0x72, 0x22, 0x3e, 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, + 0x64, 0x20, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x3c, 0x69, 0x6d, 0x67, 0x20, + 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x2e, + 0x6a, 0x70, 0x67, 0x7c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x7c, 0x74, 0x68, 0x75, + 0x6d, 0x62, 0x7c, 0x2e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x3c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, + 0x20, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x66, 0x6f, 0x6e, + 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x62, 0x6f, 0x6c, 0x64, + 0x3b, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x26, + 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x3a, 0x30, 0x3b, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, + 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x6e, 0x6f, 0x66, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x22, 0x20, 0x50, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x77, 0x65, 0x6e, 0x74, + 0x69, 0x65, 0x74, 0x68, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x70, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x20, 0x45, + 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x61, 0x2e, 0x61, 0x73, 0x79, 0x6e, + 0x63, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0d, 0x0a, 0x69, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, + 0x75, 0x74, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x22, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x3c, 0x61, 0x20, + 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x3c, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x0a, 0x3c, 0x2f, 0x62, 0x6f, + 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, + 0x7a, 0x65, 0x3a, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x3d, 0x22, 0x41, 0x72, 0x69, 0x61, 0x6c, 0x2c, + 0x20, 0x48, 0x65, 0x6c, 0x76, 0x65, 0x74, 0x69, 0x63, 0x61, 0x2c, 0x3c, 0x2f, + 0x61, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x3d, 0x22, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x3c, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x74, 0x64, 0x3e, + 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, + 0x3c, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x72, 0x65, 0x6c, 0x3d, + 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x28, 0x27, 0x3c, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x22, + 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x3e, 0x0a, 0x62, 0x65, 0x67, 0x69, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x76, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, + 0x74, 0x68, 0x65, 0x74, 0x65, 0x6c, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, + 0x22, 0x6e, 0x6f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x22, 0x3e, 0x20, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, + 0x22, 0x3e, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x68, 0x74, 0x74, 0x70, 0x25, 0x33, 0x41, + 0x25, 0x32, 0x46, 0x25, 0x32, 0x46, 0x77, 0x77, 0x77, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, + 0x66, 0x50, 0x72, 0x69, 0x6d, 0x65, 0x20, 0x4d, 0x69, 0x6e, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x66, 0x69, 0x78, 0x22, 0x3e, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x0d, 0x0a, 0x0d, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x65, 0x2d, 0x64, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x68, 0x75, 0x72, 0x63, + 0x68, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x6e, 0x67, 0x6c, 0x61, 0x6e, 0x64, 0x6f, + 0x66, 0x20, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x20, 0x43, 0x61, 0x72, 0x6f, 0x6c, + 0x69, 0x6e, 0x61, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x20, 0x6b, 0x69, 0x6c, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x65, 0x73, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x64, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, + 0x68, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x74, 0x69, + 0x63, 0x20, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x64, 0x65, 0x63, + 0x6c, 0x61, 0x72, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x20, 0x74, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x6a, 0x61, 0x6d, 0x69, 0x6e, + 0x20, 0x46, 0x72, 0x61, 0x6e, 0x6b, 0x6c, 0x69, 0x6e, 0x72, 0x6f, 0x6c, 0x65, + 0x2d, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x67, 0x61, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, + 0x79, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, 0x57, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x6e, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x70, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x47, 0x75, 0x74, 0x65, 0x6e, 0x62, + 0x65, 0x72, 0x67, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, + 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x74, 0x6f, + 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, + 0x68, 0x65, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, 0x6c, 0x69, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, + 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x6d, 0x69, 0x6e, + 0x2e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, + 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3c, 0x69, 0x6d, 0x67, + 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, + 0x20, 0x74, 0x68, 0x65, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x61, 0x6c, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x63, + 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, + 0x72, 0x65, 0x64, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x75, 0x6d, 0x20, 0x6d, 0x65, + 0x63, 0x68, 0x61, 0x6e, 0x69, 0x63, 0x73, 0x4e, 0x65, 0x76, 0x65, 0x72, 0x74, + 0x68, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x69, + 0x6c, 0x6c, 0x69, 0x6f, 0x6e, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x20, 0x61, + 0x67, 0x6f, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0d, 0x0a, 0x3c, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0d, 0xce, 0x95, 0xce, 0xbb, 0xce, 0xbb, 0xce, + 0xb7, 0xce, 0xbd, 0xce, 0xb9, 0xce, 0xba, 0xce, 0xac, 0x0a, 0x74, 0x61, 0x6b, + 0x65, 0x20, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x20, 0x6f, + 0x66, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x4d, 0x69, 0x63, 0x72, + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, + 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x79, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x64, 0x69, 0x76, 0x20, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x68, 0x6f, 0x72, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x65, 0x6e, 0x6f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x65, 0x78, + 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x73, 0x73, 0x65, + 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x74, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x67, 0x20, 0x6d, 0x69, 0x6c, 0x69, 0x74, 0x61, 0x72, 0x79, 0x69, 0x73, 0x6f, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, + 0x65, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x4f, 0x6c, 0x64, 0x20, + 0x54, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x66, 0x72, 0x69, + 0x63, 0x61, 0x6e, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x73, + 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, + 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x6f, + 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x65, 0x61, 0x6d, + 0x61, 0x6b, 0x65, 0x73, 0x20, 0x69, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x72, 0x67, 0x75, 0x61, 0x62, + 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, + 0x3e, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x3d, + 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x2f, 0x3e, + 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x63, 0x69, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x74, 0x68, 0x65, 0x74, 0x77, 0x6f, 0x2d, 0x74, 0x68, 0x69, 0x72, + 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x44, 0x75, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2c, + 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x61, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x64, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x61, + 0x6e, 0x64, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x6e, + 0x74, 0x6c, 0x79, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64, 0x20, 0x74, + 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x63, 0x69, + 0x6f, 0x75, 0x73, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x66, 0x6f, + 0x72, 0x6d, 0x65, 0x72, 0x6c, 0x79, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, + 0x61, 0x73, 0x73, 0x75, 0x72, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, + 0x70, 0x70, 0x65, 0x61, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x6f, 0x63, 0x63, + 0x61, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, + 0x64, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x61, 0x62, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x3d, 0x22, 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x22, 0x20, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x3b, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, + 0x3a, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x6a, 0x61, 0x78, 0x2f, 0x6c, + 0x69, 0x62, 0x73, 0x2f, 0x6a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x31, 0x2e, + 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x3d, 0x22, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x68, 0x74, 0x74, 0x70, 0x2d, + 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, + 0x79, 0x20, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3c, 0x2f, 0x61, 0x3e, 0x65, + 0x28, 0x22, 0x25, 0x33, 0x43, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, + 0x72, 0x63, 0x3d, 0x27, 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, + 0x22, 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x22, 0x3e, 0x4f, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x68, 0x61, 0x6e, 0x64, + 0x2c, 0x2e, 0x6a, 0x70, 0x67, 0x7c, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x7c, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x7c, 0x32, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x3a, 0x6e, 0x69, 0x6e, 0x65, 0x74, 0x65, 0x65, 0x6e, 0x74, 0x68, + 0x20, 0x63, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x79, 0x3c, 0x2f, 0x62, 0x6f, 0x64, + 0x79, 0x3e, 0x0d, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0d, 0x0a, + 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x3b, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, + 0x69, 0x67, 0x6e, 0x3a, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x6f, 0x6e, + 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x62, 0x6f, 0x6c, + 0x64, 0x3b, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x22, + 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, + 0x22, 0x30, 0x22, 0x20, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x6c, 0x69, 0x6e, 0x6b, + 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, + 0x64, 0x74, 0x64, 0x22, 0x3e, 0x0a, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3c, 0x2f, + 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x3e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x66, 0x6f, 0x72, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, + 0x3b, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, + 0x62, 0x6f, 0x6c, 0x64, 0x3b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x3c, 0x73, 0x70, + 0x61, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x6f, 0x6e, + 0x74, 0x2d, 0x6f, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x20, 0x77, 0x69, + 0x64, 0x65, 0x20, 0x76, 0x61, 0x72, 0x69, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, + 0x20, 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, + 0x6d, 0x6c, 0x3e, 0x0d, 0x0a, 0x3c, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, + 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x22, 0x3e, + 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x2f, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x3a, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x63, 0x6f, 0x6e, 0x63, 0x65, + 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, + 0x3d, 0x68, 0x74, 0x74, 0x70, 0x25, 0x33, 0x41, 0x25, 0x32, 0x46, 0x25, 0x32, + 0x46, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, + 0x61, 0x72, 0x20, 0x63, 0x75, 0x6c, 0x74, 0x75, 0x72, 0x65, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, + 0x2f, 0x3e, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x48, 0x61, 0x72, 0x76, 0x61, 0x72, + 0x64, 0x20, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, 0x74, + 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, + 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x4f, 0x78, 0x66, 0x6f, + 0x72, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, + 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, + 0x72, 0x64, 0x73, 0x22, 0x20, 0x63, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x74, 0x68, + 0x65, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x64, 0x20, 0x4b, 0x69, 0x6e, 0x67, + 0x64, 0x6f, 0x6d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x67, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x64, 0x69, 0x76, 0x20, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x64, 0x69, + 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x64, 0x65, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, + 0x61, 0x6e, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x74, 0x65, 0x6c, 0x65, + 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6c, 0x79, + 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x61, 0x66, 0x74, 0x65, 0x72, 0x65, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x61, 0x6e, 0x20, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x48, 0x6f, 0x77, 0x65, 0x76, + 0x65, 0x72, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, + 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x22, 0x20, 0x73, + 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x54, 0x65, 0x6c, 0x65, 0x63, 0x6f, + 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x6e, 0x6f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, + 0x77, 0x22, 0x20, 0x74, 0x48, 0x6f, 0x6c, 0x79, 0x20, 0x52, 0x6f, 0x6d, 0x61, + 0x6e, 0x20, 0x45, 0x6d, 0x70, 0x65, 0x72, 0x6f, 0x72, 0x61, 0x6c, 0x6d, 0x6f, + 0x73, 0x74, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x6c, + 0x79, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, + 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x61, + 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x53, 0x74, 0x61, 0x74, 0x65, 0x63, 0x75, + 0x6c, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x43, 0x49, 0x41, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, + 0x46, 0x61, 0x63, 0x74, 0x62, 0x6f, 0x6f, 0x6b, 0x74, 0x68, 0x65, 0x20, 0x6d, + 0x6f, 0x73, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, + 0x61, 0x6e, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x72, 0x79, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x3c, 0x6c, 0x69, + 0x3e, 0x3c, 0x65, 0x6d, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x2f, 0x74, 0x68, 0x65, 0x20, 0x41, 0x74, 0x6c, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x20, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x6c, 0x79, 0x20, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2c, 0x73, + 0x68, 0x6f, 0x72, 0x74, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, + 0x20, 0x74, 0x68, 0x65, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, + 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x74, 0x68, 0x65, 0x20, + 0x4f, 0x74, 0x74, 0x6f, 0x6d, 0x61, 0x6e, 0x20, 0x45, 0x6d, 0x70, 0x69, 0x72, + 0x65, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x41, 0x6e, 0x20, 0x49, 0x6e, 0x74, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, + 0x69, 0x6e, 0x64, 0x69, 0x67, 0x65, 0x6e, 0x6f, 0x75, 0x73, 0x20, 0x70, 0x65, + 0x6f, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x65, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x64, + 0x69, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, + 0x68, 0x72, 0x65, 0x65, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x20, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x69, 0x73, 0x20, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, + 0x72, 0x64, 0x69, 0x73, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6f, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x77, 0x69, + 0x64, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x65, 0x64, + 0x20, 0x61, 0x73, 0x68, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x66, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, + 0x44, 0x6f, 0x6d, 0x69, 0x6e, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52, 0x65, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x74, 0x68, 0x65, + 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, + 0x6f, 0x66, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x6c, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69, 0x73, 0x20, 0x61, + 0x6c, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x6c, + 0x79, 0x70, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, + 0x6e, 0x20, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x69, 0x63, 0x20, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x20, 0x61, 0x63, 0x63, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x74, 0x68, 0x65, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6c, 0x79, 0x20, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x72, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x20, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x20, + 0x6f, 0x66, 0x20, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x7c, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x49, 0x6e, 0x20, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x74, 0x68, + 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x6f, + 0x74, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x74, 0x68, + 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x65, + 0x61, 0x72, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x3c, 0x2f, 0x64, 0x69, 0x76, + 0x3e, 0x0d, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x0d, 0x0a, + 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x2e, 0x70, 0x68, 0x70, 0x77, 0x61, 0x73, 0x20, 0x65, 0x73, 0x74, 0x61, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x6d, 0x69, 0x6e, + 0x2e, 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3e, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, + 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x61, 0x20, 0x73, 0x74, 0x72, 0x6f, + 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, + 0x74, 0x6f, 0x70, 0x3a, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, + 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x67, 0x72, 0x61, 0x64, + 0x75, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, + 0x65, 0x54, 0x72, 0x61, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, + 0x79, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x28, 0x22, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x29, 0x3b, 0x48, 0x6f, + 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3b, + 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x2d, 0x6c, 0x65, 0x66, 0x74, 0x3a, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x67, + 0x61, 0x69, 0x6e, 0x73, 0x74, 0x30, 0x3b, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x55, 0x6e, 0x66, + 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x2c, 0x20, 0x74, + 0x68, 0x65, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x2f, 0x78, 0x2d, 0x69, 0x63, 0x6f, 0x6e, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, + 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x66, + 0x69, 0x78, 0x22, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x09, 0x09, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x0a, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6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x70, 0x61, 0x64, 0x64, 0x69, + 0x6e, 0x67, 0x3d, 0x22, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x3d, 0x22, 0x6f, 0x66, 0x66, 0x22, 0x20, 0x74, 0x65, 0x78, + 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x3b, 0x74, 0x6f, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x62, 0x61, 0x63, 0x6b, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, + 0x20, 0x23, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x2f, 0x64, 0x69, 0x76, 0x3e, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, + 0x3d, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x23, 0x22, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, + 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3d, 0x22, 0x2f, + 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x77, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x55, 0x52, + 0x49, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x28, 0x22, 0x20, + 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x28, 0x27, + 0x3c, 0x73, 0x63, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, + 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, + 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, + 0x6a, 0x73, 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, + 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, + 0x0a, 0x0d, 0x0a, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0d, 0x0a, 0x3c, + 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x2f, + 0x22, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, 0x5f, 0x62, 0x6c, + 0x61, 0x6e, 0x6b, 0x22, 0x3e, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x75, 0x74, 0x66, 0x2d, 0x38, + 0x22, 0x3f, 0x3e, 0x0a, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x3d, 0x22, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, + 0x63, 0x73, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x20, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3d, 0x22, 0x6f, 0x67, 0x3a, + 0x74, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, + 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, + 0x65, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x68, + 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, + 0x75, 0x74, 0x66, 0x2d, 0x38, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x30, + 0x30, 0x25, 0x22, 0x20, 0x49, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x3c, 0x2f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x6f, 0x6e, 0x74, + 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x31, 0x3e, 0x3c, 0x2f, 0x73, 0x70, 0x61, + 0x6e, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x69, 0x64, 0x3d, 0x67, 0x62, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x43, 0x6f, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, + 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x69, 0x6d, 0x45, + 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x20, + 0x6f, 0x66, 0x20, 0x53, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x64, 0x69, + 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x3a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x2e, 0x67, 0x65, + 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, + 0x69, 0x64, 0x29, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x28, 0x27, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, 0x29, + 0x3b, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x3d, 0x22, 0x6f, 0x67, 0x3a, 0xd0, 0x91, 0xd1, 0x8a, 0xd0, + 0xbb, 0xd0, 0xb3, 0xd0, 0xb0, 0xd1, 0x80, 0xd1, 0x81, 0xd0, 0xba, 0xd0, 0xb8, + 0x0a, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x3e, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x63, 0x79, 0x20, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3c, 0x2f, 0x61, 0x3e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, + 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x3e, 0x3c, + 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x2f, 0x2f, 0x69, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x26, 0x71, + 0x75, 0x6f, 0x74, 0x3b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x70, 0x75, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, 0x6e, 0x20, 0x57, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x2c, 0x20, 0x44, 0x2e, + 0x43, 0x2e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x62, 0x61, 0x63, + 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x61, 0x6d, 0x6f, 0x6e, 0x67, + 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x2c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x66, + 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x61, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x72, 0x20, 0x4f, 0x78, 0x66, 0x6f, 0x72, 0x64, 0x20, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, 0x20, 0x6d, 0x69, + 0x73, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x66, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, + 0x2c, 0x20, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x2f, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x61, 0x20, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74, 0x79, 0x65, 0x78, 0x70, 0x61, + 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x69, 0x6e, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x61, 0x66, 0x66, 0x69, 0x6c, 0x69, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, + 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, + 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, + 0x6f, 0x66, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x3e, + 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x3e, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x20, 0x6f, 0x66, 0x20, 0x49, 0x72, 0x65, 0x6c, 0x61, 0x6e, 0x64, 0x0a, 0x3c, + 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x69, 0x6e, 0x66, 0x6c, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x4f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x77, + 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x68, 0x65, 0x61, 0x64, + 0x71, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x61, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x6d, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x64, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x64, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x6c, 0x20, 0x52, 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x6f, 0x66, + 0x62, 0x65, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x79, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x4e, + 0x6f, 0x74, 0x65, 0x2c, 0x20, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, + 0x20, 0x74, 0x68, 0x61, 0x74, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, + 0x74, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x75, 0x6e, 0x64, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x69, 0x73, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x20, 0x63, 0x6f, + 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x68, 0x69, 0x73, 0x20, 0x79, + 0x6f, 0x75, 0x6e, 0x67, 0x65, 0x72, 0x20, 0x62, 0x72, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x74, 0x74, 0x70, + 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x58, 0x2d, 0x55, 0x41, 0x2d, + 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x6f, 0x66, 0x20, 0x42, 0x72, 0x69, 0x74, + 0x69, 0x73, 0x68, 0x20, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x61, 0x68, + 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, + 0x63, 0x69, 0x7a, 0x65, 0x64, 0x28, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, + 0x20, 0x74, 0x68, 0x65, 0x70, 0x61, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, + 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x30, 0x22, 0x20, + 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, + 0x30, 0x22, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x73, 0x61, 0x6e, 0x64, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x46, + 0x6f, 0x72, 0x68, 0x61, 0x76, 0x65, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x25, 0x33, 0x45, 0x25, 0x33, + 0x43, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x25, 0x33, 0x45, 0x22, 0x29, + 0x29, 0x3b, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x3c, 0x6c, 0x69, 0x3e, + 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x2f, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x74, 0x65, 0x78, + 0x74, 0x2d, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, + 0x6e, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3c, 0x6d, + 0x65, 0x74, 0x61, 0x20, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, + 0x76, 0x3d, 0x22, 0x58, 0x2d, 0x6e, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, + 0x28, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, + 0x2d, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, + 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3d, 0x22, 0x6a, 0x61, 0x76, + 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, + 0x66, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x6a, 0x61, 0x76, + 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3a, 0x2d, 0x2d, 0x3e, 0x0d, 0x0a, + 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x74, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x27, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x68, 0x6f, 0x72, 0x74, + 0x63, 0x75, 0x74, 0x20, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0d, 0x0a, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x3c, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x74, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x3d, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x20, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x3d, 0x22, 0x58, 0x2d, 0x55, 0x41, 0x2d, 0x43, 0x6f, + 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x20, + 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x20, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, 0x2f, 0x75, + 0x6c, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67, + 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x2f, 0x2f, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, + 0x6c, 0x69, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x66, 0x6f, 0x72, + 0x6d, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x22, 0x71, 0x22, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x30, 0x30, 0x25, 0x22, 0x20, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, + 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, + 0x20, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x20, 0x68, 0x36, 0x3e, 0x3c, 0x75, 0x6c, + 0x3e, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x68, 0x74, 0x74, 0x70, + 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x63, 0x73, 0x73, 0x22, 0x20, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3d, 0x22, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, + 0x22, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x20, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x68, 0x74, 0x6d, + 0x6c, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, + 0x66, 0x2d, 0x38, 0x22, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x3d, 0x22, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x74, 0x65, 0x0d, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, + 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x3e, + 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x20, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x3e, + 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x65, 0x63, + 0x65, 0x73, 0x73, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x46, 0x6f, 0x72, 0x20, 0x6d, + 0x6f, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x3c, 0x21, 0x44, 0x4f, + 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x68, + 0x74, 0x6d, 0x6c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, + 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x22, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x3a, 0x76, 0x6f, 0x69, 0x64, 0x28, 0x30, 0x29, 0x3b, 0x22, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x3d, 0x22, 0x6f, 0x66, 0x66, 0x22, 0x20, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x3e, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, + 0x22, 0x3e, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0d, 0x0a, + 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, + 0x68, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, + 0x64, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x6d, 0x69, 0x73, 0x63, 0x6f, + 0x6e, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, + 0x68, 0x65, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x64, 0x75, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, + 0x6d, 0x65, 0x2c, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x69, 0x63, + 0x6f, 0x6e, 0x22, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, + 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x64, 0x69, + 0x70, 0x6c, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x20, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x74, 0x65, + 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x6d, + 0x65, 0x74, 0x61, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x22, + 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, + 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x69, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x74, 0x68, 0x65, 0x20, 0x65, + 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x20, + 0x6f, 0x66, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x64, 0x69, + 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x26, 0x61, 0x6d, 0x70, + 0x3b, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x61, 0x6d, 0x70, 0x3b, 0x6e, 0x62, + 0x73, 0x70, 0x3b, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x65, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x71, 0x75, 0x69, + 0x74, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, + 0x66, 0x72, 0x6f, 0x6d, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x64, 0x69, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x77, 0x69, 0x64, 0x65, 0x6c, 0x79, 0x20, + 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, + 0x77, 0x61, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x77, 0x69, 0x74, 0x68, 0x20, 0x76, + 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, + 0x73, 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x28, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x64, 0x65, 0x74, 0x61, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, + 0x74, 0x3d, 0x22, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x3e, 0x20, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, + 0x20, 0x2f, 0x3e, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x61, 0x62, 0x6c, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6d, 0x6f, + 0x72, 0x65, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x74, + 0x68, 0x61, 0x74, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x70, 0x65, 0x72, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, + 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x22, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x72, 0x65, 0x73, + 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x76, 0x65, 0x6c, + 0x6f, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6f, 0x6e, + 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, + 0x65, 0x6e, 0x74, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x66, 0x6f, 0x72, + 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, + 0x6c, 0x20, 0x6f, 0x63, 0x63, 0x61, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x75, 0x67, 0x75, 0xc3, 0xaa, 0x73, 0x20, 0x28, 0x45, 0x75, 0x72, + 0x6f, 0x70, 0x65, 0x75, 0x29, 0xd0, 0xa3, 0xd0, 0xba, 0xd1, 0x80, 0xd0, 0xb0, + 0xd1, 0x97, 0xd0, 0xbd, 0xd1, 0x81, 0xd1, 0x8c, 0xd0, 0xba, 0xd0, 0xb0, 0xd1, + 0x83, 0xd0, 0xba, 0xd1, 0x80, 0xd0, 0xb0, 0xd1, 0x97, 0xd0, 0xbd, 0xd1, 0x81, + 0xd1, 0x8c, 0xd0, 0xba, 0xd0, 0xb0, 0xd0, 0xa0, 0xd0, 0xbe, 0xd1, 0x81, 0xd1, + 0x81, 0xd0, 0xb8, 0xd0, 0xb9, 0xd1, 0x81, 0xd0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, 0x75, 0x74, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, + 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x3c, 0x69, 0x6d, 0x67, 0x20, + 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x20, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x20, + 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x22, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x3d, 0x22, 0x6f, 0x66, 0x66, 0x22, + 0x20, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x64, + 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x3c, 0x6c, 0x69, 0x20, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x3d, 0x22, 0x63, 0x73, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, + 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x3c, + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, + 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, + 0x2f, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x22, 0x20, 0x0d, 0x0a, 0x3c, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x2f, 0x20, 0x6f, 0x6e, 0x63, 0x6c, 0x69, 0x63, 0x6b, + 0x3d, 0x22, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3a, + 0x28, 0x6e, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, 0x29, 0x2e, 0x67, 0x65, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x7d, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, + 0x31, 0x22, 0x20, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x52, + 0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x20, 0x3c, + 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x64, 0x65, + 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x75, 0x6e, 0x64, 0x65, + 0x72, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, + 0x69, 0x76, 0x3e, 0x0a, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, + 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, + 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x23, 0x76, 0x69, 0x65, 0x77, 0x70, + 0x6f, 0x72, 0x74, 0x7b, 0x6d, 0x69, 0x6e, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x72, + 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x3e, 0x3c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x20, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x73, 0x20, + 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0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 0xbf, 0xe0, 0xa4, 0x9f, 0xe0, 0xa5, 0x87, 0xe0, 0xa4, 0xa1, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, + 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, 0x6d, + 0x6c, 0x3e, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x3c, 0x6d, 0x65, 0x74, + 0x61, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x22, 0x75, 0x74, + 0x66, 0x2d, 0x38, 0x22, 0x3e, 0x3a, 0x75, 0x72, 0x6c, 0x22, 0x20, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x2e, 0x63, 0x73, 0x73, 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, + 0x2f, 0x63, 0x73, 0x73, 0x22, 0x3e, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, + 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3d, 0x22, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, + 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x74, 0x79, + 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x3d, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x20, + 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, + 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x69, 0x63, 0x6f, 0x6e, + 0x22, 0x20, 0x2f, 0x3e, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, + 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, + 0x2e, 0x63, 0x73, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, + 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, + 0x22, 0x31, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, + 0x22, 0x22, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x6e, + 0x6f, 0x6e, 0x65, 0x3b, 0x22, 0x3e, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x74, 0x65, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 0x2f, 0x44, 0x54, 0x44, + 0x20, 0x58, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x65, 0x6c, + 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, + 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x20, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3d, 0x22, 0x2f, 0x61, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, + 0x73, 0x70, 0x61, 0x6e, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x3d, 0x22, 0x73, 0x0a, + 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x3d, 0x22, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x22, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, + 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x3d, 0x22, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, + 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x27, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x63, + 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x70, 0x65, + 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x72, + 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3d, 0x22, 0x31, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, + 0x22, 0x20, 0x3d, 0x27, 0x2b, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x55, 0x52, + 0x49, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x28, 0x3c, 0x6c, + 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x22, 0x20, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x2c, + 0x20, 0x74, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2c, 0x20, 0x74, + 0x65, 0x78, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x22, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x20, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x3e, 0x0a, 0x3c, 0x61, 0x20, + 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x63, 0x73, 0x73, 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, + 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, + 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, + 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x3d, 0x22, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x22, 0x3e, 0x61, 0x72, 0x69, 0x61, 0x2d, 0x68, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x3e, 0xc2, 0xb7, + 0x3c, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x6c, 0x3d, 0x30, + 0x3b, 0x7d, 0x29, 0x28, 0x29, 0x3b, 0x0a, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x7b, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x2d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x75, 0x72, + 0x6c, 0x28, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x3c, 0x6c, 0x69, + 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x09, 0x09, + 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, + 0x61, 0x72, 0x69, 0x61, 0x2d, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x3d, 0x22, + 0x74, 0x72, 0x75, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, + 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3d, 0x22, 0x6a, 0x61, 0x76, 0x61, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x20, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x3e, 0x0a, 0x3c, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x3c, 0x2f, 0x64, 0x69, + 0x76, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x61, 0x72, 0x69, 0x61, 0x2d, 0x68, + 0x69, 0x64, 0x64, 0x65, 0x6e, 0x3d, 0x22, 0x74, 0x72, 0x65, 0x3d, 0x28, 0x6e, + 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x28, 0x29, 0x70, 0x6f, 0x72, 0x74, 0x75, 0x67, 0x75, 0xc3, + 0xaa, 0x73, 0x20, 0x28, 0x64, 0x6f, 0x20, 0x42, 0x72, 0x61, 0x73, 0x69, 0x6c, + 0x29, 0xd0, 0xbe, 0xd1, 0x80, 0xd0, 0xb3, 0xd0, 0xb0, 0xd0, 0xbd, 0xd0, 0xb8, + 0xd0, 0xb7, 0xd0, 0xb0, 0xd1, 0x86, 0xd0, 0xb8, 0xd0, 0xb8, 0xd0, 0xb2, 0xd0, + 0xbe, 0xd0, 0xb7, 0xd0, 0xbc, 0xd0, 0xbe, 0xd0, 0xb6, 0xd0, 0xbd, 0xd0, 0xbe, + 0xd1, 0x81, 0xd1, 0x82, 0xd1, 0x8c, 0xd0, 0xb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, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, + 0x6e, 0x73, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, + 0x58, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x54, 0x44, 0x54, + 0x44, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x31, 0x2d, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x78, 0x68, + 0x74, 0x6d, 0x6c, 0x31, 0x2f, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x27, 0x74, 0x65, + 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x27, 0x3b, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x73, + 0x65, 0x72, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x3c, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x68, 0x69, 0x64, 0x64, + 0x65, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6a, 0x73, 0x22, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, + 0x63, 0x72, 0x69, 0x28, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x29, + 0x2e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x55, 0x41, 0x2d, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x3d, 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, + 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, 0x2f, 0x3e, + 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x20, 0x69, 0x63, 0x6f, 0x6e, 0x3c, 0x6c, + 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x3c, 0x2f, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x3d, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x3c, 0x61, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3d, 0x22, + 0x5f, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, + 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, + 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, + 0x3d, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, + 0x63, 0x72, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, + 0x22, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, + 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, + 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, 0x2f, 0x3e, 0x64, 0x74, 0x64, + 0x22, 0x3e, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, 0x6e, + 0x73, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, + 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x34, 0x2e, + 0x30, 0x31, 0x20, 0x54, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x54, 0x61, 0x67, + 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x27, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, + 0x29, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x3c, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, + 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x22, 0x20, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, + 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x22, 0x3e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x42, 0x79, 0x49, 0x64, 0x28, 0x3d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x28, 0x27, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, + 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x27, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64, + 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, + 0x79, 0x54, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x73, 0x6e, 0x69, 0x63, + 0x61, 0x6c, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x43, 0x2f, 0x2f, 0x44, 0x54, + 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x3c, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, + 0x73, 0x22, 0x3e, 0x0a, 0x0a, 0x3c, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x74, + 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, + 0x22, 0x3e, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, + 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, + 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x64, 0x69, + 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x30, 0x22, 0x68, 0x74, 0x6d, 0x6c, + 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, + 0x2d, 0x38, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, + 0x3d, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, + 0x65, 0x3b, 0x22, 0x3e, 0x3c, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, 0x20, 0x68, + 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, 0x78, + 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x27, + 0x3e, 0xd0, 0xb4, 0xd0, 0xb5, 0xd1, 0x8f, 0xd1, 0x82, 0xd0, 0xb5, 0xd0, 0xbb, + 0xd1, 0x8c, 0xd0, 0xbd, 0xd0, 0xbe, 0xd1, 0x81, 0xd1, 0x82, 0xd0, 0xb8, 0xd1, + 0x81, 0xd0, 0xbe, 0xd0, 0xbe, 0xd1, 0x82, 0xd0, 0xb2, 0xd0, 0xb5, 0xd1, 0x82, + 0xd1, 0x81, 0xd1, 0x82, 0xd0, 0xb2, 0xd0, 0xb8, 0xd0, 0xb8, 0xd0, 0xbf, 0xd1, + 0x80, 0xd0, 0xbe, 0xd0, 0xb8, 0xd0, 0xb7, 0xd0, 0xb2, 0xd0, 0xbe, 0xd0, 0xb4, + 0xd1, 0x81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0, 0xa4, 0xa4, 0xe0, 0xa4, 0x95, 0xe0, 0xa5, 0x89, + 0xe0, 0xa4, 0xaa, 0xe0, 0xa5, 0x80, 0xe0, 0xa4, 0xb0, 0xe0, 0xa4, 0xbe, 0xe0, + 0xa4, 0x87, 0xe0, 0xa4, 0x9f, 0xe0, 0xa4, 0xb5, 0xe0, 0xa4, 0xbf, 0xe0, 0xa4, + 0x9c, 0xe0, 0xa5, 0x8d, 0xe0, 0xa4, 0x9e, 0xe0, 0xa4, 0xbe, 0xe0, 0xa4, 0xaa, + 0xe0, 0xa4, 0xa8, 0xe0, 0xa4, 0x95, 0xe0, 0xa4, 0xbe, 0xe0, 0xa4, 0xb0, 0xe0, + 0xa5, 0x8d, 0xe0, 0xa4, 0xb0, 0xe0, 0xa4, 0xb5, 0xe0, 0xa4, 0xbe, 0xe0, 0xa4, + 0x88, 0xe0, 0xa4, 0xb8, 0xe0, 0xa4, 0x95, 0xe0, 0xa5, 0x8d, 0xe0, 0xa4, 0xb0, + 0xe0, 0xa4, 0xbf, 0xe0, 0xa4, 0xaf, 0xe0, 0xa4, 0xa4, 0xe0, 0xa4, 0xbe, +]); + +// Used by the browser version +exports.init = function() { + return exports.dictionary; +}; diff --git a/node_modules/brotli/dec/dictionary.bin.js b/node_modules/brotli/dec/dictionary.bin.js new file mode 100644 index 0000000..2382a76 --- /dev/null +++ b/node_modules/brotli/dec/dictionary.bin.js @@ -0,0 +1 @@ +module.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJo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qH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="; diff --git a/node_modules/brotli/dec/dictionary.js b/node_modules/brotli/dec/dictionary.js new file mode 100644 index 0000000..927208a --- /dev/null +++ b/node_modules/brotli/dec/dictionary.js @@ -0,0 +1,36 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Collection of static dictionary words. +*/ + +var data = require('./dictionary-data'); +exports.init = function() { + exports.dictionary = data.init(); +}; + +exports.offsetsByLength = new Uint32Array([ + 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, + 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536, + 115968, 118528, 119872, 121280, 122016, +]); + +exports.sizeBitsByLength = new Uint8Array([ + 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, + 7, 6, 6, 5, 5, +]); + +exports.minDictionaryWordLength = 4; +exports.maxDictionaryWordLength = 24; diff --git a/node_modules/brotli/dec/huffman.js b/node_modules/brotli/dec/huffman.js new file mode 100644 index 0000000..a0d8e06 --- /dev/null +++ b/node_modules/brotli/dec/huffman.js @@ -0,0 +1,123 @@ +function HuffmanCode(bits, value) { + this.bits = bits; /* number of bits used for this symbol */ + this.value = value; /* symbol value or table offset */ +} + +exports.HuffmanCode = HuffmanCode; + +var MAX_LENGTH = 15; + +/* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the + bit-wise reversal of the len least significant bits of key. */ +function GetNextKey(key, len) { + var step = 1 << (len - 1); + while (key & step) { + step >>= 1; + } + return (key & (step - 1)) + step; +} + +/* Stores code in table[0], table[step], table[2*step], ..., table[end] */ +/* Assumes that end is an integer multiple of step */ +function ReplicateValue(table, i, step, end, code) { + do { + end -= step; + table[i + end] = new HuffmanCode(code.bits, code.value); + } while (end > 0); +} + +/* Returns the table width of the next 2nd level table. count is the histogram + of bit lengths for the remaining symbols, len is the code length of the next + processed symbol */ +function NextTableBitSize(count, len, root_bits) { + var left = 1 << (len - root_bits); + while (len < MAX_LENGTH) { + left -= count[len]; + if (left <= 0) break; + ++len; + left <<= 1; + } + return len - root_bits; +} + +exports.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) { + var start_table = table; + var code; /* current table entry */ + var len; /* current code length */ + var symbol; /* symbol index in original or sorted table */ + var key; /* reversed prefix code */ + var step; /* step size to replicate values in current table */ + var low; /* low bits for current root entry */ + var mask; /* mask for low bits */ + var table_bits; /* key length of current table */ + var table_size; /* size of current table */ + var total_size; /* sum of root table size and 2nd level table sizes */ + var sorted; /* symbols sorted by code length */ + var count = new Int32Array(MAX_LENGTH + 1); /* number of codes of each length */ + var offset = new Int32Array(MAX_LENGTH + 1); /* offsets in sorted table for each length */ + + sorted = new Int32Array(code_lengths_size); + + /* build histogram of code lengths */ + for (symbol = 0; symbol < code_lengths_size; symbol++) { + count[code_lengths[symbol]]++; + } + + /* generate offsets into sorted symbol table by code length */ + offset[1] = 0; + for (len = 1; len < MAX_LENGTH; len++) { + offset[len + 1] = offset[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (symbol = 0; symbol < code_lengths_size; symbol++) { + if (code_lengths[symbol] !== 0) { + sorted[offset[code_lengths[symbol]]++] = symbol; + } + } + + table_bits = root_bits; + table_size = 1 << table_bits; + total_size = table_size; + + /* special case code with only one value */ + if (offset[MAX_LENGTH] === 1) { + for (key = 0; key < total_size; ++key) { + root_table[table + key] = new HuffmanCode(0, sorted[0] & 0xffff); + } + + return total_size; + } + + /* fill in root table */ + key = 0; + symbol = 0; + for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + code = new HuffmanCode(len & 0xff, sorted[symbol++] & 0xffff); + ReplicateValue(root_table, table + key, step, table_size, code); + key = GetNextKey(key, len); + } + } + + /* fill in 2nd level tables and add pointers to root table */ + mask = total_size - 1; + low = -1; + for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + if ((key & mask) !== low) { + table += table_size; + table_bits = NextTableBitSize(count, len, root_bits); + table_size = 1 << table_bits; + total_size += table_size; + low = key & mask; + root_table[start_table + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff); + } + code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff); + ReplicateValue(root_table, table + (key >> root_bits), step, table_size, code); + key = GetNextKey(key, len); + } + } + + return total_size; +} diff --git a/node_modules/brotli/dec/prefix.js b/node_modules/brotli/dec/prefix.js new file mode 100644 index 0000000..386c2cf --- /dev/null +++ b/node_modules/brotli/dec/prefix.js @@ -0,0 +1,60 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Lookup tables to map prefix codes to value ranges. This is used during + decoding of the block lengths, literal insertion lengths and copy lengths. +*/ + +/* Represents the range of values belonging to a prefix code: */ +/* [offset, offset + 2^nbits) */ +function PrefixCodeRange(offset, nbits) { + this.offset = offset; + this.nbits = nbits; +} + +exports.kBlockLengthPrefixCode = [ + new PrefixCodeRange(1, 2), new PrefixCodeRange(5, 2), new PrefixCodeRange(9, 2), new PrefixCodeRange(13, 2), + new PrefixCodeRange(17, 3), new PrefixCodeRange(25, 3), new PrefixCodeRange(33, 3), new PrefixCodeRange(41, 3), + new PrefixCodeRange(49, 4), new PrefixCodeRange(65, 4), new PrefixCodeRange(81, 4), new PrefixCodeRange(97, 4), + new PrefixCodeRange(113, 5), new PrefixCodeRange(145, 5), new PrefixCodeRange(177, 5), new PrefixCodeRange(209, 5), + new PrefixCodeRange(241, 6), new PrefixCodeRange(305, 6), new PrefixCodeRange(369, 7), new PrefixCodeRange(497, 8), + new PrefixCodeRange(753, 9), new PrefixCodeRange(1265, 10), new PrefixCodeRange(2289, 11), new PrefixCodeRange(4337, 12), + new PrefixCodeRange(8433, 13), new PrefixCodeRange(16625, 24) +]; + +exports.kInsertLengthPrefixCode = [ + new PrefixCodeRange(0, 0), new PrefixCodeRange(1, 0), new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), + new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 1), new PrefixCodeRange(8, 1), + new PrefixCodeRange(10, 2), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 3), new PrefixCodeRange(26, 3), + new PrefixCodeRange(34, 4), new PrefixCodeRange(50, 4), new PrefixCodeRange(66, 5), new PrefixCodeRange(98, 5), + new PrefixCodeRange(130, 6), new PrefixCodeRange(194, 7), new PrefixCodeRange(322, 8), new PrefixCodeRange(578, 9), + new PrefixCodeRange(1090, 10), new PrefixCodeRange(2114, 12), new PrefixCodeRange(6210, 14), new PrefixCodeRange(22594, 24), +]; + +exports.kCopyLengthPrefixCode = [ + new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), + new PrefixCodeRange(6, 0), new PrefixCodeRange(7, 0), new PrefixCodeRange(8, 0), new PrefixCodeRange(9, 0), + new PrefixCodeRange(10, 1), new PrefixCodeRange(12, 1), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 2), + new PrefixCodeRange(22, 3), new PrefixCodeRange(30, 3), new PrefixCodeRange(38, 4), new PrefixCodeRange(54, 4), + new PrefixCodeRange(70, 5), new PrefixCodeRange(102, 5), new PrefixCodeRange(134, 6), new PrefixCodeRange(198, 7), + new PrefixCodeRange(326, 8), new PrefixCodeRange(582, 9), new PrefixCodeRange(1094, 10), new PrefixCodeRange(2118, 24), +]; + +exports.kInsertRangeLut = [ + 0, 0, 8, 8, 0, 16, 8, 16, 16, +]; + +exports.kCopyRangeLut = [ + 0, 8, 0, 8, 16, 0, 16, 8, 16, +]; diff --git a/node_modules/brotli/dec/streams.js b/node_modules/brotli/dec/streams.js new file mode 100644 index 0000000..bfc9516 --- /dev/null +++ b/node_modules/brotli/dec/streams.js @@ -0,0 +1,34 @@ +function BrotliInput(buffer) { + this.buffer = buffer; + this.pos = 0; +} + +BrotliInput.prototype.read = function(buf, i, count) { + if (this.pos + count > this.buffer.length) { + count = this.buffer.length - this.pos; + } + + for (var p = 0; p < count; p++) + buf[i + p] = this.buffer[this.pos + p]; + + this.pos += count; + return count; +} + +exports.BrotliInput = BrotliInput; + +function BrotliOutput(buf) { + this.buffer = buf; + this.pos = 0; +} + +BrotliOutput.prototype.write = function(buf, count) { + if (this.pos + count > this.buffer.length) + throw new Error('Output buffer is not large enough'); + + this.buffer.set(buf.subarray(0, count), this.pos); + this.pos += count; + return count; +}; + +exports.BrotliOutput = BrotliOutput; diff --git a/node_modules/brotli/dec/transform.js b/node_modules/brotli/dec/transform.js new file mode 100644 index 0000000..965e067 --- /dev/null +++ b/node_modules/brotli/dec/transform.js @@ -0,0 +1,247 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Transformations on dictionary words. +*/ + +var BrotliDictionary = require('./dictionary'); + +var kIdentity = 0; +var kOmitLast1 = 1; +var kOmitLast2 = 2; +var kOmitLast3 = 3; +var kOmitLast4 = 4; +var kOmitLast5 = 5; +var kOmitLast6 = 6; +var kOmitLast7 = 7; +var kOmitLast8 = 8; +var kOmitLast9 = 9; +var kUppercaseFirst = 10; +var kUppercaseAll = 11; +var kOmitFirst1 = 12; +var kOmitFirst2 = 13; +var kOmitFirst3 = 14; +var kOmitFirst4 = 15; +var kOmitFirst5 = 16; +var kOmitFirst6 = 17; +var kOmitFirst7 = 18; +var kOmitFirst8 = 19; +var kOmitFirst9 = 20; + +function Transform(prefix, transform, suffix) { + this.prefix = new Uint8Array(prefix.length); + this.transform = transform; + this.suffix = new Uint8Array(suffix.length); + + for (var i = 0; i < prefix.length; i++) + this.prefix[i] = prefix.charCodeAt(i); + + for (var i = 0; i < suffix.length; i++) + this.suffix[i] = suffix.charCodeAt(i); +} + +var kTransforms = [ + new Transform( "", kIdentity, "" ), + new Transform( "", kIdentity, " " ), + new Transform( " ", kIdentity, " " ), + new Transform( "", kOmitFirst1, "" ), + new Transform( "", kUppercaseFirst, " " ), + new Transform( "", kIdentity, " the " ), + new Transform( " ", kIdentity, "" ), + new Transform( "s ", kIdentity, " " ), + new Transform( "", kIdentity, " of " ), + new Transform( "", kUppercaseFirst, "" ), + new Transform( "", kIdentity, " and " ), + new Transform( "", kOmitFirst2, "" ), + new Transform( "", kOmitLast1, "" ), + new Transform( ", ", kIdentity, " " ), + new Transform( "", kIdentity, ", " ), + new Transform( " ", kUppercaseFirst, " " ), + new Transform( "", kIdentity, " in " ), + new Transform( "", kIdentity, " to " ), + new Transform( "e ", kIdentity, " " ), + new Transform( "", kIdentity, "\"" ), + new Transform( "", kIdentity, "." ), + new Transform( "", kIdentity, "\">" ), + new Transform( "", kIdentity, "\n" ), + new Transform( "", kOmitLast3, "" ), + new Transform( "", kIdentity, "]" ), + new Transform( "", kIdentity, " for " ), + new Transform( "", kOmitFirst3, "" ), + new Transform( "", kOmitLast2, "" ), + new Transform( "", kIdentity, " a " ), + new Transform( "", kIdentity, " that " ), + new Transform( " ", kUppercaseFirst, "" ), + new Transform( "", kIdentity, ". " ), + new Transform( ".", kIdentity, "" ), + new Transform( " ", kIdentity, ", " ), + new Transform( "", kOmitFirst4, "" ), + new Transform( "", kIdentity, " with " ), + new Transform( "", kIdentity, "'" ), + new Transform( "", kIdentity, " from " ), + new Transform( "", kIdentity, " by " ), + new Transform( "", kOmitFirst5, "" ), + new Transform( "", kOmitFirst6, "" ), + new Transform( " the ", kIdentity, "" ), + new Transform( "", kOmitLast4, "" ), + new Transform( "", kIdentity, ". The " ), + new Transform( "", kUppercaseAll, "" ), + new Transform( "", kIdentity, " on " ), + new Transform( "", kIdentity, " as " ), + new Transform( "", kIdentity, " is " ), + new Transform( "", kOmitLast7, "" ), + new Transform( "", kOmitLast1, "ing " ), + new Transform( "", kIdentity, "\n\t" ), + new Transform( "", kIdentity, ":" ), + new Transform( " ", kIdentity, ". " ), + new Transform( "", kIdentity, "ed " ), + new Transform( "", kOmitFirst9, "" ), + new Transform( "", kOmitFirst7, "" ), + new Transform( "", kOmitLast6, "" ), + new Transform( "", kIdentity, "(" ), + new Transform( "", kUppercaseFirst, ", " ), + new Transform( "", kOmitLast8, "" ), + new Transform( "", kIdentity, " at " ), + new Transform( "", kIdentity, "ly " ), + new Transform( " the ", kIdentity, " of " ), + new Transform( "", kOmitLast5, "" ), + new Transform( "", kOmitLast9, "" ), + new Transform( " ", kUppercaseFirst, ", " ), + new Transform( "", kUppercaseFirst, "\"" ), + new Transform( ".", kIdentity, "(" ), + new Transform( "", kUppercaseAll, " " ), + new Transform( "", kUppercaseFirst, "\">" ), + new Transform( "", kIdentity, "=\"" ), + new Transform( " ", kIdentity, "." ), + new Transform( ".com/", kIdentity, "" ), + new Transform( " the ", kIdentity, " of the " ), + new Transform( "", kUppercaseFirst, "'" ), + new Transform( "", kIdentity, ". This " ), + new Transform( "", kIdentity, "," ), + new Transform( ".", kIdentity, " " ), + new Transform( "", kUppercaseFirst, "(" ), + new Transform( "", kUppercaseFirst, "." ), + new Transform( "", kIdentity, " not " ), + new Transform( " ", kIdentity, "=\"" ), + new Transform( "", kIdentity, "er " ), + new Transform( " ", kUppercaseAll, " " ), + new Transform( "", kIdentity, "al " ), + new Transform( " ", kUppercaseAll, "" ), + new Transform( "", kIdentity, "='" ), + new Transform( "", kUppercaseAll, "\"" ), + new Transform( "", kUppercaseFirst, ". " ), + new Transform( " ", kIdentity, "(" ), + new Transform( "", kIdentity, "ful " ), + new Transform( " ", kUppercaseFirst, ". " ), + new Transform( "", kIdentity, "ive " ), + new Transform( "", kIdentity, "less " ), + new Transform( "", kUppercaseAll, "'" ), + new Transform( "", kIdentity, "est " ), + new Transform( " ", kUppercaseFirst, "." ), + new Transform( "", kUppercaseAll, "\">" ), + new Transform( " ", kIdentity, "='" ), + new Transform( "", kUppercaseFirst, "," ), + new Transform( "", kIdentity, "ize " ), + new Transform( "", kUppercaseAll, "." ), + new Transform( "\xc2\xa0", kIdentity, "" ), + new Transform( " ", kIdentity, "," ), + new Transform( "", kUppercaseFirst, "=\"" ), + new Transform( "", kUppercaseAll, "=\"" ), + new Transform( "", kIdentity, "ous " ), + new Transform( "", kUppercaseAll, ", " ), + new Transform( "", kUppercaseFirst, "='" ), + new Transform( " ", kUppercaseFirst, "," ), + new Transform( " ", kUppercaseAll, "=\"" ), + new Transform( " ", kUppercaseAll, ", " ), + new Transform( "", kUppercaseAll, "," ), + new Transform( "", kUppercaseAll, "(" ), + new Transform( "", kUppercaseAll, ". " ), + new Transform( " ", kUppercaseAll, "." ), + new Transform( "", kUppercaseAll, "='" ), + new Transform( " ", kUppercaseAll, ". " ), + new Transform( " ", kUppercaseFirst, "=\"" ), + new Transform( " ", kUppercaseAll, "='" ), + new Transform( " ", kUppercaseFirst, "='" ) +]; + +exports.kTransforms = kTransforms; +exports.kNumTransforms = kTransforms.length; + +function ToUpperCase(p, i) { + if (p[i] < 0xc0) { + if (p[i] >= 97 && p[i] <= 122) { + p[i] ^= 32; + } + return 1; + } + + /* An overly simplified uppercasing model for utf-8. */ + if (p[i] < 0xe0) { + p[i + 1] ^= 32; + return 2; + } + + /* An arbitrary transform for three byte characters. */ + p[i + 2] ^= 5; + return 3; +} + +exports.transformDictionaryWord = function(dst, idx, word, len, transform) { + var prefix = kTransforms[transform].prefix; + var suffix = kTransforms[transform].suffix; + var t = kTransforms[transform].transform; + var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1); + var i = 0; + var start_idx = idx; + var uppercase; + + if (skip > len) { + skip = len; + } + + var prefix_pos = 0; + while (prefix_pos < prefix.length) { + dst[idx++] = prefix[prefix_pos++]; + } + + word += skip; + len -= skip; + + if (t <= kOmitLast9) { + len -= t; + } + + for (i = 0; i < len; i++) { + dst[idx++] = BrotliDictionary.dictionary[word + i]; + } + + uppercase = idx - len; + + if (t === kUppercaseFirst) { + ToUpperCase(dst, uppercase); + } else if (t === kUppercaseAll) { + while (len > 0) { + var step = ToUpperCase(dst, uppercase); + uppercase += step; + len -= step; + } + } + + var suffix_pos = 0; + while (suffix_pos < suffix.length) { + dst[idx++] = suffix[suffix_pos++]; + } + + return idx - start_idx; +} diff --git a/node_modules/brotli/decompress.js b/node_modules/brotli/decompress.js new file mode 100644 index 0000000..bf84278 --- /dev/null +++ b/node_modules/brotli/decompress.js @@ -0,0 +1 @@ +module.exports = require('./dec/decode').BrotliDecompressBuffer; diff --git a/node_modules/brotli/enc/pre.js b/node_modules/brotli/enc/pre.js new file mode 100644 index 0000000..4737c01 --- /dev/null +++ b/node_modules/brotli/enc/pre.js @@ -0,0 +1,7 @@ +var Module = {}; +var decode = require('../decompress'); +var base64 = require('base64-js'); +Module['readBinary'] = function() { + var src = base64['toByteArray'](require('../build/mem.js')); + return decode(src); +}; diff --git a/node_modules/brotli/index.js b/node_modules/brotli/index.js new file mode 100644 index 0000000..c9528d8 --- /dev/null +++ b/node_modules/brotli/index.js @@ -0,0 +1,2 @@ +exports.compress = require('./compress'); +exports.decompress = require('./dec/decode').BrotliDecompressBuffer; diff --git a/node_modules/brotli/package.json b/node_modules/brotli/package.json new file mode 100644 index 0000000..0a1222c --- /dev/null +++ b/node_modules/brotli/package.json @@ -0,0 +1,35 @@ +{ + "name": "brotli", + "version": "1.3.3", + "description": "A port of the Brotli compression algorithm as used in WOFF2", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/devongovett/brotli.js.git" + }, + "keywords": [ + "compress", + "decompress", + "encode", + "decode" + ], + "author": "Devon Govett ", + "license": "MIT", + "bugs": { + "url": "https://github.com/devongovett/brotli.js/issues" + }, + "homepage": "https://github.com/devongovett/brotli.js", + "dependencies": { + "base64-js": "^1.1.2" + }, + "devDependencies": { + "mocha": "^2.2.1" + }, + "browser": { + "./dec/dictionary-data.js": "./dec/dictionary-browser.js" + }, + "scripts": { + "test": "mocha", + "prepublish": "make" + } +} diff --git a/node_modules/brotli/readme.md b/node_modules/brotli/readme.md new file mode 100644 index 0000000..a0920a0 --- /dev/null +++ b/node_modules/brotli/readme.md @@ -0,0 +1,61 @@ +# Brotli.js + +Brotli.js is port of the [Brotli](http://tools.ietf.org/html/draft-alakuijala-brotli-01) compression algorithm (as used in the [WOFF2](http://www.w3.org/TR/WOFF2/) font format) to JavaScript. The decompressor is hand ported, and the compressor is ported +with Emscripten. The original C++ source code can be found [here](http://github.com/google/brotli). + +## Installation and usage + +Install using npm. + + npm install brotli + +If you want to use brotli in the browser, you should use [Browserify](http://browserify.org/) to build it. + +In node, or in browserify, you can load brotli in the standard way: + +```javascript +var brotli = require('brotli'); +``` + +You can also require just the `decompress` function or just the `compress` function, which is useful for browserify builds. +For example, here's how you'd require just the `decompress` function. + +```javascript +var decompress = require('brotli/decompress'); +``` + +## API + +### brotli.decompress(buffer, [outSize]) + +Decompresses the given buffer to produce the original input to the compressor. +The `outSize` parameter is optional, and will be computed by the decompressor +if not provided. Inside a WOFF2 file, this can be computed from the WOFF2 directory. + +```javascript +// decode a buffer where the output size is known +brotli.decompress(compressedData, uncompressedLength); + +// decode a buffer where the output size is not known +brotli.decompress(fs.readFileSync('compressed.bin')); +``` + +### brotli.compress(buffer, isText = false) + +Compresses the given buffer. Pass optional parameters as the second argument. + +```javascript +// encode a buffer of binary data +brotli.compress(fs.readFileSync('myfile.bin')); + +// encode some data with options (default options shown) +brotli.compress(fs.readFileSync('myfile.bin'), { + mode: 0, // 0 = generic, 1 = text, 2 = font (WOFF2) + quality: 11, // 0 - 11 + lgwin: 22 // window size +}); +``` + +## License + +MIT diff --git a/node_modules/browserify-zlib/.npmignore b/node_modules/browserify-zlib/.npmignore new file mode 100644 index 0000000..ba8da7d --- /dev/null +++ b/node_modules/browserify-zlib/.npmignore @@ -0,0 +1,7 @@ +node_modules +.DS_Store + +*.log + +test/tmp +test diff --git a/node_modules/browserify-zlib/.travis.yml b/node_modules/browserify-zlib/.travis.yml new file mode 100644 index 0000000..4b4639e --- /dev/null +++ b/node_modules/browserify-zlib/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: node_js +node_js: + - 6 + - 8 + +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + +addons: + firefox: "latest" + +script: + - npm run lint + - npm test diff --git a/node_modules/browserify-zlib/LICENSE b/node_modules/browserify-zlib/LICENSE new file mode 100644 index 0000000..81c6c0c --- /dev/null +++ b/node_modules/browserify-zlib/LICENSE @@ -0,0 +1,70 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015 Devon Govett + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +This project contains parts of Node.js. +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/node_modules/browserify-zlib/README.md b/node_modules/browserify-zlib/README.md new file mode 100644 index 0000000..7cde70b --- /dev/null +++ b/node_modules/browserify-zlib/README.md @@ -0,0 +1,24 @@ +# browserify-zlib + +[![Travis CI](https://travis-ci.org/devongovett/browserify-zlib.svg?branch=master)](https://travis-ci.org/devongovett/browserify-zlib) +[![Dependency Status](https://david-dm.org/devongovett/browserify-zlib.svg?style=flat-square)](https://david-dm.org/devongovett/browserify-zlib) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) + +## Description + +Emulates Node's [zlib](https://nodejs.org/api/zlib.html) module for the browser. Can be used as a drop in replacement with [Browserify](http://browserify.org) and [webpack](http://webpack.github.io/). + +The heavy lifting is done using [pako](https://github.com/nodeca/pako). The code in this module is modeled closely after the code in the source of Node core to get as much compatability as possible. + +## API + +https://nodejs.org/api/zlib.html + +## Not implemented + +The following options/methods are not supported because pako does not support them yet. + +* The `params` method + +## License + +MIT diff --git a/node_modules/browserify-zlib/karma.conf.js b/node_modules/browserify-zlib/karma.conf.js new file mode 100644 index 0000000..e00b23a --- /dev/null +++ b/node_modules/browserify-zlib/karma.conf.js @@ -0,0 +1,11 @@ +module.exports = function (karma) { + karma.set({ + frameworks: ['mocha'], + files: ['test/tmp/browserified.js'], + reporters: ['mocha-own'], + mochaOwnReporter: { + reporter: 'spec' + }, + browsers: process.env.TRAVIS ? ['Firefox', 'PhantomJS'] : ['Chrome', 'PhantomJS'] + }) +} diff --git a/node_modules/browserify-zlib/lib/binding.js b/node_modules/browserify-zlib/lib/binding.js new file mode 100644 index 0000000..e0578b3 --- /dev/null +++ b/node_modules/browserify-zlib/lib/binding.js @@ -0,0 +1,409 @@ +'use strict'; +/* eslint camelcase: "off" */ + +var assert = require('assert'); + +var Zstream = require('pako/lib/zlib/zstream'); +var zlib_deflate = require('pako/lib/zlib/deflate.js'); +var zlib_inflate = require('pako/lib/zlib/inflate.js'); +var constants = require('pako/lib/zlib/constants'); + +for (var key in constants) { + exports[key] = constants[key]; +} + +// zlib modes +exports.NONE = 0; +exports.DEFLATE = 1; +exports.INFLATE = 2; +exports.GZIP = 3; +exports.GUNZIP = 4; +exports.DEFLATERAW = 5; +exports.INFLATERAW = 6; +exports.UNZIP = 7; + +var GZIP_HEADER_ID1 = 0x1f; +var GZIP_HEADER_ID2 = 0x8b; + +/** + * Emulate Node's zlib C++ layer for use by the JS layer in index.js + */ +function Zlib(mode) { + if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) { + throw new TypeError('Bad argument'); + } + + this.dictionary = null; + this.err = 0; + this.flush = 0; + this.init_done = false; + this.level = 0; + this.memLevel = 0; + this.mode = mode; + this.strategy = 0; + this.windowBits = 0; + this.write_in_progress = false; + this.pending_close = false; + this.gzip_id_bytes_read = 0; +} + +Zlib.prototype.close = function () { + if (this.write_in_progress) { + this.pending_close = true; + return; + } + + this.pending_close = false; + + assert(this.init_done, 'close before init'); + assert(this.mode <= exports.UNZIP); + + if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { + zlib_deflate.deflateEnd(this.strm); + } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) { + zlib_inflate.inflateEnd(this.strm); + } + + this.mode = exports.NONE; + + this.dictionary = null; +}; + +Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(true, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(false, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) { + assert.equal(arguments.length, 8); + + assert(this.init_done, 'write before init'); + assert(this.mode !== exports.NONE, 'already finalized'); + assert.equal(false, this.write_in_progress, 'write already in progress'); + assert.equal(false, this.pending_close, 'close is pending'); + + this.write_in_progress = true; + + assert.equal(false, flush === undefined, 'must provide flush value'); + + this.write_in_progress = true; + + if (flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK) { + throw new Error('Invalid flush value'); + } + + if (input == null) { + input = Buffer.alloc(0); + in_len = 0; + in_off = 0; + } + + this.strm.avail_in = in_len; + this.strm.input = input; + this.strm.next_in = in_off; + this.strm.avail_out = out_len; + this.strm.output = out; + this.strm.next_out = out_off; + this.flush = flush; + + if (!async) { + // sync version + this._process(); + + if (this._checkError()) { + return this._afterSync(); + } + return; + } + + // async version + var self = this; + process.nextTick(function () { + self._process(); + self._after(); + }); + + return this; +}; + +Zlib.prototype._afterSync = function () { + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + return [avail_in, avail_out]; +}; + +Zlib.prototype._process = function () { + var next_expected_header_byte = null; + + // If the avail_out is left at 0, then it means that it ran out + // of room. If there was avail_out left over, then it means + // that all of the input was consumed. + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflate(this.strm, this.flush); + break; + case exports.UNZIP: + if (this.strm.avail_in > 0) { + next_expected_header_byte = this.strm.next_in; + } + + switch (this.gzip_id_bytes_read) { + case 0: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) { + this.gzip_id_bytes_read = 1; + next_expected_header_byte++; + + if (this.strm.avail_in === 1) { + // The only available byte was already read. + break; + } + } else { + this.mode = exports.INFLATE; + break; + } + + // fallthrough + case 1: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) { + this.gzip_id_bytes_read = 2; + this.mode = exports.GUNZIP; + } else { + // There is no actual difference between INFLATE and INFLATERAW + // (after initialization). + this.mode = exports.INFLATE; + } + + break; + default: + throw new Error('invalid number of gzip magic number bytes read'); + } + + // fallthrough + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + this.err = zlib_inflate.inflate(this.strm, this.flush + + // If data was encoded with dictionary + );if (this.err === exports.Z_NEED_DICT && this.dictionary) { + // Load it + this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary); + if (this.err === exports.Z_OK) { + // And try to decode again + this.err = zlib_inflate.inflate(this.strm, this.flush); + } else if (this.err === exports.Z_DATA_ERROR) { + // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR. + // Make it possible for After() to tell a bad dictionary from bad + // input. + this.err = exports.Z_NEED_DICT; + } + } + while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0x00) { + // Bytes remain in input buffer. Perhaps this is another compressed + // member in the same archive, or just trailing garbage. + // Trailing zero bytes are okay, though, since they are frequently + // used for padding. + + this.reset(); + this.err = zlib_inflate.inflate(this.strm, this.flush); + } + break; + default: + throw new Error('Unknown mode ' + this.mode); + } +}; + +Zlib.prototype._checkError = function () { + // Acceptable error states depend on the type of zlib stream. + switch (this.err) { + case exports.Z_OK: + case exports.Z_BUF_ERROR: + if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) { + this._error('unexpected end of file'); + return false; + } + break; + case exports.Z_STREAM_END: + // normal statuses, not fatal + break; + case exports.Z_NEED_DICT: + if (this.dictionary == null) { + this._error('Missing dictionary'); + } else { + this._error('Bad dictionary'); + } + return false; + default: + // something else. + this._error('Zlib error'); + return false; + } + + return true; +}; + +Zlib.prototype._after = function () { + if (!this._checkError()) { + return; + } + + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + // call the write() cb + this.callback(avail_in, avail_out); + + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype._error = function (message) { + if (this.strm.msg) { + message = this.strm.msg; + } + this.onerror(message, this.err + + // no hope of rescue. + );this.write_in_progress = false; + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) { + assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])'); + + assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits'); + assert(level >= -1 && level <= 9, 'invalid compression level'); + + assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel'); + + assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy'); + + this._init(level, windowBits, memLevel, strategy, dictionary); + this._setDictionary(); +}; + +Zlib.prototype.params = function () { + throw new Error('deflateParams Not supported'); +}; + +Zlib.prototype.reset = function () { + this._reset(); + this._setDictionary(); +}; + +Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) { + this.level = level; + this.windowBits = windowBits; + this.memLevel = memLevel; + this.strategy = strategy; + + this.flush = exports.Z_NO_FLUSH; + + this.err = exports.Z_OK; + + if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) { + this.windowBits += 16; + } + + if (this.mode === exports.UNZIP) { + this.windowBits += 32; + } + + if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) { + this.windowBits = -1 * this.windowBits; + } + + this.strm = new Zstream(); + + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); + break; + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + case exports.UNZIP: + this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits); + break; + default: + throw new Error('Unknown mode ' + this.mode); + } + + if (this.err !== exports.Z_OK) { + this._error('Init error'); + } + + this.dictionary = dictionary; + + this.write_in_progress = false; + this.init_done = true; +}; + +Zlib.prototype._setDictionary = function () { + if (this.dictionary == null) { + return; + } + + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to set dictionary'); + } +}; + +Zlib.prototype._reset = function () { + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + case exports.GZIP: + this.err = zlib_deflate.deflateReset(this.strm); + break; + case exports.INFLATE: + case exports.INFLATERAW: + case exports.GUNZIP: + this.err = zlib_inflate.inflateReset(this.strm); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to reset stream'); + } +}; + +exports.Zlib = Zlib; \ No newline at end of file diff --git a/node_modules/browserify-zlib/lib/index.js b/node_modules/browserify-zlib/lib/index.js new file mode 100644 index 0000000..15013f0 --- /dev/null +++ b/node_modules/browserify-zlib/lib/index.js @@ -0,0 +1,609 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; +var Transform = require('stream').Transform; +var binding = require('./binding'); +var util = require('util'); +var assert = require('assert').ok; +var kMaxLength = require('buffer').kMaxLength; +var kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + 'than 0x' + kMaxLength.toString(16) + ' bytes'; + +// zlib doesn't provide these, so kludge them in following the same +// const naming scheme zlib uses. +binding.Z_MIN_WINDOWBITS = 8; +binding.Z_MAX_WINDOWBITS = 15; +binding.Z_DEFAULT_WINDOWBITS = 15; + +// fewer than 64 bytes per chunk is stupid. +// technically it could work with as few as 8, but even 64 bytes +// is absurdly low. Usually a MB or more is best. +binding.Z_MIN_CHUNK = 64; +binding.Z_MAX_CHUNK = Infinity; +binding.Z_DEFAULT_CHUNK = 16 * 1024; + +binding.Z_MIN_MEMLEVEL = 1; +binding.Z_MAX_MEMLEVEL = 9; +binding.Z_DEFAULT_MEMLEVEL = 8; + +binding.Z_MIN_LEVEL = -1; +binding.Z_MAX_LEVEL = 9; +binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; + +// expose all the zlib constants +var bkeys = Object.keys(binding); +for (var bk = 0; bk < bkeys.length; bk++) { + var bkey = bkeys[bk]; + if (bkey.match(/^Z/)) { + Object.defineProperty(exports, bkey, { + enumerable: true, value: binding[bkey], writable: false + }); + } +} + +// translation table for return codes. +var codes = { + Z_OK: binding.Z_OK, + Z_STREAM_END: binding.Z_STREAM_END, + Z_NEED_DICT: binding.Z_NEED_DICT, + Z_ERRNO: binding.Z_ERRNO, + Z_STREAM_ERROR: binding.Z_STREAM_ERROR, + Z_DATA_ERROR: binding.Z_DATA_ERROR, + Z_MEM_ERROR: binding.Z_MEM_ERROR, + Z_BUF_ERROR: binding.Z_BUF_ERROR, + Z_VERSION_ERROR: binding.Z_VERSION_ERROR +}; + +var ckeys = Object.keys(codes); +for (var ck = 0; ck < ckeys.length; ck++) { + var ckey = ckeys[ck]; + codes[codes[ckey]] = ckey; +} + +Object.defineProperty(exports, 'codes', { + enumerable: true, value: Object.freeze(codes), writable: false +}); + +exports.Deflate = Deflate; +exports.Inflate = Inflate; +exports.Gzip = Gzip; +exports.Gunzip = Gunzip; +exports.DeflateRaw = DeflateRaw; +exports.InflateRaw = InflateRaw; +exports.Unzip = Unzip; + +exports.createDeflate = function (o) { + return new Deflate(o); +}; + +exports.createInflate = function (o) { + return new Inflate(o); +}; + +exports.createDeflateRaw = function (o) { + return new DeflateRaw(o); +}; + +exports.createInflateRaw = function (o) { + return new InflateRaw(o); +}; + +exports.createGzip = function (o) { + return new Gzip(o); +}; + +exports.createGunzip = function (o) { + return new Gunzip(o); +}; + +exports.createUnzip = function (o) { + return new Unzip(o); +}; + +// Convenience methods. +// compress/decompress a string or buffer in one step. +exports.deflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Deflate(opts), buffer, callback); +}; + +exports.deflateSync = function (buffer, opts) { + return zlibBufferSync(new Deflate(opts), buffer); +}; + +exports.gzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gzip(opts), buffer, callback); +}; + +exports.gzipSync = function (buffer, opts) { + return zlibBufferSync(new Gzip(opts), buffer); +}; + +exports.deflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new DeflateRaw(opts), buffer, callback); +}; + +exports.deflateRawSync = function (buffer, opts) { + return zlibBufferSync(new DeflateRaw(opts), buffer); +}; + +exports.unzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Unzip(opts), buffer, callback); +}; + +exports.unzipSync = function (buffer, opts) { + return zlibBufferSync(new Unzip(opts), buffer); +}; + +exports.inflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Inflate(opts), buffer, callback); +}; + +exports.inflateSync = function (buffer, opts) { + return zlibBufferSync(new Inflate(opts), buffer); +}; + +exports.gunzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gunzip(opts), buffer, callback); +}; + +exports.gunzipSync = function (buffer, opts) { + return zlibBufferSync(new Gunzip(opts), buffer); +}; + +exports.inflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new InflateRaw(opts), buffer, callback); +}; + +exports.inflateRawSync = function (buffer, opts) { + return zlibBufferSync(new InflateRaw(opts), buffer); +}; + +function zlibBuffer(engine, buffer, callback) { + var buffers = []; + var nread = 0; + + engine.on('error', onError); + engine.on('end', onEnd); + + engine.end(buffer); + flow(); + + function flow() { + var chunk; + while (null !== (chunk = engine.read())) { + buffers.push(chunk); + nread += chunk.length; + } + engine.once('readable', flow); + } + + function onError(err) { + engine.removeListener('end', onEnd); + engine.removeListener('readable', flow); + callback(err); + } + + function onEnd() { + var buf; + var err = null; + + if (nread >= kMaxLength) { + err = new RangeError(kRangeErrorMessage); + } else { + buf = Buffer.concat(buffers, nread); + } + + buffers = []; + engine.close(); + callback(err, buf); + } +} + +function zlibBufferSync(engine, buffer) { + if (typeof buffer === 'string') buffer = Buffer.from(buffer); + + if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer'); + + var flushFlag = engine._finishFlushFlag; + + return engine._processChunk(buffer, flushFlag); +} + +// generic zlib +// minimal 2-byte header +function Deflate(opts) { + if (!(this instanceof Deflate)) return new Deflate(opts); + Zlib.call(this, opts, binding.DEFLATE); +} + +function Inflate(opts) { + if (!(this instanceof Inflate)) return new Inflate(opts); + Zlib.call(this, opts, binding.INFLATE); +} + +// gzip - bigger header, same deflate compression +function Gzip(opts) { + if (!(this instanceof Gzip)) return new Gzip(opts); + Zlib.call(this, opts, binding.GZIP); +} + +function Gunzip(opts) { + if (!(this instanceof Gunzip)) return new Gunzip(opts); + Zlib.call(this, opts, binding.GUNZIP); +} + +// raw - no header +function DeflateRaw(opts) { + if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); + Zlib.call(this, opts, binding.DEFLATERAW); +} + +function InflateRaw(opts) { + if (!(this instanceof InflateRaw)) return new InflateRaw(opts); + Zlib.call(this, opts, binding.INFLATERAW); +} + +// auto-detect header. +function Unzip(opts) { + if (!(this instanceof Unzip)) return new Unzip(opts); + Zlib.call(this, opts, binding.UNZIP); +} + +function isValidFlushFlag(flag) { + return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK; +} + +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. + +function Zlib(opts, mode) { + var _this = this; + + this._opts = opts = opts || {}; + this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; + + Transform.call(this, opts); + + if (opts.flush && !isValidFlushFlag(opts.flush)) { + throw new Error('Invalid flush flag: ' + opts.flush); + } + if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { + throw new Error('Invalid flush flag: ' + opts.finishFlush); + } + + this._flushFlag = opts.flush || binding.Z_NO_FLUSH; + this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? opts.finishFlush : binding.Z_FINISH; + + if (opts.chunkSize) { + if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) { + throw new Error('Invalid chunk size: ' + opts.chunkSize); + } + } + + if (opts.windowBits) { + if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) { + throw new Error('Invalid windowBits: ' + opts.windowBits); + } + } + + if (opts.level) { + if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) { + throw new Error('Invalid compression level: ' + opts.level); + } + } + + if (opts.memLevel) { + if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) { + throw new Error('Invalid memLevel: ' + opts.memLevel); + } + } + + if (opts.strategy) { + if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) { + throw new Error('Invalid strategy: ' + opts.strategy); + } + } + + if (opts.dictionary) { + if (!Buffer.isBuffer(opts.dictionary)) { + throw new Error('Invalid dictionary: it should be a Buffer instance'); + } + } + + this._handle = new binding.Zlib(mode); + + var self = this; + this._hadError = false; + this._handle.onerror = function (message, errno) { + // there is no way to cleanly recover. + // continuing only obscures problems. + _close(self); + self._hadError = true; + + var error = new Error(message); + error.errno = errno; + error.code = exports.codes[errno]; + self.emit('error', error); + }; + + var level = exports.Z_DEFAULT_COMPRESSION; + if (typeof opts.level === 'number') level = opts.level; + + var strategy = exports.Z_DEFAULT_STRATEGY; + if (typeof opts.strategy === 'number') strategy = opts.strategy; + + this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary); + + this._buffer = Buffer.allocUnsafe(this._chunkSize); + this._offset = 0; + this._level = level; + this._strategy = strategy; + + this.once('end', this.close); + + Object.defineProperty(this, '_closed', { + get: function () { + return !_this._handle; + }, + configurable: true, + enumerable: true + }); +} + +util.inherits(Zlib, Transform); + +Zlib.prototype.params = function (level, strategy, callback) { + if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) { + throw new RangeError('Invalid compression level: ' + level); + } + if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) { + throw new TypeError('Invalid strategy: ' + strategy); + } + + if (this._level !== level || this._strategy !== strategy) { + var self = this; + this.flush(binding.Z_SYNC_FLUSH, function () { + assert(self._handle, 'zlib binding closed'); + self._handle.params(level, strategy); + if (!self._hadError) { + self._level = level; + self._strategy = strategy; + if (callback) callback(); + } + }); + } else { + process.nextTick(callback); + } +}; + +Zlib.prototype.reset = function () { + assert(this._handle, 'zlib binding closed'); + return this._handle.reset(); +}; + +// This is the _flush function called by the transform class, +// internally, when the last chunk has been written. +Zlib.prototype._flush = function (callback) { + this._transform(Buffer.alloc(0), '', callback); +}; + +Zlib.prototype.flush = function (kind, callback) { + var _this2 = this; + + var ws = this._writableState; + + if (typeof kind === 'function' || kind === undefined && !callback) { + callback = kind; + kind = binding.Z_FULL_FLUSH; + } + + if (ws.ended) { + if (callback) process.nextTick(callback); + } else if (ws.ending) { + if (callback) this.once('end', callback); + } else if (ws.needDrain) { + if (callback) { + this.once('drain', function () { + return _this2.flush(kind, callback); + }); + } + } else { + this._flushFlag = kind; + this.write(Buffer.alloc(0), '', callback); + } +}; + +Zlib.prototype.close = function (callback) { + _close(this, callback); + process.nextTick(emitCloseNT, this); +}; + +function _close(engine, callback) { + if (callback) process.nextTick(callback); + + // Caller may invoke .close after a zlib error (which will null _handle). + if (!engine._handle) return; + + engine._handle.close(); + engine._handle = null; +} + +function emitCloseNT(self) { + self.emit('close'); +} + +Zlib.prototype._transform = function (chunk, encoding, cb) { + var flushFlag; + var ws = this._writableState; + var ending = ws.ending || ws.ended; + var last = ending && (!chunk || ws.length === chunk.length); + + if (chunk !== null && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input')); + + if (!this._handle) return cb(new Error('zlib binding closed')); + + // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag + // (or whatever flag was provided using opts.finishFlush). + // If it's explicitly flushing at some other time, then we use + // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression + // goodness. + if (last) flushFlag = this._finishFlushFlag;else { + flushFlag = this._flushFlag; + // once we've flushed the last of the queue, stop flushing and + // go back to the normal behavior. + if (chunk.length >= ws.length) { + this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; + } + } + + this._processChunk(chunk, flushFlag, cb); +}; + +Zlib.prototype._processChunk = function (chunk, flushFlag, cb) { + var availInBefore = chunk && chunk.length; + var availOutBefore = this._chunkSize - this._offset; + var inOff = 0; + + var self = this; + + var async = typeof cb === 'function'; + + if (!async) { + var buffers = []; + var nread = 0; + + var error; + this.on('error', function (er) { + error = er; + }); + + assert(this._handle, 'zlib binding closed'); + do { + var res = this._handle.writeSync(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + } while (!this._hadError && callback(res[0], res[1])); + + if (this._hadError) { + throw error; + } + + if (nread >= kMaxLength) { + _close(this); + throw new RangeError(kRangeErrorMessage); + } + + var buf = Buffer.concat(buffers, nread); + _close(this); + + return buf; + } + + assert(this._handle, 'zlib binding closed'); + var req = this._handle.write(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + + req.buffer = chunk; + req.callback = callback; + + function callback(availInAfter, availOutAfter) { + // When the callback is used in an async write, the callback's + // context is the `req` object that was created. The req object + // is === this._handle, and that's why it's important to null + // out the values after they are done being used. `this._handle` + // can stay in memory longer than the callback and buffer are needed. + if (this) { + this.buffer = null; + this.callback = null; + } + + if (self._hadError) return; + + var have = availOutBefore - availOutAfter; + assert(have >= 0, 'have should not go down'); + + if (have > 0) { + var out = self._buffer.slice(self._offset, self._offset + have); + self._offset += have; + // serve some output to the consumer. + if (async) { + self.push(out); + } else { + buffers.push(out); + nread += out.length; + } + } + + // exhausted the output buffer, or used all the input create a new one. + if (availOutAfter === 0 || self._offset >= self._chunkSize) { + availOutBefore = self._chunkSize; + self._offset = 0; + self._buffer = Buffer.allocUnsafe(self._chunkSize); + } + + if (availOutAfter === 0) { + // Not actually done. Need to reprocess. + // Also, update the availInBefore to the availInAfter value, + // so that if we have to hit it a third (fourth, etc.) time, + // it'll have the correct byte counts. + inOff += availInBefore - availInAfter; + availInBefore = availInAfter; + + if (!async) return true; + + var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize); + newReq.callback = callback; // this same function + newReq.buffer = chunk; + return; + } + + if (!async) return false; + + // finished with the chunk. + cb(); + } +}; + +util.inherits(Deflate, Zlib); +util.inherits(Inflate, Zlib); +util.inherits(Gzip, Zlib); +util.inherits(Gunzip, Zlib); +util.inherits(DeflateRaw, Zlib); +util.inherits(InflateRaw, Zlib); +util.inherits(Unzip, Zlib); \ No newline at end of file diff --git a/node_modules/browserify-zlib/package.json b/node_modules/browserify-zlib/package.json new file mode 100644 index 0000000..d8bd834 --- /dev/null +++ b/node_modules/browserify-zlib/package.json @@ -0,0 +1,64 @@ +{ + "name": "browserify-zlib", + "version": "0.2.0", + "description": "Full zlib module for the browser", + "keywords": [ + "zlib", + "browserify" + ], + "main": "lib/index.js", + "directories": { + "test": "test" + }, + "dependencies": { + "pako": "~1.0.5" + }, + "devDependencies": { + "assert": "^1.4.1", + "babel-cli": "^6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babelify": "^7.3.0", + "brfs": "^1.4.3", + "browserify": "^14.4.0", + "exec-glob": "^1.2.2", + "glob": "^7.1.2", + "karma": "^1.7.0", + "karma-chrome-launcher": "^2.1.1", + "karma-firefox-launcher": "^1.0.1", + "karma-mocha": "^1.3.0", + "karma-mocha-own-reporter": "^1.1.2", + "karma-phantomjs-launcher": "^1.0.4", + "mocha": "^3.4.2", + "phantomjs-prebuilt": "^2.1.14", + "standard": "^10.0.2", + "watchify": "^3.9.0" + }, + "scripts": { + "build": "babel src --out-dir lib", + "lint": "standard \"*.js\" \"!(node_modules|lib)/!(*test-zlib*|index).js\"", + "pretest": "npm run build", + "test": "npm run test:node && npm run test:browser", + "test:node": "node node_modules/exec-glob node \"test/test-*\"", + "pretest:browser": "node test/build", + "test:browser": "karma start --single-run=true karma.conf.js" + }, + "babel": { + "plugins": [ + "transform-es2015-arrow-functions", + "transform-es2015-block-scoping", + "transform-es2015-template-literals" + ] + }, + "author": "Devon Govett ", + "homepage": "https://github.com/devongovett/browserify-zlib", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/devongovett/browserify-zlib.git" + }, + "bugs": { + "url": "https://github.com/devongovett/browserify-zlib/issues" + } +} diff --git a/node_modules/browserify-zlib/src/binding.js b/node_modules/browserify-zlib/src/binding.js new file mode 100644 index 0000000..14e419d --- /dev/null +++ b/node_modules/browserify-zlib/src/binding.js @@ -0,0 +1,432 @@ +'use strict' +/* eslint camelcase: "off" */ + +var assert = require('assert') + +var Zstream = require('pako/lib/zlib/zstream') +var zlib_deflate = require('pako/lib/zlib/deflate.js') +var zlib_inflate = require('pako/lib/zlib/inflate.js') +var constants = require('pako/lib/zlib/constants') + +for (var key in constants) { + exports[key] = constants[key] +} + +// zlib modes +exports.NONE = 0 +exports.DEFLATE = 1 +exports.INFLATE = 2 +exports.GZIP = 3 +exports.GUNZIP = 4 +exports.DEFLATERAW = 5 +exports.INFLATERAW = 6 +exports.UNZIP = 7 + +var GZIP_HEADER_ID1 = 0x1f +var GZIP_HEADER_ID2 = 0x8b + +/** + * Emulate Node's zlib C++ layer for use by the JS layer in index.js + */ +function Zlib (mode) { + if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) { + throw new TypeError('Bad argument') + } + + this.dictionary = null + this.err = 0 + this.flush = 0 + this.init_done = false + this.level = 0 + this.memLevel = 0 + this.mode = mode + this.strategy = 0 + this.windowBits = 0 + this.write_in_progress = false + this.pending_close = false + this.gzip_id_bytes_read = 0 +} + +Zlib.prototype.close = function () { + if (this.write_in_progress) { + this.pending_close = true + return + } + + this.pending_close = false + + assert(this.init_done, 'close before init') + assert(this.mode <= exports.UNZIP) + + if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { + zlib_deflate.deflateEnd(this.strm) + } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || + this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) { + zlib_inflate.inflateEnd(this.strm) + } + + this.mode = exports.NONE + + this.dictionary = null +} + +Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(true, flush, input, in_off, in_len, out, out_off, out_len) +} + +Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(false, flush, input, in_off, in_len, out, out_off, out_len) +} + +Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) { + assert.equal(arguments.length, 8) + + assert(this.init_done, 'write before init') + assert(this.mode !== exports.NONE, 'already finalized') + assert.equal(false, this.write_in_progress, 'write already in progress') + assert.equal(false, this.pending_close, 'close is pending') + + this.write_in_progress = true + + assert.equal(false, flush === undefined, 'must provide flush value') + + this.write_in_progress = true + + if (flush !== exports.Z_NO_FLUSH && + flush !== exports.Z_PARTIAL_FLUSH && + flush !== exports.Z_SYNC_FLUSH && + flush !== exports.Z_FULL_FLUSH && + flush !== exports.Z_FINISH && + flush !== exports.Z_BLOCK) { + throw new Error('Invalid flush value') + } + + if (input == null) { + input = Buffer.alloc(0) + in_len = 0 + in_off = 0 + } + + this.strm.avail_in = in_len + this.strm.input = input + this.strm.next_in = in_off + this.strm.avail_out = out_len + this.strm.output = out + this.strm.next_out = out_off + this.flush = flush + + if (!async) { + // sync version + this._process() + + if (this._checkError()) { + return this._afterSync() + } + return + } + + // async version + var self = this + process.nextTick(function () { + self._process() + self._after() + }) + + return this +} + +Zlib.prototype._afterSync = function () { + var avail_out = this.strm.avail_out + var avail_in = this.strm.avail_in + + this.write_in_progress = false + + return [avail_in, avail_out] +} + +Zlib.prototype._process = function () { + var next_expected_header_byte = null + + // If the avail_out is left at 0, then it means that it ran out + // of room. If there was avail_out left over, then it means + // that all of the input was consumed. + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflate(this.strm, this.flush) + break + case exports.UNZIP: + if (this.strm.avail_in > 0) { + next_expected_header_byte = this.strm.next_in + } + + switch (this.gzip_id_bytes_read) { + case 0: + if (next_expected_header_byte === null) { + break + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) { + this.gzip_id_bytes_read = 1 + next_expected_header_byte++ + + if (this.strm.avail_in === 1) { + // The only available byte was already read. + break + } + } else { + this.mode = exports.INFLATE + break + } + + // fallthrough + case 1: + if (next_expected_header_byte === null) { + break + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) { + this.gzip_id_bytes_read = 2 + this.mode = exports.GUNZIP + } else { + // There is no actual difference between INFLATE and INFLATERAW + // (after initialization). + this.mode = exports.INFLATE + } + + break + default: + throw new Error('invalid number of gzip magic number bytes read') + } + + // fallthrough + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + this.err = zlib_inflate.inflate(this.strm, this.flush) + + // If data was encoded with dictionary + if (this.err === exports.Z_NEED_DICT && this.dictionary) { + // Load it + this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary) + if (this.err === exports.Z_OK) { + // And try to decode again + this.err = zlib_inflate.inflate(this.strm, this.flush) + } else if (this.err === exports.Z_DATA_ERROR) { + // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR. + // Make it possible for After() to tell a bad dictionary from bad + // input. + this.err = exports.Z_NEED_DICT + } + } + while (this.strm.avail_in > 0 && + this.mode === exports.GUNZIP && + this.err === exports.Z_STREAM_END && + this.strm.next_in[0] !== 0x00) { + // Bytes remain in input buffer. Perhaps this is another compressed + // member in the same archive, or just trailing garbage. + // Trailing zero bytes are okay, though, since they are frequently + // used for padding. + + this.reset() + this.err = zlib_inflate.inflate(this.strm, this.flush) + } + break + default: + throw new Error('Unknown mode ' + this.mode) + } +} + +Zlib.prototype._checkError = function () { + // Acceptable error states depend on the type of zlib stream. + switch (this.err) { + case exports.Z_OK: + case exports.Z_BUF_ERROR: + if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) { + this._error('unexpected end of file') + return false + } + break + case exports.Z_STREAM_END: + // normal statuses, not fatal + break + case exports.Z_NEED_DICT: + if (this.dictionary == null) { + this._error('Missing dictionary') + } else { + this._error('Bad dictionary') + } + return false + default: + // something else. + this._error('Zlib error') + return false + } + + return true +} + +Zlib.prototype._after = function () { + if (!this._checkError()) { + return + } + + var avail_out = this.strm.avail_out + var avail_in = this.strm.avail_in + + this.write_in_progress = false + + // call the write() cb + this.callback(avail_in, avail_out) + + if (this.pending_close) { + this.close() + } +} + +Zlib.prototype._error = function (message) { + if (this.strm.msg) { + message = this.strm.msg + } + this.onerror(message, this.err) + + // no hope of rescue. + this.write_in_progress = false + if (this.pending_close) { + this.close() + } +} + +Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) { + assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])') + + assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits') + assert(level >= -1 && level <= 9, 'invalid compression level') + + assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel') + + assert(strategy === exports.Z_FILTERED || + strategy === exports.Z_HUFFMAN_ONLY || + strategy === exports.Z_RLE || + strategy === exports.Z_FIXED || + strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy') + + this._init(level, windowBits, memLevel, strategy, dictionary) + this._setDictionary() +} + +Zlib.prototype.params = function () { + throw new Error('deflateParams Not supported') +} + +Zlib.prototype.reset = function () { + this._reset() + this._setDictionary() +} + +Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) { + this.level = level + this.windowBits = windowBits + this.memLevel = memLevel + this.strategy = strategy + + this.flush = exports.Z_NO_FLUSH + + this.err = exports.Z_OK + + if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) { + this.windowBits += 16 + } + + if (this.mode === exports.UNZIP) { + this.windowBits += 32 + } + + if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) { + this.windowBits = -1 * this.windowBits + } + + this.strm = new Zstream() + + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateInit2( + this.strm, + this.level, + exports.Z_DEFLATED, + this.windowBits, + this.memLevel, + this.strategy + ) + break + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + case exports.UNZIP: + this.err = zlib_inflate.inflateInit2( + this.strm, + this.windowBits + ) + break + default: + throw new Error('Unknown mode ' + this.mode) + } + + if (this.err !== exports.Z_OK) { + this._error('Init error') + } + + this.dictionary = dictionary + + this.write_in_progress = false + this.init_done = true +} + +Zlib.prototype._setDictionary = function () { + if (this.dictionary == null) { + return + } + + this.err = exports.Z_OK + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary) + break + default: + break + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to set dictionary') + } +} + +Zlib.prototype._reset = function () { + this.err = exports.Z_OK + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + case exports.GZIP: + this.err = zlib_deflate.deflateReset(this.strm) + break + case exports.INFLATE: + case exports.INFLATERAW: + case exports.GUNZIP: + this.err = zlib_inflate.inflateReset(this.strm) + break + default: + break + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to reset stream') + } +} + +exports.Zlib = Zlib diff --git a/node_modules/browserify-zlib/src/index.js b/node_modules/browserify-zlib/src/index.js new file mode 100644 index 0000000..12f1ad0 --- /dev/null +++ b/node_modules/browserify-zlib/src/index.js @@ -0,0 +1,650 @@ +'use strict'; + +const Buffer = require('buffer').Buffer; +const Transform = require('stream').Transform; +const binding = require('./binding'); +const util = require('util'); +const assert = require('assert').ok; +const kMaxLength = require('buffer').kMaxLength; +const kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + + 'than 0x' + kMaxLength.toString(16) + ' bytes'; + +// zlib doesn't provide these, so kludge them in following the same +// const naming scheme zlib uses. +binding.Z_MIN_WINDOWBITS = 8; +binding.Z_MAX_WINDOWBITS = 15; +binding.Z_DEFAULT_WINDOWBITS = 15; + +// fewer than 64 bytes per chunk is stupid. +// technically it could work with as few as 8, but even 64 bytes +// is absurdly low. Usually a MB or more is best. +binding.Z_MIN_CHUNK = 64; +binding.Z_MAX_CHUNK = Infinity; +binding.Z_DEFAULT_CHUNK = (16 * 1024); + +binding.Z_MIN_MEMLEVEL = 1; +binding.Z_MAX_MEMLEVEL = 9; +binding.Z_DEFAULT_MEMLEVEL = 8; + +binding.Z_MIN_LEVEL = -1; +binding.Z_MAX_LEVEL = 9; +binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; + +// expose all the zlib constants +const bkeys = Object.keys(binding); +for (var bk = 0; bk < bkeys.length; bk++) { + var bkey = bkeys[bk]; + if (bkey.match(/^Z/)) { + Object.defineProperty(exports, bkey, { + enumerable: true, value: binding[bkey], writable: false + }); + } +} + +// translation table for return codes. +const codes = { + Z_OK: binding.Z_OK, + Z_STREAM_END: binding.Z_STREAM_END, + Z_NEED_DICT: binding.Z_NEED_DICT, + Z_ERRNO: binding.Z_ERRNO, + Z_STREAM_ERROR: binding.Z_STREAM_ERROR, + Z_DATA_ERROR: binding.Z_DATA_ERROR, + Z_MEM_ERROR: binding.Z_MEM_ERROR, + Z_BUF_ERROR: binding.Z_BUF_ERROR, + Z_VERSION_ERROR: binding.Z_VERSION_ERROR +}; + +const ckeys = Object.keys(codes); +for (var ck = 0; ck < ckeys.length; ck++) { + var ckey = ckeys[ck]; + codes[codes[ckey]] = ckey; +} + +Object.defineProperty(exports, 'codes', { + enumerable: true, value: Object.freeze(codes), writable: false +}); + +exports.Deflate = Deflate; +exports.Inflate = Inflate; +exports.Gzip = Gzip; +exports.Gunzip = Gunzip; +exports.DeflateRaw = DeflateRaw; +exports.InflateRaw = InflateRaw; +exports.Unzip = Unzip; + +exports.createDeflate = function(o) { + return new Deflate(o); +}; + +exports.createInflate = function(o) { + return new Inflate(o); +}; + +exports.createDeflateRaw = function(o) { + return new DeflateRaw(o); +}; + +exports.createInflateRaw = function(o) { + return new InflateRaw(o); +}; + +exports.createGzip = function(o) { + return new Gzip(o); +}; + +exports.createGunzip = function(o) { + return new Gunzip(o); +}; + +exports.createUnzip = function(o) { + return new Unzip(o); +}; + + +// Convenience methods. +// compress/decompress a string or buffer in one step. +exports.deflate = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Deflate(opts), buffer, callback); +}; + +exports.deflateSync = function(buffer, opts) { + return zlibBufferSync(new Deflate(opts), buffer); +}; + +exports.gzip = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gzip(opts), buffer, callback); +}; + +exports.gzipSync = function(buffer, opts) { + return zlibBufferSync(new Gzip(opts), buffer); +}; + +exports.deflateRaw = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new DeflateRaw(opts), buffer, callback); +}; + +exports.deflateRawSync = function(buffer, opts) { + return zlibBufferSync(new DeflateRaw(opts), buffer); +}; + +exports.unzip = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Unzip(opts), buffer, callback); +}; + +exports.unzipSync = function(buffer, opts) { + return zlibBufferSync(new Unzip(opts), buffer); +}; + +exports.inflate = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Inflate(opts), buffer, callback); +}; + +exports.inflateSync = function(buffer, opts) { + return zlibBufferSync(new Inflate(opts), buffer); +}; + +exports.gunzip = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gunzip(opts), buffer, callback); +}; + +exports.gunzipSync = function(buffer, opts) { + return zlibBufferSync(new Gunzip(opts), buffer); +}; + +exports.inflateRaw = function(buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new InflateRaw(opts), buffer, callback); +}; + +exports.inflateRawSync = function(buffer, opts) { + return zlibBufferSync(new InflateRaw(opts), buffer); +}; + +function zlibBuffer(engine, buffer, callback) { + var buffers = []; + var nread = 0; + + engine.on('error', onError); + engine.on('end', onEnd); + + engine.end(buffer); + flow(); + + function flow() { + var chunk; + while (null !== (chunk = engine.read())) { + buffers.push(chunk); + nread += chunk.length; + } + engine.once('readable', flow); + } + + function onError(err) { + engine.removeListener('end', onEnd); + engine.removeListener('readable', flow); + callback(err); + } + + function onEnd() { + var buf; + var err = null; + + if (nread >= kMaxLength) { + err = new RangeError(kRangeErrorMessage); + } else { + buf = Buffer.concat(buffers, nread); + } + + buffers = []; + engine.close(); + callback(err, buf); + } +} + +function zlibBufferSync(engine, buffer) { + if (typeof buffer === 'string') + buffer = Buffer.from(buffer); + + if (!Buffer.isBuffer(buffer)) + throw new TypeError('Not a string or buffer'); + + var flushFlag = engine._finishFlushFlag; + + return engine._processChunk(buffer, flushFlag); +} + +// generic zlib +// minimal 2-byte header +function Deflate(opts) { + if (!(this instanceof Deflate)) return new Deflate(opts); + Zlib.call(this, opts, binding.DEFLATE); +} + +function Inflate(opts) { + if (!(this instanceof Inflate)) return new Inflate(opts); + Zlib.call(this, opts, binding.INFLATE); +} + + +// gzip - bigger header, same deflate compression +function Gzip(opts) { + if (!(this instanceof Gzip)) return new Gzip(opts); + Zlib.call(this, opts, binding.GZIP); +} + +function Gunzip(opts) { + if (!(this instanceof Gunzip)) return new Gunzip(opts); + Zlib.call(this, opts, binding.GUNZIP); +} + + +// raw - no header +function DeflateRaw(opts) { + if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); + Zlib.call(this, opts, binding.DEFLATERAW); +} + +function InflateRaw(opts) { + if (!(this instanceof InflateRaw)) return new InflateRaw(opts); + Zlib.call(this, opts, binding.INFLATERAW); +} + + +// auto-detect header. +function Unzip(opts) { + if (!(this instanceof Unzip)) return new Unzip(opts); + Zlib.call(this, opts, binding.UNZIP); +} + +function isValidFlushFlag(flag) { + return flag === binding.Z_NO_FLUSH || + flag === binding.Z_PARTIAL_FLUSH || + flag === binding.Z_SYNC_FLUSH || + flag === binding.Z_FULL_FLUSH || + flag === binding.Z_FINISH || + flag === binding.Z_BLOCK; +} + +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. + +function Zlib(opts, mode) { + this._opts = opts = opts || {}; + this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; + + Transform.call(this, opts); + + if (opts.flush && !isValidFlushFlag(opts.flush)) { + throw new Error('Invalid flush flag: ' + opts.flush); + } + if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { + throw new Error('Invalid flush flag: ' + opts.finishFlush); + } + + this._flushFlag = opts.flush || binding.Z_NO_FLUSH; + this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? + opts.finishFlush : binding.Z_FINISH; + + if (opts.chunkSize) { + if (opts.chunkSize < exports.Z_MIN_CHUNK || + opts.chunkSize > exports.Z_MAX_CHUNK) { + throw new Error('Invalid chunk size: ' + opts.chunkSize); + } + } + + if (opts.windowBits) { + if (opts.windowBits < exports.Z_MIN_WINDOWBITS || + opts.windowBits > exports.Z_MAX_WINDOWBITS) { + throw new Error('Invalid windowBits: ' + opts.windowBits); + } + } + + if (opts.level) { + if (opts.level < exports.Z_MIN_LEVEL || + opts.level > exports.Z_MAX_LEVEL) { + throw new Error('Invalid compression level: ' + opts.level); + } + } + + if (opts.memLevel) { + if (opts.memLevel < exports.Z_MIN_MEMLEVEL || + opts.memLevel > exports.Z_MAX_MEMLEVEL) { + throw new Error('Invalid memLevel: ' + opts.memLevel); + } + } + + if (opts.strategy) { + if (opts.strategy != exports.Z_FILTERED && + opts.strategy != exports.Z_HUFFMAN_ONLY && + opts.strategy != exports.Z_RLE && + opts.strategy != exports.Z_FIXED && + opts.strategy != exports.Z_DEFAULT_STRATEGY) { + throw new Error('Invalid strategy: ' + opts.strategy); + } + } + + if (opts.dictionary) { + if (!Buffer.isBuffer(opts.dictionary)) { + throw new Error('Invalid dictionary: it should be a Buffer instance'); + } + } + + this._handle = new binding.Zlib(mode); + + var self = this; + this._hadError = false; + this._handle.onerror = function(message, errno) { + // there is no way to cleanly recover. + // continuing only obscures problems. + _close(self); + self._hadError = true; + + var error = new Error(message); + error.errno = errno; + error.code = exports.codes[errno]; + self.emit('error', error); + }; + + var level = exports.Z_DEFAULT_COMPRESSION; + if (typeof opts.level === 'number') level = opts.level; + + var strategy = exports.Z_DEFAULT_STRATEGY; + if (typeof opts.strategy === 'number') strategy = opts.strategy; + + this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, + level, + opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, + strategy, + opts.dictionary); + + this._buffer = Buffer.allocUnsafe(this._chunkSize); + this._offset = 0; + this._level = level; + this._strategy = strategy; + + this.once('end', this.close); + + Object.defineProperty(this, '_closed', { + get: () => { return !this._handle; }, + configurable: true, + enumerable: true + }); +} + +util.inherits(Zlib, Transform); + +Zlib.prototype.params = function(level, strategy, callback) { + if (level < exports.Z_MIN_LEVEL || + level > exports.Z_MAX_LEVEL) { + throw new RangeError('Invalid compression level: ' + level); + } + if (strategy != exports.Z_FILTERED && + strategy != exports.Z_HUFFMAN_ONLY && + strategy != exports.Z_RLE && + strategy != exports.Z_FIXED && + strategy != exports.Z_DEFAULT_STRATEGY) { + throw new TypeError('Invalid strategy: ' + strategy); + } + + if (this._level !== level || this._strategy !== strategy) { + var self = this; + this.flush(binding.Z_SYNC_FLUSH, function() { + assert(self._handle, 'zlib binding closed'); + self._handle.params(level, strategy); + if (!self._hadError) { + self._level = level; + self._strategy = strategy; + if (callback) callback(); + } + }); + } else { + process.nextTick(callback); + } +}; + +Zlib.prototype.reset = function() { + assert(this._handle, 'zlib binding closed'); + return this._handle.reset(); +}; + +// This is the _flush function called by the transform class, +// internally, when the last chunk has been written. +Zlib.prototype._flush = function(callback) { + this._transform(Buffer.alloc(0), '', callback); +}; + +Zlib.prototype.flush = function(kind, callback) { + var ws = this._writableState; + + if (typeof kind === 'function' || (kind === undefined && !callback)) { + callback = kind; + kind = binding.Z_FULL_FLUSH; + } + + if (ws.ended) { + if (callback) + process.nextTick(callback); + } else if (ws.ending) { + if (callback) + this.once('end', callback); + } else if (ws.needDrain) { + if (callback) { + this.once('drain', () => this.flush(kind, callback)); + } + } else { + this._flushFlag = kind; + this.write(Buffer.alloc(0), '', callback); + } +}; + +Zlib.prototype.close = function(callback) { + _close(this, callback); + process.nextTick(emitCloseNT, this); +}; + +function _close(engine, callback) { + if (callback) + process.nextTick(callback); + + // Caller may invoke .close after a zlib error (which will null _handle). + if (!engine._handle) + return; + + engine._handle.close(); + engine._handle = null; +} + +function emitCloseNT(self) { + self.emit('close'); +} + +Zlib.prototype._transform = function(chunk, encoding, cb) { + var flushFlag; + var ws = this._writableState; + var ending = ws.ending || ws.ended; + var last = ending && (!chunk || ws.length === chunk.length); + + if (chunk !== null && !Buffer.isBuffer(chunk)) + return cb(new Error('invalid input')); + + if (!this._handle) + return cb(new Error('zlib binding closed')); + + // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag + // (or whatever flag was provided using opts.finishFlush). + // If it's explicitly flushing at some other time, then we use + // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression + // goodness. + if (last) + flushFlag = this._finishFlushFlag; + else { + flushFlag = this._flushFlag; + // once we've flushed the last of the queue, stop flushing and + // go back to the normal behavior. + if (chunk.length >= ws.length) { + this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; + } + } + + this._processChunk(chunk, flushFlag, cb); +}; + +Zlib.prototype._processChunk = function(chunk, flushFlag, cb) { + var availInBefore = chunk && chunk.length; + var availOutBefore = this._chunkSize - this._offset; + var inOff = 0; + + var self = this; + + var async = typeof cb === 'function'; + + if (!async) { + var buffers = []; + var nread = 0; + + var error; + this.on('error', function(er) { + error = er; + }); + + assert(this._handle, 'zlib binding closed'); + do { + var res = this._handle.writeSync(flushFlag, + chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + } while (!this._hadError && callback(res[0], res[1])); + + if (this._hadError) { + throw error; + } + + if (nread >= kMaxLength) { + _close(this); + throw new RangeError(kRangeErrorMessage); + } + + var buf = Buffer.concat(buffers, nread); + _close(this); + + return buf; + } + + assert(this._handle, 'zlib binding closed'); + var req = this._handle.write(flushFlag, + chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + + req.buffer = chunk; + req.callback = callback; + + function callback(availInAfter, availOutAfter) { + // When the callback is used in an async write, the callback's + // context is the `req` object that was created. The req object + // is === this._handle, and that's why it's important to null + // out the values after they are done being used. `this._handle` + // can stay in memory longer than the callback and buffer are needed. + if (this) { + this.buffer = null; + this.callback = null; + } + + if (self._hadError) + return; + + var have = availOutBefore - availOutAfter; + assert(have >= 0, 'have should not go down'); + + if (have > 0) { + var out = self._buffer.slice(self._offset, self._offset + have); + self._offset += have; + // serve some output to the consumer. + if (async) { + self.push(out); + } else { + buffers.push(out); + nread += out.length; + } + } + + // exhausted the output buffer, or used all the input create a new one. + if (availOutAfter === 0 || self._offset >= self._chunkSize) { + availOutBefore = self._chunkSize; + self._offset = 0; + self._buffer = Buffer.allocUnsafe(self._chunkSize); + } + + if (availOutAfter === 0) { + // Not actually done. Need to reprocess. + // Also, update the availInBefore to the availInAfter value, + // so that if we have to hit it a third (fourth, etc.) time, + // it'll have the correct byte counts. + inOff += (availInBefore - availInAfter); + availInBefore = availInAfter; + + if (!async) + return true; + + var newReq = self._handle.write(flushFlag, + chunk, + inOff, + availInBefore, + self._buffer, + self._offset, + self._chunkSize); + newReq.callback = callback; // this same function + newReq.buffer = chunk; + return; + } + + if (!async) + return false; + + // finished with the chunk. + cb(); + } +}; + +util.inherits(Deflate, Zlib); +util.inherits(Inflate, Zlib); +util.inherits(Gzip, Zlib); +util.inherits(Gunzip, Zlib); +util.inherits(DeflateRaw, Zlib); +util.inherits(InflateRaw, Zlib); +util.inherits(Unzip, Zlib); diff --git a/node_modules/browserify-zlib/yarn.lock b/node_modules/browserify-zlib/yarn.lock new file mode 100644 index 0000000..f3991b1 --- /dev/null +++ b/node_modules/browserify-zlib/yarn.lock @@ -0,0 +1,3819 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +JSONStream@^1.0.3: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +accepts@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^1.0.3: + version "1.2.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + +array-slice@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array.prototype.find@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1.js@^4.0.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.4.0, assert@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +astw@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917" + dependencies: + acorn "^4.0.3" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-cli@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" + dependencies: + babel-core "^6.24.1" + babel-polyfill "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" + lodash "^4.2.0" + output-file-sync "^1.1.0" + path-is-absolute "^1.0.0" + slash "^1.0.0" + source-map "^0.5.0" + v8flags "^2.0.10" + optionalDependencies: + chokidar "^1.6.1" + +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@^6.0.14, babel-core@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.24.1" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-polyfill@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + dependencies: + babel-core "^6.24.1" + babel-runtime "^6.22.0" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babelify@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" + dependencies: + babel-core "^6.0.14" + object-assign "^4.0.0" + +babylon@^6.11.0, babylon@^6.15.0: + version "6.17.2" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.2.tgz#201d25ef5f892c41bae49488b08db0dd476e9f5c" + +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" + +base64-js@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + dependencies: + callsite "1.0.0" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.3.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + +body-parser@^1.16.1: + version "1.17.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.17.2.tgz#f8892abc8f9e627d42aedafbca66bf5ab99104ee" + dependencies: + bytes "2.4.0" + content-type "~1.0.2" + debug "2.6.7" + depd "~1.1.0" + http-errors "~1.6.1" + iconv-lite "0.4.15" + on-finished "~2.3.0" + qs "6.4.0" + raw-body "~2.2.0" + type-is "~1.6.15" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" + dependencies: + expand-range "^0.1.0" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brfs@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/brfs/-/brfs-1.4.3.tgz#db675d6f5e923e6df087fca5859c9090aaed3216" + dependencies: + quote-stream "^1.0.1" + resolve "^1.1.5" + static-module "^1.1.0" + through2 "^2.0.0" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browser-pack@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531" + dependencies: + JSONStream "^1.0.3" + combine-source-map "~0.7.1" + defined "^1.0.0" + through2 "^2.0.0" + umd "^3.0.0" + +browser-resolve@^1.11.0, browser-resolve@^1.7.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + dependencies: + buffer-xor "^1.0.2" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + inherits "^2.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserify@^14.0.0, browserify@^14.4.0: + version "14.4.0" + resolved "https://registry.yarnpkg.com/browserify/-/browserify-14.4.0.tgz#089a3463af58d0e48d8cd4070b3f74654d5abca9" + dependencies: + JSONStream "^1.0.3" + assert "^1.4.0" + browser-pack "^6.0.1" + browser-resolve "^1.11.0" + browserify-zlib "~0.1.2" + buffer "^5.0.2" + cached-path-relative "^1.0.0" + concat-stream "~1.5.1" + console-browserify "^1.1.0" + constants-browserify "~1.0.0" + crypto-browserify "^3.0.0" + defined "^1.0.0" + deps-sort "^2.0.0" + domain-browser "~1.1.0" + duplexer2 "~0.1.2" + events "~1.1.0" + glob "^7.1.0" + has "^1.0.0" + htmlescape "^1.1.0" + https-browserify "^1.0.0" + inherits "~2.0.1" + insert-module-globals "^7.0.0" + labeled-stream-splicer "^2.0.0" + module-deps "^4.0.8" + os-browserify "~0.1.1" + parents "^1.0.1" + path-browserify "~0.0.0" + process "~0.11.0" + punycode "^1.3.2" + querystring-es3 "~0.2.0" + read-only-stream "^2.0.0" + readable-stream "^2.0.2" + resolve "^1.1.4" + shasum "^1.0.0" + shell-quote "^1.6.1" + stream-browserify "^2.0.0" + stream-http "^2.0.0" + string_decoder "~1.0.0" + subarg "^1.0.0" + syntax-error "^1.1.1" + through2 "^2.0.0" + timers-browserify "^1.0.1" + tty-browserify "~0.0.0" + url "~0.11.0" + util "~0.10.1" + vm-browserify "~0.0.1" + xtend "^4.0.0" + +buffer-equal@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" + +buffer-xor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^5.0.2: + version "5.0.6" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.6.tgz#2ea669f7eec0b6eda05b08f8b5ff661b28573588" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +bytes@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" + +cached-path-relative@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chokidar@^1.0.0, chokidar@^1.4.1, chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07" + dependencies: + inherits "^2.0.1" + +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +colors@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combine-lists@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/combine-lists/-/combine-lists-1.0.1.tgz#458c07e09e0d900fc28b70a3fec2dacd1d2cb7f6" + dependencies: + lodash "^4.5.0" + +combine-source-map@~0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e" + dependencies: + convert-source-map "~1.1.0" + inline-source-map "~0.6.0" + lodash.memoize "~3.0.3" + source-map "~0.5.3" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@2.9.0, commander@^2.8.1, commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + +component-emitter@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +concat-stream@^1.5.2, concat-stream@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +concat-stream@~1.5.0, concat-stream@~1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +connect@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.2.tgz#694e8d20681bfe490282c8ab886be98f09f42fe7" + dependencies: + debug "2.6.7" + finalhandler "1.0.3" + parseurl "~1.3.1" + utils-merge "1.0.0" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +convert-source-map@^1.1.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +convert-source-map@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +core-js@^2.2.0, core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@^3.0.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug-log@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" + +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + dependencies: + ms "0.7.2" + +debug@2.6.0, debug@^2.1.1, debug@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + +debug@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" + dependencies: + ms "2.0.0" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +deglob@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" + dependencies: + find-root "^1.0.0" + glob "^7.0.5" + ignore "^3.0.9" + pkg-config "^1.1.0" + run-parallel "^1.1.2" + uniq "^1.0.1" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.0, depd@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" + +deps-sort@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" + dependencies: + JSONStream "^1.0.3" + shasum "^1.0.0" + subarg "^1.0.0" + through2 "^2.0.0" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detective@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/detective/-/detective-4.5.0.tgz#6e5a8c6b26e6c7a254b1c6b6d7490d98ec91edd1" + dependencies: + acorn "^4.0.3" + defined "^1.0.0" + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + +diff@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +doctrine@1.5.0, doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-serialize@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +domain-browser@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + dependencies: + readable-stream "^2.0.2" + +duplexer2@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +engine.io-client@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" + dependencies: + component-emitter "1.2.1" + component-inherit "0.0.3" + debug "2.3.3" + engine.io-parser "1.3.2" + has-cors "1.1.0" + indexof "0.0.1" + parsejson "0.0.3" + parseqs "0.0.5" + parseuri "0.0.5" + ws "1.1.2" + xmlhttprequest-ssl "1.5.3" + yeast "0.1.2" + +engine.io-parser@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a" + dependencies: + after "0.8.2" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.5" + blob "0.0.4" + has-binary "0.1.7" + wtf-8 "1.0.0" + +engine.io@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4" + dependencies: + accepts "1.3.3" + base64id "1.0.0" + cookie "0.3.1" + debug "2.3.3" + engine.io-parser "1.3.2" + ws "1.1.2" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + is-callable "^1.1.3" + is-regex "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.22" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.22.tgz#1876c51f990769c112c781ea3ebe89f84fd39071" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-promise@~4.0.3: + version "4.0.5" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@~0.0.24: + version "0.0.28" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-0.0.28.tgz#0e4ff1715f328775d6cab51ac44a406cd7abffd3" + dependencies: + esprima "~1.0.2" + estraverse "~1.3.0" + optionalDependencies: + source-map ">= 0.1.2" + +escodegen@~1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.3.3.tgz#f024016f5a88e046fd12005055e939802e6c5f23" + dependencies: + esprima "~1.1.1" + estraverse "~1.5.0" + esutils "~1.0.0" + optionalDependencies: + source-map "~0.1.33" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-standard-jsx@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.1.tgz#cd4e463d0268e2d9e707f61f42f73f5b3333c642" + +eslint-config-standard@10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" + +eslint-import-resolver-node@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" + dependencies: + debug "^2.2.0" + object-assign "^4.0.1" + resolve "^1.1.6" + +eslint-module-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" + dependencies: + debug "2.2.0" + pkg-dir "^1.0.0" + +eslint-plugin-import@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.2.0" + doctrine "1.5.0" + eslint-import-resolver-node "^0.2.0" + eslint-module-utils "^2.0.0" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + pkg-up "^1.0.0" + +eslint-plugin-node@~4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" + dependencies: + ignore "^3.0.11" + minimatch "^3.0.2" + object-assign "^4.0.1" + resolve "^1.1.7" + semver "5.3.0" + +eslint-plugin-promise@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" + +eslint-plugin-react@~6.10.0: + version "6.10.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz#c5435beb06774e12c7db2f6abaddcbf900cd3f78" + dependencies: + array.prototype.find "^2.0.1" + doctrine "^1.2.2" + has "^1.0.1" + jsx-ast-utils "^1.3.4" + object.assign "^4.0.4" + +eslint-plugin-standard@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" + +eslint@~3.19.0: + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + doctrine "^2.0.0" + escope "^3.6.0" + espree "^3.4.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.4.0: + version "3.4.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" + dependencies: + acorn "^5.0.1" + acorn-jsx "^3.0.0" + +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esprima@~1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" + +esprima@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.1.1.tgz#5b6f1547f4d102e670e140c509be6771d6aeb549" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.3.2.tgz#37c2b893ef13d723f276d878d60d8535152a6c42" + +estraverse@~1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.5.1.tgz#867a3e8e58a9f84618afb6c2ddbcd916b7cbaf71" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +esutils@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.0.0.tgz#8151d358e20c8acc7fb745e7472c0025fe496570" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +events@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" + dependencies: + create-hash "^1.1.1" + +exec-glob@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/exec-glob/-/exec-glob-1.2.2.tgz#9af8a232e2b0dec85b35ffa46f04375e2cd4a68e" + dependencies: + glob "^5.0.5" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-braces@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/expand-braces/-/expand-braces-0.1.2.tgz#488b1d1d2451cb3d3a6b192cfc030f44c5855fea" + dependencies: + array-slice "^0.2.3" + array-unique "^0.2.1" + braces "^0.1.2" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-0.1.1.tgz#4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044" + dependencies: + is-number "^0.1.1" + repeat-string "^0.2.2" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extract-zip@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.5.0.tgz#92ccf6d81ef70a9fa4c1747114ccef6d8688a6c4" + dependencies: + concat-stream "1.5.0" + debug "0.7.4" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +falafel@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/falafel/-/falafel-1.2.0.tgz#c18d24ef5091174a497f318cd24b026a25cddab4" + dependencies: + acorn "^1.0.3" + foreach "^2.0.5" + isarray "0.0.1" + object-keys "^1.0.6" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.3.tgz#ef47e77950e999780e86022a560e3217e0d0cc89" + dependencies: + debug "2.6.7" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-root@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-access@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" + dependencies: + null-check "^1.0.0" + +fs-extra@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + +fs-readdir-recursive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.5: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.0.0, globals@^9.14.0: + version "9.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-binary@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" + dependencies: + isarray "0.0.1" + +has-cors@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.0, has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + dependencies: + inherits "^2.0.1" + +hasha@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + dependencies: + is-stream "^1.0.1" + pinkie-promise "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +htmlescape@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" + +http-errors@~1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" + dependencies: + depd "1.1.0" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-proxy@^1.13.0: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +ignore@^3.0.11, ignore@^3.0.9, ignore@^3.2.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inline-source-map@~0.6.0: + version "0.6.2" + resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" + dependencies: + source-map "~0.5.3" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +insert-module-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3" + dependencies: + JSONStream "^1.0.3" + combine-source-map "~0.7.1" + concat-stream "~1.5.1" + is-buffer "^1.1.0" + lexical-scope "^1.2.0" + process "~0.11.0" + through2 "^2.0.0" + xtend "^4.0.0" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.0, is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isarray@0.0.1, isarray@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isbinaryfile@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +js-yaml@^3.5.1: + version "3.8.4" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stable-stringify@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +jsx-ast-utils@^1.3.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +karma-chrome-launcher@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.1.1.tgz#216879c68ac04d8d5140e99619ba04b59afd46cf" + dependencies: + fs-access "^1.0.0" + which "^1.2.1" + +karma-firefox-launcher@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.0.1.tgz#ce58f47c2013a88156d55a5d61337c099cf5bb51" + +karma-mocha-own-reporter@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/karma-mocha-own-reporter/-/karma-mocha-own-reporter-1.1.2.tgz#0e94b36bd405f0391401bf31307adc65813a218f" + +karma-mocha@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-1.3.0.tgz#eeaac7ffc0e201eb63c467440d2b69c7cf3778bf" + dependencies: + minimist "1.2.0" + +karma-phantomjs-launcher@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz#d23ca34801bda9863ad318e3bb4bd4062b13acd2" + dependencies: + lodash "^4.0.1" + phantomjs-prebuilt "^2.1.7" + +karma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/karma/-/karma-1.7.0.tgz#6f7a1a406446fa2e187ec95398698f4cee476269" + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + chokidar "^1.4.1" + colors "^1.1.0" + combine-lists "^1.0.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + expand-braces "^0.1.1" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^3.8.0" + log4js "^0.6.31" + mime "^1.3.4" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "1.7.3" + source-map "^0.5.3" + tmp "0.0.31" + useragent "^2.1.12" + +kew@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +labeled-stream-splicer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59" + dependencies: + inherits "^2.0.1" + isarray "~0.0.1" + stream-splicer "^2.0.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lexical-scope@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4" + dependencies: + astw "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.memoize@~3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" + +lodash@^3.8.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +lodash@^4.0.0, lodash@^4.0.1, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +log4js@^0.6.31: + version "0.6.38" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" + dependencies: + readable-stream "~1.0.2" + semver "~4.3.3" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +lru-cache@2.2.x: + version "2.2.4" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +miller-rabin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594" + dependencies: + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.6.0" + diff "3.2.0" + escape-string-regexp "1.0.5" + glob "7.1.1" + growl "1.9.2" + json3 "3.3.2" + lodash.create "3.1.1" + mkdirp "0.5.1" + supports-color "3.1.2" + +module-deps@^4.0.8: + version "4.1.1" + resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" + dependencies: + JSONStream "^1.0.3" + browser-resolve "^1.7.0" + cached-path-relative "^1.0.0" + concat-stream "~1.5.0" + defined "^1.0.0" + detective "^4.0.0" + duplexer2 "^0.1.2" + inherits "^2.0.1" + parents "^1.0.0" + readable-stream "^2.0.2" + resolve "^1.1.3" + stream-combiner2 "^1.1.1" + subarg "^1.0.0" + through2 "^2.0.0" + xtend "^4.0.0" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-pre-gyp@^0.6.29: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npmlog@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +null-check@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + +object-inspect@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-0.4.0.tgz#f5157c116c1455b243b06ee97703392c5ad89fec" + +object-keys@^1.0.10, object-keys@^1.0.6, object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + +object.assign@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + object-keys "^1.0.10" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + +os-browserify@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +outpipe@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" + dependencies: + shell-quote "^1.4.2" + +output-file-sync@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +pako@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.5.tgz#d2205dfe5b9da8af797e7c163db4d1f84e4600bc" + +parents@^1.0.0, parents@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" + dependencies: + path-platform "~0.11.15" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parsejson@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.3.tgz#ab7e3759f209ece99437973f7d0f1f64ae0e64ab" + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" + dependencies: + better-assert "~1.0.0" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-browserify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-platform@~0.11.15: + version "0.11.15" + resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" + +pbkdf2@^3.0.3: + version "3.0.12" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.12.tgz#be36785c5067ea48d806ff923288c5f750b6b8a2" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +phantomjs-prebuilt@^2.1.14, phantomjs-prebuilt@^2.1.7: + version "2.1.14" + resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz#d53d311fcfb7d1d08ddb24014558f1188c516da0" + dependencies: + es6-promise "~4.0.3" + extract-zip "~1.5.0" + fs-extra "~1.0.0" + hasha "~2.2.0" + kew "~0.7.0" + progress "~1.1.8" + request "~2.79.0" + request-progress "~2.0.1" + which "~1.2.10" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-conf@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.0.0.tgz#071c87650403bccfb9c627f58751bfe47c067279" + dependencies: + find-up "^2.0.0" + load-json-file "^2.0.0" + +pkg-config@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" + dependencies: + debug-log "^1.0.0" + find-root "^1.0.0" + xtend "^4.0.1" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pkg-up@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" + dependencies: + find-up "^1.0.0" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +private@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@~0.11.0: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress@^1.1.8, progress@~1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.3.2, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qjobs@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" + +qs@6.4.0, qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +querystring-es3@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +quote-stream@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/quote-stream/-/quote-stream-1.0.2.tgz#84963f8c9c26b942e153feeb53aae74652b7e0b2" + dependencies: + buffer-equal "0.0.1" + minimist "^1.1.3" + through2 "^2.0.0" + +quote-stream@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/quote-stream/-/quote-stream-0.0.0.tgz#cde29e94c409b16e19dc7098b89b6658f9721d3b" + dependencies: + minimist "0.0.8" + through2 "~0.4.1" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.4.tgz#9551df208422c8f80eb58e2326dd0b840ff22efd" + dependencies: + safe-buffer "^5.0.1" + +range-parser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.15" + unpipe "1.0.0" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-only-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" + dependencies: + readable-stream "^2.0.2" + +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6: + version "2.2.10" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.10.tgz#effe72bb7c884c0dd335e2379d526196d9d011ee" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "^5.0.1" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +readable-stream@~1.0.17, readable-stream@~1.0.2, readable-stream@~1.0.27-1: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-0.2.2.tgz#c7a8d3236068362059a7e4651fc6884e8b1fb4ae" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request-progress@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + dependencies: + throttleit "^1.0.0" + +request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +requires-port@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.0, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +run-parallel@^1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +safe-buffer@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223" + +semver@5.3.0, semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +semver@~4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: + version "2.4.8" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" + dependencies: + inherits "^2.0.1" + +shallow-copy@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" + +shasum@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" + dependencies: + json-stable-stringify "~0.0.0" + sha.js "~2.4.4" + +shell-quote@^1.4.2, shell-quote@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + +shelljs@^0.7.5: + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +socket.io-adapter@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz#cb6d4bb8bec81e1078b99677f9ced0046066bb8b" + dependencies: + debug "2.3.3" + socket.io-parser "2.3.1" + +socket.io-client@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377" + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.2.1" + debug "2.3.3" + engine.io-client "1.8.3" + has-binary "0.1.7" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.5" + socket.io-parser "2.3.1" + to-array "0.1.4" + +socket.io-parser@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0" + dependencies: + component-emitter "1.1.2" + debug "2.2.0" + isarray "0.0.1" + json3 "3.3.2" + +socket.io@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b" + dependencies: + debug "2.3.3" + engine.io "1.8.3" + has-binary "0.1.7" + object-assign "4.1.0" + socket.io-adapter "0.5.0" + socket.io-client "1.7.3" + socket.io-parser "2.3.1" + +source-map-support@^0.4.2: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +"source-map@>= 0.1.2", source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.3: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.1.33: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +standard-engine@~7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-7.0.0.tgz#ebb77b9c8fc2c8165ffa353bd91ba0dff41af690" + dependencies: + deglob "^2.1.0" + get-stdin "^5.0.1" + minimist "^1.1.0" + pkg-conf "^2.0.0" + +standard@^10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/standard/-/standard-10.0.2.tgz#974c1c53cc865b075a4b576e78441e1695daaf7b" + dependencies: + eslint "~3.19.0" + eslint-config-standard "10.2.1" + eslint-config-standard-jsx "4.0.1" + eslint-plugin-import "~2.2.0" + eslint-plugin-node "~4.2.2" + eslint-plugin-promise "~3.5.0" + eslint-plugin-react "~6.10.0" + eslint-plugin-standard "~3.0.1" + standard-engine "~7.0.0" + +static-eval@~0.2.0: + version "0.2.4" + resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-0.2.4.tgz#b7d34d838937b969f9641ca07d48f8ede263ea7b" + dependencies: + escodegen "~0.0.24" + +static-module@^1.1.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/static-module/-/static-module-1.3.2.tgz#329fb9f223a566266bda71843b7d932c767174f3" + dependencies: + concat-stream "~1.6.0" + duplexer2 "~0.0.2" + escodegen "~1.3.2" + falafel "^1.0.0" + has "^1.0.0" + object-inspect "~0.4.0" + quote-stream "~0.0.0" + readable-stream "~1.0.27-1" + shallow-copy "~0.0.1" + static-eval "~0.2.0" + through2 "~0.4.1" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-browserify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + +stream-http@^2.0.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.1.tgz#546a51741ad5a6b07e9e31b0b10441a917df528a" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.2.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-splicer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.2" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" + dependencies: + safe-buffer "^5.0.1" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +subarg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" + dependencies: + minimist "^1.1.0" + +supports-color@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +syntax-error@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1" + dependencies: + acorn "^4.0.3" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b" + dependencies: + readable-stream "~1.0.17" + xtend "~2.1.1" + +"through@>=2.2.7 <3", through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +timers-browserify@^1.0.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + dependencies: + process "~0.11.0" + +tmp@0.0.31, tmp@0.0.x: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +to-array@0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tty-browserify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +typedarray@^0.0.6, typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + +umd@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +url@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +useragent@^2.1.12: + version "2.1.13" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.1.13.tgz#bba43e8aa24d5ceb83c2937473e102e21df74c10" + dependencies: + lru-cache "2.2.x" + tmp "0.0.x" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@~0.10.1: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.10: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vm-browserify@~0.0.1: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + +watchify@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.9.0.tgz#f075fd2e8a86acde84cedba6e5c2a0bedd523d9e" + dependencies: + anymatch "^1.3.0" + browserify "^14.0.0" + chokidar "^1.0.0" + defined "^1.0.0" + outpipe "^1.1.0" + through2 "^2.0.0" + xtend "^4.0.0" + +which@^1.2.1, which@~1.2.10: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +ws@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +wtf-8@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" + +xmlhttprequest-ssl@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" + +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + dependencies: + object-keys "~0.4.0" + +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" + +yeast@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" diff --git a/node_modules/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts new file mode 100644 index 0000000..58f2069 --- /dev/null +++ b/node_modules/camelcase/index.d.ts @@ -0,0 +1,63 @@ +declare namespace camelcase { + interface Options { + /** + Uppercase the first character: `foo-bar` → `FooBar`. + + @default false + */ + readonly pascalCase?: boolean; + } +} + +declare const camelcase: { + /** + Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. + + @param input - String to convert to camel case. + + @example + ``` + import camelCase = require('camelcase'); + + camelCase('foo-bar'); + //=> 'fooBar' + + camelCase('foo_bar'); + //=> 'fooBar' + + camelCase('Foo-Bar'); + //=> 'fooBar' + + camelCase('Foo-Bar', {pascalCase: true}); + //=> 'FooBar' + + camelCase('--foo.bar', {pascalCase: false}); + //=> 'fooBar' + + camelCase('foo bar'); + //=> 'fooBar' + + console.log(process.argv[3]); + //=> '--foo-bar' + camelCase(process.argv[3]); + //=> 'fooBar' + + camelCase(['foo', 'bar']); + //=> 'fooBar' + + camelCase(['__foo__', '--bar'], {pascalCase: true}); + //=> 'FooBar' + ``` + */ + (input: string | ReadonlyArray, options?: camelcase.Options): string; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function camelcase( + // input: string | ReadonlyArray, + // options?: camelcase.Options + // ): string; + // export = camelcase; + default: typeof camelcase; +}; + +export = camelcase; diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js new file mode 100644 index 0000000..579f99b --- /dev/null +++ b/node_modules/camelcase/index.js @@ -0,0 +1,76 @@ +'use strict'; + +const preserveCamelCase = string => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < string.length; i++) { + const character = string[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + '-' + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + '-' + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + + return string; +}; + +const camelCase = (input, options) => { + if (!(typeof input === 'string' || Array.isArray(input))) { + throw new TypeError('Expected the input to be `string | string[]`'); + } + + options = Object.assign({ + pascalCase: false + }, options); + + const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + + if (Array.isArray(input)) { + input = input.map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + input = input.trim(); + } + + if (input.length === 0) { + return ''; + } + + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + + const hasUpperCase = input !== input.toLowerCase(); + + if (hasUpperCase) { + input = preserveCamelCase(input); + } + + input = input + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) + .replace(/\d+(\w|$)/g, m => m.toUpperCase()); + + return postProcess(input); +}; + +module.exports = camelCase; +// TODO: Remove this for the next major release +module.exports.default = camelCase; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/camelcase/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json new file mode 100644 index 0000000..fbdbaaa --- /dev/null +++ b/node_modules/camelcase/package.json @@ -0,0 +1,43 @@ +{ + "name": "camelcase", + "version": "5.3.1", + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", + "license": "MIT", + "repository": "sindresorhus/camelcase", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert", + "pascalcase", + "pascal-case" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md new file mode 100644 index 0000000..fde2726 --- /dev/null +++ b/node_modules/camelcase/readme.md @@ -0,0 +1,99 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` + +--- + +

+ + Get professional support for 'camelcase' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- + +## Install + +``` +$ npm install camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('Foo-Bar', {pascalCase: true}); +//=> 'FooBar' + +camelCase('--foo.bar', {pascalCase: false}); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase(['foo', 'bar']); +//=> 'fooBar' + +camelCase(['__foo__', '--bar'], {pascalCase: true}); +//=> 'FooBar' +``` + + +## API + +### camelCase(input, [options]) + +#### input + +Type: `string` `string[]` + +String to convert to camel case. + +#### options + +Type: `Object` + +##### pascalCase + +Type: `boolean`
+Default: `false` + +Uppercase the first character: `foo-bar` → `FooBar` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase +- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string +- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md new file mode 100644 index 0000000..6a77f8f --- /dev/null +++ b/node_modules/cliui/CHANGELOG.md @@ -0,0 +1,76 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [6.0.0](https://www.github.com/yargs/cliui/compare/v5.0.0...v6.0.0) (2019-11-10) + + +### ⚠ BREAKING CHANGES + +* update deps, drop Node 6 + +### Code Refactoring + +* update deps, drop Node 6 ([62056df](https://www.github.com/yargs/cliui/commit/62056df)) + +## [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10) + + +### Bug Fixes + +* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae)) + + +### BREAKING CHANGES + +* Drop support for node < 6. + + + + +## [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) + + +### Features + +* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902)) + + + + +## [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18) + + +### Bug Fixes + +* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46)) +* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36)) + + +### Chores + +* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376)) + + +### Features + +* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922)) + + +### BREAKING CHANGES + +* officially drop support for Node < 4 + + + + +## [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11) + + +### Bug Fixes + +* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33)) + +### Features + +* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32)) diff --git a/node_modules/cliui/LICENSE.txt b/node_modules/cliui/LICENSE.txt new file mode 100644 index 0000000..c7e2747 --- /dev/null +++ b/node_modules/cliui/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md new file mode 100644 index 0000000..deacfa0 --- /dev/null +++ b/node_modules/cliui/README.md @@ -0,0 +1,115 @@ +# cliui + +[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) +[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) +[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +easily create complex multi-column command-line-interfaces. + +## Example + +```js +var ui = require('cliui')() + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 2, 0] +}) + +ui.div( + { + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] + }, + { + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 + }, + { + text: chalk.red("[required]"), + align: 'right' + } +) + +console.log(ui.toString()) +``` + + + +## Layout DSL + +cliui exposes a simple layout DSL: + +If you create a single `ui.div`, passing a string rather than an +object: + +* `\n`: characters will be interpreted as new rows. +* `\t`: characters will be interpreted as new columns. +* `\s`: characters will be interpreted as padding. + +**as an example...** + +```js +var ui = require('./')({ + width: 60 +}) + +ui.div( + 'Usage: node ./bin/foo.js\n' + + ' \t provide a regex\n' + + ' \t provide a glob\t [required]' +) + +console.log(ui.toString()) +``` + +**will output:** + +```shell +Usage: node ./bin/foo.js + provide a regex + provide a glob [required] +``` + +## Methods + +```js +cliui = require('cliui') +``` + +### cliui({width: integer}) + +Specify the maximum width of the UI being generated. +If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. + +### cliui({wrap: boolean}) + +Enable or disable the wrapping of text in a column. + +### cliui.div(column, column, column) + +Create a row with any number of columns, a column +can either be a string, or an object with the following +options: + +* **text:** some text to place in the column. +* **width:** the width of a column. +* **align:** alignment, `right` or `center`. +* **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? + +### cliui.span(column, column, column) + +Similar to `div`, except the next row will be appended without +a new line being created. + +### cliui.resetOutput() + +Resets the UI elements of the current cliui instance, maintaining the values +set for `width` and `wrap`. diff --git a/node_modules/cliui/index.js b/node_modules/cliui/index.js new file mode 100644 index 0000000..e917b00 --- /dev/null +++ b/node_modules/cliui/index.js @@ -0,0 +1,354 @@ +'use strict' + +const stringWidth = require('string-width') +const stripAnsi = require('strip-ansi') +const wrap = require('wrap-ansi') + +const align = { + right: alignRight, + center: alignCenter +} +const top = 0 +const right = 1 +const bottom = 2 +const left = 3 + +class UI { + constructor (opts) { + this.width = opts.width + this.wrap = opts.wrap + this.rows = [] + } + + span (...args) { + const cols = this.div(...args) + cols.span = true + } + + resetOutput () { + this.rows = [] + } + + div (...args) { + if (args.length === 0) { + this.div('') + } + + if (this.wrap && this._shouldApplyLayoutDSL(...args)) { + return this._applyLayoutDSL(args[0]) + } + + const cols = args.map(arg => { + if (typeof arg === 'string') { + return this._colFromString(arg) + } + + return arg + }) + + this.rows.push(cols) + return cols + } + + _shouldApplyLayoutDSL (...args) { + return args.length === 1 && typeof args[0] === 'string' && + /[\t\n]/.test(args[0]) + } + + _applyLayoutDSL (str) { + const rows = str.split('\n').map(row => row.split('\t')) + let leftColumnWidth = 0 + + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(columns => { + if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min( + Math.floor(this.width * 0.5), + stringWidth(columns[0]) + ) + } + }) + + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(columns => { + this.div(...columns.map((r, i) => { + return { + text: r.trim(), + padding: this._measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + } + })) + }) + + return this.rows[this.rows.length - 1] + } + + _colFromString (text) { + return { + text, + padding: this._measurePadding(text) + } + } + + _measurePadding (str) { + // measure padding without ansi escape codes + const noAnsi = stripAnsi(str) + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length] + } + + toString () { + const lines = [] + + this.rows.forEach(row => { + this.rowToString(row, lines) + }) + + // don't display any lines with the + // hidden flag set. + return lines + .filter(line => !line.hidden) + .map(line => line.text) + .join('\n') + } + + rowToString (row, lines) { + this._rasterize(row).forEach((rrow, r) => { + let str = '' + rrow.forEach((col, c) => { + const { width } = row[c] // the width with padding. + const wrapWidth = this._negatePadding(row[c]) // the width without padding. + + let ts = col // temporary string used during alignment/padding. + + if (wrapWidth > stringWidth(col)) { + ts += ' '.repeat(wrapWidth - stringWidth(col)) + } + + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && this.wrap) { + ts = align[row[c].align](ts, wrapWidth) + if (stringWidth(ts) < wrapWidth) { + ts += ' '.repeat(width - stringWidth(ts) - 1) + } + } + + // apply border and padding to string. + const padding = row[c].padding || [0, 0, 0, 0] + if (padding[left]) { + str += ' '.repeat(padding[left]) + } + + str += addBorder(row[c], ts, '| ') + str += ts + str += addBorder(row[c], ts, ' |') + if (padding[right]) { + str += ' '.repeat(padding[right]) + } + + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = this._renderInline(str, lines[lines.length - 1]) + } + }) + + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }) + }) + + return lines + } + + // if the full 'source' can render in + // the target line, do so. + _renderInline (source, previousLine) { + const leadingWhitespace = source.match(/^ */)[0].length + const target = previousLine.text + const targetTextWidth = stringWidth(target.trimRight()) + + if (!previousLine.span) { + return source + } + + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true + return target + source + } + + if (leadingWhitespace < targetTextWidth) { + return source + } + + previousLine.hidden = true + + return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft() + } + + _rasterize (row) { + const rrows = [] + const widths = this._columnWidths(row) + let wrapped + + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach((col, c) => { + // leave room for left and right padding. + col.width = widths[c] + if (this.wrap) { + wrapped = wrap(col.text, this._negatePadding(col), { hard: true }).split('\n') + } else { + wrapped = col.text.split('\n') + } + + if (col.border) { + wrapped.unshift('.' + '-'.repeat(this._negatePadding(col) + 2) + '.') + wrapped.push("'" + '-'.repeat(this._negatePadding(col) + 2) + "'") + } + + // add top and bottom padding. + if (col.padding) { + wrapped.unshift(...new Array(col.padding[top] || 0).fill('')) + wrapped.push(...new Array(col.padding[bottom] || 0).fill('')) + } + + wrapped.forEach((str, r) => { + if (!rrows[r]) { + rrows.push([]) + } + + const rrow = rrows[r] + + for (let i = 0; i < c; i++) { + if (rrow[i] === undefined) { + rrow.push('') + } + } + + rrow.push(str) + }) + }) + + return rrows + } + + _negatePadding (col) { + let wrapWidth = col.width + if (col.padding) { + wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0) + } + + if (col.border) { + wrapWidth -= 4 + } + + return wrapWidth + } + + _columnWidths (row) { + if (!this.wrap) { + return row.map(col => { + return col.width || stringWidth(col.text) + }) + } + + let unset = row.length + let remainingWidth = this.width + + // column widths can be set in config. + const widths = row.map(col => { + if (col.width) { + unset-- + remainingWidth -= col.width + return col.width + } + + return undefined + }) + + // any unset widths should be calculated. + const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0 + + return widths.map((w, i) => { + if (w === undefined) { + return Math.max(unsetWidth, _minWidth(row[i])) + } + + return w + }) + } +} + +function addBorder (col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) { + return '' + } + + if (ts.trim().length !== 0) { + return style + } + + return ' ' + } + + return '' +} + +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth (col) { + const padding = col.padding || [] + const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0) + if (col.border) { + return minWidth + 4 + } + + return minWidth +} + +function getWindowWidth () { + /* istanbul ignore next: depends on terminal */ + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return process.stdout.columns + } +} + +function alignRight (str, width) { + str = str.trim() + const strWidth = stringWidth(str) + + if (strWidth < width) { + return ' '.repeat(width - strWidth) + str + } + + return str +} + +function alignCenter (str, width) { + str = str.trim() + const strWidth = stringWidth(str) + + /* istanbul ignore next */ + if (strWidth >= width) { + return str + } + + return ' '.repeat((width - strWidth) >> 1) + str +} + +module.exports = function (opts = {}) { + return new UI({ + width: opts.width || getWindowWidth() || /* istanbul ignore next */ 80, + wrap: opts.wrap !== false + }) +} diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json new file mode 100644 index 0000000..f92fd10 --- /dev/null +++ b/node_modules/cliui/package.json @@ -0,0 +1,65 @@ +{ + "name": "cliui", + "version": "6.0.0", + "description": "easily create complex multi-column command-line-interfaces", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc --reporter=text-lcov mocha | coveralls" + }, + "repository": { + "type": "git", + "url": "http://github.com/yargs/cliui.git" + }, + "config": { + "blanket": { + "pattern": [ + "index.js" + ], + "data-cover-never": [ + "node_modules", + "test" + ], + "output-reporter": "spec" + } + }, + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "keywords": [ + "cli", + "command-line", + "layout", + "design", + "console", + "wrap", + "table" + ], + "author": "Ben Coe ", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "devDependencies": { + "chai": "^4.2.0", + "chalk": "^3.0.0", + "coveralls": "^3.0.3", + "mocha": "^6.2.2", + "nyc": "^14.1.1", + "standard": "^12.0.1" + }, + "files": [ + "index.js" + ], + "engine": { + "node": ">=8" + } +} diff --git a/node_modules/clone/.npmignore b/node_modules/clone/.npmignore new file mode 100644 index 0000000..2ff84f0 --- /dev/null +++ b/node_modules/clone/.npmignore @@ -0,0 +1,4 @@ +/node_modules/ +/test.js +/.travis.yml +*.html diff --git a/node_modules/clone/LICENSE b/node_modules/clone/LICENSE new file mode 100644 index 0000000..cc3c87b --- /dev/null +++ b/node_modules/clone/LICENSE @@ -0,0 +1,18 @@ +Copyright © 2011-2015 Paul Vorbach + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/clone/README.md b/node_modules/clone/README.md new file mode 100644 index 0000000..207e60a --- /dev/null +++ b/node_modules/clone/README.md @@ -0,0 +1,194 @@ +# clone + +[![build status](https://secure.travis-ci.org/pvorb/clone.svg)](http://travis-ci.org/pvorb/clone) [![downloads](https://img.shields.io/npm/dt/clone.svg)](http://npm-stat.com/charts.html?package=clone) + +offers foolproof _deep cloning_ of objects, arrays, numbers, strings, maps, +sets, promises, etc. in JavaScript. + +**XSS vulnerability detected** + + +## Installation + + npm install clone + +(It also works with browserify, ender or standalone. You may want to use the +option `noParse` in browserify to reduce the resulting file size, since usually +`Buffer`s are not needed in browsers.) + + +## Example + +~~~ javascript +var clone = require('clone'); + +var a, b; + +a = { foo: { bar: 'baz' } }; // initial value of a + +b = clone(a); // clone a -> b +a.foo.bar = 'foo'; // change a + +console.log(a); // show a +console.log(b); // show b +~~~ + +This will print: + +~~~ javascript +{ foo: { bar: 'foo' } } +{ foo: { bar: 'baz' } } +~~~ + +**clone** masters cloning simple objects (even with custom prototype), arrays, +Date objects, and RegExp objects. Everything is cloned recursively, so that you +can clone dates in arrays in objects, for example. + + +## API + +`clone(val, circular, depth)` + + * `val` -- the value that you want to clone, any type allowed + * `circular` -- boolean + + Call `clone` with `circular` set to `false` if you are certain that `obj` + contains no circular references. This will give better performance if + needed. There is no error if `undefined` or `null` is passed as `obj`. + * `depth` -- depth to which the object is to be cloned (optional, + defaults to infinity) + * `prototype` -- sets the prototype to be used when cloning an object. + (optional, defaults to parent prototype). + * `includeNonEnumerable` -- set to `true` if the non-enumerable properties + should be cloned as well. Non-enumerable properties on the prototype chain + will be ignored. (optional, defaults to `false`) + +`clone.clonePrototype(obj)` + + * `obj` -- the object that you want to clone + +Does a prototype clone as +[described by Oran Looney](http://oranlooney.com/functional-javascript/). + + +## Circular References + +~~~ javascript +var a, b; + +a = { hello: 'world' }; + +a.myself = a; +b = clone(a); + +console.log(b); +~~~ + +This will print: + +~~~ javascript +{ hello: "world", myself: [Circular] } +~~~ + +So, `b.myself` points to `b`, not `a`. Neat! + + +## Test + + npm test + + +## Changelog + +### v2.1.2 + +#### 2018-03-21 + + - Use `Buffer.allocUnsafe()` on Node >= 4.5.0 (contributed by @ChALkeR) + +### v2.1.1 + +#### 2017-03-09 + + - Fix build badge in README + - Add support for cloning Maps and Sets on Internet Explorer + +### v2.1.0 + +#### 2016-11-22 + + - Add support for cloning Errors + - Exclude non-enumerable symbol-named object properties from cloning + - Add option to include non-enumerable own properties of objects + +### v2.0.0 + +#### 2016-09-28 + + - Add support for cloning ES6 Maps, Sets, Promises, and Symbols + +### v1.0.3 + +#### 2017-11-08 + + - Close XSS vulnerability in the NPM package, which included the file + `test-apart-ctx.html`. This vulnerability was disclosed by Juho Nurminen of + 2NS - Second Nature Security. + +### v1.0.2 (deprecated) + +#### 2015-03-25 + + - Fix call on getRegExpFlags + - Refactor utilities + - Refactor test suite + +### v1.0.1 (deprecated) + +#### 2015-03-04 + + - Fix nodeunit version + - Directly call getRegExpFlags + +### v1.0.0 (deprecated) + +#### 2015-02-10 + + - Improve browser support + - Improve browser testability + - Move helper methods to private namespace + +## Caveat + +Some special objects like a socket or `process.stdout`/`stderr` are known to not +be cloneable. If you find other objects that cannot be cloned, please [open an +issue](https://github.com/pvorb/clone/issues/new). + + +## Bugs and Issues + +If you encounter any bugs or issues, feel free to [open an issue at +github](https://github.com/pvorb/clone/issues) or send me an email to +. I also always like to hear from you, if you’re using my code. + +## License + +Copyright © 2011-2016 [Paul Vorbach](https://paul.vorba.ch/) and +[contributors](https://github.com/pvorb/clone/graphs/contributors). + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/clone/clone.iml b/node_modules/clone/clone.iml new file mode 100644 index 0000000..30de8ae --- /dev/null +++ b/node_modules/clone/clone.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/clone/clone.js b/node_modules/clone/clone.js new file mode 100644 index 0000000..3fa5fad --- /dev/null +++ b/node_modules/clone/clone.js @@ -0,0 +1,257 @@ +var clone = (function() { +'use strict'; + +function _instanceof(obj, type) { + return type != null && obj instanceof type; +} + +var nativeMap; +try { + nativeMap = Map; +} catch(_) { + // maybe a reference error because no `Map`. Give it a dummy value that no + // value will ever be an instanceof. + nativeMap = function() {}; +} + +var nativeSet; +try { + nativeSet = Set; +} catch(_) { + nativeSet = function() {}; +} + +var nativePromise; +try { + nativePromise = Promise; +} catch(_) { + nativePromise = function() {}; +} + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). + * @param `includeNonEnumerable` - set to true if the non-enumerable properties + * should be cloned as well. Non-enumerable properties on the prototype + * chain will be ignored. (optional - false by default) +*/ +function clone(parent, circular, depth, prototype, includeNonEnumerable) { + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + includeNonEnumerable = circular.includeNonEnumerable; + circular = circular.circular; + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth === 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (_instanceof(parent, nativeMap)) { + child = new nativeMap(); + } else if (_instanceof(parent, nativeSet)) { + child = new nativeSet(); + } else if (_instanceof(parent, nativePromise)) { + child = new nativePromise(function (resolve, reject) { + parent.then(function(value) { + resolve(_clone(value, depth - 1)); + }, function(err) { + reject(_clone(err, depth - 1)); + }); + }); + } else if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + if (Buffer.allocUnsafe) { + // Node.js >= 4.5.0 + child = Buffer.allocUnsafe(parent.length); + } else { + // Older Node.js versions + child = new Buffer(parent.length); + } + parent.copy(child); + return child; + } else if (_instanceof(parent, Error)) { + child = Object.create(parent); + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + if (_instanceof(parent, nativeMap)) { + parent.forEach(function(value, key) { + var keyChild = _clone(key, depth - 1); + var valueChild = _clone(value, depth - 1); + child.set(keyChild, valueChild); + }); + } + if (_instanceof(parent, nativeSet)) { + parent.forEach(function(value) { + var entryChild = _clone(value, depth - 1); + child.add(entryChild); + }); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(parent); + for (var i = 0; i < symbols.length; i++) { + // Don't need to worry about cloning a symbol because it is a primitive, + // like a number or string. + var symbol = symbols[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); + if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { + continue; + } + child[symbol] = _clone(parent[symbol], depth - 1); + if (!descriptor.enumerable) { + Object.defineProperty(child, symbol, { + enumerable: false + }); + } + } + } + + if (includeNonEnumerable) { + var allPropertyNames = Object.getOwnPropertyNames(parent); + for (var i = 0; i < allPropertyNames.length; i++) { + var propertyName = allPropertyNames[i]; + var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); + if (descriptor && descriptor.enumerable) { + continue; + } + child[propertyName] = _clone(parent[propertyName], depth - 1); + Object.defineProperty(child, propertyName, { + enumerable: false + }); + } + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; + +// private utility functions + +function __objToStr(o) { + return Object.prototype.toString.call(o); +} +clone.__objToStr = __objToStr; + +function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; +} +clone.__isDate = __isDate; + +function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; +} +clone.__isArray = __isArray; + +function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; +} +clone.__isRegExp = __isRegExp; + +function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; +} +clone.__getRegExpFlags = __getRegExpFlags; + +return clone; +})(); + +if (typeof module === 'object' && module.exports) { + module.exports = clone; +} diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json new file mode 100644 index 0000000..39a53e3 --- /dev/null +++ b/node_modules/clone/package.json @@ -0,0 +1,56 @@ +{ + "name": "clone", + "description": "deep cloning of objects and arrays", + "tags": [ + "clone", + "object", + "array", + "function", + "date" + ], + "version": "2.1.2", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "main": "clone.js", + "author": "Paul Vorbach (http://paul.vorba.ch/)", + "contributors": [ + "Blake Miner (http://www.blakeminer.com/)", + "Tian You (http://blog.axqd.net/)", + "George Stagas (http://stagas.com/)", + "Tobiasz Cudnik (https://github.com/TobiaszCudnik)", + "Pavel Lang (https://github.com/langpavel)", + "Dan MacTough (http://yabfog.com/)", + "w1nk (https://github.com/w1nk)", + "Hugh Kennedy (http://twitter.com/hughskennedy)", + "Dustin Diaz (http://dustindiaz.com)", + "Ilya Shaisultanov (https://github.com/diversario)", + "Nathan MacInnes (http://macinn.es/)", + "Benjamin E. Coe (https://twitter.com/benjamincoe)", + "Nathan Zadoks (https://github.com/nathan7)", + "Róbert Oroszi (https://github.com/oroce)", + "Aurélio A. Heckert (http://softwarelivre.org/aurium)", + "Guy Ellis (http://www.guyellisrocks.com/)", + "fscherwi (https://fscherwi.github.io)", + "rictic (https://github.com/rictic)", + "Martin Jurča (https://github.com/jurca)", + "Misery Lee (https://github.com/miserylee)", + "Clemens Wolff (https://github.com/c-w)" + ], + "license": "MIT", + "engines": { + "node": ">=0.8" + }, + "dependencies": {}, + "devDependencies": { + "nodeunit": "~0.9.0" + }, + "optionalDependencies": {}, + "scripts": { + "test": "nodeunit test.js" + } +} diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md new file mode 100644 index 0000000..0a7bce4 --- /dev/null +++ b/node_modules/color-convert/CHANGELOG.md @@ -0,0 +1,54 @@ +# 1.0.0 - 2016-01-07 + +- Removed: unused speed test +- Added: Automatic routing between previously unsupported conversions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `convert()` class +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: all functions to lookup dictionary +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: `ansi` to `ansi256` +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Fixed: argument grouping for functions requiring only one argument +([#27](https://github.com/Qix-/color-convert/pull/27)) + +# 0.6.0 - 2015-07-23 + +- Added: methods to handle +[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: + - rgb2ansi16 + - rgb2ansi + - hsl2ansi16 + - hsl2ansi + - hsv2ansi16 + - hsv2ansi + - hwb2ansi16 + - hwb2ansi + - cmyk2ansi16 + - cmyk2ansi + - keyword2ansi16 + - keyword2ansi + - ansi162rgb + - ansi162hsl + - ansi162hsv + - ansi162hwb + - ansi162cmyk + - ansi162keyword + - ansi2rgb + - ansi2hsl + - ansi2hsv + - ansi2hwb + - ansi2cmyk + - ansi2keyword +([#18](https://github.com/harthur/color-convert/pull/18)) + +# 0.5.3 - 2015-06-02 + +- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` +([#15](https://github.com/harthur/color-convert/issues/15)) + +--- + +Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE new file mode 100644 index 0000000..5b4c386 --- /dev/null +++ b/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md new file mode 100644 index 0000000..d4b08fc --- /dev/null +++ b/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js new file mode 100644 index 0000000..2657f26 --- /dev/null +++ b/node_modules/color-convert/conversions.js @@ -0,0 +1,839 @@ +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js new file mode 100644 index 0000000..b648e57 --- /dev/null +++ b/node_modules/color-convert/index.js @@ -0,0 +1,81 @@ +const conversions = require('./conversions'); +const route = require('./route'); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json new file mode 100644 index 0000000..6e48000 --- /dev/null +++ b/node_modules/color-convert/package.json @@ -0,0 +1,48 @@ +{ + "name": "color-convert", + "description": "Plain color conversion functions", + "version": "2.0.1", + "author": "Heather Arthur ", + "license": "MIT", + "repository": "Qix-/color-convert", + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "engines": { + "node": ">=7.0.0" + }, + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + }, + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" + }, + "dependencies": { + "color-name": "~1.1.4" + } +} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js new file mode 100644 index 0000000..1a08521 --- /dev/null +++ b/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +const conversions = require('./conversions'); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE new file mode 100644 index 0000000..4d9802a --- /dev/null +++ b/node_modules/color-name/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md new file mode 100644 index 0000000..3611a6b --- /dev/null +++ b/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js new file mode 100644 index 0000000..e42aa68 --- /dev/null +++ b/node_modules/color-name/index.js @@ -0,0 +1,152 @@ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json new file mode 100644 index 0000000..7acc902 --- /dev/null +++ b/node_modules/color-name/package.json @@ -0,0 +1,28 @@ +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/crypto-js/CONTRIBUTING.md b/node_modules/crypto-js/CONTRIBUTING.md new file mode 100644 index 0000000..09bf774 --- /dev/null +++ b/node_modules/crypto-js/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contribution + +# Git Flow + +The crypto-js project uses [git flow](https://github.com/nvie/gitflow) to manage branches. +Do your changes on the `develop` or even better on a `feature/*` branch. Don't do any changes on the `master` branch. + +# Pull request + +Target your pull request on `develop` branch. Other pull request won't be accepted. + +# How to build + +1. Clone + +2. Run + + ```sh + npm install + ``` + +3. Run + + ```sh + npm run build + ``` + +4. Check `build` folder \ No newline at end of file diff --git a/node_modules/crypto-js/LICENSE b/node_modules/crypto-js/LICENSE new file mode 100644 index 0000000..b0828e5 --- /dev/null +++ b/node_modules/crypto-js/LICENSE @@ -0,0 +1,24 @@ +# License + +[The MIT License (MIT)](http://opensource.org/licenses/MIT) + +Copyright (c) 2009-2013 Jeff Mott +Copyright (c) 2013-2016 Evan Vosberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/crypto-js/README.md b/node_modules/crypto-js/README.md new file mode 100644 index 0000000..6a9bcdf --- /dev/null +++ b/node_modules/crypto-js/README.md @@ -0,0 +1,275 @@ +# crypto-js + +JavaScript library of crypto standards. + +## Discontinued + +Active development of CryptoJS has been discontinued. This library is no longer maintained. + +Nowadays, NodeJS and modern browsers have a native `Crypto` module. The latest version of CryptoJS already uses the native Crypto module for random number generation, since `Math.random()` is not crypto-safe. Further development of CryptoJS would result in it only being a wrapper of native Crypto. Therefore, development and maintenance has been discontinued, it is time to go for the native `crypto` module. + +## Node.js (Install) + +Requirements: + +- Node.js +- npm (Node.js package manager) + +```bash +npm install crypto-js +``` + +### Usage + +ES6 import for typical API call signing use case: + +```javascript +import sha256 from 'crypto-js/sha256'; +import hmacSHA512 from 'crypto-js/hmac-sha512'; +import Base64 from 'crypto-js/enc-base64'; + +const message, nonce, path, privateKey; // ... +const hashDigest = sha256(nonce + message); +const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey)); +``` + +Modular include: + +```javascript +var AES = require("crypto-js/aes"); +var SHA256 = require("crypto-js/sha256"); +... +console.log(SHA256("Message")); +``` + +Including all libraries, for access to extra methods: + +```javascript +var CryptoJS = require("crypto-js"); +console.log(CryptoJS.HmacSHA1("Message", "Key")); +``` + +## Client (browser) + +Requirements: + +- Node.js +- Bower (package manager for frontend) + +```bash +bower install crypto-js +``` + +### Usage + +Modular include: + +```javascript +require.config({ + packages: [ + { + name: 'crypto-js', + location: 'path-to/bower_components/crypto-js', + main: 'index' + } + ] +}); + +require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) { + console.log(SHA256("Message")); +}); +``` + +Including all libraries, for access to extra methods: + +```javascript +// Above-mentioned will work or use this simple form +require.config({ + paths: { + 'crypto-js': 'path-to/bower_components/crypto-js/crypto-js' + } +}); + +require(["crypto-js"], function (CryptoJS) { + console.log(CryptoJS.HmacSHA1("Message", "Key")); +}); +``` + +### Usage without RequireJS + +```html + + +``` + +## API + +See: https://cryptojs.gitbook.io/docs/ + +### AES Encryption + +#### Plain text encryption + +```javascript +var CryptoJS = require("crypto-js"); + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString(); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123'); +var originalText = bytes.toString(CryptoJS.enc.Utf8); + +console.log(originalText); // 'my message' +``` + +#### Object encryption + +```javascript +var CryptoJS = require("crypto-js"); + +var data = [{id: 1}, {id: 2}] + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString(); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123'); +var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8)); + +console.log(decryptedData); // [{id: 1}, {id: 2}] +``` + +### List of modules + + +- ```crypto-js/core``` +- ```crypto-js/x64-core``` +- ```crypto-js/lib-typedarrays``` + +--- + +- ```crypto-js/md5``` +- ```crypto-js/sha1``` +- ```crypto-js/sha256``` +- ```crypto-js/sha224``` +- ```crypto-js/sha512``` +- ```crypto-js/sha384``` +- ```crypto-js/sha3``` +- ```crypto-js/ripemd160``` + +--- + +- ```crypto-js/hmac-md5``` +- ```crypto-js/hmac-sha1``` +- ```crypto-js/hmac-sha256``` +- ```crypto-js/hmac-sha224``` +- ```crypto-js/hmac-sha512``` +- ```crypto-js/hmac-sha384``` +- ```crypto-js/hmac-sha3``` +- ```crypto-js/hmac-ripemd160``` + +--- + +- ```crypto-js/pbkdf2``` + +--- + +- ```crypto-js/aes``` +- ```crypto-js/tripledes``` +- ```crypto-js/rc4``` +- ```crypto-js/rabbit``` +- ```crypto-js/rabbit-legacy``` +- ```crypto-js/evpkdf``` + +--- + +- ```crypto-js/format-openssl``` +- ```crypto-js/format-hex``` + +--- + +- ```crypto-js/enc-latin1``` +- ```crypto-js/enc-utf8``` +- ```crypto-js/enc-hex``` +- ```crypto-js/enc-utf16``` +- ```crypto-js/enc-base64``` + +--- + +- ```crypto-js/mode-cfb``` +- ```crypto-js/mode-ctr``` +- ```crypto-js/mode-ctr-gladman``` +- ```crypto-js/mode-ofb``` +- ```crypto-js/mode-ecb``` + +--- + +- ```crypto-js/pad-pkcs7``` +- ```crypto-js/pad-ansix923``` +- ```crypto-js/pad-iso10126``` +- ```crypto-js/pad-iso97971``` +- ```crypto-js/pad-zeropadding``` +- ```crypto-js/pad-nopadding``` + + +## Release notes + +### 4.2.0 + +Change default hash algorithm and iteration's for PBKDF2 to prevent weak security by using the default configuration. + +Custom KDF Hasher + +Blowfish support + +### 4.1.1 + +Fix module order in bundled release. + +Include the browser field in the released package.json. + +### 4.1.0 + +Added url safe variant of base64 encoding. [357](https://github.com/brix/crypto-js/pull/357) + +Avoid webpack to add crypto-browser package. [364](https://github.com/brix/crypto-js/pull/364) + +### 4.0.0 + +This is an update including breaking changes for some environments. + +In this version `Math.random()` has been replaced by the random methods of the native crypto module. + +For this reason CryptoJS might not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native. + +### 3.3.0 + +Rollback, `3.3.0` is the same as `3.1.9-1`. + +The move of using native secure crypto module will be shifted to a new `4.x.x` version. As it is a breaking change the impact is too big for a minor release. + +### 3.2.1 + +The usage of the native crypto module has been fixed. The import and access of the native crypto module has been improved. + +### 3.2.0 + +In this version `Math.random()` has been replaced by the random methods of the native crypto module. + +For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before. + +If it's absolute required to run CryptoJS in such an environment, stay with `3.1.x` version. Encrypting and decrypting stays compatible. But keep in mind `3.1.x` versions still use `Math.random()` which is cryptographically not secure, as it's not random enough. + +This version came along with `CRITICAL` `BUG`. + +DO NOT USE THIS VERSION! Please, go for a newer version! + +### 3.1.x + +The `3.1.x` are based on the original CryptoJS, wrapped in CommonJS modules. + + diff --git a/node_modules/crypto-js/aes.js b/node_modules/crypto-js/aes.js new file mode 100644 index 0000000..166e3ea --- /dev/null +++ b/node_modules/crypto-js/aes.js @@ -0,0 +1,234 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + var t; + + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/blowfish.js b/node_modules/crypto-js/blowfish.js new file mode 100644 index 0000000..149812f --- /dev/null +++ b/node_modules/crypto-js/blowfish.js @@ -0,0 +1,471 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + const N = 16; + + //Origin pbox and sbox, derived from PI + const ORIG_P = [ + 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, + 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, + 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, + 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, + 0x9216D5D9, 0x8979FB1B + ]; + + const ORIG_S = [ + [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, + 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, + 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, + 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, + 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, + 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, + 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, + 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, + 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, + 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, + 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, + 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, + 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, + 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, + 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, + 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, + 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, + 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, + 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, + 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, + 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, + 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, + 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, + 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, + 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, + 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, + 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, + 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, + 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, + 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, + 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, + 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, + 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, + 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, + 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, + 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, + 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, + 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, + 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, + 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, + 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, + 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, + 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, + 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, + 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, + 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, + 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, + 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, + 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, + 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, + 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, + 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, + 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, + 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, + 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, + 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, + 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, + 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, + 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, + 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, + 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, + 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, + 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, + 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], + [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, + 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, + 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, + 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, + 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, + 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, + 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, + 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, + 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, + 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, + 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, + 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, + 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, + 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, + 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, + 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, + 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, + 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, + 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, + 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, + 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, + 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, + 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, + 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, + 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, + 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, + 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, + 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, + 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, + 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, + 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, + 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, + 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, + 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, + 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, + 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, + 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, + 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, + 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, + 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, + 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, + 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, + 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, + 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, + 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, + 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, + 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, + 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, + 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, + 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, + 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, + 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, + 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, + 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, + 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, + 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, + 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, + 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, + 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, + 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, + 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, + 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, + 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, + 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], + [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, + 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, + 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, + 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, + 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, + 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, + 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, + 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, + 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, + 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, + 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, + 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, + 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, + 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, + 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, + 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, + 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, + 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, + 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, + 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, + 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, + 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, + 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, + 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, + 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, + 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, + 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, + 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, + 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, + 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, + 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, + 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, + 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, + 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, + 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, + 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, + 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, + 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, + 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, + 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, + 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, + 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, + 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, + 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, + 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, + 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, + 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, + 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, + 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, + 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, + 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, + 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, + 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, + 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, + 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, + 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, + 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, + 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, + 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, + 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, + 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, + 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, + 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, + 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], + [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, + 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, + 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, + 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, + 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, + 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, + 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, + 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, + 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, + 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, + 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, + 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, + 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, + 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, + 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, + 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, + 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, + 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, + 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, + 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, + 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, + 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, + 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, + 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, + 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, + 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, + 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, + 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, + 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, + 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, + 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, + 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, + 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, + 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, + 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, + 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, + 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, + 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, + 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, + 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, + 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, + 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, + 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, + 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, + 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, + 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, + 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, + 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, + 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, + 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, + 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, + 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, + 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, + 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, + 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, + 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, + 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, + 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, + 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, + 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, + 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, + 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, + 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, + 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] + ]; + + var BLOWFISH_CTX = { + pbox: [], + sbox: [] + } + + function F(ctx, x){ + let a = (x >> 24) & 0xFF; + let b = (x >> 16) & 0xFF; + let c = (x >> 8) & 0xFF; + let d = x & 0xFF; + + let y = ctx.sbox[0][a] + ctx.sbox[1][b]; + y = y ^ ctx.sbox[2][c]; + y = y + ctx.sbox[3][d]; + + return y; + } + + function BlowFish_Encrypt(ctx, left, right){ + let Xl = left; + let Xr = right; + let temp; + + for(let i = 0; i < N; ++i){ + Xl = Xl ^ ctx.pbox[i]; + Xr = F(ctx, Xl) ^ Xr; + + temp = Xl; + Xl = Xr; + Xr = temp; + } + + temp = Xl; + Xl = Xr; + Xr = temp; + + Xr = Xr ^ ctx.pbox[N]; + Xl = Xl ^ ctx.pbox[N + 1]; + + return {left: Xl, right: Xr}; + } + + function BlowFish_Decrypt(ctx, left, right){ + let Xl = left; + let Xr = right; + let temp; + + for(let i = N + 1; i > 1; --i){ + Xl = Xl ^ ctx.pbox[i]; + Xr = F(ctx, Xl) ^ Xr; + + temp = Xl; + Xl = Xr; + Xr = temp; + } + + temp = Xl; + Xl = Xr; + Xr = temp; + + Xr = Xr ^ ctx.pbox[1]; + Xl = Xl ^ ctx.pbox[0]; + + return {left: Xl, right: Xr}; + } + + /** + * Initialization ctx's pbox and sbox. + * + * @param {Object} ctx The object has pbox and sbox. + * @param {Array} key An array of 32-bit words. + * @param {int} keysize The length of the key. + * + * @example + * + * BlowFishInit(BLOWFISH_CTX, key, 128/32); + */ + function BlowFishInit(ctx, key, keysize) + { + for(let Row = 0; Row < 4; Row++) + { + ctx.sbox[Row] = []; + for(let Col = 0; Col < 256; Col++) + { + ctx.sbox[Row][Col] = ORIG_S[Row][Col]; + } + } + + let keyIndex = 0; + for(let index = 0; index < N + 2; index++) + { + ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; + keyIndex++; + if(keyIndex >= keysize) + { + keyIndex = 0; + } + } + + let Data1 = 0; + let Data2 = 0; + let res = 0; + for(let i = 0; i < N + 2; i += 2) + { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.pbox[i] = Data1; + ctx.pbox[i + 1] = Data2; + } + + for(let i = 0; i < 4; i++) + { + for(let j = 0; j < 256; j += 2) + { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.sbox[i][j] = Data1; + ctx.sbox[i][j + 1] = Data2; + } + } + + return true; + } + + /** + * Blowfish block cipher algorithm. + */ + var Blowfish = C_algo.Blowfish = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + //Initialization pbox and sbox + BlowFishInit(BLOWFISH_CTX, keyWords, keySize); + }, + + encryptBlock: function (M, offset) { + var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); + M[offset] = res.left; + M[offset + 1] = res.right; + }, + + decryptBlock: function (M, offset) { + var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); + M[offset] = res.left; + M[offset + 1] = res.right; + }, + + blockSize: 64/32, + + keySize: 128/32, + + ivSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); + */ + C.Blowfish = BlockCipher._createHelper(Blowfish); + }()); + + + return CryptoJS.Blowfish; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/bower.json b/node_modules/crypto-js/bower.json new file mode 100644 index 0000000..4dee617 --- /dev/null +++ b/node_modules/crypto-js/bower.json @@ -0,0 +1,39 @@ +{ + "name": "crypto-js", + "version": "4.2.0", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64", + "Base64url" + ], + "main": "index.js", + "dependencies": {}, + "browser": { + "crypto": false + }, + "ignore": [] +} diff --git a/node_modules/crypto-js/cipher-core.js b/node_modules/crypto-js/cipher-core.js new file mode 100644 index 0000000..903f462 --- /dev/null +++ b/node_modules/crypto-js/cipher-core.js @@ -0,0 +1,895 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./evpkdf")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./evpkdf"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + var block; + + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + var modeCreator; + + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + var finalProcessedBlocks; + + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + var wordArray; + + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + var salt; + + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt, hasher) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + if (!hasher) { + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + } else { + var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); + } + + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/core.js b/node_modules/crypto-js/core.js new file mode 100644 index 0000000..e3a498b --- /dev/null +++ b/node_modules/crypto-js/core.js @@ -0,0 +1,807 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /*globals window, global, require*/ + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + + var crypto; + + // Native crypto from window (Browser) + if (typeof window !== 'undefined' && window.crypto) { + crypto = window.crypto; + } + + // Native crypto in web worker (Browser) + if (typeof self !== 'undefined' && self.crypto) { + crypto = self.crypto; + } + + // Native crypto from worker + if (typeof globalThis !== 'undefined' && globalThis.crypto) { + crypto = globalThis.crypto; + } + + // Native (experimental IE 11) crypto from window (Browser) + if (!crypto && typeof window !== 'undefined' && window.msCrypto) { + crypto = window.msCrypto; + } + + // Native crypto from global (NodeJS) + if (!crypto && typeof global !== 'undefined' && global.crypto) { + crypto = global.crypto; + } + + // Native crypto import via require (NodeJS) + if (!crypto && typeof require === 'function') { + try { + crypto = require('crypto'); + } catch (err) {} + } + + /* + * Cryptographically secure pseudorandom number generator + * + * As Math.random() is cryptographically not safe to use + */ + var cryptoSecureRandomInt = function () { + if (crypto) { + // Use getRandomValues method (Browser) + if (typeof crypto.getRandomValues === 'function') { + try { + return crypto.getRandomValues(new Uint32Array(1))[0]; + } catch (err) {} + } + + // Use randomBytes method (NodeJS) + if (typeof crypto.randomBytes === 'function') { + try { + return crypto.randomBytes(4).readInt32LE(); + } catch (err) {} + } + } + + throw new Error('Native crypto module could not be used to get secure random number.'); + }; + + /* + * Local polyfill of Object.create + + */ + var create = Object.create || (function () { + function F() {} + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()); + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var j = 0; j < thatSigBytes; j += 4) { + thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + var processedWords; + + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/crypto-js.js b/node_modules/crypto-js/crypto-js.js new file mode 100644 index 0000000..958ee53 --- /dev/null +++ b/node_modules/crypto-js/crypto-js.js @@ -0,0 +1,6657 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /*globals window, global, require*/ + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + + var crypto; + + // Native crypto from window (Browser) + if (typeof window !== 'undefined' && window.crypto) { + crypto = window.crypto; + } + + // Native crypto in web worker (Browser) + if (typeof self !== 'undefined' && self.crypto) { + crypto = self.crypto; + } + + // Native crypto from worker + if (typeof globalThis !== 'undefined' && globalThis.crypto) { + crypto = globalThis.crypto; + } + + // Native (experimental IE 11) crypto from window (Browser) + if (!crypto && typeof window !== 'undefined' && window.msCrypto) { + crypto = window.msCrypto; + } + + // Native crypto from global (NodeJS) + if (!crypto && typeof global !== 'undefined' && global.crypto) { + crypto = global.crypto; + } + + // Native crypto import via require (NodeJS) + if (!crypto && typeof require === 'function') { + try { + crypto = require('crypto'); + } catch (err) {} + } + + /* + * Cryptographically secure pseudorandom number generator + * + * As Math.random() is cryptographically not safe to use + */ + var cryptoSecureRandomInt = function () { + if (crypto) { + // Use getRandomValues method (Browser) + if (typeof crypto.getRandomValues === 'function') { + try { + return crypto.getRandomValues(new Uint32Array(1))[0]; + } catch (err) {} + } + + // Use randomBytes method (NodeJS) + if (typeof crypto.randomBytes === 'function') { + try { + return crypto.randomBytes(4).readInt32LE(); + } catch (err) {} + } + } + + throw new Error('Native crypto module could not be used to get secure random number.'); + }; + + /* + * Local polyfill of Object.create + + */ + var create = Object.create || (function () { + function F() {} + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()); + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var j = 0; j < thatSigBytes; j += 4) { + thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + var processedWords; + + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64url encoding strategy. + */ + var Base64url = C_enc.Base64url = { + /** + * Converts a word array to a Base64url string. + * + * @param {WordArray} wordArray The word array. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {string} The Base64url string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); + */ + stringify: function (wordArray, urlSafe) { + if (urlSafe === undefined) { + urlSafe = true + } + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = urlSafe ? this._safe_map : this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64url string to a word array. + * + * @param {string} base64Str The Base64url string. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64url.parse(base64String); + */ + parse: function (base64Str, urlSafe) { + if (urlSafe === undefined) { + urlSafe = true + } + + // Shortcuts + var base64StrLength = base64Str.length; + var map = urlSafe ? this._safe_map : this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + var Wil; + var Wih; + + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + Wih = Wi.high = M[offset + i * 2] | 0; + Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + Wil = gamma0l + Wi7l; + Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + Wil = Wil + gamma1l; + Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + Wil = Wil + Wi16l; + Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + var tMsw; + var tLsw; + + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA256 + * @property {number} iterations The number of iterations to perform. Default: 250000 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA256, + iterations: 250000 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + var block; + + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + var block; + + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + var modeCreator; + + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + var finalProcessedBlocks; + + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + var wordArray; + + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + var salt; + + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt, hasher) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + if (!hasher) { + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + } else { + var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); + } + + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + var keystream; + + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + for (var i = data.sigBytes - 1; i >= 0; i--) { + if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + data.sigBytes = i + 1; + break; + } + } + } + }; + + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + var t; + + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + // Make sure the key length is valid (64, 128 or >= 192 bit) + if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { + throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); + } + + // Extend the key according to the keying options defined in 3DES standard + var key1 = keyWords.slice(0, 2); + var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); + var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(key1)); + this._des2 = DES.createEncryptor(WordArray.create(key2)); + this._des3 = DES.createEncryptor(WordArray.create(key3)); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + const N = 16; + + //Origin pbox and sbox, derived from PI + const ORIG_P = [ + 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, + 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, + 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, + 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, + 0x9216D5D9, 0x8979FB1B + ]; + + const ORIG_S = [ + [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, + 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, + 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, + 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, + 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, + 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, + 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, + 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, + 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, + 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, + 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, + 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, + 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, + 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, + 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, + 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, + 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, + 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, + 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, + 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, + 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, + 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, + 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, + 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, + 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, + 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, + 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, + 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, + 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, + 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, + 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, + 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, + 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, + 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, + 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, + 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, + 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, + 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, + 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, + 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, + 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, + 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, + 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, + 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, + 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, + 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, + 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, + 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, + 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, + 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, + 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, + 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, + 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, + 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, + 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, + 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, + 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, + 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, + 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, + 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, + 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, + 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, + 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, + 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], + [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, + 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, + 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, + 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, + 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, + 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, + 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, + 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, + 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, + 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, + 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, + 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, + 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, + 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, + 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, + 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, + 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, + 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, + 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, + 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, + 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, + 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, + 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, + 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, + 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, + 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, + 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, + 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, + 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, + 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, + 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, + 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, + 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, + 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, + 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, + 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, + 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, + 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, + 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, + 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, + 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, + 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, + 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, + 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, + 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, + 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, + 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, + 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, + 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, + 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, + 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, + 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, + 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, + 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, + 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, + 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, + 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, + 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, + 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, + 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, + 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, + 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, + 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, + 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], + [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, + 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, + 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, + 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, + 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, + 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, + 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, + 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, + 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, + 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, + 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, + 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, + 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, + 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, + 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, + 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, + 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, + 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, + 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, + 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, + 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, + 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, + 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, + 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, + 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, + 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, + 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, + 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, + 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, + 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, + 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, + 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, + 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, + 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, + 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, + 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, + 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, + 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, + 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, + 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, + 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, + 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, + 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, + 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, + 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, + 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, + 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, + 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, + 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, + 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, + 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, + 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, + 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, + 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, + 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, + 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, + 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, + 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, + 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, + 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, + 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, + 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, + 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, + 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], + [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, + 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, + 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, + 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, + 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, + 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, + 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, + 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, + 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, + 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, + 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, + 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, + 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, + 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, + 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, + 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, + 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, + 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, + 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, + 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, + 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, + 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, + 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, + 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, + 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, + 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, + 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, + 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, + 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, + 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, + 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, + 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, + 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, + 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, + 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, + 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, + 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, + 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, + 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, + 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, + 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, + 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, + 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, + 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, + 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, + 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, + 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, + 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, + 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, + 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, + 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, + 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, + 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, + 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, + 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, + 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, + 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, + 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, + 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, + 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, + 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, + 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, + 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, + 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] + ]; + + var BLOWFISH_CTX = { + pbox: [], + sbox: [] + } + + function F(ctx, x){ + let a = (x >> 24) & 0xFF; + let b = (x >> 16) & 0xFF; + let c = (x >> 8) & 0xFF; + let d = x & 0xFF; + + let y = ctx.sbox[0][a] + ctx.sbox[1][b]; + y = y ^ ctx.sbox[2][c]; + y = y + ctx.sbox[3][d]; + + return y; + } + + function BlowFish_Encrypt(ctx, left, right){ + let Xl = left; + let Xr = right; + let temp; + + for(let i = 0; i < N; ++i){ + Xl = Xl ^ ctx.pbox[i]; + Xr = F(ctx, Xl) ^ Xr; + + temp = Xl; + Xl = Xr; + Xr = temp; + } + + temp = Xl; + Xl = Xr; + Xr = temp; + + Xr = Xr ^ ctx.pbox[N]; + Xl = Xl ^ ctx.pbox[N + 1]; + + return {left: Xl, right: Xr}; + } + + function BlowFish_Decrypt(ctx, left, right){ + let Xl = left; + let Xr = right; + let temp; + + for(let i = N + 1; i > 1; --i){ + Xl = Xl ^ ctx.pbox[i]; + Xr = F(ctx, Xl) ^ Xr; + + temp = Xl; + Xl = Xr; + Xr = temp; + } + + temp = Xl; + Xl = Xr; + Xr = temp; + + Xr = Xr ^ ctx.pbox[1]; + Xl = Xl ^ ctx.pbox[0]; + + return {left: Xl, right: Xr}; + } + + /** + * Initialization ctx's pbox and sbox. + * + * @param {Object} ctx The object has pbox and sbox. + * @param {Array} key An array of 32-bit words. + * @param {int} keysize The length of the key. + * + * @example + * + * BlowFishInit(BLOWFISH_CTX, key, 128/32); + */ + function BlowFishInit(ctx, key, keysize) + { + for(let Row = 0; Row < 4; Row++) + { + ctx.sbox[Row] = []; + for(let Col = 0; Col < 256; Col++) + { + ctx.sbox[Row][Col] = ORIG_S[Row][Col]; + } + } + + let keyIndex = 0; + for(let index = 0; index < N + 2; index++) + { + ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; + keyIndex++; + if(keyIndex >= keysize) + { + keyIndex = 0; + } + } + + let Data1 = 0; + let Data2 = 0; + let res = 0; + for(let i = 0; i < N + 2; i += 2) + { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.pbox[i] = Data1; + ctx.pbox[i + 1] = Data2; + } + + for(let i = 0; i < 4; i++) + { + for(let j = 0; j < 256; j += 2) + { + res = BlowFish_Encrypt(ctx, Data1, Data2); + Data1 = res.left; + Data2 = res.right; + ctx.sbox[i][j] = Data1; + ctx.sbox[i][j + 1] = Data2; + } + } + + return true; + } + + /** + * Blowfish block cipher algorithm. + */ + var Blowfish = C_algo.Blowfish = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + //Initialization pbox and sbox + BlowFishInit(BLOWFISH_CTX, keyWords, keySize); + }, + + encryptBlock: function (M, offset) { + var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); + M[offset] = res.left; + M[offset + 1] = res.right; + }, + + decryptBlock: function (M, offset) { + var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); + M[offset] = res.left; + M[offset + 1] = res.right; + }, + + blockSize: 64/32, + + keySize: 128/32, + + ivSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); + */ + C.Blowfish = BlockCipher._createHelper(Blowfish); + }()); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/docs/QuickStartGuide.wiki b/node_modules/crypto-js/docs/QuickStartGuide.wiki new file mode 100644 index 0000000..2bee35d --- /dev/null +++ b/node_modules/crypto-js/docs/QuickStartGuide.wiki @@ -0,0 +1,470 @@ + + +---- + += Quick-start Guide = + +== Hashers == + +=== The Hasher Algorithms === + +==== MD5 ==== + +MD5 is a widely used hash function. It's been used in a variety of security applications and is also commonly used to check the integrity of files. Though, MD5 is not collision resistant, and it isn't suitable for applications like SSL certificates or digital signatures that rely on this property. + +{{{ + + +}}} + +==== SHA-1 ==== + +The SHA hash functions were designed by the National Security Agency (NSA). SHA-1 is the most established of the existing SHA hash functions, and it's used in a variety of security applications and protocols. Though, SHA-1's collision resistance has been weakening as new attacks are discovered or improved. + +{{{ + + +}}} + +==== SHA-2 ==== + +SHA-256 is one of the four variants in the SHA-2 set. It isn't as widely used as SHA-1, though it appears to provide much better security. + +{{{ + + +}}} + +SHA-512 is largely identical to SHA-256 but operates on 64-bit words rather than 32. + +{{{ + + +}}} + +CryptoJS also supports SHA-224 and SHA-384, which are largely identical but truncated versions of SHA-256 and SHA-512 respectively. + +==== SHA-3 ==== + +SHA-3 is the winner of a five-year competition to select a new cryptographic hash algorithm where 64 competing designs were evaluated. + +{{{ + + +}}} + +SHA-3 can be configured to output hash lengths of one of 224, 256, 384, or 512 bits. The default is 512 bits. + +{{{ + + +}}} + +==== RIPEMD-160 ==== + +{{{ + + +}}} + +=== The Hasher Input === + +The hash algorithms accept either strings or instances of CryptoJS.lib.WordArray. A WordArray object represents an array of 32-bit words. When you pass a string, it's automatically converted to a WordArray encoded as UTF-8. + +=== The Hasher Output === + +The hash you get back isn't a string yet. It's a WordArray object. When you use a WordArray object in a string context, it's automatically converted to a hex string. + +{{{ + + +}}} + +You can convert a WordArray object to other formats by explicitly calling the toString method and passing an encoder. + +{{{ + + + +}}} + +=== Progressive Hashing === + +{{{ + + +}}} + +== HMAC == + +Keyed-hash message authentication codes (HMAC) is a mechanism for message authentication using cryptographic hash functions. + +HMAC can be used in combination with any iterated cryptographic hash function. + +{{{ + + + + + +}}} + +=== Progressive HMAC Hashing === + +{{{ + + +}}} + +== PBKDF2 == + +PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required. + +A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack. + +{{{ + + +}}} + +== Ciphers == + +=== The Cipher Algorithms === + +==== AES ==== + +The Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated. + +{{{ + + +}}} + +CryptoJS supports AES-128, AES-192, and AES-256. It will pick the variant by the size of the key you pass in. If you use a passphrase, then it will generate a 256-bit key. + +==== DES, Triple DES ==== + +DES is a previously dominant algorithm for encryption, and was published as an official Federal Information Processing Standard (FIPS). DES is now considered to be insecure due to the small key size. + +{{{ + + +}}} + +Triple DES applies DES three times to each block to increase the key size. The algorithm is believed to be secure in this form. + +{{{ + + +}}} + +==== Rabbit ==== + +Rabbit is a high-performance stream cipher and a finalist in the eSTREAM Portfolio. It is one of the four designs selected after a 3 1/2-year process where 22 designs were evaluated. + +{{{ + + +}}} + +==== RC4, RC4Drop ==== + +RC4 is a widely-used stream cipher. It's used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security. + +{{{ + + +}}} + +It was discovered that the first few bytes of keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop. + +By default, 192 words (768 bytes) are dropped, but you can configure the algorithm to drop any number of words. + +{{{ + + +}}} + +=== Custom Key and IV === + +{{{ + + +}}} + +=== Block Modes and Padding === + +{{{ + + + + +}}} + +CryptoJS supports the following modes: + + * CBC (the default) + * CFB + * CTR + * OFB + * ECB + +And CryptoJS supports the following padding schemes: + + * Pkcs7 (the default) + * Iso97971 + * AnsiX923 + * Iso10126 + * ZeroPadding + * NoPadding + +=== The Cipher Input === + +For the plaintext message, the cipher algorithms accept either strings or instances of CryptoJS.lib.WordArray. + +For the key, when you pass a string, it's treated as a passphrase and used to derive an actual key and IV. Or you can pass a WordArray that represents the actual key. If you pass the actual key, you must also pass the actual IV. + +For the ciphertext, the cipher algorithms accept either strings or instances of CryptoJS.lib.CipherParams. A CipherParams object represents a collection of parameters such as the IV, a salt, and the raw ciphertext itself. When you pass a string, it's automatically converted to a CipherParams object according to a configurable format strategy. + +=== The Cipher Output === + +The plaintext you get back after decryption is a WordArray object. See Hashers' Output for more detail. + +The ciphertext you get back after encryption isn't a string yet. It's a CipherParams object. A CipherParams object gives you access to all the parameters used during encryption. When you use a CipherParams object in a string context, it's automatically converted to a string according to a format strategy. The default is an OpenSSL-compatible format. + +{{{ + + +}}} + +You can define your own formats in order to be compatible with other crypto implementations. A format is an object with two methods—stringify and parse—that converts between CipherParams objects and ciphertext strings. + +Here's how you might write a JSON formatter: + +{{{ + + +}}} + +=== Progressive Ciphering === + +{{{ + + +}}} + +=== Interoperability === + +==== With OpenSSL ==== + +Encrypt with OpenSSL: + +{{{ +openssl enc -aes-256-cbc -in infile -out outfile -pass pass:"Secret Passphrase" -e -base64 +}}} + +Decrypt with CryptoJS: + +{{{ + + +}}} + +== Encoders == + +CryptoJS can convert from encoding formats such as Base64, Latin1 or Hex to WordArray objects and vica versa. + +{{{ + + + + +}}} \ No newline at end of file diff --git a/node_modules/crypto-js/enc-base64.js b/node_modules/crypto-js/enc-base64.js new file mode 100644 index 0000000..0ffcd53 --- /dev/null +++ b/node_modules/crypto-js/enc-base64.js @@ -0,0 +1,136 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/enc-base64url.js b/node_modules/crypto-js/enc-base64url.js new file mode 100644 index 0000000..af682e3 --- /dev/null +++ b/node_modules/crypto-js/enc-base64url.js @@ -0,0 +1,148 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64url encoding strategy. + */ + var Base64url = C_enc.Base64url = { + /** + * Converts a word array to a Base64url string. + * + * @param {WordArray} wordArray The word array. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {string} The Base64url string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); + */ + stringify: function (wordArray, urlSafe) { + if (urlSafe === undefined) { + urlSafe = true + } + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = urlSafe ? this._safe_map : this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64url string to a word array. + * + * @param {string} base64Str The Base64url string. + * + * @param {boolean} urlSafe Whether to use url safe + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64url.parse(base64String); + */ + parse: function (base64Str, urlSafe) { + if (urlSafe === undefined) { + urlSafe = true + } + + // Shortcuts + var base64StrLength = base64Str.length; + var map = urlSafe ? this._safe_map : this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64url; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/enc-hex.js b/node_modules/crypto-js/enc-hex.js new file mode 100644 index 0000000..88161ff --- /dev/null +++ b/node_modules/crypto-js/enc-hex.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Hex; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/enc-latin1.js b/node_modules/crypto-js/enc-latin1.js new file mode 100644 index 0000000..ade56dc --- /dev/null +++ b/node_modules/crypto-js/enc-latin1.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Latin1; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/enc-utf16.js b/node_modules/crypto-js/enc-utf16.js new file mode 100644 index 0000000..7de6245 --- /dev/null +++ b/node_modules/crypto-js/enc-utf16.js @@ -0,0 +1,149 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/enc-utf8.js b/node_modules/crypto-js/enc-utf8.js new file mode 100644 index 0000000..e7a251d --- /dev/null +++ b/node_modules/crypto-js/enc-utf8.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Utf8; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/evpkdf.js b/node_modules/crypto-js/evpkdf.js new file mode 100644 index 0000000..578974a --- /dev/null +++ b/node_modules/crypto-js/evpkdf.js @@ -0,0 +1,134 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + var block; + + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/format-hex.js b/node_modules/crypto-js/format-hex.js new file mode 100644 index 0000000..2e9a861 --- /dev/null +++ b/node_modules/crypto-js/format-hex.js @@ -0,0 +1,66 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/format-openssl.js b/node_modules/crypto-js/format-openssl.js new file mode 100644 index 0000000..3373edc --- /dev/null +++ b/node_modules/crypto-js/format-openssl.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.format.OpenSSL; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-md5.js b/node_modules/crypto-js/hmac-md5.js new file mode 100644 index 0000000..ad7a90a --- /dev/null +++ b/node_modules/crypto-js/hmac-md5.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./md5"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./md5", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacMD5; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-ripemd160.js b/node_modules/crypto-js/hmac-ripemd160.js new file mode 100644 index 0000000..73d55a7 --- /dev/null +++ b/node_modules/crypto-js/hmac-ripemd160.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./ripemd160", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacRIPEMD160; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha1.js b/node_modules/crypto-js/hmac-sha1.js new file mode 100644 index 0000000..0b570cb --- /dev/null +++ b/node_modules/crypto-js/hmac-sha1.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA1; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha224.js b/node_modules/crypto-js/hmac-sha224.js new file mode 100644 index 0000000..3778863 --- /dev/null +++ b/node_modules/crypto-js/hmac-sha224.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./sha224"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./sha224", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA224; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha256.js b/node_modules/crypto-js/hmac-sha256.js new file mode 100644 index 0000000..33b0c9f --- /dev/null +++ b/node_modules/crypto-js/hmac-sha256.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA256; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha3.js b/node_modules/crypto-js/hmac-sha3.js new file mode 100644 index 0000000..1248804 --- /dev/null +++ b/node_modules/crypto-js/hmac-sha3.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha3"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha3", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA3; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha384.js b/node_modules/crypto-js/hmac-sha384.js new file mode 100644 index 0000000..0036e2b --- /dev/null +++ b/node_modules/crypto-js/hmac-sha384.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./sha384"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./sha384", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA384; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac-sha512.js b/node_modules/crypto-js/hmac-sha512.js new file mode 100644 index 0000000..c1005b6 --- /dev/null +++ b/node_modules/crypto-js/hmac-sha512.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA512; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/hmac.js b/node_modules/crypto-js/hmac.js new file mode 100644 index 0000000..8c09851 --- /dev/null +++ b/node_modules/crypto-js/hmac.js @@ -0,0 +1,143 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/index.js b/node_modules/crypto-js/index.js new file mode 100644 index 0000000..b696646 --- /dev/null +++ b/node_modules/crypto-js/index.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./enc-base64url"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy"), require("./blowfish")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy", "./blowfish"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/lib-typedarrays.js b/node_modules/crypto-js/lib-typedarrays.js new file mode 100644 index 0000000..264b210 --- /dev/null +++ b/node_modules/crypto-js/lib-typedarrays.js @@ -0,0 +1,76 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/md5.js b/node_modules/crypto-js/md5.js new file mode 100644 index 0000000..72fce03 --- /dev/null +++ b/node_modules/crypto-js/md5.js @@ -0,0 +1,268 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/mode-cfb.js b/node_modules/crypto-js/mode-cfb.js new file mode 100644 index 0000000..444c9cb --- /dev/null +++ b/node_modules/crypto-js/mode-cfb.js @@ -0,0 +1,80 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + var keystream; + + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/mode-ctr-gladman.js b/node_modules/crypto-js/mode-ctr-gladman.js new file mode 100644 index 0000000..bbc5687 --- /dev/null +++ b/node_modules/crypto-js/mode-ctr-gladman.js @@ -0,0 +1,116 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/mode-ctr.js b/node_modules/crypto-js/mode-ctr.js new file mode 100644 index 0000000..c3d470a --- /dev/null +++ b/node_modules/crypto-js/mode-ctr.js @@ -0,0 +1,58 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/mode-ecb.js b/node_modules/crypto-js/mode-ecb.js new file mode 100644 index 0000000..ff06921 --- /dev/null +++ b/node_modules/crypto-js/mode-ecb.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/mode-ofb.js b/node_modules/crypto-js/mode-ofb.js new file mode 100644 index 0000000..c01314c --- /dev/null +++ b/node_modules/crypto-js/mode-ofb.js @@ -0,0 +1,54 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/package.json b/node_modules/crypto-js/package.json new file mode 100644 index 0000000..4b9a8e2 --- /dev/null +++ b/node_modules/crypto-js/package.json @@ -0,0 +1,42 @@ +{ + "name": "crypto-js", + "version": "4.2.0", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "author": { + "name": "Evan Vosberg", + "url": "http://github.com/evanvosberg" + }, + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64", + "Base64url" + ], + "main": "index.js", + "dependencies": {}, + "browser": { + "crypto": false + } +} diff --git a/node_modules/crypto-js/pad-ansix923.js b/node_modules/crypto-js/pad-ansix923.js new file mode 100644 index 0000000..f01f21e --- /dev/null +++ b/node_modules/crypto-js/pad-ansix923.js @@ -0,0 +1,49 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pad-iso10126.js b/node_modules/crypto-js/pad-iso10126.js new file mode 100644 index 0000000..6e2aefd --- /dev/null +++ b/node_modules/crypto-js/pad-iso10126.js @@ -0,0 +1,44 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pad-iso97971.js b/node_modules/crypto-js/pad-iso97971.js new file mode 100644 index 0000000..41049b4 --- /dev/null +++ b/node_modules/crypto-js/pad-iso97971.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pad-nopadding.js b/node_modules/crypto-js/pad-nopadding.js new file mode 100644 index 0000000..c7787c9 --- /dev/null +++ b/node_modules/crypto-js/pad-nopadding.js @@ -0,0 +1,30 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pad-pkcs7.js b/node_modules/crypto-js/pad-pkcs7.js new file mode 100644 index 0000000..3555168 --- /dev/null +++ b/node_modules/crypto-js/pad-pkcs7.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.pad.Pkcs7; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pad-zeropadding.js b/node_modules/crypto-js/pad-zeropadding.js new file mode 100644 index 0000000..a1a459e --- /dev/null +++ b/node_modules/crypto-js/pad-zeropadding.js @@ -0,0 +1,47 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + for (var i = data.sigBytes - 1; i >= 0; i--) { + if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + data.sigBytes = i + 1; + break; + } + } + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/pbkdf2.js b/node_modules/crypto-js/pbkdf2.js new file mode 100644 index 0000000..6850934 --- /dev/null +++ b/node_modules/crypto-js/pbkdf2.js @@ -0,0 +1,145 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA256 + * @property {number} iterations The number of iterations to perform. Default: 250000 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA256, + iterations: 250000 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/rabbit-legacy.js b/node_modules/crypto-js/rabbit-legacy.js new file mode 100644 index 0000000..e118b6b --- /dev/null +++ b/node_modules/crypto-js/rabbit-legacy.js @@ -0,0 +1,190 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/rabbit.js b/node_modules/crypto-js/rabbit.js new file mode 100644 index 0000000..1b06833 --- /dev/null +++ b/node_modules/crypto-js/rabbit.js @@ -0,0 +1,192 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/rc4.js b/node_modules/crypto-js/rc4.js new file mode 100644 index 0000000..0e4bdff --- /dev/null +++ b/node_modules/crypto-js/rc4.js @@ -0,0 +1,139 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/ripemd160.js b/node_modules/crypto-js/ripemd160.js new file mode 100644 index 0000000..24feb47 --- /dev/null +++ b/node_modules/crypto-js/ripemd160.js @@ -0,0 +1,267 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha1.js b/node_modules/crypto-js/sha1.js new file mode 100644 index 0000000..6691149 --- /dev/null +++ b/node_modules/crypto-js/sha1.js @@ -0,0 +1,150 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha224.js b/node_modules/crypto-js/sha224.js new file mode 100644 index 0000000..d8ce988 --- /dev/null +++ b/node_modules/crypto-js/sha224.js @@ -0,0 +1,80 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha256.js b/node_modules/crypto-js/sha256.js new file mode 100644 index 0000000..de2d7fc --- /dev/null +++ b/node_modules/crypto-js/sha256.js @@ -0,0 +1,199 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha3.js b/node_modules/crypto-js/sha3.js new file mode 100644 index 0000000..34ad86c --- /dev/null +++ b/node_modules/crypto-js/sha3.js @@ -0,0 +1,326 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + var tMsw; + var tLsw; + + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha384.js b/node_modules/crypto-js/sha384.js new file mode 100644 index 0000000..a0b95bf --- /dev/null +++ b/node_modules/crypto-js/sha384.js @@ -0,0 +1,83 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/sha512.js b/node_modules/crypto-js/sha512.js new file mode 100644 index 0000000..d274ab0 --- /dev/null +++ b/node_modules/crypto-js/sha512.js @@ -0,0 +1,326 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + var Wil; + var Wih; + + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + Wih = Wi.high = M[offset + i * 2] | 0; + Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + Wil = gamma0l + Wi7l; + Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + Wil = Wil + gamma1l; + Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + Wil = Wil + Wi16l; + Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/tripledes.js b/node_modules/crypto-js/tripledes.js new file mode 100644 index 0000000..1a92477 --- /dev/null +++ b/node_modules/crypto-js/tripledes.js @@ -0,0 +1,779 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + // Make sure the key length is valid (64, 128 or >= 192 bit) + if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { + throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); + } + + // Extend the key according to the keying options defined in 3DES standard + var key1 = keyWords.slice(0, 2); + var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); + var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(key1)); + this._des2 = DES.createEncryptor(WordArray.create(key2)); + this._des3 = DES.createEncryptor(WordArray.create(key3)); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); \ No newline at end of file diff --git a/node_modules/crypto-js/x64-core.js b/node_modules/crypto-js/x64-core.js new file mode 100644 index 0000000..57dcc14 --- /dev/null +++ b/node_modules/crypto-js/x64-core.js @@ -0,0 +1,304 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js new file mode 100644 index 0000000..8d5bab7 --- /dev/null +++ b/node_modules/decamelize/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function (str, sep) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + sep = typeof sep === 'undefined' ? '_' : sep; + + return str + .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') + .toLowerCase(); +}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/decamelize/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json new file mode 100644 index 0000000..ca35790 --- /dev/null +++ b/node_modules/decamelize/package.json @@ -0,0 +1,38 @@ +{ + "name": "decamelize", + "version": "1.2.0", + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "license": "MIT", + "repository": "sindresorhus/decamelize", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decamelize", + "decamelcase", + "camelcase", + "lowercase", + "case", + "dash", + "hyphen", + "string", + "str", + "text", + "convert" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md new file mode 100644 index 0000000..624c7ee --- /dev/null +++ b/node_modules/decamelize/readme.md @@ -0,0 +1,48 @@ +# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) + +> Convert a camelized string into a lowercased one with a custom separator
+> Example: `unicornRainbow` → `unicorn_rainbow` + + +## Install + +``` +$ npm install --save decamelize +``` + + +## Usage + +```js +const decamelize = require('decamelize'); + +decamelize('unicornRainbow'); +//=> 'unicorn_rainbow' + +decamelize('unicornRainbow', '-'); +//=> 'unicorn-rainbow' +``` + + +## API + +### decamelize(input, [separator]) + +#### input + +Type: `string` + +#### separator + +Type: `string`
+Default: `_` + + +## Related + +See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/dfa/README.md b/node_modules/dfa/README.md new file mode 100644 index 0000000..5e4338f --- /dev/null +++ b/node_modules/dfa/README.md @@ -0,0 +1,83 @@ +# dfa + +Compiles a regular expression like syntax to fast deterministic finite automata. +Useful for pattern matching against non-string sequences. + +## Example + +This example matches [Hangul](https://en.wikipedia.org/wiki/Hangul) syllables. The symbols defined in the machine are Unicode character categories which could be mapped from code points. + +Machine definition: + +```coffeescript +# define symbols +X = 0; # Other character +L = 1; # Leading consonant +V = 2; # Medial vowel +T = 3; # Trailing consonant +LV = 4; # Composed syllable +LVT = 5; # Composed syllable +M = 6; # Tone mark + +# define variables +decomposed = L V T?; +partial = LV T?; +composed = LVT; + +# define main state machine pattern +main = (decomposed | partial | composed) M?; +``` + +Visualized, the machine looks like this (double circles are accepting states): + +![dfa](https://cloud.githubusercontent.com/assets/19409/19143719/8fbc6a12-8b5a-11e6-868d-99621644d094.png) + +Compiling and using the machine: + +```javascript +import compile from 'dfa/compile'; +import fs from 'fs'; + +let stateMachine = compile(fs.readFileSync('hangul.machine', 'utf8')); + +// find matches +for (let [startIndex, endIndex] of stateMachine.match([0, 1, 2, 3, 0, 4, 6]) { + console.log('match:', startIndex, endIndex); +} +``` + +Output: +``` +match: 1 3 +match: 5 6 +``` + +## Syntax + +A state machine file contains a list of assignment statements. Comments are also allowed +and are started with the `#` character. Each statement is an assignment of a variable name +to a value or expression. Assigning a variable to a number produces a symbol, which is +added to the state machine's alphabet. Assigning a variable to an expression allows +for substitutions into later expressions. The special `main` variable should always be +assigned to at the end of the file, and is the final expression that will be compiled. + +A subset of common regular expression syntax is supported. A list of operators and their +precedence is below. Operators with the same precedence are evaluated left to right. + +| Precedence | Syntax | Type | Meaning | +| ---------- | ---------- | --------------| ------------------------------------------ | +| 1 | `a \| b` | Alternation | Matches either `a` or `b` | +| 2 | `a b` | Concatenation | Matches `a` followed by `b` | +| 3 | `a*` | Repetition | Matches zero or more occurrences of `a` | +| 3 | `a+` | Repetition | Matches one ore more occurrences of `a` | +| 3 | `a?` | Optional | Matches zero or one occurrence of `a` | +| 3 | `a{n}` | Repetition | Matches exactly n occurrences of `a` | +| 3 | `a{n,}` | Repetition | Matches n or more occurrences of `a` | +| 3 | `a{,n}` | Repetition | Matches up to n occurrences of `a` | +| 3 | `a{n,m}` | Repetition | Matches n to m occurrences of `a` | +| 4 | `t:` | Tag | Tags the following expression with tag `t` | +| 5 | `()` | Grouping | Groups an expression | + +## License + +MIT diff --git a/node_modules/dfa/compile.js b/node_modules/dfa/compile.js new file mode 100644 index 0000000..a6a98b7 --- /dev/null +++ b/node_modules/dfa/compile.js @@ -0,0 +1,1834 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * Returns a new set representing the union of a and b. + */ +function union(a, b) { + var s = new Set(a); + addAll(s, b); + return s; +} +/** + * Adds all items from the set b to a. + */ + +function addAll(a, b) { + for (var x of b) { + a.add(x); + } +} +/** + * Returns whether two sets are equal + */ + +function equal(a, b) { + if (a === b) return true; + if (a.size !== b.size) return false; + + for (var x of a) { + if (!b.has(x)) { + return false; + } + } + + return true; +} + +/** + * Base AST node + */ + +class Node { + constructor() { + Object.defineProperty(this, 'followpos', { + value: new Set() + }); + } + + calcFollowpos() { + for (var key in this) { + if (this[key] instanceof Node) { + this[key].calcFollowpos(); + } + } + } + +} +/** + * Represents a variable reference + */ + +class Variable extends Node { + constructor(name) { + super(); + this.name = name; + } + + copy() { + return new Variable(this.name); + } + +} +/** + * Represents a comment + */ + +class Comment extends Node { + constructor(value) { + super(); + this.value = value; + } + +} +/** + * Represents an assignment statement. + * e.g. `variable = expression;` + */ + +class Assignment extends Node { + constructor(variable, expression) { + super(); + this.variable = variable; + this.expression = expression; + } + +} +/** + * Represents an alternation. + * e.g. `a | b` + */ + +class Alternation extends Node { + constructor(a, b) { + super(); + this.a = a; + this.b = b; + } + + get nullable() { + return this.a.nullable || this.b.nullable; + } + + get firstpos() { + return union(this.a.firstpos, this.b.firstpos); + } + + get lastpos() { + return union(this.a.lastpos, this.b.lastpos); + } + + copy() { + return new Alternation(this.a.copy(), this.b.copy()); + } + +} +/** + * Represents a concatenation, or chain. + * e.g. `a b c` + */ + +class Concatenation extends Node { + constructor(a, b) { + super(); + this.a = a; + this.b = b; + } + + get nullable() { + return this.a.nullable && this.b.nullable; + } + + get firstpos() { + var s = this.a.firstpos; + + if (this.a.nullable) { + s = union(s, this.b.firstpos); + } + + return s; + } + + get lastpos() { + var s = this.b.lastpos; + + if (this.b.nullable) { + s = union(s, this.a.lastpos); + } + + return s; + } + + calcFollowpos() { + super.calcFollowpos(); + + for (var n of this.a.lastpos) { + addAll(n.followpos, this.b.firstpos); + } + } + + copy() { + return new Concatenation(this.a.copy(), this.b.copy()); + } + +} +/** + * Represents a repetition. + * e.g. `a+`, `b*`, or `c?` + */ + +class Repeat extends Node { + constructor(expression, op) { + super(); + this.expression = expression; + this.op = op; + } + + get nullable() { + return this.op === '*' || this.op === '?'; + } + + get firstpos() { + return this.expression.firstpos; + } + + get lastpos() { + return this.expression.lastpos; + } + + calcFollowpos() { + super.calcFollowpos(); + + if (this.op === '*' || this.op === '+') { + for (var n of this.lastpos) { + addAll(n.followpos, this.firstpos); + } + } + } + + copy() { + return new Repeat(this.expression.copy(), this.op); + } + +} +function buildRepetition(expression, min = 0, max = Infinity) { + if (min < 0 || min > max) { + throw new Error("Invalid repetition range: ".concat(min, " ").concat(max)); + } + + var res = null; + + for (var i = 0; i < min; i++) { + res = concat(res, expression.copy()); + } + + if (max === Infinity) { + res = concat(res, new Repeat(expression.copy(), '*')); + } else { + for (var _i = min; _i < max; _i++) { + res = concat(res, new Repeat(expression.copy(), '?')); + } + } + + return res; +} + +function concat(a, b) { + if (!a) { + return b; + } + + return new Concatenation(a, b); +} +/** + * Base class for leaf nodes + */ + + +class Leaf extends Node { + get nullable() { + return false; + } + + get firstpos() { + return new Set([this]); + } + + get lastpos() { + return new Set([this]); + } + +} +/** + * Represents a literal value, e.g. a number + */ + + +class Literal extends Leaf { + constructor(value) { + super(); + this.value = value; + } + + copy() { + return new Literal(this.value); + } + +} +/** + * Marks the end of an expression + */ + +class EndMarker extends Leaf {} +/** + * Represents a tag + * e.g. `a:(a b)` + */ + +class Tag extends Leaf { + constructor(name) { + super(); + this.name = name; + } + + get nullable() { + return true; + } + + copy() { + return new Tag(this.name); + } + +} + +var nodes = /*#__PURE__*/Object.freeze({ + Node: Node, + Variable: Variable, + Comment: Comment, + Assignment: Assignment, + Alternation: Alternation, + Concatenation: Concatenation, + Repeat: Repeat, + buildRepetition: buildRepetition, + Literal: Literal, + EndMarker: EndMarker, + Tag: Tag +}); + +function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + + ctor.prototype = parent.prototype; + child.prototype = new ctor(); +} + +function peg$SyntaxError(message, expected, found, location) { + this.message = message; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } +} + +peg$subclass(peg$SyntaxError, Error); + +peg$SyntaxError.buildMessage = function (expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function (expectation) { + return "\"" + literalEscape(expectation.text) + "\""; + }, + "class": function (expectation) { + var escapedParts = "", + i; + + for (i = 0; i < expectation.parts.length; i++) { + escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); + } + + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + }, + any: function (expectation) { + return "any character"; + }, + end: function (expectation) { + return "end of input"; + }, + other: function (expectation) { + return expectation.description; + } + }; + + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + + function literalEscape(s) { + return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { + return '\\x0' + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { + return '\\x' + hex(ch); + }); + } + + function classEscape(s) { + return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { + return '\\x0' + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { + return '\\x' + hex(ch); + }); + } + + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + + function describeExpected(expected) { + var descriptions = new Array(expected.length), + i, + j; + + for (i = 0; i < expected.length; i++) { + descriptions[i] = describeExpectation(expected[i]); + } + + descriptions.sort(); + + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; +}; + +function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + + var peg$FAILED = {}, + peg$startRuleFunctions = { + rules: peg$parserules + }, + peg$startRuleFunction = peg$parserules, + peg$c0 = function (s) { + return s; + }, + peg$c1 = "#", + peg$c2 = peg$literalExpectation("#", false), + peg$c3 = /^[^\r\n]/, + peg$c4 = peg$classExpectation(["\r", "\n"], true, false), + peg$c5 = /^[\r\n]/, + peg$c6 = peg$classExpectation(["\r", "\n"], false, false), + peg$c7 = function (v) { + return new n.Comment(v.join('')); + }, + peg$c8 = "=", + peg$c9 = peg$literalExpectation("=", false), + peg$c10 = ";", + peg$c11 = peg$literalExpectation(";", false), + peg$c12 = function (v, e) { + return new n.Assignment(v, e); + }, + peg$c13 = function (v) { + return new n.Variable(v); + }, + peg$c14 = "|", + peg$c15 = peg$literalExpectation("|", false), + peg$c16 = function (a, b) { + return new n.Alternation(a, b); + }, + peg$c17 = function (a, b) { + return new n.Concatenation(a, b); + }, + peg$c18 = ":", + peg$c19 = peg$literalExpectation(":", false), + peg$c20 = function (t, e) { + return new n.Concatenation(e, new n.Tag(t)); + }, + peg$c21 = "*", + peg$c22 = peg$literalExpectation("*", false), + peg$c23 = function (t) { + return new n.Repeat(t, '*'); + }, + peg$c24 = "?", + peg$c25 = peg$literalExpectation("?", false), + peg$c26 = function (t) { + return new n.Repeat(t, '?'); + }, + peg$c27 = "+", + peg$c28 = peg$literalExpectation("+", false), + peg$c29 = function (t) { + return new n.Repeat(t, '+'); + }, + peg$c30 = "{", + peg$c31 = peg$literalExpectation("{", false), + peg$c32 = "}", + peg$c33 = peg$literalExpectation("}", false), + peg$c34 = function (t, m) { + return n.buildRepetition(t, m, m); + }, + peg$c35 = ",", + peg$c36 = peg$literalExpectation(",", false), + peg$c37 = function (t, min) { + return n.buildRepetition(t, min, Infinity); + }, + peg$c38 = function (t, max) { + return n.buildRepetition(t, 0, max); + }, + peg$c39 = function (t, min, max) { + return n.buildRepetition(t, min, max); + }, + peg$c40 = function (x) { + return new n.Literal(x); + }, + peg$c41 = "(", + peg$c42 = peg$literalExpectation("(", false), + peg$c43 = ")", + peg$c44 = peg$literalExpectation(")", false), + peg$c45 = function (e) { + return e; + }, + peg$c47 = function (a, b) { + return a + b.join(''); + }, + peg$c48 = "_", + peg$c49 = peg$literalExpectation("_", false), + peg$c50 = /^[a-zA-Z]/, + peg$c51 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), + peg$c52 = /^[0-9]/, + peg$c53 = peg$classExpectation([["0", "9"]], false, false), + peg$c54 = function (num) { + return parseInt(num.join('')); + }, + peg$c55 = /^[ \t\r\n]/, + peg$c56 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false), + peg$currPos = 0, + peg$posDetailsCache = [{ + line: 1, + column: 1 + }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function peg$literalExpectation(text, ignoreCase) { + return { + type: "literal", + text: text, + ignoreCase: ignoreCase + }; + } + + function peg$classExpectation(parts, inverted, ignoreCase) { + return { + type: "class", + parts: parts, + inverted: inverted, + ignoreCase: ignoreCase + }; + } + + function peg$endExpectation() { + return { + type: "end" + }; + } + + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], + p; + + if (details) { + return details; + } else { + p = pos - 1; + + while (!peg$posDetailsCache[p]) { + p--; + } + + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + + p++; + } + + peg$posDetailsCache[pos] = details; + return details; + } + } + + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), + endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { + return; + } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildStructuredError(expected, found, location) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); + } + + function peg$parserules() { + var s0, s1; + s0 = []; + s1 = peg$parsestatement(); + + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsestatement(); + } + } else { + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsestatement() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parsestatement_type(); + + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + + if (s2 !== peg$FAILED) { + s1 = peg$c0(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsestatement_type() { + var s0; + s0 = peg$parseassignment(); + + if (s0 === peg$FAILED) { + s0 = peg$parsecomment(); + } + + return s0; + } + + function peg$parsecomment() { + var s0, s1, s2, s3; + s0 = peg$currPos; + + if (input.charCodeAt(peg$currPos) === 35) { + s1 = peg$c1; + peg$currPos++; + } else { + s1 = peg$FAILED; + + { + peg$fail(peg$c2); + } + } + + if (s1 !== peg$FAILED) { + s2 = []; + + if (peg$c3.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c4); + } + } + + while (s3 !== peg$FAILED) { + s2.push(s3); + + if (peg$c3.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c4); + } + } + } + + if (s2 !== peg$FAILED) { + if (peg$c5.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c6); + } + } + + if (s3 !== peg$FAILED) { + s1 = peg$c7(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseassignment() { + var s0, s1, s2, s3, s4, s5, s6, s7; + s0 = peg$currPos; + s1 = peg$parsevariable(); + + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c8; + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c9); + } + } + + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + + if (s4 !== peg$FAILED) { + s5 = peg$parsealternation(); + + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s7 = peg$c10; + peg$currPos++; + } else { + s7 = peg$FAILED; + + { + peg$fail(peg$c11); + } + } + + if (s7 !== peg$FAILED) { + s1 = peg$c12(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsevariable() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parsename(); + + if (s1 !== peg$FAILED) { + s1 = peg$c13(s1); + } + + s0 = s1; + return s0; + } + + function peg$parsealternation() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseconcatenation(); + + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 124) { + s3 = peg$c14; + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c15); + } + } + + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + + if (s4 !== peg$FAILED) { + s5 = peg$parsealternation(); + + if (s5 !== peg$FAILED) { + s1 = peg$c16(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$parseconcatenation(); + } + + return s0; + } + + function peg$parseconcatenation() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parserepeat(); + + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + + if (s2 !== peg$FAILED) { + s3 = peg$parseconcatenation(); + + if (s3 !== peg$FAILED) { + s1 = peg$c17(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$parserepeat(); + } + + return s0; + } + + function peg$parserepeat() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = peg$parsename(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c19); + } + } + + if (s2 !== peg$FAILED) { + s3 = peg$parserepeat(); + + if (s3 !== peg$FAILED) { + s1 = peg$c20(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 42) { + s2 = peg$c21; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c22); + } + } + + if (s2 !== peg$FAILED) { + s1 = peg$c23(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 63) { + s2 = peg$c24; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c25); + } + } + + if (s2 !== peg$FAILED) { + s1 = peg$c26(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s2 = peg$c27; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c28); + } + } + + if (s2 !== peg$FAILED) { + s1 = peg$c29(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c31); + } + } + + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s4 = peg$c32; + peg$currPos++; + } else { + s4 = peg$FAILED; + + { + peg$fail(peg$c33); + } + } + + if (s4 !== peg$FAILED) { + s1 = peg$c34(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c31); + } + } + + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + + { + peg$fail(peg$c36); + } + } + + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c32; + peg$currPos++; + } else { + s5 = peg$FAILED; + + { + peg$fail(peg$c33); + } + } + + if (s5 !== peg$FAILED) { + s1 = peg$c37(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c31); + } + } + + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c35; + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c36); + } + } + + if (s3 !== peg$FAILED) { + s4 = peg$parsenumber(); + + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c32; + peg$currPos++; + } else { + s5 = peg$FAILED; + + { + peg$fail(peg$c33); + } + } + + if (s5 !== peg$FAILED) { + s1 = peg$c38(s1, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c31); + } + } + + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c35; + peg$currPos++; + } else { + s4 = peg$FAILED; + + { + peg$fail(peg$c36); + } + } + + if (s4 !== peg$FAILED) { + s5 = peg$parsenumber(); + + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s6 = peg$c32; + peg$currPos++; + } else { + s6 = peg$FAILED; + + { + peg$fail(peg$c33); + } + } + + if (s6 !== peg$FAILED) { + s1 = peg$c39(s1, s3, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + if (s0 === peg$FAILED) { + s0 = peg$parseterm(); + } + } + } + } + } + } + } + } + + return s0; + } + + function peg$parseterm() { + var s0, s1, s2, s3; + s0 = peg$parsevariable(); + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsenumber(); + + if (s1 !== peg$FAILED) { + s1 = peg$c40(s1); + } + + s0 = s1; + + if (s0 === peg$FAILED) { + s0 = peg$currPos; + + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c41; + peg$currPos++; + } else { + s1 = peg$FAILED; + + { + peg$fail(peg$c42); + } + } + + if (s1 !== peg$FAILED) { + s2 = peg$parsealternation(); + + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c43; + peg$currPos++; + } else { + s3 = peg$FAILED; + + { + peg$fail(peg$c44); + } + } + + if (s3 !== peg$FAILED) { + s1 = peg$c45(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + + return s0; + } + + function peg$parsename() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parsename_start_char(); + + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsename_char(); + + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsename_char(); + } + + if (s2 !== peg$FAILED) { + s1 = peg$c47(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsename_start_char() { + var s0; + + if (input.charCodeAt(peg$currPos) === 95) { + s0 = peg$c48; + peg$currPos++; + } else { + s0 = peg$FAILED; + + { + peg$fail(peg$c49); + } + } + + if (s0 === peg$FAILED) { + if (peg$c50.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + + { + peg$fail(peg$c51); + } + } + } + + return s0; + } + + function peg$parsename_char() { + var s0; + s0 = peg$parsename_start_char(); + + if (s0 === peg$FAILED) { + if (peg$c52.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + + { + peg$fail(peg$c53); + } + } + } + + return s0; + } + + function peg$parsenumber() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + + if (peg$c52.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c53); + } + } + + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + + if (peg$c52.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + + { + peg$fail(peg$c53); + } + } + } + } else { + s1 = peg$FAILED; + } + + if (s1 !== peg$FAILED) { + s1 = peg$c54(s1); + } + + s0 = s1; + return s0; + } + + function peg$parse_() { + var s0, s1; + s0 = []; + + if (peg$c55.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + + { + peg$fail(peg$c56); + } + } + + while (s1 !== peg$FAILED) { + s0.push(s1); + + if (peg$c55.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + + { + peg$fail(peg$c56); + } + } + } + + return s0; + } + + var n = nodes; + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } +} + +var grammar = { + SyntaxError: peg$SyntaxError, + parse: peg$parse +}; + +/** + * Processes a list of statements into a symbol table + */ + +class SymbolTable { + constructor(statements, externalSymbols = {}) { + this.variables = {}; + this.symbols = {}; + this.main = null; + this.size = 0; + this.addExternalSymbols(externalSymbols); + this.process(statements); + } + + addExternalSymbols(externalSymbols) { + for (var key in externalSymbols) { + this.variables[key] = new Literal(externalSymbols[key]); + this.symbols[key] = externalSymbols[key]; + this.size++; + } + } + + process(statements) { + for (var statement of statements) { + if (statement instanceof Assignment) { + this.variables[statement.variable.name] = this.processExpression(statement.expression); + + if (statement.expression instanceof Literal) { + this.symbols[statement.variable.name] = statement.expression.value; + this.size++; + } + } + } + + this.main = this.variables.main; + + if (!this.main) { + throw new Error('No main variable declaration found'); + } + } + + processExpression(expr) { + // Process children + for (var key in expr) { + if (expr[key] instanceof Node) { + expr[key] = this.processExpression(expr[key]); + } + } // Replace variable references with their values + + + if (expr instanceof Variable) { + var value = this.variables[expr.name]; + if (value == null) throw new Error("Undeclared indentifier ".concat(expr.name)); + expr = this.processExpression(value.copy()); + } + + return expr; + } + +} + +var END_MARKER = new EndMarker(); +/** + * This is an implementation of the direct regular expression to DFA algorithm described + * in section 3.9.5 of "Compilers: Principles, Techniques, and Tools" by Aho, + * Lam, Sethi, and Ullman. http://dragonbook.stanford.edu + * There is a PDF of the book here: + * http://www.informatik.uni-bremen.de/agbkb/lehre/ccfl/Material/ALSUdragonbook.pdf + */ + +function buildDFA(root, numSymbols) { + root = new Concatenation(root, END_MARKER); + root.calcFollowpos(); + var failState = new State(new Set(), numSymbols); + var initialState = new State(root.firstpos, numSymbols); + var dstates = [failState, initialState]; // while there is an unmarked state S in dstates + + while (1) { + var s = null; + + for (var j = 1; j < dstates.length; j++) { + if (!dstates[j].marked) { + s = dstates[j]; + break; + } + } + + if (s == null) { + break; + } // mark S + + + s.marked = true; // for each input symbol a + + for (var a = 0; a < numSymbols; a++) { + // let U be the union of followpos(p) for all + // p in S that correspond to a + var u = new Set(); + + for (var p of s.positions) { + if (p instanceof Literal && p.value === a) { + addAll(u, p.followpos); + } + } + + if (u.size === 0) { + continue; + } // if U is not in dstates + + + var ux = -1; + + for (var i = 0; i < dstates.length; i++) { + if (equal(u, dstates[i].positions)) { + ux = i; + break; + } + } + + if (ux === -1) { + // Add U as an unmarked state to dstates + dstates.push(new State(u, numSymbols)); + ux = dstates.length - 1; + } + + s.transitions[a] = ux; + } + } + + return dstates; +} + +class State { + constructor(positions, len) { + this.positions = positions; + this.transitions = new Uint16Array(len); + this.accepting = positions.has(END_MARKER); + this.marked = false; + this.tags = new Set(); + + for (var pos of positions) { + if (pos instanceof Tag) { + this.tags.add(pos.name); + } + } + } + +} + +var INITIAL_STATE = 1; +var FAIL_STATE = 0; +/** + * A StateMachine represents a deterministic finite automaton. + * It can perform matches over a sequence of values, similar to a regular expression. + */ + +class StateMachine { + constructor(dfa) { + this.stateTable = dfa.stateTable; + this.accepting = dfa.accepting; + this.tags = dfa.tags; + } + /** + * Returns an iterable object that yields pattern matches over the input sequence. + * Matches are of the form [startIndex, endIndex, tags]. + */ + + + match(str) { + var self = this; + return { + *[Symbol.iterator]() { + var state = INITIAL_STATE; + var startRun = null; + var lastAccepting = null; + var lastState = null; + + for (var p = 0; p < str.length; p++) { + var c = str[p]; + lastState = state; + state = self.stateTable[state][c]; + + if (state === FAIL_STATE) { + // yield the last match if any + if (startRun != null && lastAccepting != null && lastAccepting >= startRun) { + yield [startRun, lastAccepting, self.tags[lastState]]; + } // reset the state as if we started over from the initial state + + + state = self.stateTable[INITIAL_STATE][c]; + startRun = null; + } // start a run if not in the failure state + + + if (state !== FAIL_STATE && startRun == null) { + startRun = p; + } // if accepting, mark the potential match end + + + if (self.accepting[state]) { + lastAccepting = p; + } // reset the state to the initial state if we get into the failure state + + + if (state === FAIL_STATE) { + state = INITIAL_STATE; + } + } // yield the last match if any + + + if (startRun != null && lastAccepting != null && lastAccepting >= startRun) { + yield [startRun, lastAccepting, self.tags[state]]; + } + } + + }; + } + /** + * For each match over the input sequence, action functions matching + * the tag definitions in the input pattern are called with the startIndex, + * endIndex, and sub-match sequence. + */ + + + apply(str, actions) { + for (var [start, end, tags] of this.match(str)) { + for (var tag of tags) { + if (typeof actions[tag] === 'function') { + actions[tag](start, end, str.slice(start, end + 1)); + } + } + } + } + +} + +function parse(string, externalSymbols) { + var ast = grammar.parse(string); + return new SymbolTable(ast, externalSymbols); +} +function build(symbolTable) { + var states = buildDFA(symbolTable.main, symbolTable.size); + return new StateMachine({ + stateTable: states.map(s => Array.from(s.transitions)), + accepting: states.map(s => s.accepting), + tags: states.map(s => Array.from(s.tags)) + }); +} +function compile(string, externalSymbols) { + return build(parse(string, externalSymbols)); +} + +exports.build = build; +exports.default = compile; +exports.parse = parse; +//# sourceMappingURL=compile.js.map diff --git a/node_modules/dfa/compile.js.map b/node_modules/dfa/compile.js.map new file mode 100644 index 0000000..c105528 --- /dev/null +++ b/node_modules/dfa/compile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compile.js","sources":["src/utils.js","src/nodes.js","src/grammar.js","src/SymbolTable.js","src/dfa.js","src/StateMachine.js","src/compile.js"],"sourcesContent":["/**\n * Returns a new set representing the union of a and b.\n */\nexport function union(a, b) {\n let s = new Set(a);\n addAll(s, b);\n return s;\n}\n\n/**\n * Adds all items from the set b to a.\n */\nexport function addAll(a, b) {\n for (let x of b) {\n a.add(x);\n }\n}\n\n/**\n * Returns whether two sets are equal\n */\nexport function equal(a, b) {\n if (a === b)\n return true;\n\n if (a.size !== b.size)\n return false;\n\n for (let x of a) {\n if (!b.has(x)) {\n return false;\n }\n }\n\n return true;\n}\n","import {addAll, union} from './utils';\n\n/**\n * Base AST node\n */\nexport class Node {\n constructor() {\n Object.defineProperty(this, 'followpos', {value: new Set})\n }\n\n calcFollowpos() {\n for (let key in this) {\n if (this[key] instanceof Node) {\n this[key].calcFollowpos();\n }\n }\n }\n}\n\n/**\n * Represents a variable reference\n */\nexport class Variable extends Node {\n constructor(name) {\n super();\n this.name = name;\n }\n\n copy() {\n return new Variable(this.name);\n }\n}\n\n/**\n * Represents a comment\n */\nexport class Comment extends Node {\n constructor(value) {\n super();\n this.value = value;\n }\n}\n\n/**\n * Represents an assignment statement.\n * e.g. `variable = expression;`\n */\nexport class Assignment extends Node {\n constructor(variable, expression) {\n super();\n this.variable = variable;\n this.expression = expression;\n }\n}\n\n/**\n * Represents an alternation.\n * e.g. `a | b`\n */\nexport class Alternation extends Node {\n constructor(a, b) {\n super();\n this.a = a;\n this.b = b;\n }\n\n get nullable() {\n return this.a.nullable || this.b.nullable;\n }\n\n get firstpos() {\n return union(this.a.firstpos, this.b.firstpos);\n }\n\n get lastpos() {\n return union(this.a.lastpos, this.b.lastpos);\n }\n\n copy() {\n return new Alternation(this.a.copy(), this.b.copy());\n }\n}\n\n/**\n * Represents a concatenation, or chain.\n * e.g. `a b c`\n */\nexport class Concatenation extends Node {\n constructor(a, b) {\n super();\n this.a = a;\n this.b = b;\n }\n\n get nullable() {\n return this.a.nullable && this.b.nullable;\n }\n\n get firstpos() {\n let s = this.a.firstpos;\n if (this.a.nullable) {\n s = union(s, this.b.firstpos);\n }\n\n return s;\n }\n\n get lastpos() {\n let s = this.b.lastpos;\n if (this.b.nullable) {\n s = union(s, this.a.lastpos);\n }\n\n return s;\n }\n\n calcFollowpos() {\n super.calcFollowpos();\n for (let n of this.a.lastpos) {\n addAll(n.followpos, this.b.firstpos);\n }\n }\n\n copy() {\n return new Concatenation(this.a.copy(), this.b.copy());\n }\n}\n\n/**\n * Represents a repetition.\n * e.g. `a+`, `b*`, or `c?`\n */\nexport class Repeat extends Node {\n constructor(expression, op) {\n super();\n this.expression = expression;\n this.op = op;\n }\n\n get nullable() {\n return this.op === '*' || this.op === '?';\n }\n\n get firstpos() {\n return this.expression.firstpos;\n }\n\n get lastpos() {\n return this.expression.lastpos;\n }\n\n calcFollowpos() {\n super.calcFollowpos();\n if (this.op === '*' || this.op === '+') {\n for (let n of this.lastpos) {\n addAll(n.followpos, this.firstpos);\n }\n }\n }\n\n copy() {\n return new Repeat(this.expression.copy(), this.op);\n }\n}\n\nexport function buildRepetition(expression, min = 0, max = Infinity) {\n if (min < 0 || min > max) {\n throw new Error(`Invalid repetition range: ${min} ${max}`);\n }\n\n let res = null;\n for (let i = 0; i < min; i++) {\n res = concat(res, expression.copy());\n }\n\n if (max === Infinity) {\n res = concat(res, new Repeat(expression.copy(), '*'));\n } else {\n for (let i = min; i < max; i++) {\n res = concat(res, new Repeat(expression.copy(), '?'))\n }\n }\n\n return res;\n}\n\nfunction concat(a, b) {\n if (!a) {\n return b;\n }\n\n return new Concatenation(a, b);\n}\n\n/**\n * Base class for leaf nodes\n */\nclass Leaf extends Node {\n get nullable() {\n return false;\n }\n\n get firstpos() {\n return new Set([this]);\n }\n\n get lastpos() {\n return new Set([this]);\n }\n}\n\n/**\n * Represents a literal value, e.g. a number\n */\nexport class Literal extends Leaf {\n constructor(value) {\n super();\n this.value = value;\n }\n\n copy() {\n return new Literal(this.value);\n }\n}\n\n/**\n * Marks the end of an expression\n */\nexport class EndMarker extends Leaf {}\n\n/**\n * Represents a tag\n * e.g. `a:(a b)`\n */\nexport class Tag extends Leaf {\n constructor(name) {\n super();\n this.name = name;\n }\n\n get nullable() {\n return true;\n }\n\n copy() {\n return new Tag(this.name);\n }\n}\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { rules: peg$parserules },\n peg$startRuleFunction = peg$parserules,\n\n peg$c0 = function(s) { return s },\n peg$c1 = \"#\",\n peg$c2 = peg$literalExpectation(\"#\", false),\n peg$c3 = /^[^\\r\\n]/,\n peg$c4 = peg$classExpectation([\"\\r\", \"\\n\"], true, false),\n peg$c5 = /^[\\r\\n]/,\n peg$c6 = peg$classExpectation([\"\\r\", \"\\n\"], false, false),\n peg$c7 = function(v) { return new n.Comment(v.join('')) },\n peg$c8 = \"=\",\n peg$c9 = peg$literalExpectation(\"=\", false),\n peg$c10 = \";\",\n peg$c11 = peg$literalExpectation(\";\", false),\n peg$c12 = function(v, e) { return new n.Assignment(v, e) },\n peg$c13 = function(v) { return new n.Variable(v) },\n peg$c14 = \"|\",\n peg$c15 = peg$literalExpectation(\"|\", false),\n peg$c16 = function(a, b) { return new n.Alternation(a, b) },\n peg$c17 = function(a, b) { return new n.Concatenation(a, b) },\n peg$c18 = \":\",\n peg$c19 = peg$literalExpectation(\":\", false),\n peg$c20 = function(t, e) { return new n.Concatenation(e, new n.Tag(t)) },\n peg$c21 = \"*\",\n peg$c22 = peg$literalExpectation(\"*\", false),\n peg$c23 = function(t) { return new n.Repeat(t, '*') },\n peg$c24 = \"?\",\n peg$c25 = peg$literalExpectation(\"?\", false),\n peg$c26 = function(t) { return new n.Repeat(t, '?') },\n peg$c27 = \"+\",\n peg$c28 = peg$literalExpectation(\"+\", false),\n peg$c29 = function(t) { return new n.Repeat(t, '+') },\n peg$c30 = \"{\",\n peg$c31 = peg$literalExpectation(\"{\", false),\n peg$c32 = \"}\",\n peg$c33 = peg$literalExpectation(\"}\", false),\n peg$c34 = function(t, m) { return n.buildRepetition(t, m, m) },\n peg$c35 = \",\",\n peg$c36 = peg$literalExpectation(\",\", false),\n peg$c37 = function(t, min) { return n.buildRepetition(t, min, Infinity) },\n peg$c38 = function(t, max) { return n.buildRepetition(t, 0, max) },\n peg$c39 = function(t, min, max) { return n.buildRepetition(t, min, max) },\n peg$c40 = function(x) { return new n.Literal(x) },\n peg$c41 = \"(\",\n peg$c42 = peg$literalExpectation(\"(\", false),\n peg$c43 = \")\",\n peg$c44 = peg$literalExpectation(\")\", false),\n peg$c45 = function(e) { return e },\n peg$c46 = function() { return n.buildRepetition() },\n peg$c47 = function(a, b) { return a + b.join('') },\n peg$c48 = \"_\",\n peg$c49 = peg$literalExpectation(\"_\", false),\n peg$c50 = /^[a-zA-Z]/,\n peg$c51 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false),\n peg$c52 = /^[0-9]/,\n peg$c53 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c54 = function(num) { return parseInt(num.join('')) },\n peg$c55 = /^[ \\t\\r\\n]/,\n peg$c56 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parserules() {\n var s0, s1;\n\n s0 = [];\n s1 = peg$parsestatement();\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsestatement();\n }\n } else {\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsestatement() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = peg$parsestatement_type();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsestatement_type() {\n var s0;\n\n s0 = peg$parseassignment();\n if (s0 === peg$FAILED) {\n s0 = peg$parsecomment();\n }\n\n return s0;\n }\n\n function peg$parsecomment() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c1;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c3.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c4); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c3.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c4); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c7(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseassignment() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parsevariable();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s3 = peg$c8;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c9); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsealternation();\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 59) {\n s7 = peg$c10;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12(s1, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsevariable() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsename();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c13(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsealternation() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = peg$parseconcatenation();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 124) {\n s3 = peg$c14;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c15); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsealternation();\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16(s1, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseconcatenation();\n }\n\n return s0;\n }\n\n function peg$parseconcatenation() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parserepeat();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseconcatenation();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c17(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parserepeat();\n }\n\n return s0;\n }\n\n function peg$parserepeat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n s1 = peg$parsename();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 58) {\n s2 = peg$c18;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c19); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parserepeat();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 42) {\n s2 = peg$c21;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 63) {\n s2 = peg$c24;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c27;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s2 = peg$c30;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s4 = peg$c32;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s2 = peg$c30;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c35;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s2 = peg$c30;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c35;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parsenumber();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c38(s1, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s2 = peg$c30;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c35;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c36); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s6 = peg$c32;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s6 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseterm();\n }\n }\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseterm() {\n var s0, s1, s2, s3;\n\n s0 = peg$parsevariable();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 40) {\n s1 = peg$c41;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsealternation();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parserepetition() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s3 = peg$c32;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsename() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parsename_start_char();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsename_char();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsename_char();\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsename_start_char() {\n var s0;\n\n if (input.charCodeAt(peg$currPos) === 95) {\n s0 = peg$c48;\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s0 === peg$FAILED) {\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n }\n\n return s0;\n }\n\n function peg$parsename_char() {\n var s0;\n\n s0 = peg$parsename_start_char();\n if (s0 === peg$FAILED) {\n if (peg$c52.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c52.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c52.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c54(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n s0 = [];\n if (peg$c55.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c56); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c55.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c56); }\n }\n }\n\n return s0;\n }\n\n\n var n = require('./nodes');\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n}\n\nmodule.exports = {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n};\n","import {Assignment, Literal, Node, Variable} from './nodes';\n\n/**\n * Processes a list of statements into a symbol table\n */\nexport default class SymbolTable {\n constructor(statements, externalSymbols = {}) {\n this.variables = {};\n this.symbols = {};\n this.main = null;\n this.size = 0;\n\n this.addExternalSymbols(externalSymbols);\n this.process(statements);\n }\n\n addExternalSymbols(externalSymbols) {\n for (let key in externalSymbols) {\n this.variables[key] = new Literal(externalSymbols[key]);\n this.symbols[key] = externalSymbols[key];\n this.size++;\n }\n }\n\n process(statements) {\n for (let statement of statements) {\n if (statement instanceof Assignment) {\n this.variables[statement.variable.name] = this.processExpression(statement.expression);\n\n if (statement.expression instanceof Literal) {\n this.symbols[statement.variable.name] = statement.expression.value;\n this.size++;\n }\n }\n }\n\n this.main = this.variables.main;\n if (!this.main) {\n throw new Error('No main variable declaration found');\n }\n }\n\n processExpression(expr) {\n // Process children\n for (let key in expr) {\n if (expr[key] instanceof Node) {\n expr[key] = this.processExpression(expr[key]);\n }\n }\n\n // Replace variable references with their values\n if (expr instanceof Variable) {\n let value = this.variables[expr.name];\n if (value == null)\n throw new Error(`Undeclared indentifier ${expr.name}`);\n\n expr = this.processExpression(value.copy());\n }\n\n return expr;\n }\n}\n","import {EndMarker, Concatenation, Literal, Tag} from './nodes';\nimport {addAll, equal} from './utils';\n\nconst END_MARKER = new EndMarker;\n\n/**\n * This is an implementation of the direct regular expression to DFA algorithm described\n * in section 3.9.5 of \"Compilers: Principles, Techniques, and Tools\" by Aho,\n * Lam, Sethi, and Ullman. http://dragonbook.stanford.edu\n * There is a PDF of the book here:\n * http://www.informatik.uni-bremen.de/agbkb/lehre/ccfl/Material/ALSUdragonbook.pdf\n */\nexport default function buildDFA(root, numSymbols) {\n root = new Concatenation(root, END_MARKER);\n root.calcFollowpos();\n\n let failState = new State(new Set, numSymbols);\n let initialState = new State(root.firstpos, numSymbols);\n let dstates = [failState, initialState];\n\n // while there is an unmarked state S in dstates\n while (1) {\n let s = null;\n\n for (let j = 1; j < dstates.length; j++) {\n if (!dstates[j].marked) {\n s = dstates[j];\n break;\n }\n }\n\n if (s == null) {\n break;\n }\n\n // mark S\n s.marked = true;\n\n // for each input symbol a\n for (let a = 0; a < numSymbols; a++) {\n // let U be the union of followpos(p) for all\n // p in S that correspond to a\n let u = new Set;\n for (let p of s.positions) {\n if (p instanceof Literal && p.value === a) {\n addAll(u, p.followpos);\n }\n }\n\n if (u.size === 0) {\n continue;\n }\n\n // if U is not in dstates\n let ux = -1;\n for (let i = 0; i < dstates.length; i++) {\n if (equal(u, dstates[i].positions)) {\n ux = i;\n break;\n }\n }\n\n if (ux === -1) {\n // Add U as an unmarked state to dstates\n dstates.push(new State(u, numSymbols));\n ux = dstates.length - 1;\n }\n\n s.transitions[a] = ux;\n }\n }\n\n return dstates;\n}\n\nclass State {\n constructor(positions, len) {\n this.positions = positions;\n this.transitions = new Uint16Array(len);\n this.accepting = positions.has(END_MARKER);\n this.marked = false;\n this.tags = new Set;\n\n for (let pos of positions) {\n if (pos instanceof Tag) {\n this.tags.add(pos.name);\n }\n }\n }\n}\n","const INITIAL_STATE = 1;\nconst FAIL_STATE = 0;\n\n/**\n * A StateMachine represents a deterministic finite automaton.\n * It can perform matches over a sequence of values, similar to a regular expression.\n */\nexport default class StateMachine {\n constructor(dfa) {\n this.stateTable = dfa.stateTable;\n this.accepting = dfa.accepting;\n this.tags = dfa.tags;\n }\n\n /**\n * Returns an iterable object that yields pattern matches over the input sequence.\n * Matches are of the form [startIndex, endIndex, tags].\n */\n match(str) {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let state = INITIAL_STATE;\n let startRun = null;\n let lastAccepting = null;\n let lastState = null;\n\n for (let p = 0; p < str.length; p++) {\n let c = str[p];\n\n lastState = state;\n state = self.stateTable[state][c];\n\n if (state === FAIL_STATE) {\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[lastState]];\n }\n\n // reset the state as if we started over from the initial state\n state = self.stateTable[INITIAL_STATE][c];\n startRun = null;\n }\n\n // start a run if not in the failure state\n if (state !== FAIL_STATE && startRun == null) {\n startRun = p;\n }\n\n // if accepting, mark the potential match end\n if (self.accepting[state]) {\n lastAccepting = p;\n }\n\n // reset the state to the initial state if we get into the failure state\n if (state === FAIL_STATE) {\n state = INITIAL_STATE;\n }\n }\n\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[state]];\n }\n }\n };\n }\n\n /**\n * For each match over the input sequence, action functions matching\n * the tag definitions in the input pattern are called with the startIndex,\n * endIndex, and sub-match sequence.\n */\n apply(str, actions) {\n for (let [start, end, tags] of this.match(str)) {\n for (let tag of tags) {\n if (typeof actions[tag] === 'function') {\n actions[tag](start, end, str.slice(start, end + 1));\n }\n }\n }\n }\n}\n","import grammar from './grammar';\nimport SymbolTable from './SymbolTable';\nimport buildDFA from './dfa';\nimport StateMachine from './StateMachine';\n\nexport function parse(string, externalSymbols) {\n let ast = grammar.parse(string);\n return new SymbolTable(ast, externalSymbols);\n}\n\nexport function build(symbolTable) {\n let states = buildDFA(symbolTable.main, symbolTable.size);\n\n return new StateMachine({\n stateTable: states.map(s => Array.from(s.transitions)),\n accepting: states.map(s => s.accepting),\n tags: states.map(s => Array.from(s.tags))\n });\n}\n\nexport default function compile(string, externalSymbols) {\n return build(parse(string, externalSymbols));\n}\n"],"names":["union","a","b","s","Set","addAll","x","add","equal","size","has","Node","constructor","Object","defineProperty","value","calcFollowpos","key","Variable","name","copy","Comment","Assignment","variable","expression","Alternation","nullable","firstpos","lastpos","Concatenation","n","followpos","Repeat","op","buildRepetition","min","max","Infinity","Error","res","i","concat","Leaf","Literal","EndMarker","Tag","peg$subclass","child","parent","ctor","prototype","peg$SyntaxError","message","expected","found","location","captureStackTrace","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","replace","describeExpectation","type","describeExpected","descriptions","j","sort","slice","join","describeFound","peg$parse","input","options","peg$FAILED","peg$startRuleFunctions","rules","peg$parserules","peg$startRuleFunction","peg$c0","peg$c1","peg$c2","peg$literalExpectation","peg$c3","peg$c4","peg$classExpectation","peg$c5","peg$c6","peg$c7","v","peg$c8","peg$c9","peg$c10","peg$c11","peg$c12","e","peg$c13","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","t","peg$c21","peg$c22","peg$c23","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$c30","peg$c31","peg$c32","peg$c33","peg$c34","m","peg$c35","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","peg$c41","peg$c42","peg$c43","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","peg$c53","peg$c54","num","parseInt","peg$c55","peg$c56","peg$currPos","peg$savedPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","peg$result","startRule","ignoreCase","peg$endExpectation","peg$computePosDetails","pos","details","p","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","start","offset","peg$fail","push","peg$buildStructuredError","s0","s1","peg$parsestatement","s2","peg$parsestatement_type","peg$parse_","peg$parseassignment","peg$parsecomment","s3","test","charAt","s4","s5","s6","s7","peg$parsevariable","peg$parsealternation","peg$parsename","peg$parseconcatenation","peg$parserepeat","peg$parseterm","peg$parsenumber","peg$parsename_start_char","peg$parsename_char","require$$0","SyntaxError","parse","SymbolTable","statements","externalSymbols","variables","symbols","main","addExternalSymbols","process","statement","processExpression","expr","END_MARKER","buildDFA","root","numSymbols","failState","State","initialState","dstates","marked","u","positions","ux","transitions","len","Uint16Array","accepting","tags","INITIAL_STATE","FAIL_STATE","StateMachine","dfa","stateTable","match","str","self","Symbol","iterator","state","startRun","lastAccepting","lastState","c","apply","actions","tag","string","ast","grammar","build","symbolTable","states","map","from","compile"],"mappings":";;;;AAAA;;;AAGA,AAAO,SAASA,KAAT,CAAeC,CAAf,EAAkBC,CAAlB,EAAqB;MACtBC,CAAC,GAAG,IAAIC,GAAJ,CAAQH,CAAR,CAAR;EACAI,MAAM,CAACF,CAAD,EAAID,CAAJ,CAAN;SACOC,CAAP;;;;;;AAMF,AAAO,SAASE,MAAT,CAAgBJ,CAAhB,EAAmBC,CAAnB,EAAsB;OACtB,IAAII,CAAT,IAAcJ,CAAd,EAAiB;IACfD,CAAC,CAACM,GAAF,CAAMD,CAAN;;;;;;;AAOJ,AAAO,SAASE,KAAT,CAAeP,CAAf,EAAkBC,CAAlB,EAAqB;MACtBD,CAAC,KAAKC,CAAV,EACE,OAAO,IAAP;MAEED,CAAC,CAACQ,IAAF,KAAWP,CAAC,CAACO,IAAjB,EACE,OAAO,KAAP;;OAEG,IAAIH,CAAT,IAAcL,CAAd,EAAiB;QACX,CAACC,CAAC,CAACQ,GAAF,CAAMJ,CAAN,CAAL,EAAe;aACN,KAAP;;;;SAIG,IAAP;;;AChCF;;;;AAGA,AAAO,MAAMK,IAAN,CAAW;EAChBC,WAAW,GAAG;IACZC,MAAM,CAACC,cAAP,CAAsB,IAAtB,EAA4B,WAA5B,EAAyC;MAACC,KAAK,EAAE,IAAIX,GAAJ;KAAjD;;;EAGFY,aAAa,GAAG;SACT,IAAIC,GAAT,IAAgB,IAAhB,EAAsB;UAChB,KAAKA,GAAL,aAAqBN,IAAzB,EAA+B;aACxBM,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AD,CAAP,CAAa7E,KAAb,EAAoBhH,GAApB,EAAyBkL,GAAG,CAACnK,KAAJ,CAAUiG,KAAV,EAAiBhH,GAAG,GAAG,CAAvB,CAAzB;;;;;;;;ACxEH,SAAS+I,KAAT,CAAe+C,MAAf,EAAuB5C,eAAvB,EAAwC;MACzC6C,GAAG,GAAGC,OAAO,CAACjD,KAAR,CAAc+C,MAAd,CAAV;SACO,IAAI9C,WAAJ,CAAgB+C,GAAhB,EAAqB7C,eAArB,CAAP;;AAGF,AAAO,SAAS+C,KAAT,CAAeC,WAAf,EAA4B;MAC7BC,MAAM,GAAGvC,QAAQ,CAACsC,WAAW,CAAC7C,IAAb,EAAmB6C,WAAW,CAAC/P,IAA/B,CAArB;SAEO,IAAI2O,YAAJ,CAAiB;IACtBE,UAAU,EAAEmB,MAAM,CAACC,GAAP,CAAWvQ,CAAC,IAAI+D,KAAK,CAACyM,IAAN,CAAWxQ,CAAC,CAAC0O,WAAb,CAAhB,CADU;IAEtBG,SAAS,EAAEyB,MAAM,CAACC,GAAP,CAAWvQ,CAAC,IAAIA,CAAC,CAAC6O,SAAlB,CAFW;IAGtBC,IAAI,EAAEwB,MAAM,CAACC,GAAP,CAAWvQ,CAAC,IAAI+D,KAAK,CAACyM,IAAN,CAAWxQ,CAAC,CAAC8O,IAAb,CAAhB;GAHD,CAAP;;AAOF,AAAe,SAAS2B,OAAT,CAAiBR,MAAjB,EAAyB5C,eAAzB,EAA0C;SAChD+C,KAAK,CAAClD,KAAK,CAAC+C,MAAD,EAAS5C,eAAT,CAAN,CAAZ;;;;;;;"} \ No newline at end of file diff --git a/node_modules/dfa/index.js b/node_modules/dfa/index.js new file mode 100644 index 0000000..05181ee --- /dev/null +++ b/node_modules/dfa/index.js @@ -0,0 +1,91 @@ +'use strict'; + +var INITIAL_STATE = 1; +var FAIL_STATE = 0; +/** + * A StateMachine represents a deterministic finite automaton. + * It can perform matches over a sequence of values, similar to a regular expression. + */ + +class StateMachine { + constructor(dfa) { + this.stateTable = dfa.stateTable; + this.accepting = dfa.accepting; + this.tags = dfa.tags; + } + /** + * Returns an iterable object that yields pattern matches over the input sequence. + * Matches are of the form [startIndex, endIndex, tags]. + */ + + + match(str) { + var self = this; + return { + *[Symbol.iterator]() { + var state = INITIAL_STATE; + var startRun = null; + var lastAccepting = null; + var lastState = null; + + for (var p = 0; p < str.length; p++) { + var c = str[p]; + lastState = state; + state = self.stateTable[state][c]; + + if (state === FAIL_STATE) { + // yield the last match if any + if (startRun != null && lastAccepting != null && lastAccepting >= startRun) { + yield [startRun, lastAccepting, self.tags[lastState]]; + } // reset the state as if we started over from the initial state + + + state = self.stateTable[INITIAL_STATE][c]; + startRun = null; + } // start a run if not in the failure state + + + if (state !== FAIL_STATE && startRun == null) { + startRun = p; + } // if accepting, mark the potential match end + + + if (self.accepting[state]) { + lastAccepting = p; + } // reset the state to the initial state if we get into the failure state + + + if (state === FAIL_STATE) { + state = INITIAL_STATE; + } + } // yield the last match if any + + + if (startRun != null && lastAccepting != null && lastAccepting >= startRun) { + yield [startRun, lastAccepting, self.tags[state]]; + } + } + + }; + } + /** + * For each match over the input sequence, action functions matching + * the tag definitions in the input pattern are called with the startIndex, + * endIndex, and sub-match sequence. + */ + + + apply(str, actions) { + for (var [start, end, tags] of this.match(str)) { + for (var tag of tags) { + if (typeof actions[tag] === 'function') { + actions[tag](start, end, str.slice(start, end + 1)); + } + } + } + } + +} + +module.exports = StateMachine; +//# sourceMappingURL=index.js.map diff --git a/node_modules/dfa/index.js.map b/node_modules/dfa/index.js.map new file mode 100644 index 0000000..867f150 --- /dev/null +++ b/node_modules/dfa/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["src/StateMachine.js"],"sourcesContent":["const INITIAL_STATE = 1;\nconst FAIL_STATE = 0;\n\n/**\n * A StateMachine represents a deterministic finite automaton.\n * It can perform matches over a sequence of values, similar to a regular expression.\n */\nexport default class StateMachine {\n constructor(dfa) {\n this.stateTable = dfa.stateTable;\n this.accepting = dfa.accepting;\n this.tags = dfa.tags;\n }\n\n /**\n * Returns an iterable object that yields pattern matches over the input sequence.\n * Matches are of the form [startIndex, endIndex, tags].\n */\n match(str) {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let state = INITIAL_STATE;\n let startRun = null;\n let lastAccepting = null;\n let lastState = null;\n\n for (let p = 0; p < str.length; p++) {\n let c = str[p];\n\n lastState = state;\n state = self.stateTable[state][c];\n\n if (state === FAIL_STATE) {\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[lastState]];\n }\n\n // reset the state as if we started over from the initial state\n state = self.stateTable[INITIAL_STATE][c];\n startRun = null;\n }\n\n // start a run if not in the failure state\n if (state !== FAIL_STATE && startRun == null) {\n startRun = p;\n }\n\n // if accepting, mark the potential match end\n if (self.accepting[state]) {\n lastAccepting = p;\n }\n\n // reset the state to the initial state if we get into the failure state\n if (state === FAIL_STATE) {\n state = INITIAL_STATE;\n }\n }\n\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[state]];\n }\n }\n };\n }\n\n /**\n * For each match over the input sequence, action functions matching\n * the tag definitions in the input pattern are called with the startIndex,\n * endIndex, and sub-match sequence.\n */\n apply(str, actions) {\n for (let [start, end, tags] of this.match(str)) {\n for (let tag of tags) {\n if (typeof actions[tag] === 'function') {\n actions[tag](start, end, str.slice(start, end + 1));\n }\n }\n }\n }\n}\n"],"names":["INITIAL_STATE","FAIL_STATE","StateMachine","constructor","dfa","stateTable","accepting","tags","match","str","self","Symbol","iterator","state","startRun","lastAccepting","lastState","p","length","c","apply","actions","start","end","tag","slice"],"mappings":";;AAAA,IAAMA,aAAa,GAAG,CAAtB;AACA,IAAMC,UAAU,GAAG,CAAnB;;;;;;AAMA,AAAe,MAAMC,YAAN,CAAmB;EAChCC,WAAW,CAACC,GAAD,EAAM;SACVC,UAAL,GAAkBD,GAAG,CAACC,UAAtB;SACK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BACpE,CAACA,QAAD,EAAWC,aAAX,EAA0BL,IAAI,CAACH,IAAL,CAAUM,KAAV,CAA1B,CAAN;;;;KA1CN;;;;;;;;;EAqDFO,KAAK,CAACX,GAAD,EAAMY,OAAN,EAAe;SACb,IAAI,CAACC,KAAD,EAAQC,GAAR,EAAahB,IAAb,CAAT,IAA+B,KAAKC,KAAL,CAAWC,GAAX,CAA/B,EAAgD;WACzC,IAAIe,GAAT,IAAgBjB,IAAhB,EAAsB;YAChB,OAAOc,OAAO,CAACG,GAAD,CAAd,KAAwB,UAA5B,EAAwC;UACtCH,OAAO,CAACG,GAAD,CAAP,CAAaF,KAAb,EAAoBC,GAApB,EAAyBd,GAAG,CAACgB,KAAJ,CAAUH,KAAV,EAAiBC,GAAG,GAAG,CAAvB,CAAzB;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/dfa/package.json b/node_modules/dfa/package.json new file mode 100644 index 0000000..a9b6b10 --- /dev/null +++ b/node_modules/dfa/package.json @@ -0,0 +1,42 @@ +{ + "name": "dfa", + "version": "1.2.0", + "description": "A state machine compiler", + "main": "index.js", + "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", + "mocha": "^3.1.0", + "pegjs": "^0.10.0", + "rollup": "^1.5.0", + "rollup-plugin-babel": "^4.0.1", + "rollup-plugin-commonjs": "^9.2.1", + "rollup-plugin-local-resolve": "^1.0.7" + }, + "scripts": { + "test": "mocha --require @babel/register", + "prepublish": "make" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/devongovett/dfa.git" + }, + "keywords": [ + "state", + "machine", + "compiler" + ], + "author": "Devon Govett ", + "license": "MIT", + "bugs": { + "url": "https://github.com/devongovett/dfa/issues" + }, + "homepage": "https://github.com/devongovett/dfa#readme", + "files": [ + "index.js", + "index.js.map", + "compile.js", + "compile.js.map" + ] +} diff --git a/node_modules/dijkstrajs/.travis.yml b/node_modules/dijkstrajs/.travis.yml new file mode 100644 index 0000000..2d63faf --- /dev/null +++ b/node_modules/dijkstrajs/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "stable" +sudo: false diff --git a/node_modules/dijkstrajs/CONTRIBUTING.md b/node_modules/dijkstrajs/CONTRIBUTING.md new file mode 100644 index 0000000..5f25961 --- /dev/null +++ b/node_modules/dijkstrajs/CONTRIBUTING.md @@ -0,0 +1,8 @@ +Contributing +============ + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request diff --git a/node_modules/dijkstrajs/LICENSE.md b/node_modules/dijkstrajs/LICENSE.md new file mode 100644 index 0000000..b662d80 --- /dev/null +++ b/node_modules/dijkstrajs/LICENSE.md @@ -0,0 +1,19 @@ +``` +Dijkstra path-finding functions. Adapted from the Dijkstar Python project. + +Copyright (C) 2008 + Wyatt Baldwin + All rights reserved + +Licensed under the MIT license. + + http://www.opensource.org/licenses/mit-license.php + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +``` diff --git a/node_modules/dijkstrajs/README.md b/node_modules/dijkstrajs/README.md new file mode 100644 index 0000000..77deac7 --- /dev/null +++ b/node_modules/dijkstrajs/README.md @@ -0,0 +1,18 @@ +# dijkstrajs.js + +dijkstrajs is a simple JavaScript implementation of Dijkstra's single-source shortest-paths algorithm. + +The code was originally written by Wyatt Baldwin and turned into a node module by Thomas Cort. + +## Requirements + +* [nodejs](http://nodejs.org/) + +## Installation + + npm install dijkstrajs + +## Examples + +See `test/dijkstra.test.js` in the sources for some example code. + diff --git a/node_modules/dijkstrajs/dijkstra.js b/node_modules/dijkstrajs/dijkstra.js new file mode 100644 index 0000000..4f83f1f --- /dev/null +++ b/node_modules/dijkstrajs/dijkstra.js @@ -0,0 +1,165 @@ +'use strict'; + +/****************************************************************************** + * Created 2008-08-19. + * + * Dijkstra path-finding functions. Adapted from the Dijkstar Python project. + * + * Copyright (C) 2008 + * Wyatt Baldwin + * All rights reserved + * + * Licensed under the MIT license. + * + * http://www.opensource.org/licenses/mit-license.php + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + *****************************************************************************/ +var dijkstra = { + single_source_shortest_paths: function(graph, s, d) { + // Predecessor map for each node that has been encountered. + // node ID => predecessor node ID + var predecessors = {}; + + // Costs of shortest paths from s to all nodes encountered. + // node ID => cost + var costs = {}; + costs[s] = 0; + + // Costs of shortest paths from s to all nodes encountered; differs from + // `costs` in that it provides easy access to the node that currently has + // the known shortest path from s. + // XXX: Do we actually need both `costs` and `open`? + var open = dijkstra.PriorityQueue.make(); + open.push(s, 0); + + var closest, + u, v, + cost_of_s_to_u, + adjacent_nodes, + cost_of_e, + cost_of_s_to_u_plus_cost_of_e, + cost_of_s_to_v, + first_visit; + while (!open.empty()) { + // In the nodes remaining in graph that have a known cost from s, + // find the node, u, that currently has the shortest path from s. + closest = open.pop(); + u = closest.value; + cost_of_s_to_u = closest.cost; + + // Get nodes adjacent to u... + adjacent_nodes = graph[u] || {}; + + // ...and explore the edges that connect u to those nodes, updating + // the cost of the shortest paths to any or all of those nodes as + // necessary. v is the node across the current edge from u. + for (v in adjacent_nodes) { + if (adjacent_nodes.hasOwnProperty(v)) { + // Get the cost of the edge running from u to v. + cost_of_e = adjacent_nodes[v]; + + // Cost of s to u plus the cost of u to v across e--this is *a* + // cost from s to v that may or may not be less than the current + // known cost to v. + cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e; + + // If we haven't visited v yet OR if the current known cost from s to + // v is greater than the new cost we just found (cost of s to u plus + // cost of u to v across e), update v's cost in the cost list and + // update v's predecessor in the predecessor list (it's now u). + cost_of_s_to_v = costs[v]; + first_visit = (typeof costs[v] === 'undefined'); + if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) { + costs[v] = cost_of_s_to_u_plus_cost_of_e; + open.push(v, cost_of_s_to_u_plus_cost_of_e); + predecessors[v] = u; + } + } + } + } + + if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') { + var msg = ['Could not find a path from ', s, ' to ', d, '.'].join(''); + throw new Error(msg); + } + + return predecessors; + }, + + extract_shortest_path_from_predecessor_list: function(predecessors, d) { + var nodes = []; + var u = d; + var predecessor; + while (u) { + nodes.push(u); + predecessor = predecessors[u]; + u = predecessors[u]; + } + nodes.reverse(); + return nodes; + }, + + find_path: function(graph, s, d) { + var predecessors = dijkstra.single_source_shortest_paths(graph, s, d); + return dijkstra.extract_shortest_path_from_predecessor_list( + predecessors, d); + }, + + /** + * A very naive priority queue implementation. + */ + PriorityQueue: { + make: function (opts) { + var T = dijkstra.PriorityQueue, + t = {}, + key; + opts = opts || {}; + for (key in T) { + if (T.hasOwnProperty(key)) { + t[key] = T[key]; + } + } + t.queue = []; + t.sorter = opts.sorter || T.default_sorter; + return t; + }, + + default_sorter: function (a, b) { + return a.cost - b.cost; + }, + + /** + * Add a new item to the queue and ensure the highest priority element + * is at the front of the queue. + */ + push: function (value, cost) { + var item = {value: value, cost: cost}; + this.queue.push(item); + this.queue.sort(this.sorter); + }, + + /** + * Return the highest priority element in the queue. + */ + pop: function () { + return this.queue.shift(); + }, + + empty: function () { + return this.queue.length === 0; + } + } +}; + + +// node.js module exports +if (typeof module !== 'undefined') { + module.exports = dijkstra; +} diff --git a/node_modules/dijkstrajs/package.json b/node_modules/dijkstrajs/package.json new file mode 100644 index 0000000..67cd76d --- /dev/null +++ b/node_modules/dijkstrajs/package.json @@ -0,0 +1,60 @@ +{ + "name": "dijkstrajs", + "version": "1.0.3", + "description": "A simple JavaScript implementation of Dijkstra's single-source shortest-paths algorithm.", + "main": "dijkstra.js", + "scripts": { + "pretest": "jshint dijkstra.js", + "test": "mocha -R spec" + }, + "repository": { + "type": "git", + "url": "git://github.com/tcort/dijkstrajs" + }, + "keywords": [ + "dijkstra", + "shortest", + "path", + "search", + "graph" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/tcort/dijkstrajs/issues" + }, + "homepage": "https://github.com/tcort/dijkstrajs", + "devDependencies": { + "expect.js": "^0.3.1", + "jshint": "^2.13.6", + "mocha": "^10.2.0" + }, + "jshintConfig": { + "bitwise": true, + "curly": true, + "eqeqeq": true, + "forin": true, + "freeze": true, + "globalstrict": true, + "immed": true, + "indent": 4, + "moz": true, + "newcap": true, + "noarg": true, + "node": true, + "noempty": true, + "nonew": true, + "trailing": true, + "undef": true, + "smarttabs": true, + "strict": true, + "validthis": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false + } + } +} diff --git a/node_modules/dijkstrajs/test/dijkstra.test.js b/node_modules/dijkstrajs/test/dijkstra.test.js new file mode 100644 index 0000000..865c5a0 --- /dev/null +++ b/node_modules/dijkstrajs/test/dijkstra.test.js @@ -0,0 +1,96 @@ +'use strict'; + +var expect = require('expect.js'); +var dijkstra = require('../dijkstra.js'); +var find_path = dijkstra.find_path; + +describe('dijkstra.js', function () { + + describe('.find_path()', function () { + + it('should find the path between two points, all edges have weight 1', function () { + // A B C + // D E F + // G H I + var graph = { + a: {b: 10, d: 1}, + b: {a: 1, c: 1, e: 1}, + c: {b: 1, f: 1}, + d: {a: 1, e: 1, g: 1}, + e: {b: 1, d: 1, f: 1, h: 1}, + f: {c: 1, e: 1, i: 1}, + g: {d: 1, h: 1}, + h: {e: 1, g: 1, i: 1}, + i: {f: 1, h: 1} + }; + var path = find_path(graph, 'a', 'i'); + expect(path).to.eql(['a', 'd', 'e', 'f', 'i']); + }); + + it('should find the path between two points, weighted edges', function () { + var graph = { + a: {b: 10, c: 100, d: 1}, + b: {c: 10}, + d: {b: 1, e: 1}, + e: {f: 1}, + f: {c: 1}, + g: {b: 1} + }; + + var path = find_path(graph, 'a', 'c'); + expect(path).to.eql(['a', 'd', 'e', 'f', 'c']); + path = find_path(graph, 'd', 'b'); + expect(path).to.eql(['d', 'b']); + }); + + it('should throw on unreachable destination', function () { + var graph = { + a: {b: 10, c: 100, d: 1}, + b: {c: 10}, + d: {b: 1, e: 1}, + e: {f: 1}, + f: {c: 1}, + g: {b: 1} + }; + + expect(function () { find_path(graph, 'c', 'a'); }).to.throwException(); + expect(function () { find_path(graph, 'a', 'g'); }).to.throwException(); + }); + + it('should throw on non-existent destination', function () { + var graph = { + a: {b: 10, c: 100, d: 1}, + b: {c: 10}, + d: {b: 1, e: 1}, + e: {f: 1}, + f: {c: 1}, + g: {b: 1} + }; + + expect(function () { find_path(graph, 'a', 'z'); }).to.throwException(); + }); + }); + + describe('.single_source_shortest_paths()', function () { + it('should find all paths from a node', function () { + var graph = { + a: {b: 10, c: 100, d: 1}, + b: {c: 10}, + d: {b: 1, e: 1}, + e: {f: 1}, + f: {c: 1}, + g: {b: 1} + }; + + // All paths from 'a' + var paths = dijkstra.single_source_shortest_paths(graph, 'a'); + expect(paths).to.eql({ + d: 'a', + b: 'd', + e: 'd', + f: 'e', + c: 'f' + }); + }); + }); +}); diff --git a/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/emoji-regex/LICENSE-MIT.txt new file mode 100644 index 0000000..a41e0a7 --- /dev/null +++ b/node_modules/emoji-regex/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/emoji-regex/README.md b/node_modules/emoji-regex/README.md new file mode 100644 index 0000000..f10e173 --- /dev/null +++ b/node_modules/emoji-regex/README.md @@ -0,0 +1,73 @@ +# emoji-regex [![Build status](https://travis-ci.org/mathiasbynens/emoji-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/emoji-regex) + +_emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard. + +This repository contains a script that generates this regular expression based on [the data from Unicode v12](https://github.com/mathiasbynens/unicode-12.0.0). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install emoji-regex +``` + +In [Node.js](https://nodejs.org/): + +```js +const emojiRegex = require('emoji-regex'); +// Note: because the regular expression has the global flag set, this module +// exports a function that returns the regex rather than exporting the regular +// expression itself, to make it impossible to (accidentally) mutate the +// original regular expression. + +const text = ` +\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) +\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji +\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base) +\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier +`; + +const regex = emojiRegex(); +let match; +while (match = regex.exec(text)) { + const emoji = match[0]; + console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`); +} +``` + +Console output: + +``` +Matched sequence ⌚ — code points: 1 +Matched sequence ⌚ — code points: 1 +Matched sequence ↔️ — code points: 2 +Matched sequence ↔️ — code points: 2 +Matched sequence 👩 — code points: 1 +Matched sequence 👩 — code points: 1 +Matched sequence 👩🏿 — code points: 2 +Matched sequence 👩🏿 — code points: 2 +``` + +To match emoji in their textual representation as well (i.e. emoji that are not `Emoji_Presentation` symbols and that aren’t forced to render as emoji by a variation selector), `require` the other regex: + +```js +const emojiRegex = require('emoji-regex/text.js'); +``` + +Additionally, in environments which support ES2015 Unicode escapes, you may `require` ES2015-style versions of the regexes: + +```js +const emojiRegex = require('emoji-regex/es2015/index.js'); +const emojiRegexText = require('emoji-regex/es2015/text.js'); +``` + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +_emoji-regex_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/emoji-regex/es2015/index.js b/node_modules/emoji-regex/es2015/index.js new file mode 100644 index 0000000..b4cf3dc --- /dev/null +++ b/node_modules/emoji-regex/es2015/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = () => { + // https://mths.be/emoji + return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}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A}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; +}; diff --git a/node_modules/emoji-regex/es2015/text.js b/node_modules/emoji-regex/es2015/text.js new file mode 100644 index 0000000..780309d --- /dev/null +++ b/node_modules/emoji-regex/es2015/text.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = () => { + // https://mths.be/emoji + return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7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B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; +}; diff --git a/node_modules/emoji-regex/index.d.ts b/node_modules/emoji-regex/index.d.ts new file mode 100644 index 0000000..1955b47 --- /dev/null +++ b/node_modules/emoji-regex/index.d.ts @@ -0,0 +1,23 @@ +declare module 'emoji-regex' { + function emojiRegex(): RegExp; + + export default emojiRegex; +} + +declare module 'emoji-regex/text' { + function emojiRegex(): RegExp; + + export default emojiRegex; +} + +declare module 'emoji-regex/es2015' { + function emojiRegex(): RegExp; + + export default emojiRegex; +} + +declare module 'emoji-regex/es2015/text' { + function emojiRegex(): RegExp; + + export default emojiRegex; +} diff --git a/node_modules/emoji-regex/index.js b/node_modules/emoji-regex/index.js new file mode 100644 index 0000000..d993a3a --- /dev/null +++ b/node_modules/emoji-regex/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83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C74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; +}; diff --git a/node_modules/emoji-regex/package.json b/node_modules/emoji-regex/package.json new file mode 100644 index 0000000..6d32352 --- /dev/null +++ b/node_modules/emoji-regex/package.json @@ -0,0 +1,50 @@ +{ + "name": "emoji-regex", + "version": "8.0.0", + "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", + "homepage": "https://mths.be/emoji-regex", + "main": "index.js", + "types": "index.d.ts", + "keywords": [ + "unicode", + "regex", + "regexp", + "regular expressions", + "code points", + "symbols", + "characters", + "emoji" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/emoji-regex.git" + }, + "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", + "files": [ + "LICENSE-MIT.txt", + "index.js", + "index.d.ts", + "text.js", + "es2015/index.js", + "es2015/text.js" + ], + "scripts": { + "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", + "test": "mocha", + "test:watch": "npm run test -- --watch" + }, + "devDependencies": { + "@babel/cli": "^7.2.3", + "@babel/core": "^7.3.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", + "@babel/preset-env": "^7.3.4", + "mocha": "^6.0.2", + "regexgen": "^1.3.0", + "unicode-12.0.0": "^0.7.9" + } +} diff --git a/node_modules/emoji-regex/text.js b/node_modules/emoji-regex/text.js new file mode 100644 index 0000000..0a55ce2 --- /dev/null +++ b/node_modules/emoji-regex/text.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\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F(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; +}; diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md new file mode 100644 index 0000000..2027e8d --- /dev/null +++ b/node_modules/esbuild/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/esbuild/README.md b/node_modules/esbuild/README.md new file mode 100644 index 0000000..93863d1 --- /dev/null +++ b/node_modules/esbuild/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details. diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild new file mode 100644 index 0000000..3282e10 --- /dev/null +++ b/node_modules/esbuild/bin/esbuild @@ -0,0 +1,223 @@ +#!/usr/bin/env node +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var packageDarwin_arm64 = "@esbuild/darwin-arm64"; +var packageDarwin_x64 = "@esbuild/darwin-x64"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64", + "openharmony arm64 LE": "@esbuild/openharmony-arm64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM2 = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM2 = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM: isWASM2 }; +} +function pkgForSomeOtherPlatform() { + const libMainJS = require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + } + return null; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} +function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform(); + let binPath2; + try { + binPath2 = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath2 = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath2)) { + try { + require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath2)) { + let pnpapi; + try { + pnpapi = require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.28.2"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath2, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM: isWASM2 }; + } + } + return { binPath: binPath2, isWASM: isWASM2 }; +} + +// lib/npm/node-shim.ts +var { binPath, isWASM } = generateBinPath(); +if (isWASM) { + require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" }); +} else { + require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" }); +} diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js new file mode 100644 index 0000000..ee09eff --- /dev/null +++ b/node_modules/esbuild/install.js @@ -0,0 +1,300 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64", + "openharmony arm64 LE": "@esbuild/openharmony-arm64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} + +// lib/npm/node-install.ts +var fs2 = require("fs"); +var os2 = require("os"); +var path2 = require("path"); +var zlib = require("zlib"); +var https = require("https"); +var crypto = require("crypto"); +var child_process = require("child_process"); +var packageJSON = require(path2.join(__dirname, "package.json")); +var toPath = path2.join(__dirname, "bin", "esbuild"); +var isToPathJS = true; +function validateBinaryVersion(...command) { + command.push("--version"); + let stdout; + try { + stdout = child_process.execFileSync(command.shift(), command, { + // Without this, this install script strangely crashes with the error + // "EACCES: permission denied, write" but only on Ubuntu Linux when node is + // installed from the Snap Store. This is not a problem when you download + // the official version of node. The problem appears to be that stderr + // (i.e. file descriptor 2) isn't writable? + // + // More info: + // - https://snapcraft.io/ (what the Snap Store is) + // - https://nodejs.org/dist/ (download the official version of node) + // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 + // + stdio: "pipe" + }).toString().trim(); + } catch (err) { + if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { + let os3 = "this version of macOS"; + try { + os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); + } catch { + } + throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. + +The Go compiler (which esbuild relies on) no longer supports ${os3}, +which means the "esbuild" binary executable can't be run. You can either: + + * Update your version of macOS to one that the Go compiler supports + * Use the "esbuild-wasm" package instead of the "esbuild" package + * Build esbuild yourself using an older version of the Go compiler +`); + } + throw err; + } + if (stdout !== packageJSON.version) { + throw new Error(`Expected ${JSON.stringify(packageJSON.version)} but got ${JSON.stringify(stdout)}`); + } +} +function isYarn() { + const { npm_config_user_agent } = process.env; + if (npm_config_user_agent) { + return /\byarn\//.test(npm_config_user_agent); + } + return false; +} +function fetch(url) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) + return fetch(res.headers.location).then(resolve, reject); + if (res.statusCode !== 200) + return reject(new Error(`Server responded with ${res.statusCode}`)); + let chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => resolve(Buffer.concat(chunks))); + }).on("error", reject); + }); +} +function extractFileFromTarGzip(buffer, subpath) { + try { + buffer = zlib.unzipSync(buffer); + } catch (err) { + throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`); + } + let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, ""); + let offset = 0; + subpath = `package/${subpath}`; + while (offset < buffer.length) { + let name = str(offset, 100); + let size = parseInt(str(offset + 124, 12), 8); + offset += 512; + if (!isNaN(size) && size >= 0) { + if (name === subpath) return buffer.subarray(offset, offset + size); + offset += size + 511 & ~511; + } + } + throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); +} +function installUsingNPM(pkg, subpath, binPath) { + const env = { ...process.env, npm_config_global: void 0 }; + const esbuildLibDir = path2.dirname(require.resolve("esbuild")); + const installDir = path2.join(esbuildLibDir, "npm-install"); + fs2.mkdirSync(installDir); + try { + fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); + child_process.execSync( + `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${packageJSON.version}`, + { cwd: installDir, stdio: "pipe", env } + ); + const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); + binaryIntegrityCheck(pkg, subpath, fs2.readFileSync(installedBinPath)); + fs2.renameSync(installedBinPath, binPath); + } finally { + try { + removeRecursive(installDir); + } catch { + } + } +} +function removeRecursive(dir) { + for (const entry of fs2.readdirSync(dir)) { + const entryPath = path2.join(dir, entry); + let stats; + try { + stats = fs2.lstatSync(entryPath); + } catch { + continue; + } + if (stats.isDirectory()) removeRecursive(entryPath); + else fs2.unlinkSync(entryPath); + } + fs2.rmdirSync(dir); +} +function applyManualBinaryPathOverride(overridePath) { + const pathString = JSON.stringify(overridePath); + fs2.writeFileSync(toPath, `#!/usr/bin/env node +require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' }); +`); + const libMain = path2.join(__dirname, "lib", "main.js"); + const code = fs2.readFileSync(libMain, "utf8"); + fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString}; +${code}`); +} +function maybeOptimizePackage(binPath, isWASM) { + if (os2.platform() !== "win32" && !isYarn() && !isWASM) { + const tempPath = path2.join(__dirname, "bin-esbuild"); + try { + fs2.linkSync(binPath, tempPath); + fs2.renameSync(tempPath, toPath); + isToPathJS = false; + fs2.unlinkSync(tempPath); + } catch { + } + } +} +function binaryIntegrityCheck(pkg, subpath, bytes) { + const hash = crypto.createHash("sha256").update(bytes).digest("hex"); + const key = `${pkg}/${subpath}`; + const expected = packageJSON["esbuild.binaryHashes"][key]; + if (!expected) throw new Error(`Missing hash for "${key}"`); + if (hash !== expected) throw new Error(`"${hash.slice(0, 8)}..." doesn't match "${expected.slice(0, 8)}..." for "${pkg}"`); +} +async function downloadDirectlyFromNPM(pkg, subpath, binPath) { + const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${packageJSON.version}.tgz`; + console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); + try { + const bytes = extractFileFromTarGzip(await fetch(url), subpath); + binaryIntegrityCheck(pkg, subpath, bytes); + fs2.writeFileSync(binPath, bytes); + fs2.chmodSync(binPath, 493); + } catch (e) { + console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`); + throw e; + } +} +async function checkAndPreparePackage() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); + return; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + console.error(`[esbuild] Failed to find package "${pkg}" on the file system + +This can happen if you use the "--no-optional" flag. The "optionalDependencies" +package.json feature is used by esbuild to install the correct binary executable +for your current platform. This install script will now attempt to work around +this. If that fails, you need to remove the "--no-optional" flag to use esbuild. +`); + if (isWASM) throw new Error(`Failed to install package "${pkg}"`); + binPath = downloadedBinPath(pkg, subpath); + try { + console.error(`[esbuild] Trying to install package "${pkg}" using npm`); + installUsingNPM(pkg, subpath, binPath); + } catch (e2) { + console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`); + try { + await downloadDirectlyFromNPM(pkg, subpath, binPath); + } catch (e3) { + throw new Error(`Failed to install package "${pkg}"`); + } + } + } + maybeOptimizePackage(binPath, isWASM); +} +checkAndPreparePackage().then(() => { + if (isToPathJS) { + validateBinaryVersion(process.execPath, toPath); + } else { + validateBinaryVersion(toPath); + } +}); diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts new file mode 100644 index 0000000..9d9974b --- /dev/null +++ b/node_modules/esbuild/lib/main.d.ts @@ -0,0 +1,720 @@ +export type Platform = 'browser' | 'node' | 'neutral' +export type Format = 'iife' | 'cjs' | 'esm' +export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' +export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' +export type LogStyle = 'default' | 'visualstudio' +export type Charset = 'ascii' | 'utf8' +export type Drop = 'console' | 'debugger' +export type AbsPaths = 'code' | 'log' | 'metafile' + +interface CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcemap */ + sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' + /** Documentation: https://esbuild.github.io/api/#legal-comments */ + legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' + /** Documentation: https://esbuild.github.io/api/#source-root */ + sourceRoot?: string + /** Documentation: https://esbuild.github.io/api/#sources-content */ + sourcesContent?: boolean + + /** Documentation: https://esbuild.github.io/api/#format */ + format?: Format + /** Documentation: https://esbuild.github.io/api/#global-name */ + globalName?: string + /** Documentation: https://esbuild.github.io/api/#target */ + target?: string | string[] + /** Documentation: https://esbuild.github.io/api/#supported */ + supported?: Record + /** Documentation: https://esbuild.github.io/api/#platform */ + platform?: Platform + + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + reserveProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleQuoted?: boolean + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleCache?: Record + /** Documentation: https://esbuild.github.io/api/#drop */ + drop?: Drop[] + /** Documentation: https://esbuild.github.io/api/#drop-labels */ + dropLabels?: string[] + /** Documentation: https://esbuild.github.io/api/#minify */ + minify?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyWhitespace?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyIdentifiers?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifySyntax?: boolean + /** Documentation: https://esbuild.github.io/api/#line-limit */ + lineLimit?: number + /** Documentation: https://esbuild.github.io/api/#charset */ + charset?: Charset + /** Documentation: https://esbuild.github.io/api/#tree-shaking */ + treeShaking?: boolean + /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ + ignoreAnnotations?: boolean + + /** Documentation: https://esbuild.github.io/api/#jsx */ + jsx?: 'transform' | 'preserve' | 'automatic' + /** Documentation: https://esbuild.github.io/api/#jsx-factory */ + jsxFactory?: string + /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ + jsxFragment?: string + /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ + jsxImportSource?: string + /** Documentation: https://esbuild.github.io/api/#jsx-development */ + jsxDev?: boolean + /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ + jsxSideEffects?: boolean + + /** Documentation: https://esbuild.github.io/api/#define */ + define?: { [key: string]: string } + /** Documentation: https://esbuild.github.io/api/#pure */ + pure?: string[] + /** Documentation: https://esbuild.github.io/api/#keep-names */ + keepNames?: boolean + + /** Documentation: https://esbuild.github.io/api/#abs-paths */ + absPaths?: AbsPaths[] + /** Documentation: https://esbuild.github.io/api/#color */ + color?: boolean + /** Documentation: https://esbuild.github.io/api/#log-level */ + logLevel?: LogLevel + /** Documentation: https://esbuild.github.io/api/#log-limit */ + logLimit?: number + /** Documentation: https://esbuild.github.io/api/#log-override */ + logOverride?: Record + /** Documentation: https://esbuild.github.io/api/#log-style */ + logStyle?: LogStyle + + /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ + tsconfigRaw?: string | TsconfigRaw +} + +export interface TsconfigRaw { + compilerOptions?: { + alwaysStrict?: boolean + baseUrl?: string + experimentalDecorators?: boolean + importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' + jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' + jsxFactory?: string + jsxFragmentFactory?: string + jsxImportSource?: string + paths?: Record + preserveValueImports?: boolean + strict?: boolean + target?: string + useDefineForClassFields?: boolean + verbatimModuleSyntax?: boolean + } +} + +export interface BuildOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#bundle */ + bundle?: boolean + /** Documentation: https://esbuild.github.io/api/#splitting */ + splitting?: boolean + /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ + preserveSymlinks?: boolean + /** Documentation: https://esbuild.github.io/api/#outfile */ + outfile?: string + /** Documentation: https://esbuild.github.io/api/#metafile */ + metafile?: boolean + /** Documentation: https://esbuild.github.io/api/#outdir */ + outdir?: string + /** Documentation: https://esbuild.github.io/api/#outbase */ + outbase?: string + /** Documentation: https://esbuild.github.io/api/#external */ + external?: string[] + /** Documentation: https://esbuild.github.io/api/#packages */ + packages?: 'bundle' | 'external' + /** Documentation: https://esbuild.github.io/api/#alias */ + alias?: Record + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: { [ext: string]: Loader } + /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ + resolveExtensions?: string[] + /** Documentation: https://esbuild.github.io/api/#main-fields */ + mainFields?: string[] + /** Documentation: https://esbuild.github.io/api/#conditions */ + conditions?: string[] + /** Documentation: https://esbuild.github.io/api/#write */ + write?: boolean + /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ + allowOverwrite?: boolean + /** Documentation: https://esbuild.github.io/api/#tsconfig */ + tsconfig?: string + /** Documentation: https://esbuild.github.io/api/#out-extension */ + outExtension?: { [ext: string]: string } + /** Documentation: https://esbuild.github.io/api/#public-path */ + publicPath?: string + /** Documentation: https://esbuild.github.io/api/#entry-names */ + entryNames?: string + /** Documentation: https://esbuild.github.io/api/#chunk-names */ + chunkNames?: string + /** Documentation: https://esbuild.github.io/api/#asset-names */ + assetNames?: string + /** Documentation: https://esbuild.github.io/api/#inject */ + inject?: string[] + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#entry-points */ + entryPoints?: (string | { in: string, out: string })[] | Record + /** Documentation: https://esbuild.github.io/api/#stdin */ + stdin?: StdinOptions + /** Documentation: https://esbuild.github.io/plugins/ */ + plugins?: Plugin[] + /** Documentation: https://esbuild.github.io/api/#working-directory */ + absWorkingDir?: string + /** Documentation: https://esbuild.github.io/api/#node-paths */ + nodePaths?: string[]; // The "NODE_PATH" variable from Node.js +} + +export interface StdinOptions { + contents: string | Uint8Array + resolveDir?: string + sourcefile?: string + loader?: Loader +} + +export interface Message { + id: string + pluginName: string + text: string + location: Location | null + notes: Note[] + + /** + * Optional user-specified data that is passed through unmodified. You can + * use this to stash the original error, for example. + */ + detail: any +} + +export interface Note { + text: string + location: Location | null +} + +export interface Location { + file: string + namespace: string + /** 1-based */ + line: number + /** 0-based, in bytes */ + column: number + /** in bytes */ + length: number + lineText: string + suggestion: string +} + +export interface OutputFile { + path: string + contents: Uint8Array + hash: string + /** "contents" as text (changes automatically with "contents") */ + readonly text: string +} + +export interface BuildResult { + errors: Message[] + warnings: Message[] + /** Only when "write: false" */ + outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) + /** Only when "metafile: true" */ + metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) +} + +export interface BuildFailure extends Error { + errors: Message[] + warnings: Message[] +} + +/** Documentation: https://esbuild.github.io/api/#serve-arguments */ +export interface ServeOptions { + port?: number + host?: string + servedir?: string + keyfile?: string + certfile?: string + fallback?: string + cors?: CORSOptions + onRequest?: (args: ServeOnRequestArgs) => void +} + +/** Documentation: https://esbuild.github.io/api/#cors */ +export interface CORSOptions { + origin?: string | string[] +} + +export interface ServeOnRequestArgs { + remoteAddress: string + method: string + path: string + status: number + /** The time to generate the response, not to send it */ + timeInMS: number +} + +/** Documentation: https://esbuild.github.io/api/#serve-return-values */ +export interface ServeResult { + port: number + hosts: string[] +} + +export interface TransformOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcefile */ + sourcefile?: string + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: Loader + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: string + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: string +} + +export interface TransformResult { + code: string + map: string + warnings: Message[] + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) + /** Only when "legalComments" is "external" */ + legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) +} + +export interface TransformFailure extends Error { + errors: Message[] + warnings: Message[] +} + +export interface Plugin { + name: string + setup: (build: PluginBuild) => (void | Promise) +} + +export interface PluginBuild { + /** Documentation: https://esbuild.github.io/plugins/#build-options */ + initialOptions: BuildOptions + + /** Documentation: https://esbuild.github.io/plugins/#resolve */ + resolve(path: string, options?: ResolveOptions): Promise + + /** Documentation: https://esbuild.github.io/plugins/#on-start */ + onStart(callback: () => + (OnStartResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-end */ + onEnd(callback: (result: BuildResult) => + (OnEndResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ + onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => + (OnResolveResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-load */ + onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => + (OnLoadResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ + onDispose(callback: () => void): void + + // This is a full copy of the esbuild library in case you need it + esbuild: { + context: typeof context, + build: typeof build, + buildSync: typeof buildSync, + transform: typeof transform, + transformSync: typeof transformSync, + formatMessages: typeof formatMessages, + formatMessagesSync: typeof formatMessagesSync, + analyzeMetafile: typeof analyzeMetafile, + analyzeMetafileSync: typeof analyzeMetafileSync, + initialize: typeof initialize, + version: typeof version, + } +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ +export interface ResolveOptions { + pluginName?: string + importer?: string + namespace?: string + resolveDir?: string + kind?: ImportKind + pluginData?: any + with?: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ +export interface ResolveResult { + errors: Message[] + warnings: Message[] + + path: string + external: boolean + sideEffects: boolean + namespace: string + suffix: string + pluginData: any +} + +export interface OnStartResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +export interface OnEndResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ +export interface OnResolveOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ +export interface OnResolveArgs { + path: string + importer: string + namespace: string + resolveDir: string + kind: ImportKind + pluginData: any + with: Record +} + +export type ImportKind = + | 'entry-point' + + // JS + | 'import-statement' + | 'require-call' + | 'dynamic-import' + | 'require-resolve' + + // CSS + | 'import-rule' + | 'composes-from' + | 'url-token' + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ +export interface OnResolveResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + path?: string + external?: boolean + sideEffects?: boolean + namespace?: string + suffix?: string + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ +export interface OnLoadOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ +export interface OnLoadArgs { + path: string + namespace: string + suffix: string + pluginData: any + with: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ +export interface OnLoadResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + contents?: string | Uint8Array + resolveDir?: string + loader?: Loader + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +export interface PartialMessage { + id?: string + pluginName?: string + text?: string + location?: Partial | null + notes?: PartialNote[] + detail?: any +} + +export interface PartialNote { + text?: string + location?: Partial | null +} + +/** Documentation: https://esbuild.github.io/api/#metafile */ +export interface Metafile { + inputs: { + [path: string]: { + bytes: number + imports: { + path: string + kind: ImportKind + external?: boolean + original?: string + with?: Record + }[] + format?: 'cjs' | 'esm' + with?: Record + } + } + outputs: { + [path: string]: { + bytes: number + inputs: { + [path: string]: { + bytesInOutput: number + } + } + imports: { + path: string + kind: ImportKind | 'file-loader' + external?: boolean + }[] + exports: string[] + entryPoint?: string + cssBundle?: string + } + } +} + +export interface FormatMessagesOptions { + kind: 'error' | 'warning' + color?: boolean + terminalWidth?: number + logStyle?: LogStyle +} + +export interface AnalyzeMetafileOptions { + color?: boolean + verbose?: boolean +} + +/** Documentation: https://esbuild.github.io/api/#watch-arguments */ +export interface WatchOptions { + delay?: number // In milliseconds +} + +export interface BuildContext { + /** Documentation: https://esbuild.github.io/api/#rebuild */ + rebuild(): Promise> + + /** Documentation: https://esbuild.github.io/api/#watch */ + watch(options?: WatchOptions): Promise + + /** Documentation: https://esbuild.github.io/api/#serve */ + serve(options?: ServeOptions): Promise + + cancel(): Promise + dispose(): Promise +} + +// This is a TypeScript type-level function which replaces any keys in "In" +// that aren't in "Out" with "never". We use this to reject properties with +// typos in object literals. See: https://stackoverflow.com/questions/49580725 +type SameShape = In & { [Key in Exclude]: never } + +/** + * This function invokes the "esbuild" command-line tool for you. It returns a + * promise that either resolves with a "BuildResult" object or rejects with a + * "BuildFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function build(options: SameShape): Promise> + +/** + * This is the advanced long-running form of "build" that supports additional + * features such as watch mode and a local development server. + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function context(options: SameShape): Promise> + +/** + * This function transforms a single JavaScript file. It can be used to minify + * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript + * to older JavaScript. It returns a promise that is either resolved with a + * "TransformResult" object or rejected with a "TransformFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transform(input: string | Uint8Array, options?: SameShape): Promise> + +/** + * Converts log messages to formatted message strings suitable for printing in + * the terminal. This allows you to reuse the built-in behavior of esbuild's + * log message formatter. This is a batch-oriented API for efficiency. + * + * - Works in node: yes + * - Works in browser: yes + */ +export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise + +/** + * Pretty-prints an analysis of the metafile JSON to a string. This is just for + * convenience to be able to match esbuild's pretty-printing exactly. If you want + * to customize it, you can just inspect the data in the metafile yourself. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise + +/** + * A synchronous version of "build". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function buildSync(options: SameShape): BuildResult + +/** + * A synchronous version of "transform". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transformSync(input: string | Uint8Array, options?: SameShape): TransformResult + +/** + * A synchronous version of "formatMessages". + * + * - Works in node: yes + * - Works in browser: no + */ +export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] + +/** + * A synchronous version of "analyzeMetafile". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string + +/** + * This configures the browser-based version of esbuild. It is necessary to + * call this first and wait for the returned promise to be resolved before + * making other API calls when using esbuild in the browser. + * + * - Works in node: yes + * - Works in browser: yes ("options" is required) + * + * Documentation: https://esbuild.github.io/api/#browser + */ +export declare function initialize(options: InitializeOptions): Promise + +export interface InitializeOptions { + /** + * The URL of the "esbuild.wasm" file. This must be provided when running + * esbuild in the browser. + */ + wasmURL?: string | URL + + /** + * The result of calling "new WebAssembly.Module(buffer)" where "buffer" + * is a typed array or ArrayBuffer containing the binary code of the + * "esbuild.wasm" file. + * + * You can use this as an alternative to "wasmURL" for environments where it's + * not possible to download the WebAssembly module. + */ + wasmModule?: WebAssembly.Module + + /** + * By default esbuild runs the WebAssembly-based browser API in a web worker + * to avoid blocking the UI thread. This can be disabled by setting "worker" + * to false. + */ + worker?: boolean +} + +export let version: string + +// Call this function to terminate esbuild's child process. The child process +// is not terminated and re-created after each API call because it's more +// efficient to keep it around when there are multiple API calls. +// +// In node this happens automatically before the parent node process exits. So +// you only need to call this if you know you will not make any more esbuild +// API calls and you want to clean up resources. +// +// Unlike node, Deno lacks the necessary APIs to clean up child processes +// automatically. You must manually call stop() in Deno when you're done +// using esbuild or Deno will continue running forever. +// +// Another reason you might want to call this is if you are using esbuild from +// within a Deno test. Deno fails tests that create a child process without +// killing it before the test ends, so you have to call this function (and +// await the returned promise) in every Deno test that uses esbuild. +export declare function stop(): Promise + +// Note: These declarations exist to avoid type errors when you omit "dom" from +// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the +// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do +// with the browser DOM and is present in many non-browser JavaScript runtimes +// (e.g. node and deno). Declaring it here allows esbuild's API to be used in +// these scenarios. +// +// There's an open issue about getting this problem corrected (although these +// declarations will need to remain even if this is fixed for backward +// compatibility with older TypeScript versions): +// +// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826 +// +declare global { + namespace WebAssembly { + interface Module { + } + } + interface URL { + } +} diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js new file mode 100644 index 0000000..6126744 --- /dev/null +++ b/node_modules/esbuild/lib/main.js @@ -0,0 +1,2536 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/npm/node.ts +var node_exports = {}; +__export(node_exports, { + analyzeMetafile: () => analyzeMetafile, + analyzeMetafileSync: () => analyzeMetafileSync, + build: () => build, + buildSync: () => buildSync, + context: () => context, + default: () => node_default, + formatMessages: () => formatMessages, + formatMessagesSync: () => formatMessagesSync, + initialize: () => initialize, + stop: () => stop, + transform: () => transform, + transformSync: () => transformSync, + version: () => version +}); +module.exports = __toCommonJS(node_exports); + +// lib/shared/stdio_protocol.ts +function encodePacket(packet) { + let visit = (value) => { + if (value === null) { + bb.write8(0); + } else if (typeof value === "boolean") { + bb.write8(1); + bb.write8(+value); + } else if (typeof value === "number") { + bb.write8(2); + bb.write32(value | 0); + } else if (typeof value === "string") { + bb.write8(3); + bb.write(encodeUTF8(value)); + } else if (value instanceof Uint8Array) { + bb.write8(4); + bb.write(value); + } else if (value instanceof Array) { + bb.write8(5); + bb.write32(value.length); + for (let item of value) { + visit(item); + } + } else { + let keys = Object.keys(value); + bb.write8(6); + bb.write32(keys.length); + for (let key of keys) { + bb.write(encodeUTF8(key)); + visit(value[key]); + } + } + }; + let bb = new ByteBuffer(); + bb.write32(0); + bb.write32(packet.id << 1 | +!packet.isRequest); + visit(packet.value); + writeUInt32LE(bb.buf, bb.len - 4, 0); + return bb.buf.subarray(0, bb.len); +} +function decodePacket(bytes) { + let visit = () => { + switch (bb.read8()) { + case 0: + return null; + case 1: + return !!bb.read8(); + case 2: + return bb.read32(); + case 3: + return decodeUTF8(bb.read()); + case 4: + return bb.read(); + case 5: { + let count = bb.read32(); + let value2 = []; + for (let i = 0; i < count; i++) { + value2.push(visit()); + } + return value2; + } + case 6: { + let count = bb.read32(); + let value2 = {}; + for (let i = 0; i < count; i++) { + value2[decodeUTF8(bb.read())] = visit(); + } + return value2; + } + default: + throw new Error("Invalid packet"); + } + }; + let bb = new ByteBuffer(bytes); + let id = bb.read32(); + let isRequest = (id & 1) === 0; + id >>>= 1; + let value = visit(); + if (bb.ptr !== bytes.length) { + throw new Error("Invalid packet"); + } + return { id, isRequest, value }; +} +var ByteBuffer = class { + constructor(buf = new Uint8Array(1024)) { + this.buf = buf; + this.len = 0; + this.ptr = 0; + } + _write(delta) { + if (this.len + delta > this.buf.length) { + let clone = new Uint8Array((this.len + delta) * 2); + clone.set(this.buf); + this.buf = clone; + } + this.len += delta; + return this.len - delta; + } + write8(value) { + let offset = this._write(1); + this.buf[offset] = value; + } + write32(value) { + let offset = this._write(4); + writeUInt32LE(this.buf, value, offset); + } + write(bytes) { + let offset = this._write(4 + bytes.length); + writeUInt32LE(this.buf, bytes.length, offset); + this.buf.set(bytes, offset + 4); + } + _read(delta) { + if (this.ptr + delta > this.buf.length) { + throw new Error("Invalid packet"); + } + this.ptr += delta; + return this.ptr - delta; + } + read8() { + return this.buf[this._read(1)]; + } + read32() { + return readUInt32LE(this.buf, this._read(4)); + } + read() { + let length = this.read32(); + let bytes = new Uint8Array(length); + let ptr = this._read(bytes.length); + bytes.set(this.buf.subarray(ptr, ptr + length)); + return bytes; + } +}; +var encodeUTF8; +var decodeUTF8; +var encodeInvariant; +if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { + let encoder = new TextEncoder(); + let decoder = new TextDecoder(); + encodeUTF8 = (text) => encoder.encode(text); + decodeUTF8 = (bytes) => decoder.decode(bytes); + encodeInvariant = 'new TextEncoder().encode("")'; +} else if (typeof Buffer !== "undefined") { + encodeUTF8 = (text) => Buffer.from(text); + decodeUTF8 = (bytes) => { + let { buffer, byteOffset, byteLength } = bytes; + return Buffer.from(buffer, byteOffset, byteLength).toString(); + }; + encodeInvariant = 'Buffer.from("")'; +} else { + throw new Error("No UTF-8 codec found"); +} +if (!(encodeUTF8("") instanceof Uint8Array)) + throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false + +This indicates that your JavaScript environment is broken. You cannot use +esbuild in this environment because esbuild relies on this invariant. This +is not a problem with esbuild. You need to fix your environment instead. +`); +function readUInt32LE(buffer, offset) { + return (buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24) >>> 0; +} +function writeUInt32LE(buffer, value, offset) { + buffer[offset++] = value; + buffer[offset++] = value >> 8; + buffer[offset++] = value >> 16; + buffer[offset++] = value >> 24; +} + +// lib/shared/uint8array_json_parser.ts +var fromCharCode = String.fromCharCode; +function throwSyntaxError(bytes, index, message) { + const c = bytes[index]; + let line = 1; + let column = 0; + for (let i = 0; i < index; i++) { + if (bytes[i] === 10 /* Newline */) { + line++; + column = 0; + } else { + column++; + } + } + throw new SyntaxError( + message ? message : index === bytes.length ? "Unexpected end of input while parsing JSON" : c >= 32 && c <= 126 ? `Unexpected character ${fromCharCode(c)} in JSON at position ${index} (line ${line}, column ${column})` : `Unexpected byte 0x${c.toString(16)} in JSON at position ${index} (line ${line}, column ${column})` + ); +} +function JSON_parse(bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new Error(`JSON input must be a Uint8Array`); + } + const propertyStack = []; + const objectStack = []; + const stateStack = []; + const length = bytes.length; + let property = null; + let state = 0 /* TopLevel */; + let object; + let i = 0; + while (i < length) { + let c = bytes[i++]; + if (c <= 32 /* Space */) { + continue; + } + let value; + if (state === 2 /* Object */ && property === null && c !== 34 /* Quote */ && c !== 125 /* CloseBrace */) { + throwSyntaxError(bytes, --i); + } + switch (c) { + // True + case 116 /* LowerT */: { + if (bytes[i++] !== 114 /* LowerR */ || bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 101 /* LowerE */) { + throwSyntaxError(bytes, --i); + } + value = true; + break; + } + // False + case 102 /* LowerF */: { + if (bytes[i++] !== 97 /* LowerA */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 115 /* LowerS */ || bytes[i++] !== 101 /* LowerE */) { + throwSyntaxError(bytes, --i); + } + value = false; + break; + } + // Null + case 110 /* LowerN */: { + if (bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 108 /* LowerL */) { + throwSyntaxError(bytes, --i); + } + value = null; + break; + } + // Number begin + case 45 /* Minus */: + case 46 /* Dot */: + case 48 /* Digit0 */: + case 49 /* Digit1 */: + case 50 /* Digit2 */: + case 51 /* Digit3 */: + case 52 /* Digit4 */: + case 53 /* Digit5 */: + case 54 /* Digit6 */: + case 55 /* Digit7 */: + case 56 /* Digit8 */: + case 57 /* Digit9 */: { + let index = i; + value = fromCharCode(c); + c = bytes[i]; + while (true) { + switch (c) { + case 43 /* Plus */: + case 45 /* Minus */: + case 46 /* Dot */: + case 48 /* Digit0 */: + case 49 /* Digit1 */: + case 50 /* Digit2 */: + case 51 /* Digit3 */: + case 52 /* Digit4 */: + case 53 /* Digit5 */: + case 54 /* Digit6 */: + case 55 /* Digit7 */: + case 56 /* Digit8 */: + case 57 /* Digit9 */: + case 101 /* LowerE */: + case 69 /* UpperE */: { + value += fromCharCode(c); + c = bytes[++i]; + continue; + } + } + break; + } + value = +value; + if (isNaN(value)) { + throwSyntaxError(bytes, --index, "Invalid number"); + } + break; + } + // String begin + case 34 /* Quote */: { + value = ""; + while (true) { + if (i >= length) { + throwSyntaxError(bytes, length); + } + c = bytes[i++]; + if (c === 34 /* Quote */) { + break; + } else if (c === 92 /* Backslash */) { + switch (bytes[i++]) { + // Normal escape sequence + case 34 /* Quote */: + value += '"'; + break; + case 47 /* Slash */: + value += "/"; + break; + case 92 /* Backslash */: + value += "\\"; + break; + case 98 /* LowerB */: + value += "\b"; + break; + case 102 /* LowerF */: + value += "\f"; + break; + case 110 /* LowerN */: + value += "\n"; + break; + case 114 /* LowerR */: + value += "\r"; + break; + case 116 /* LowerT */: + value += " "; + break; + // Unicode escape sequence + case 117 /* LowerU */: { + let code = 0; + for (let j = 0; j < 4; j++) { + c = bytes[i++]; + code <<= 4; + if (c >= 48 /* Digit0 */ && c <= 57 /* Digit9 */) code |= c - 48 /* Digit0 */; + else if (c >= 97 /* LowerA */ && c <= 102 /* LowerF */) code |= c + (10 - 97 /* LowerA */); + else if (c >= 65 /* UpperA */ && c <= 70 /* UpperF */) code |= c + (10 - 65 /* UpperA */); + else throwSyntaxError(bytes, --i); + } + value += fromCharCode(code); + break; + } + // Invalid escape sequence + default: + throwSyntaxError(bytes, --i); + break; + } + } else if (c <= 127) { + value += fromCharCode(c); + } else if ((c & 224) === 192) { + value += fromCharCode((c & 31) << 6 | bytes[i++] & 63); + } else if ((c & 240) === 224) { + value += fromCharCode((c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63); + } else if ((c & 248) == 240) { + let codePoint = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; + if (codePoint > 65535) { + codePoint -= 65536; + value += fromCharCode(codePoint >> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + value += fromCharCode(codePoint); + } + } + value[0]; + break; + } + // Array begin + case 91 /* OpenBracket */: { + value = []; + propertyStack.push(property); + objectStack.push(object); + stateStack.push(state); + property = null; + object = value; + state = 1 /* Array */; + continue; + } + // Object begin + case 123 /* OpenBrace */: { + value = {}; + propertyStack.push(property); + objectStack.push(object); + stateStack.push(state); + property = null; + object = value; + state = 2 /* Object */; + continue; + } + // Array end + case 93 /* CloseBracket */: { + if (state !== 1 /* Array */) { + throwSyntaxError(bytes, --i); + } + value = object; + property = propertyStack.pop(); + object = objectStack.pop(); + state = stateStack.pop(); + break; + } + // Object end + case 125 /* CloseBrace */: { + if (state !== 2 /* Object */) { + throwSyntaxError(bytes, --i); + } + value = object; + property = propertyStack.pop(); + object = objectStack.pop(); + state = stateStack.pop(); + break; + } + default: { + throwSyntaxError(bytes, --i); + } + } + c = bytes[i]; + while (c <= 32 /* Space */) { + c = bytes[++i]; + } + switch (state) { + case 0 /* TopLevel */: { + if (i === length) { + return value; + } + break; + } + case 1 /* Array */: { + object.push(value); + if (c === 44 /* Comma */) { + i++; + continue; + } + if (c === 93 /* CloseBracket */) { + continue; + } + break; + } + case 2 /* Object */: { + if (property === null) { + property = value; + if (c === 58 /* Colon */) { + i++; + continue; + } + } else { + object[property] = value; + property = null; + if (c === 44 /* Comma */) { + i++; + continue; + } + if (c === 125 /* CloseBrace */) { + continue; + } + } + break; + } + } + break; + } + throwSyntaxError(bytes, i); +} + +// lib/shared/common.ts +var quote = JSON.stringify; +var buildLogLevelDefault = "warning"; +var transformLogLevelDefault = "silent"; +function validateAndJoinStringArray(values, what) { + const toJoin = []; + for (const value of values) { + validateStringValue(value, what); + if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`); + toJoin.push(value); + } + return toJoin.join(","); +} +var canBeAnything = () => null; +var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; +var mustBeString = (value) => typeof value === "string" ? null : "a string"; +var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; +var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; +var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number"; +var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; +var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; +var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings"; +var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; +var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; +var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; +var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; +var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; +var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; +var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings"; +var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; +var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; +function getFlag(object, keys, key, mustBeFn) { + let value = object[key]; + keys[key + ""] = true; + if (value === void 0) return void 0; + let mustBe = mustBeFn(value); + if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); + return value; +} +function checkForInvalidFlags(object, keys, where) { + for (let key in object) { + if (!(key in keys)) { + throw new Error(`Invalid option ${where}: ${quote(key)}`); + } + } +} +function validateInitializeOptions(options) { + let keys = /* @__PURE__ */ Object.create(null); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); + let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let worker = getFlag(options, keys, "worker", mustBeBoolean); + checkForInvalidFlags(options, keys, "in initialize() call"); + return { + wasmURL, + wasmModule, + worker + }; +} +function validateMangleCache(mangleCache) { + let validated; + if (mangleCache !== void 0) { + validated = /* @__PURE__ */ Object.create(null); + for (let key in mangleCache) { + let value = mangleCache[key]; + if (typeof value === "string" || value === false) { + validated[key] = value; + } else { + throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); + } + } + } + return validated; +} +function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { + let color = getFlag(options, keys, "color", mustBeBoolean); + let logLevel = getFlag(options, keys, "logLevel", mustBeString); + let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); + let logStyle = getFlag(options, keys, "logStyle", mustBeString); + if (color !== void 0) flags.push(`--color=${color}`); + else if (isTTY2) flags.push(`--color=true`); + flags.push(`--log-level=${logLevel || logLevelDefault}`); + flags.push(`--log-limit=${logLimit || 0}`); + if (logStyle) flags.push(`--log-style=${logStyle}`); +} +function validateStringValue(value, what, key) { + if (typeof value !== "string") { + throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); + } + return value; +} +function pushCommonFlags(flags, options, keys) { + let legalComments = getFlag(options, keys, "legalComments", mustBeString); + let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); + let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); + let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings); + let format = getFlag(options, keys, "format", mustBeString); + let globalName = getFlag(options, keys, "globalName", mustBeString); + let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); + let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); + let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); + let minify = getFlag(options, keys, "minify", mustBeBoolean); + let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); + let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); + let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); + let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); + let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings); + let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings); + let charset = getFlag(options, keys, "charset", mustBeString); + let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); + let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); + let jsx = getFlag(options, keys, "jsx", mustBeString); + let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); + let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); + let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); + let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); + let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); + let define = getFlag(options, keys, "define", mustBeObject); + let logOverride = getFlag(options, keys, "logOverride", mustBeObject); + let supported = getFlag(options, keys, "supported", mustBeObject); + let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings); + let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); + let platform = getFlag(options, keys, "platform", mustBeString); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); + let absPaths = getFlag(options, keys, "absPaths", mustBeArrayOfStrings); + if (legalComments) flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); + if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`); + if (format) flags.push(`--format=${format}`); + if (globalName) flags.push(`--global-name=${globalName}`); + if (platform) flags.push(`--platform=${platform}`); + if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (minify) flags.push("--minify"); + if (minifySyntax) flags.push("--minify-syntax"); + if (minifyWhitespace) flags.push("--minify-whitespace"); + if (minifyIdentifiers) flags.push("--minify-identifiers"); + if (lineLimit) flags.push(`--line-limit=${lineLimit}`); + if (charset) flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) flags.push(`--ignore-annotations`); + if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); + if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`); + if (absPaths) flags.push(`--abs-paths=${validateAndJoinStringArray(absPaths, "abs paths")}`); + if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`); + if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`); + if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); + if (jsx) flags.push(`--jsx=${jsx}`); + if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); + if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); + if (jsxDev) flags.push(`--jsx-dev`); + if (jsxSideEffects) flags.push(`--jsx-side-effects`); + if (define) { + for (let key in define) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + } + } + if (logOverride) { + for (let key in logOverride) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); + flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); + } + } + if (supported) { + for (let key in supported) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); + const value = supported[key]; + if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); + flags.push(`--supported:${key}=${value}`); + } + } + if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); + if (keepNames) flags.push(`--keep-names`); +} +function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { + var _a2; + let flags = []; + let entries = []; + let keys = /* @__PURE__ */ Object.create(null); + let stdinContents = null; + let stdinResolveDir = null; + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let splitting = getFlag(options, keys, "splitting", mustBeBoolean); + let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); + let metafile = getFlag(options, keys, "metafile", mustBeBoolean); + let outfile = getFlag(options, keys, "outfile", mustBeString); + let outdir = getFlag(options, keys, "outdir", mustBeString); + let outbase = getFlag(options, keys, "outbase", mustBeString); + let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); + let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings); + let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings); + let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings); + let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings); + let external = getFlag(options, keys, "external", mustBeArrayOfStrings); + let packages = getFlag(options, keys, "packages", mustBeString); + let alias = getFlag(options, keys, "alias", mustBeObject); + let loader = getFlag(options, keys, "loader", mustBeObject); + let outExtension = getFlag(options, keys, "outExtension", mustBeObject); + let publicPath = getFlag(options, keys, "publicPath", mustBeString); + let entryNames = getFlag(options, keys, "entryNames", mustBeString); + let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); + let assetNames = getFlag(options, keys, "assetNames", mustBeString); + let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings); + let banner = getFlag(options, keys, "banner", mustBeObject); + let footer = getFlag(options, keys, "footer", mustBeObject); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); + let stdin = getFlag(options, keys, "stdin", mustBeObject); + let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; + let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + keys.plugins = true; + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) flags.push("--bundle"); + if (allowOverwrite) flags.push("--allow-overwrite"); + if (splitting) flags.push("--splitting"); + if (preserveSymlinks) flags.push("--preserve-symlinks"); + if (metafile) flags.push(`--metafile`); + if (outfile) flags.push(`--outfile=${outfile}`); + if (outdir) flags.push(`--outdir=${outdir}`); + if (outbase) flags.push(`--outbase=${outbase}`); + if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); + if (packages) flags.push(`--packages=${packages}`); + if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`); + if (publicPath) flags.push(`--public-path=${publicPath}`); + if (entryNames) flags.push(`--entry-names=${entryNames}`); + if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) flags.push(`--asset-names=${assetNames}`); + if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`); + if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`); + if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); + if (alias) { + for (let old in alias) { + if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); + flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); + } + } + if (banner) { + for (let type in banner) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + } + } + if (footer) { + for (let type in footer) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + } + } + if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (loader) { + for (let ext in loader) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + } + } + if (outExtension) { + for (let ext in outExtension) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + } + } + if (entryPoints) { + if (Array.isArray(entryPoints)) { + for (let i = 0, n = entryPoints.length; i < n; i++) { + let entryPoint = entryPoints[i]; + if (typeof entryPoint === "object" && entryPoint !== null) { + let entryPointKeys = /* @__PURE__ */ Object.create(null); + let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); + let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); + checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); + if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); + if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); + entries.push([output, input]); + } else { + entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); + } + } + } else { + for (let key in entryPoints) { + entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + } + } + } + if (stdin) { + let stdinKeys = /* @__PURE__ */ Object.create(null); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); + let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); + let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); + checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader2) flags.push(`--loader=${loader2}`); + if (resolveDir) stdinResolveDir = resolveDir; + if (typeof contents === "string") stdinContents = encodeUTF8(contents); + else if (contents instanceof Uint8Array) stdinContents = contents; + } + let nodePaths = []; + if (nodePathsInput) { + for (let value of nodePathsInput) { + value += ""; + nodePaths.push(value); + } + } + return { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache: validateMangleCache(mangleCache) + }; +} +function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { + let flags = []; + let keys = /* @__PURE__ */ Object.create(null); + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); + let loader = getFlag(options, keys, "loader", mustBeString); + let banner = getFlag(options, keys, "banner", mustBeString); + let footer = getFlag(options, keys, "footer", mustBeString); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader) flags.push(`--loader=${loader}`); + if (banner) flags.push(`--banner=${banner}`); + if (footer) flags.push(`--footer=${footer}`); + return { + flags, + mangleCache: validateMangleCache(mangleCache) + }; +} +function createChannel(streamIn) { + const requestCallbacksByKey = {}; + const closeData = { didClose: false, reason: "" }; + let responseCallbacks = {}; + let nextRequestID = 0; + let nextBuildKey = 0; + let stdout = new Uint8Array(16 * 1024); + let stdoutUsed = 0; + let readFromStdout = (chunk) => { + let limit = stdoutUsed + chunk.length; + if (limit > stdout.length) { + let swap = new Uint8Array(limit * 2); + swap.set(stdout); + stdout = swap; + } + stdout.set(chunk, stdoutUsed); + stdoutUsed += chunk.length; + let offset = 0; + while (offset + 4 <= stdoutUsed) { + let length = readUInt32LE(stdout, offset); + if (offset + 4 + length > stdoutUsed) { + break; + } + offset += 4; + handleIncomingPacket(stdout.subarray(offset, offset + length)); + offset += length; + } + if (offset > 0) { + stdout.copyWithin(0, offset, stdoutUsed); + stdoutUsed -= offset; + } + }; + let afterClose = (error) => { + closeData.didClose = true; + if (error) closeData.reason = ": " + (error.message || error); + const text = "The service was stopped" + closeData.reason; + for (let id in responseCallbacks) { + responseCallbacks[id](text, null); + } + responseCallbacks = {}; + }; + let sendRequest = (refs, value, callback) => { + if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); + let id = nextRequestID++; + responseCallbacks[id] = (error, response) => { + try { + callback(error, response); + } finally { + if (refs) refs.unref(); + } + }; + if (refs) refs.ref(); + streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); + }; + let sendResponse = (id, value) => { + if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); + streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); + }; + let handleRequest = async (id, request) => { + try { + if (request.command === "ping") { + sendResponse(id, {}); + return; + } + if (typeof request.key === "number") { + const requestCallbacks = requestCallbacksByKey[request.key]; + if (!requestCallbacks) { + return; + } + const callback = requestCallbacks[request.command]; + if (callback) { + await callback(id, request); + return; + } + } + throw new Error(`Invalid command: ` + request.command); + } catch (e) { + const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; + try { + sendResponse(id, { errors }); + } catch { + } + } + }; + let isFirstPacket = true; + let handleIncomingPacket = (bytes) => { + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); + if (binaryVersion !== "0.28.2") { + throw new Error(`Cannot start service: Host version "${"0.28.2"}" does not match binary version ${quote(binaryVersion)}`); + } + return; + } + let packet = decodePacket(bytes); + if (packet.isRequest) { + handleRequest(packet.id, packet.value); + } else { + let callback = responseCallbacks[packet.id]; + delete responseCallbacks[packet.id]; + if (packet.value.error) callback(packet.value.error, {}); + else callback(null, packet.value); + } + }; + let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { + let refCount = 0; + const buildKey = nextBuildKey++; + const requestCallbacks = {}; + const buildRefs = { + ref() { + if (++refCount === 1) { + if (refs) refs.ref(); + } + }, + unref() { + if (--refCount === 0) { + delete requestCallbacksByKey[buildKey]; + if (refs) refs.unref(); + } + } + }; + requestCallbacksByKey[buildKey] = requestCallbacks; + buildRefs.ref(); + buildOrContextImpl( + callName, + buildKey, + sendRequest, + sendResponse, + buildRefs, + streamIn, + requestCallbacks, + options, + isTTY2, + defaultWD2, + (err, res) => { + try { + callback(err, res); + } finally { + buildRefs.unref(); + } + } + ); + }; + let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { + const details = createObjectStash(); + let start = (inputPath) => { + try { + if (typeof input !== "string" && !(input instanceof Uint8Array)) + throw new Error('The input to "transform" must be a string or a Uint8Array'); + let { + flags, + mangleCache + } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + let request = { + command: "transform", + flags, + inputFS: inputPath !== null, + input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + }; + if (mangleCache) request.mangleCache = mangleCache; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + let errors = replaceDetailsInMessages(response.errors, details); + let warnings = replaceDetailsInMessages(response.warnings, details); + let outstanding = 1; + let next = () => { + if (--outstanding === 0) { + let result = { + warnings, + code: response.code, + map: response.map, + mangleCache: void 0, + legalComments: void 0 + }; + if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; + if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; + callback(null, result); + } + }; + if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + if (response.codeFS) { + outstanding++; + fs3.readFile(response.code, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.code = contents; + next(); + } + }); + } + if (response.mapFS) { + outstanding++; + fs3.readFile(response.map, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.map = contents; + next(); + } + }); + } + next(); + }); + } catch (e) { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); + } catch { + } + const error = extractErrorMessageV8(e, streamIn, details, void 0, ""); + sendRequest(refs, { command: "error", flags, error }, () => { + error.detail = details.load(error.detail); + callback(failureErrorWithLog("Transform failed", [error], []), null); + }); + } + }; + if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + let next = start; + start = () => fs3.writeFile(input, next); + } + start(null); + }; + let formatMessages2 = ({ callName, refs, messages, options, callback }) => { + if (!options) throw new Error(`Missing second argument in ${callName}() call`); + let keys = {}; + let kind = getFlag(options, keys, "kind", mustBeString); + let color = getFlag(options, keys, "color", mustBeBoolean); + let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); + let logStyle = getFlag(options, keys, "logStyle", mustBeString); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + let request = { + command: "format-msgs", + messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + isWarning: kind === "warning" + }; + if (color !== void 0) request.color = color; + if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; + if (logStyle !== void 0) request.logStyle = logStyle; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.messages); + }); + }; + let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { + if (options === void 0) options = {}; + let keys = {}; + let color = getFlag(options, keys, "color", mustBeBoolean); + let verbose = getFlag(options, keys, "verbose", mustBeBoolean); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + let request = { + command: "analyze-metafile", + metafile + }; + if (color !== void 0) request.color = color; + if (verbose !== void 0) request.verbose = verbose; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.result); + }); + }; + return { + readFromStdout, + afterClose, + service: { + buildOrContext, + transform: transform2, + formatMessages: formatMessages2, + analyzeMetafile: analyzeMetafile2 + } + }; +} +function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { + const details = createObjectStash(); + const isContext = callName === "context"; + const handleError = (e, pluginName) => { + const flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); + }); + }; + let plugins; + if (typeof options === "object") { + const value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); + plugins = value; + } + } + if (plugins && plugins.length > 0) { + if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins( + buildKey, + sendRequest, + sendResponse, + refs, + streamIn, + requestCallbacks, + options, + plugins, + details + ).then( + (result) => { + if (!result.ok) return handleError(result.error, result.pluginName); + try { + buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); + } catch (e) { + handleError(e, ""); + } + }, + (e) => handleError(e, "") + ); + return; + } + try { + buildOrContextContinue(null, (result, done) => done([], []), () => { + }); + } catch (e) { + handleError(e, ""); + } + function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { + const writeDefault = streamIn.hasFS; + const { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); + const request = { + command: "build", + key: buildKey, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + nodePaths, + context: isContext + }; + if (requestPlugins) request.plugins = requestPlugins; + if (mangleCache) request.mangleCache = mangleCache; + const buildResponseToResult = (response, callback2) => { + const result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + outputFiles: void 0, + metafile: void 0, + mangleCache: void 0 + }; + const originalErrors = result.errors.slice(); + const originalWarnings = result.warnings.slice(); + if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile && response.metafile.length) result.metafile = parseJSON(response.metafile); + if (response.mangleCache) result.mangleCache = response.mangleCache; + if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { + if (originalErrors.length > 0 || onEndErrors.length > 0) { + const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); + return callback2(error, null, onEndErrors, onEndWarnings); + } + callback2(null, result, onEndErrors, onEndWarnings); + }); + }; + let latestResultPromise; + let provideLatestResult; + if (isContext) + requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { + buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { + const response = { + errors: onEndErrors, + warnings: onEndWarnings + }; + if (provideLatestResult) provideLatestResult(err, result); + latestResultPromise = void 0; + provideLatestResult = void 0; + sendResponse(id, response); + resolve(); + }); + }); + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + if (!isContext) { + return buildResponseToResult(response, (err, res) => { + scheduleOnDisposeCallbacks(); + return callback(err, res); + }); + } + if (response.errors.length > 0) { + return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); + } + let didDispose = false; + const result = { + rebuild: () => { + if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => { + let settlePromise; + provideLatestResult = (err, result2) => { + if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2); + }; + const triggerAnotherBuild = () => { + const request2 = { + command: "rebuild", + key: buildKey + }; + sendRequest(refs, request2, (error2, response2) => { + if (error2) { + reject(new Error(error2)); + } else if (settlePromise) { + settlePromise(); + } else { + triggerAnotherBuild(); + } + }); + }; + triggerAnotherBuild(); + }); + return latestResultPromise; + }, + watch: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); + const keys = {}; + const delay = getFlag(options2, keys, "delay", mustBeInteger); + checkForInvalidFlags(options2, keys, `in watch() call`); + const request2 = { + command: "watch", + key: buildKey + }; + if (delay) request2.delay = delay; + sendRequest(refs, request2, (error2) => { + if (error2) reject(new Error(error2)); + else resolve(void 0); + }); + }), + serve: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); + const keys = {}; + const port = getFlag(options2, keys, "port", mustBeValidPortNumber); + const host = getFlag(options2, keys, "host", mustBeString); + const servedir = getFlag(options2, keys, "servedir", mustBeString); + const keyfile = getFlag(options2, keys, "keyfile", mustBeString); + const certfile = getFlag(options2, keys, "certfile", mustBeString); + const fallback = getFlag(options2, keys, "fallback", mustBeString); + const cors = getFlag(options2, keys, "cors", mustBeObject); + const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); + checkForInvalidFlags(options2, keys, `in serve() call`); + const request2 = { + command: "serve", + key: buildKey, + onRequest: !!onRequest + }; + if (port !== void 0) request2.port = port; + if (host !== void 0) request2.host = host; + if (servedir !== void 0) request2.servedir = servedir; + if (keyfile !== void 0) request2.keyfile = keyfile; + if (certfile !== void 0) request2.certfile = certfile; + if (fallback !== void 0) request2.fallback = fallback; + if (cors) { + const corsKeys = {}; + const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings); + checkForInvalidFlags(cors, corsKeys, `on "cors" object`); + if (Array.isArray(origin)) request2.corsOrigin = origin; + else if (origin !== void 0) request2.corsOrigin = [origin]; + } + sendRequest(refs, request2, (error2, response2) => { + if (error2) return reject(new Error(error2)); + if (onRequest) { + requestCallbacks["serve-request"] = (id, request3) => { + onRequest(request3.args); + sendResponse(id, {}); + }; + } + resolve(response2); + }); + }), + cancel: () => new Promise((resolve) => { + if (didDispose) return resolve(); + const request2 = { + command: "cancel", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + }); + }), + dispose: () => new Promise((resolve) => { + if (didDispose) return resolve(); + didDispose = true; + const request2 = { + command: "dispose", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + scheduleOnDisposeCallbacks(); + refs.unref(); + }); + }) + }; + refs.ref(); + callback(null, result); + }); + } +} +var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let onDisposeCallbacks = []; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); + let plugin = { + name, + onStart: false, + onEnd: false, + onResolve: [], + onLoad: [] + }; + i++; + let resolve = (path3, options = {}) => { + if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + let importAttributes = getFlag(options, keys2, "with", mustBeObject); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve2, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) request.pluginName = pluginName; + if (importer != null) request.importer = importer; + if (namespace != null) request.namespace = namespace; + if (resolveDir != null) request.resolveDir = resolveDir; + if (kind != null) request.kind = kind; + else throw new Error(`Must specify "kind" when calling "resolve"`); + if (pluginData != null) request.pluginData = details.store(pluginData); + if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); + sendRequest(refs, request, (error, response) => { + if (error !== null) reject(new Error(error)); + else resolve2({ + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: details.load(response.pluginData) + }); + }); + }); + }; + let promise = setup({ + initialOptions, + resolve, + onStart(callback) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback, note: registeredNote }); + plugin.onStart = true; + }, + onEnd(callback) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback, note: registeredNote }); + plugin.onEnd = true; + }, + onResolve(options, callback) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onLoad(options, callback) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onDispose(callback) { + onDisposeCallbacks.push(callback); + }, + esbuild: streamIn.esbuild + }); + if (promise) await promise; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + requestCallbacks["on-start"] = async (id, request) => { + details.clear(); + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { + try { + let result = await callback(); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); + if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); + if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); + } + })); + sendResponse(id, response); + }; + requestCallbacks["on-resolve"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onResolveCallbacks[id2]); + let result = await callback({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (path3 != null) response.path = path3; + if (namespace != null) response.namespace = namespace; + if (suffix != null) response.suffix = suffix; + if (external != null) response.external = external; + if (sideEffects != null) response.sideEffects = sideEffects; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + requestCallbacks["on-load"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onLoadCallbacks[id2]); + let result = await callback({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (contents instanceof Uint8Array) response.contents = contents; + else if (contents != null) response.contents = encodeUTF8(contents); + if (resolveDir != null) response.resolveDir = resolveDir; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (loader != null) response.loader = loader; + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + let runOnEndCallbacks = (result, done) => done([], []); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, done) => { + (async () => { + const onEndErrors = []; + const onEndWarnings = []; + for (const { name, callback, note } of onEndCallbacks) { + let newErrors; + let newWarnings; + try { + const value = await callback(result); + if (value != null) { + if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(value, keys, "errors", mustBeArray); + let warnings = getFlag(value, keys, "warnings", mustBeArray); + checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); + if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + } + } catch (e) { + newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; + } + if (newErrors) { + onEndErrors.push(...newErrors); + try { + result.errors.push(...newErrors); + } catch { + } + } + if (newWarnings) { + onEndWarnings.push(...newWarnings); + try { + result.warnings.push(...newWarnings); + } catch { + } + } + } + done(onEndErrors, onEndWarnings); + })(); + }; + } + let scheduleOnDisposeCallbacks = () => { + for (const cb of onDisposeCallbacks) { + setTimeout(() => cb(), 0); + } + }; + isSetupDone = true; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + scheduleOnDisposeCallbacks + }; +}; +function createObjectStash() { + const map = /* @__PURE__ */ new Map(); + let nextID = 0; + return { + clear() { + map.clear(); + }, + load(id) { + return map.get(id); + }, + store(value) { + if (value === void 0) return -1; + const id = nextID++; + map.set(id, value); + return id; + } + }; +} +function extractCallerV8(e, streamIn, ident) { + let note; + let tried = false; + return () => { + if (tried) return note; + tried = true; + try { + let lines = (e.stack + "").split("\n"); + lines.splice(1, 1); + let location = parseStackLinesV8(streamIn, lines, ident); + if (location) { + note = { text: e.message, location }; + return note; + } + } catch { + } + }; +} +function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { + let text = "Internal error"; + let location = null; + try { + text = (e && e.message || e) + ""; + } catch { + } + try { + location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); + } catch { + } + return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; +} +function parseStackLinesV8(streamIn, lines, ident) { + let at = " at "; + if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { + for (let i = 1; i < lines.length; i++) { + let line = lines[i]; + if (!line.startsWith(at)) continue; + line = line.slice(at.length); + while (true) { + let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^(\S+):(\d+):(\d+)$/.exec(line); + if (match) { + let contents; + try { + contents = streamIn.readFileSync(match[1], "utf8"); + } catch { + break; + } + let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; + let column = +match[3] - 1; + let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; + return { + file: match[1], + namespace: "file", + line: +match[2], + column: encodeUTF8(lineText.slice(0, column)).length, + length: encodeUTF8(lineText.slice(column, column + length)).length, + lineText: lineText + "\n" + lines.slice(1).join("\n"), + suggestion: "" + }; + } + break; + } + } + } + return null; +} +function failureErrorWithLog(text, errors, warnings) { + let limit = 5; + text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) return "\n..."; + if (!e.location) return ` +error: ${e.text}`; + let { file, line, column } = e.location; + let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; + return ` +${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; + }).join(""); + let error = new Error(text); + for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { + Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + get: () => value, + set: (value2) => Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + value: value2 + }) + }); + } + return error; +} +function replaceDetailsInMessages(messages, stash) { + for (const message of messages) { + message.detail = stash.load(message.detail); + } + return messages; +} +function sanitizeLocation(location, where, terminalWidth) { + if (location == null) return null; + let keys = {}; + let file = getFlag(location, keys, "file", mustBeString); + let namespace = getFlag(location, keys, "namespace", mustBeString); + let line = getFlag(location, keys, "line", mustBeInteger); + let column = getFlag(location, keys, "column", mustBeInteger); + let length = getFlag(location, keys, "length", mustBeInteger); + let lineText = getFlag(location, keys, "lineText", mustBeString); + let suggestion = getFlag(location, keys, "suggestion", mustBeString); + checkForInvalidFlags(location, keys, where); + if (lineText) { + const relevantASCII = lineText.slice( + 0, + (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) + ); + if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { + lineText = relevantASCII; + } + } + return { + file: file || "", + namespace: namespace || "", + line: line || 0, + column: column || 0, + length: length || 0, + lineText: lineText || "", + suggestion: suggestion || "" + }; +} +function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { + let messagesClone = []; + let index = 0; + for (const message of messages) { + let keys = {}; + let id = getFlag(message, keys, "id", mustBeString); + let pluginName = getFlag(message, keys, "pluginName", mustBeString); + let text = getFlag(message, keys, "text", mustBeString); + let location = getFlag(message, keys, "location", mustBeObjectOrNull); + let notes = getFlag(message, keys, "notes", mustBeArray); + let detail = getFlag(message, keys, "detail", canBeAnything); + let where = `in element ${index} of "${property}"`; + checkForInvalidFlags(message, keys, where); + let notesClone = []; + if (notes) { + for (const note of notes) { + let noteKeys = {}; + let noteText = getFlag(note, noteKeys, "text", mustBeString); + let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); + checkForInvalidFlags(note, noteKeys, where); + notesClone.push({ + text: noteText || "", + location: sanitizeLocation(noteLocation, where, terminalWidth) + }); + } + } + messagesClone.push({ + id: id || "", + pluginName: pluginName || fallbackPluginName, + text: text || "", + location: sanitizeLocation(location, where, terminalWidth), + notes: notesClone, + detail: stash ? stash.store(detail) : -1 + }); + index++; + } + return messagesClone; +} +function sanitizeStringArray(values, property) { + const result = []; + for (const value of values) { + if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); + result.push(value); + } + return result; +} +function sanitizeStringMap(map, property) { + const result = /* @__PURE__ */ Object.create(null); + for (const key in map) { + const value = map[key]; + if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); + result[key] = value; + } + return result; +} +function convertOutputFiles({ path: path3, contents, hash }) { + let text = null; + return { + path: path3, + contents, + hash, + get text() { + const binary = this.contents; + if (text === null || binary !== contents) { + contents = binary; + text = decodeUTF8(binary); + } + return text; + } + }; +} +function jsRegExpToGoRegExp(regexp) { + let result = regexp.source; + if (regexp.flags) result = `(?${regexp.flags})${result}`; + return result; +} +function parseJSON(bytes) { + let text; + try { + text = decodeUTF8(bytes); + } catch { + return JSON_parse(bytes); + } + return JSON.parse(text); +} + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var packageDarwin_arm64 = "@esbuild/darwin-arm64"; +var packageDarwin_x64 = "@esbuild/darwin-x64"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64", + "openharmony arm64 LE": "@esbuild/openharmony-arm64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function pkgForSomeOtherPlatform() { + const libMainJS = require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + } + return null; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} +function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { + try { + require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath)) { + let pnpapi; + try { + pnpapi = require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.28.2"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM }; + } + } + return { binPath, isWASM }; +} + +// lib/npm/node.ts +var child_process = require("child_process"); +var crypto = require("crypto"); +var path2 = require("path"); +var fs2 = require("fs"); +var os2 = require("os"); +var tty = require("tty"); +var worker_threads; +if (process.env.ESBUILD_WORKER_THREADS !== "0") { + try { + worker_threads = require("worker_threads"); + } catch { + } + let [major, minor] = process.versions.node.split("."); + if ( + // { + if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { + throw new Error( + `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` + ); + } + if (false) { + return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; + } else { + const { binPath, isWASM } = generateBinPath(); + if (isWASM) { + return ["node", [binPath]]; + } else { + return [binPath, []]; + } + } +}; +var isTTY = () => tty.isatty(2); +var fsSync = { + readFile(tempFile, callback) { + try { + let contents = fs2.readFileSync(tempFile, "utf8"); + try { + fs2.unlinkSync(tempFile); + } catch { + } + callback(null, contents); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFileSync(tempFile, contents); + callback(tempFile); + } catch { + callback(null); + } + } +}; +var fsAsync = { + readFile(tempFile, callback) { + try { + fs2.readFile(tempFile, "utf8", (err, contents) => { + try { + fs2.unlink(tempFile, () => callback(err, contents)); + } catch { + callback(err, contents); + } + }); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); + } catch { + callback(null); + } + } +}; +var version = "0.28.2"; +var build = (options) => ensureServiceIsRunning().build(options); +var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); +var transform = (input, options) => ensureServiceIsRunning().transform(input, options); +var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); +var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); +var buildSync = (options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.buildSync(options); + } + let result; + runServiceSync((service) => service.buildOrContext({ + callName: "buildSync", + refs: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var transformSync = (input, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.transformSync(input, options); + } + let result; + runServiceSync((service) => service.transform({ + callName: "transformSync", + refs: null, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsSync, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var formatMessagesSync = (messages, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.formatMessagesSync(messages, options); + } + let result; + runServiceSync((service) => service.formatMessages({ + callName: "formatMessagesSync", + refs: null, + messages, + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var analyzeMetafileSync = (metafile, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.analyzeMetafileSync(metafile, options); + } + let result; + runServiceSync((service) => service.analyzeMetafile({ + callName: "analyzeMetafileSync", + refs: null, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var stop = () => { + if (stopService) stopService(); + if (workerThreadService) workerThreadService.stop(); + return Promise.resolve(); +}; +var initializeWasCalled = false; +var initialize = (options) => { + options = validateInitializeOptions(options || {}); + if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); + if (options.worker) throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); + ensureServiceIsRunning(); + initializeWasCalled = true; + return Promise.resolve(); +}; +var defaultWD = process.cwd(); +var longLivedService; +var stopService; +var ensureServiceIsRunning = () => { + if (longLivedService) return longLivedService; + let [command, args] = esbuildCommandAndArgs(); + let child = child_process.spawn(command, args.concat(`--service=${"0.28.2"}`, "--ping"), { + windowsHide: true, + stdio: ["pipe", "pipe", "inherit"], + cwd: defaultWD + }); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + child.stdin.write(bytes, (err) => { + if (err) afterClose(err); + }); + }, + readFileSync: fs2.readFileSync, + isSync: false, + hasFS: true, + esbuild: node_exports + }); + child.stdin.on("error", afterClose); + child.on("error", afterClose); + const stdin = child.stdin; + const stdout = child.stdout; + stdout.on("data", readFromStdout); + stdout.on("end", afterClose); + stopService = () => { + stdin.destroy(); + stdout.destroy(); + child.kill(); + initializeWasCalled = false; + longLivedService = void 0; + stopService = void 0; + }; + let refCount = 0; + child.unref(); + if (stdin.unref) { + stdin.unref(); + } + if (stdout.unref) { + stdout.unref(); + } + const refs = { + ref() { + if (++refCount === 1) child.ref(); + }, + unref() { + if (--refCount === 0) child.unref(); + } + }; + longLivedService = { + build: (options) => new Promise((resolve, reject) => { + service.buildOrContext({ + callName: "build", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + }); + }), + context: (options) => new Promise((resolve, reject) => service.buildOrContext({ + callName: "context", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + transform: (input, options) => new Promise((resolve, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })) + }; + return longLivedService; +}; +var runServiceSync = (callback) => { + let [command, args] = esbuildCommandAndArgs(); + let stdin = new Uint8Array(); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + if (stdin.length !== 0) throw new Error("Must run at most one command"); + stdin = bytes; + }, + isSync: true, + hasFS: true, + esbuild: node_exports + }); + callback(service); + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.28.2"}`), { + cwd: defaultWD, + windowsHide: true, + input: stdin, + // We don't know how large the output could be. If it's too large, the + // command will fail with ENOBUFS. Reserve 16mb for now since that feels + // like it should be enough. Also allow overriding this with an environment + // variable. + maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 + }); + readFromStdout(stdout); + afterClose(null); +}; +var randomFileName = () => { + return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); +}; +var workerThreadService = null; +var startWorkerThreadService = (worker_threads2) => { + let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); + let worker = new worker_threads2.Worker(__filename, { + workerData: { workerPort, defaultWD, esbuildVersion: "0.28.2" }, + transferList: [workerPort], + // From node's documentation: https://nodejs.org/api/worker_threads.html + // + // Take care when launching worker threads from preload scripts (scripts loaded + // and run using the `-r` command line flag). Unless the `execArgv` option is + // explicitly set, new Worker threads automatically inherit the command line flags + // from the running process and will preload the same preload scripts as the main + // thread. If the preload script unconditionally launches a worker thread, every + // thread spawned will spawn another until the application crashes. + // + execArgv: [] + }); + let nextID = 0; + let fakeBuildError = (text) => { + let error = new Error(`Build failed with 1 error: +error: ${text}`); + let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + error.errors = errors; + error.warnings = []; + return error; + }; + let validateBuildSyncOptions = (options) => { + if (!options) return; + let plugins = options.plugins; + if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + }; + let applyProperties = (object, properties) => { + for (let key in properties) { + object[key] = properties[key]; + } + }; + let runCallSync = (command, args) => { + let id = nextID++; + let sharedBuffer = new SharedArrayBuffer(8); + let sharedBufferView = new Int32Array(sharedBuffer); + let msg = { sharedBuffer, id, command, args }; + worker.postMessage(msg); + let status = Atomics.wait(sharedBufferView, 0, 0); + if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); + let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); + if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (reject) { + applyProperties(reject, properties); + throw reject; + } + return resolve; + }; + worker.unref(); + return { + buildSync(options) { + validateBuildSyncOptions(options); + return runCallSync("build", [options]); + }, + transformSync(input, options) { + return runCallSync("transform", [input, options]); + }, + formatMessagesSync(messages, options) { + return runCallSync("formatMessages", [messages, options]); + }, + analyzeMetafileSync(metafile, options) { + return runCallSync("analyzeMetafile", [metafile, options]); + }, + stop() { + worker.terminate(); + workerThreadService = null; + } + }; +}; +var startSyncServiceWorker = () => { + let workerPort = worker_threads.workerData.workerPort; + let parentPort = worker_threads.parentPort; + let extractProperties = (object) => { + let properties = {}; + if (object && typeof object === "object") { + for (let key in object) { + properties[key] = object[key]; + } + } + return properties; + }; + try { + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + })(); + }); + } catch (reject) { + parentPort.on("message", (msg) => { + let { sharedBuffer, id } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + }); + } +}; +if (isInternalWorkerThread) { + startSyncServiceWorker(); +} +var node_default = node_exports; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + analyzeMetafile, + analyzeMetafileSync, + build, + buildSync, + context, + formatMessages, + formatMessagesSync, + initialize, + stop, + transform, + transformSync, + version +}); diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json new file mode 100644 index 0000000..7e54c6f --- /dev/null +++ b/node_modules/esbuild/package.json @@ -0,0 +1,74 @@ +{ + "name": "esbuild", + "version": "0.28.2", + "description": "An extremely fast JavaScript and CSS bundler and minifier.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "scripts": { + "postinstall": "node install.js" + }, + "main": "lib/main.js", + "types": "lib/main.d.ts", + "engines": { + "node": ">=18" + }, + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + }, + "license": "MIT", + "esbuild.binaryHashes": { + "@esbuild/aix-ppc64/bin/esbuild": "6de148b932fc5d3b28a97f9f0bc4de8e2b47db478b8ad679e0eaa6b96e00420d", + "@esbuild/android-arm64/bin/esbuild": "84efbbd2cbf21bbfec2aaf304bee79cb2a4a05fe2ea7b861a87f7b8f213ac27d", + "@esbuild/darwin-arm64/bin/esbuild": "10b6243df618d374bb2d5c9cfbe7052e1405f6aa4e53a6164f11a91b9f2e1384", + "@esbuild/darwin-x64/bin/esbuild": "7fe5c9c905fff0a05d92db98929434ab4d3b6dd92d7a7688922db74380c75df3", + "@esbuild/freebsd-arm64/bin/esbuild": "6aba108a68b93064e491bfb1ecfa28843b4d4e504dff0627f53f68f6bb015c01", + "@esbuild/freebsd-x64/bin/esbuild": "8a237e222bee0e50556e7b00d83ec2ff43721bf72f19811a5f0ee56f1d40177c", + "@esbuild/linux-arm/bin/esbuild": "d88f751b22095b2f3b42c8c2e8a3f36fabc1705438c5d6e78366b681f8b4e7a5", + "@esbuild/linux-arm64/bin/esbuild": "90bd269553d258e80b19e3ccab4f98f0831f87442a2f056510ce24fd1b425fc2", + "@esbuild/linux-ia32/bin/esbuild": "b1e2d87d79f9a2baa0d3043cdf0dc6716f9f2eea66c58f47588641fd6019f36f", + "@esbuild/linux-loong64/bin/esbuild": "55a66f9854d6798f36b2b5471db74f2e552481887ea14d8bda1634a512383a43", + "@esbuild/linux-mips64el/bin/esbuild": "6bf7921a3af4a801051e056d85c360fe24bb446f488ef3da25f0b8e5cf973db1", + "@esbuild/linux-ppc64/bin/esbuild": "c30df60d09bb0ba4853d7b06e244ce966890d61ce60cadd9b22335f6379c316a", + "@esbuild/linux-riscv64/bin/esbuild": "36bdcdc8230eef385838cdfeb0d9a1565cbe4b9ace30097a511d77e894de36a1", + "@esbuild/linux-s390x/bin/esbuild": "bbbc1f92a76a5ca6e2976065222e42b02797363a1f119490dda315f74047741f", + "@esbuild/linux-x64/bin/esbuild": "e1698a3d5c6c0798fee4fd3b5cc816651f460c63d390a7a26ea4beb0b1884100", + "@esbuild/netbsd-arm64/bin/esbuild": "62548519d7ae875d060aa8c94bfb8ed38ef191671a5173d9f626bdb6b7516970", + "@esbuild/netbsd-x64/bin/esbuild": "f9d0e59d2b404559e3a0c958164d96960ebf0e04583b878b1d64d8f1c3698fcc", + "@esbuild/openbsd-arm64/bin/esbuild": "e10c45a0b62456632da41df058d7626b2e7cfe710780a2dc7f9f84681753f3aa", + "@esbuild/openbsd-x64/bin/esbuild": "720bbe607736716f2ecd37962436c5589d801966e868a2ae4e0e7e62d1e4e887", + "@esbuild/sunos-x64/bin/esbuild": "01a3bd9183631ca749f34d15601ea21ba6834614184c5c859f99d54bd683203d", + "@esbuild/win32-arm64/esbuild.exe": "530fb3933af14eefe85dfd06502f826e6ef60fdf4e75228ea67c696db312ecb1", + "@esbuild/win32-ia32/esbuild.exe": "b2e62af5c17e00939583be0a0762fdc469f352869a617edc91371b00454c76f0", + "@esbuild/win32-x64/esbuild.exe": "c7bee37877d0aa6a046e52783fa0a2cf1a9ce5579d68bb3083bda99d4bff18ef" + } +} diff --git a/node_modules/fast-deep-equal/LICENSE b/node_modules/fast-deep-equal/LICENSE new file mode 100644 index 0000000..7f15435 --- /dev/null +++ b/node_modules/fast-deep-equal/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/fast-deep-equal/README.md b/node_modules/fast-deep-equal/README.md new file mode 100644 index 0000000..d3f4ffc --- /dev/null +++ b/node_modules/fast-deep-equal/README.md @@ -0,0 +1,96 @@ +# fast-deep-equal +The fastest deep equal with ES6 Map, Set and Typed arrays support. + +[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal) +[![npm](https://img.shields.io/npm/v/fast-deep-equal.svg)](https://www.npmjs.com/package/fast-deep-equal) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master) + + +## Install + +```bash +npm install fast-deep-equal +``` + + +## Features + +- ES5 compatible +- works in node.js (8+) and browsers (IE9+) +- checks equality of Date and RegExp objects by value. + +ES6 equal (`require('fast-deep-equal/es6')`) also supports: +- Maps +- Sets +- Typed arrays + + +## Usage + +```javascript +var equal = require('fast-deep-equal'); +console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true +``` + +To support ES6 Maps, Sets and Typed arrays equality use: + +```javascript +var equal = require('fast-deep-equal/es6'); +console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true +``` + +To use with React (avoiding the traversal of React elements' _owner +property that contains circular references and is not needed when +comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)): + +```javascript +var equal = require('fast-deep-equal/react'); +var equal = require('fast-deep-equal/es6/react'); +``` + + +## Performance benchmark + +Node.js v12.6.0: + +``` +fast-deep-equal x 261,950 ops/sec ±0.52% (89 runs sampled) +fast-deep-equal/es6 x 212,991 ops/sec ±0.34% (92 runs sampled) +fast-equals x 230,957 ops/sec ±0.83% (85 runs sampled) +nano-equal x 187,995 ops/sec ±0.53% (88 runs sampled) +shallow-equal-fuzzy x 138,302 ops/sec ±0.49% (90 runs sampled) +underscore.isEqual x 74,423 ops/sec ±0.38% (89 runs sampled) +lodash.isEqual x 36,637 ops/sec ±0.72% (90 runs sampled) +deep-equal x 2,310 ops/sec ±0.37% (90 runs sampled) +deep-eql x 35,312 ops/sec ±0.67% (91 runs sampled) +ramda.equals x 12,054 ops/sec ±0.40% (91 runs sampled) +util.isDeepStrictEqual x 46,440 ops/sec ±0.43% (90 runs sampled) +assert.deepStrictEqual x 456 ops/sec ±0.71% (88 runs sampled) + +The fastest is fast-deep-equal +``` + +To run benchmark (requires node.js 6+): + +```bash +npm run benchmark +``` + +__Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application. + + +## Enterprise support + +fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. + + +## Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. + + +## License + +[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE) diff --git a/node_modules/fast-deep-equal/es6/index.d.ts b/node_modules/fast-deep-equal/es6/index.d.ts new file mode 100644 index 0000000..c7eb9c7 --- /dev/null +++ b/node_modules/fast-deep-equal/es6/index.d.ts @@ -0,0 +1,2 @@ +declare const equal: (a: any, b: any) => boolean; +export = equal; diff --git a/node_modules/fast-deep-equal/es6/index.js b/node_modules/fast-deep-equal/es6/index.js new file mode 100644 index 0000000..d980be2 --- /dev/null +++ b/node_modules/fast-deep-equal/es6/index.js @@ -0,0 +1,72 @@ +'use strict'; + +// do not edit .js files directly - edit src/index.jst + + + var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + if ((a instanceof Map) && (b instanceof Map)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + for (i of a.entries()) + if (!equal(i[1], b.get(i[0]))) return false; + return true; + } + + if ((a instanceof Set) && (b instanceof Set)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + return true; + } + + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (a[i] !== b[i]) return false; + return true; + } + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; diff --git a/node_modules/fast-deep-equal/es6/react.d.ts b/node_modules/fast-deep-equal/es6/react.d.ts new file mode 100644 index 0000000..c7eb9c7 --- /dev/null +++ b/node_modules/fast-deep-equal/es6/react.d.ts @@ -0,0 +1,2 @@ +declare const equal: (a: any, b: any) => boolean; +export = equal; diff --git a/node_modules/fast-deep-equal/es6/react.js b/node_modules/fast-deep-equal/es6/react.js new file mode 100644 index 0000000..98e2f9b --- /dev/null +++ b/node_modules/fast-deep-equal/es6/react.js @@ -0,0 +1,79 @@ +'use strict'; + +// do not edit .js files directly - edit src/index.jst + + + var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + if ((a instanceof Map) && (b instanceof Map)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + for (i of a.entries()) + if (!equal(i[1], b.get(i[0]))) return false; + return true; + } + + if ((a instanceof Set) && (b instanceof Set)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + return true; + } + + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (a[i] !== b[i]) return false; + return true; + } + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + continue; + } + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; diff --git a/node_modules/fast-deep-equal/index.d.ts b/node_modules/fast-deep-equal/index.d.ts new file mode 100644 index 0000000..3c042ca --- /dev/null +++ b/node_modules/fast-deep-equal/index.d.ts @@ -0,0 +1,4 @@ +declare module 'fast-deep-equal' { + const equal: (a: any, b: any) => boolean; + export = equal; +} diff --git a/node_modules/fast-deep-equal/index.js b/node_modules/fast-deep-equal/index.js new file mode 100644 index 0000000..30dd1ba --- /dev/null +++ b/node_modules/fast-deep-equal/index.js @@ -0,0 +1,46 @@ +'use strict'; + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json new file mode 100644 index 0000000..3cfe66c --- /dev/null +++ b/node_modules/fast-deep-equal/package.json @@ -0,0 +1,61 @@ +{ + "name": "fast-deep-equal", + "version": "3.1.3", + "description": "Fast deep equal", + "main": "index.js", + "scripts": { + "eslint": "eslint *.js benchmark/*.js spec/*.js", + "build": "node build", + "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-cov": "nyc npm run test-spec", + "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", + "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov", + "prepublish": "npm run build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" + }, + "keywords": [ + "fast", + "equal", + "deep-equal" + ], + "author": "Evgeny Poberezkin", + "license": "MIT", + "bugs": { + "url": "https://github.com/epoberezkin/fast-deep-equal/issues" + }, + "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "devDependencies": { + "coveralls": "^3.1.0", + "dot": "^1.1.2", + "eslint": "^7.2.0", + "mocha": "^7.2.0", + "nyc": "^15.1.0", + "pre-commit": "^1.2.2", + "react": "^16.12.0", + "react-test-renderer": "^16.12.0", + "sinon": "^9.0.2", + "typescript": "^3.9.5" + }, + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "files": [ + "index.js", + "index.d.ts", + "react.js", + "react.d.ts", + "es6/" + ], + "types": "index.d.ts" +} diff --git a/node_modules/fast-deep-equal/react.d.ts b/node_modules/fast-deep-equal/react.d.ts new file mode 100644 index 0000000..c7eb9c7 --- /dev/null +++ b/node_modules/fast-deep-equal/react.d.ts @@ -0,0 +1,2 @@ +declare const equal: (a: any, b: any) => boolean; +export = equal; diff --git a/node_modules/fast-deep-equal/react.js b/node_modules/fast-deep-equal/react.js new file mode 100644 index 0000000..3489b98 --- /dev/null +++ b/node_modules/fast-deep-equal/react.js @@ -0,0 +1,53 @@ +'use strict'; + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (key === '_owner' && a.$$typeof) { + // React-specific: avoid traversing React elements' _owner. + // _owner contains circular references + // and is not needed when comparing the actual elements (and not their owners) + continue; + } + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; diff --git a/node_modules/find-up/index.d.ts b/node_modules/find-up/index.d.ts new file mode 100644 index 0000000..41e3192 --- /dev/null +++ b/node_modules/find-up/index.d.ts @@ -0,0 +1,137 @@ +import {Options as LocatePathOptions} from 'locate-path'; + +declare const stop: unique symbol; + +declare namespace findUp { + interface Options extends LocatePathOptions {} + + type StopSymbol = typeof stop; + + type Match = string | StopSymbol | undefined; +} + +declare const findUp: { + /** + Find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + + @example + ``` + // / + // └── Users + // └── sindresorhus + // ├── unicorn.png + // └── foo + // └── bar + // ├── baz + // └── example.js + + // example.js + import findUp = require('find-up'); + + (async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + })(); + ``` + */ + (name: string | string[], options?: findUp.Options): Promise; + + /** + Find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + (async () => { + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + })(); + ``` + */ + (matcher: (directory: string) => (findUp.Match | Promise), options?: findUp.Options): Promise; + + sync: { + /** + Synchronously find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + */ + (name: string | string[], options?: findUp.Options): string | undefined; + + /** + Synchronously find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + console.log(findUp.sync(directory => { + const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + ``` + */ + (matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined; + + /** + Synchronously check if a path exists. + + @param path - Path to the file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png')); + //=> true + ``` + */ + exists(path: string): boolean; + } + + /** + Check if a path exists. + + @param path - Path to a file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + (async () => { + console.log(await findUp.exists('/Users/sindresorhus/unicorn.png')); + //=> true + })(); + ``` + */ + exists(path: string): Promise; + + /** + Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`. + */ + readonly stop: findUp.StopSymbol; +}; + +export = findUp; diff --git a/node_modules/find-up/index.js b/node_modules/find-up/index.js new file mode 100644 index 0000000..ce564e5 --- /dev/null +++ b/node_modules/find-up/index.js @@ -0,0 +1,89 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); +const pathExists = require('path-exists'); + +const stop = Symbol('findUp.stop'); + +module.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = async locateOptions => { + if (typeof name !== 'function') { + return locatePath(paths, locateOptions); + } + + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + // eslint-disable-next-line no-await-in-loop + const foundPath = await runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = locateOptions => { + if (typeof name !== 'function') { + return locatePath.sync(paths, locateOptions); + } + + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath.sync([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + const foundPath = runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.exists = pathExists; + +module.exports.sync.exists = pathExists.sync; + +module.exports.stop = stop; diff --git a/node_modules/find-up/license b/node_modules/find-up/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/find-up/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/find-up/package.json b/node_modules/find-up/package.json new file mode 100644 index 0000000..cd50281 --- /dev/null +++ b/node_modules/find-up/package.json @@ -0,0 +1,53 @@ +{ + "name": "find-up", + "version": "4.1.0", + "description": "Find a file or directory by walking up parent directories", + "license": "MIT", + "repository": "sindresorhus/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "walk", + "walking", + "path" + ], + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "devDependencies": { + "ava": "^2.1.0", + "is-path-inside": "^2.1.0", + "tempy": "^0.3.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + } +} diff --git a/node_modules/find-up/readme.md b/node_modules/find-up/readme.md new file mode 100644 index 0000000..d6a21e5 --- /dev/null +++ b/node_modules/find-up/readme.md @@ -0,0 +1,156 @@ +# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) + +> Find a file or directory by walking up parent directories + + +## Install + +``` +$ npm install find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +`example.js` + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' +})(); +``` + + +## API + +### findUp(name, options?) +### findUp(matcher, options?) + +Returns a `Promise` for either the path or `undefined` if it couldn't be found. + +### findUp([...name], options?) + +Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found. + +### findUp.sync(name, options?) +### findUp.sync(matcher, options?) + +Returns a path or `undefined` if it couldn't be found. + +### findUp.sync([...name], options?) + +Returns the first path found (by respecting the order of the array) or `undefined` if none could be found. + +#### name + +Type: `string` + +Name of the file or directory to find. + +#### matcher + +Type: `Function` + +A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases. + +When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path. + +#### options + +Type: `object` + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Directory to start from. + +##### type + +Type: `string`
+Default: `'file'`
+Values: `'file'` `'directory'` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`
+Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### findUp.exists(path) + +Returns a `Promise` of whether the path exists. + +### findUp.sync.exists(path) + +Returns a `boolean` of whether the path exists. + +#### path + +Type: `string` + +Path to a file or directory. + +### findUp.stop + +A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem. + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + await findUp(directory => { + return path.basename(directory) === 'work' ? findUp.stop : 'logo.png'; + }); +})(); +``` + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path + + +--- + +
+ + Get professional support for 'find-up' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/fontkit/README.md b/node_modules/fontkit/README.md new file mode 100644 index 0000000..027b61c --- /dev/null +++ b/node_modules/fontkit/README.md @@ -0,0 +1,266 @@ +# fontkit + +Fontkit is an advanced font engine for Node and the browser, used by [PDFKit](https://github.com/devongovett/pdfkit). It supports many font formats, advanced glyph substitution and layout features, glyph path extraction, color emoji glyphs, font subsetting, and more. + +## Features + +* Supports TrueType (.ttf), OpenType (.otf), WOFF, WOFF2, TrueType Collection (.ttc), and Datafork TrueType (.dfont) font files +* Supports mapping characters to glyphs, including support for ligatures and other advanced substitutions (see below) +* Supports reading glyph metrics and laying out glyphs, including support for kerning and other advanced layout features (see below) +* Advanced OpenType features including glyph substitution (GSUB) and positioning (GPOS) +* Apple Advanced Typography (AAT) glyph substitution features (morx table) +* Support for getting glyph vector paths and converting them to SVG paths, or rendering them to a graphics context +* Supports TrueType (glyf) and PostScript (CFF) outlines +* Support for color glyphs (e.g. emoji), including Apple’s SBIX table, and Microsoft’s COLR table +* Support for AAT variation glyphs, allowing for nearly infinite design control over weight, width, and other axes. +* Font subsetting support - create a new font including only the specified glyphs + +## Installation + + npm install fontkit + +## Example + +```javascript +var fontkit = require('fontkit'); + +// open a font synchronously +var font = fontkit.openSync('font.ttf'); + +// layout a string, using default shaping features. +// returns a GlyphRun, describing glyphs and positions. +var run = font.layout('hello world!'); + +// get an SVG path for a glyph +var svg = run.glyphs[0].path.toSVG(); + +// create a font subset +var subset = font.createSubset(); +run.glyphs.forEach(function(glyph) { + subset.includeGlyph(glyph); +}); + +let buffer = subset.encode(); +``` + +## API + +### `fontkit.open(filename, postscriptName = null)` + +Opens a font file asynchronously, and returns a `Promise` with a font object. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +### `fontkit.openSync(filename, postscriptName = null)` + +Opens a font file synchronously, and returns a font object. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +### `fontkit.create(buffer, postscriptName = null)` + +Returns a font object for the given buffer. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +## Font objects + +There are several different types of font objects that are returned by fontkit depending on the font format. They all inherit from the `TTFFont` class and have the same public API, described below. + +### Metadata properties + +The following properties are strings (or null if the font does not contain strings for them) describing the font, as specified by the font creator. + +* `postscriptName` +* `fullName` +* `familyName` +* `subfamilyName` +* `copyright` +* `version` + +### Metrics + +The following properties describe the general metrics of the font. See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html) for a good overview of how all of these properties relate to one another. + +* `unitsPerEm` - the size of the font’s internal coordinate grid +* `ascent` - the font’s [ascender](http://en.wikipedia.org/wiki/Ascender_(typography)) +* `descent` - the font’s [descender](http://en.wikipedia.org/wiki/Descender) +* `lineGap` - the amount of space that should be included between lines +* `underlinePosition` - the offset from the normal underline position that should be used +* `underlineThickness` - the weight of the underline that should be used +* `italicAngle` - if this is an italic font, the angle the cursor should be drawn at to match the font design +* `capHeight` - the height of capital letters above the baseline. See [here](http://en.wikipedia.org/wiki/Cap_height) for more details. +* `xHeight`- the height of lower case letters. See [here](http://en.wikipedia.org/wiki/X-height) for more details. +* `bbox` - the font’s bounding box, i.e. the box that encloses all glyphs in the font + +### Other properties + +* `numGlyphs` - the number of glyphs in the font +* `characterSet` - an array of all of the unicode code points supported by the font +* `availableFeatures` - an array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) (or mapped AAT tags) supported by the font (see below for a description of this) + +### Character to glyph mapping + +Fontkit includes several methods for character to glyph mapping, including support for advanced OpenType and AAT substitutions. + +#### `font.glyphForCodePoint(codePoint)` + +Maps a single unicode code point (number) to a Glyph object. Does not perform any advanced substitutions (there is no context to do so). + +#### `font.hasGlyphForCodePoint(codePoint)` + +Returns whether there is glyph in the font for the given unicode code point. + +#### `font.glyphsForString(string)` + +This method returns an array of Glyph objects for the given string. This is only a one-to-one mapping from characters +to glyphs. For most uses, you should use `font.layout` (described below), which provides a much more advanced mapping +supporting AAT and OpenType shaping. + +### Glyph metrics and layout + +Fontkit includes several methods for accessing glyph metrics and performing layout, including support for kerning and other advanced OpenType positioning adjustments. + +#### `font.widthOfGlyph(glyph_id)` + +Returns the advance width (described above) for a single glyph id. + +#### `font.layout(string, features = [] | {})` + +This method returns a `GlyphRun` object, which includes an array of `Glyph`s and `GlyphPosition`s for the given string. +`Glyph` objects are described below. `GlyphPosition` objects include 4 properties: `xAdvance`, `yAdvance`, `xOffset`, +and `yOffset`. + +The `features` parameter is either an array of [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) to be applied +in addition to the default set, or an object mapping OpenType features to a boolean enabling or disabling each. If this is an AAT font, the OpenType feature tags are mapped to AAT features. + +### Variation fonts + +Fontkit has support for AAT variation fonts, where glyphs can adjust their shape according to user defined settings along +various axes including weight, width, and slant. Font designers specify the minimum, default, and maximum values for each +axis they support, and allow the user fine grained control over the rendered text. + +#### `font.variationAxes` + +Returns an object describing the available variation axes. Keys are 4 letter axis tags, and values include `name`, +`min`, `default`, and `max` properties for the axis. + +#### `font.namedVariations` + +The font designer may have picked out some variations that they think look particularly good, for example a light, regular, +and bold weight which would traditionally be separate fonts. This property returns an object describing these named variation +instances that the designer has specified. Keys are variation names, and values are objects with axis settings. + +#### `font.getVariation(variation)` + +Returns a new font object representing this variation, from which you can get glyphs and perform layout as normal. +The `variation` parameter can either be a variation settings object or a string variation name. Variation settings objects +have axis names as keys, and numbers as values (should be in the range specified by `font.variationAxes`). + +### Other methods + +#### `font.getGlyph(glyph_id, codePoints = [])` + +Returns a glyph object for the given glyph id. You can pass the array of code points this glyph represents for your use later, and it will be stored in the glyph object. + +#### `font.createSubset()` + +Returns a Subset object for this font, described below. + +## Font Collection objects + +For font collection files that contain multiple fonts in a single file, such as TrueType Collection (.ttc) and Datafork TrueType (.dfont) files, a font collection object can be returned by Fontkit. + +### `collection.getFont(postscriptName)` + +Gets a font from the collection by its postscript name. Returns a Font object, described above. + +### `collection.fonts` + +This property is a lazily-loaded array of all of the fonts in the collection. + +## Glyph objects + +Glyph objects represent a glyph in the font. They have various properties for accessing metrics and the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context. + +You do not create glyph objects directly. They are created by various methods on the font object, described above. There are several subclasses of the base `Glyph` class internally that may be returned depending on the font format, but they all include the following API. + +### Properties + +* `id` - the glyph id in the font +* `name` - the glyph name in the font +* `codePoints` - an array of unicode code points that are represented by this glyph. There can be multiple code points in the case of ligatures and other glyphs that represent multiple visual characters. +* `path` - a vector Path object representing the glyph +* `bbox` - the glyph’s bounding box, i.e. the rectangle that encloses the glyph outline as tightly as possible. +* `cbox` - the glyph’s control box. This is often the same as the bounding box, but is faster to compute. Because of the way bezier curves are defined, some of the control points can be outside of the bounding box. Where `bbox` takes this into account, `cbox` does not. Thus, `cbox` is less accurate, but faster to compute. See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) for a more detailed description. +* `advanceWidth` - the glyph’s advance width. + +### `glyph.render(ctx, size)` + +Renders the glyph to the given graphics context, at the specified font size. + +### Color glyphs (e.g. emoji) + +Fontkit has support for several different color emoji font formats. Currently, these include Apple’s SBIX table (as used by the “Apple Color Emoji” font), and Microsoft’s COLR table (supported by Windows 8.1). [Here](http://blog.symbolset.com/multicolor-fonts) is an overview of the various color font formats out there. + +#### `glyph.getImageForSize(size)` + +For SBIX glyphs, which are bitmap based, this returns an object containing some properties about the image, along with the image data itself (usually PNG). + +#### `glyph.layers` + +For COLR glyphs, which are vector based, this returns an array of objects representing the glyphs and colors for each layer in render order. + +## Path objects + +Path objects are returned by glyphs and represent the actual vector outlines for each glyph in the font. Paths can be converted to SVG path data strings, or to functions that can be applied to render the path to a graphics context. + +### `path.moveTo(x, y)` + +Moves the virtual pen to the given x, y coordinates. + +### `path.lineTo(x, y)` + +Adds a line to the path from the current point to the given x, y coordinates. + +### `path.quadraticCurveTo(cpx, cpy, x, y)` + +Adds a quadratic curve to the path from the current point to the given x, y coordinates using cpx, cpy as a control point. + +### `path.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)` + +Adds a bezier curve to the path from the current point to the given x, y coordinates using cp1x, cp1y and cp2x, cp2y as control points. + +### `path.closePath()` + +Closes the current sub-path by drawing a straight line back to the starting point. + +### `path.toFunction()` + +Compiles the path to a JavaScript function that can be applied with a graphics context in order to render the path. + +### `path.toSVG()` + +Converts the path to an SVG path data string. + +### `path.bbox` + +This property represents the path’s bounding box, i.e. the smallest rectangle that contains the entire path shape. This is the exact bounding box, taking into account control points that may be outside the visible shape. + +### `path.cbox` + +This property represents the path’s control box. It is like the bounding box, but it includes all points of the path, including control points of bezier segments. It is much faster to compute than the real bounding box, but less accurate if there are control points outside of the visible shape. + +## Subsets + +Fontkit can perform font subsetting, i.e. the process of creating a new font from an existing font where only the specified glyphs are included. This is useful to reduce the size of large fonts, such as in PDF generation or for web use. + +Currently, subsets produce minimal fonts designed for PDF embedding that may not work as standalone files. They have no cmap tables and other essential tables for standalone use. This limitation will be removed in the future. + +You create a Subset object by calling `font.createSubset()`, described above. The API on Subset objects is as follows. + +### `subset.includeGlyph(glyph)` + +Includes the given glyph object or glyph ID in the subset. + +### `subset.encode()` + +Returns a `Uint8Array` containing the encoded font file. + +## License + +MIT diff --git a/node_modules/fontkit/dist/browser-module.mjs b/node_modules/fontkit/dist/browser-module.mjs new file mode 100644 index 0000000..4d0a389 --- /dev/null +++ b/node_modules/fontkit/dist/browser-module.mjs @@ -0,0 +1,13316 @@ +import {DecodeStream as $6uUbQ$DecodeStream, Struct as $6uUbQ$Struct, String as $6uUbQ$String, uint32 as $6uUbQ$uint32, Pointer as $6uUbQ$Pointer, uint16 as $6uUbQ$uint16, Array as $6uUbQ$Array, VoidPointer as $6uUbQ$VoidPointer, int16 as $6uUbQ$int16, uint24 as $6uUbQ$uint24, uint8 as $6uUbQ$uint8, VersionedStruct as $6uUbQ$VersionedStruct, LazyArray as $6uUbQ$LazyArray, Reserved as $6uUbQ$Reserved, int32 as $6uUbQ$int32, Bitfield as $6uUbQ$Bitfield, fixed32 as $6uUbQ$fixed32, Buffer as $6uUbQ$Buffer, Number as $6uUbQ$Number, resolveLength as $6uUbQ$resolveLength, fixed16 as $6uUbQ$fixed16, PropertyDescriptor as $6uUbQ$PropertyDescriptor, Fixed as $6uUbQ$Fixed, int8 as $6uUbQ$int8, Optional as $6uUbQ$Optional, EncodeStream as $6uUbQ$EncodeStream} from "restructure"; +import {_ as $6uUbQ$_} from "@swc/helpers/_/_define_property"; +import {_ as $6uUbQ$_1} from "@swc/helpers/_/_ts_decorate"; +import $6uUbQ$fastdeepequal from "fast-deep-equal"; +import {getCombiningClass as $6uUbQ$getCombiningClass, getScript as $6uUbQ$getScript, isDigit as $6uUbQ$isDigit, getCategory as $6uUbQ$getCategory, isMark as $6uUbQ$isMark} from "unicode-properties"; +import $6uUbQ$unicodetrie from "unicode-trie"; +import $6uUbQ$dfa from "dfa"; +import $6uUbQ$clone from "clone"; +import $6uUbQ$tinyinflate from "tiny-inflate"; +import $6uUbQ$brotlidecompressjs from "brotli/decompress.js"; + + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} +var $d636bc798e7178db$exports = {}; + +$parcel$export($d636bc798e7178db$exports, "logErrors", () => $d636bc798e7178db$export$bd5c5d8b8dcafd78); +$parcel$export($d636bc798e7178db$exports, "registerFormat", () => $d636bc798e7178db$export$36b2f24e97d43be); +$parcel$export($d636bc798e7178db$exports, "create", () => $d636bc798e7178db$export$185802fd694ee1f5); +$parcel$export($d636bc798e7178db$exports, "defaultLanguage", () => $d636bc798e7178db$export$42940898df819940); +$parcel$export($d636bc798e7178db$exports, "setDefaultLanguage", () => $d636bc798e7178db$export$5157e7780d44cc36); + +let $d636bc798e7178db$export$bd5c5d8b8dcafd78 = false; +let $d636bc798e7178db$var$formats = []; +function $d636bc798e7178db$export$36b2f24e97d43be(format) { + $d636bc798e7178db$var$formats.push(format); +} +function $d636bc798e7178db$export$185802fd694ee1f5(buffer, postscriptName) { + for(let i = 0; i < $d636bc798e7178db$var$formats.length; i++){ + let format = $d636bc798e7178db$var$formats[i]; + if (format.probe(buffer)) { + let font = new format(new (0, $6uUbQ$DecodeStream)(buffer)); + if (postscriptName) return font.getFont(postscriptName); + return font; + } + } + throw new Error('Unknown font format'); +} +let $d636bc798e7178db$export$42940898df819940 = 'en'; +function $d636bc798e7178db$export$5157e7780d44cc36(lang = 'en') { + $d636bc798e7178db$export$42940898df819940 = lang; +} + + + + + +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ function $e71565f2ce09cb6b$export$69a3209f1a06c04d(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { + value: value + }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + return { + get () { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) return cache.get(key); + let result = fn.apply(this, args); + cache.set(key, result); + return result; + } + Object.defineProperty(this, key, { + value: memoized + }); + return memoized; + } + }; + } +} + + + + + +let $26a62205ad06574e$var$SubHeader = new $6uUbQ$Struct({ + firstCode: $6uUbQ$uint16, + entryCount: $6uUbQ$uint16, + idDelta: $6uUbQ$int16, + idRangeOffset: $6uUbQ$uint16 +}); +let $26a62205ad06574e$var$CmapGroup = new $6uUbQ$Struct({ + startCharCode: $6uUbQ$uint32, + endCharCode: $6uUbQ$uint32, + glyphID: $6uUbQ$uint32 +}); +let $26a62205ad06574e$var$UnicodeValueRange = new $6uUbQ$Struct({ + startUnicodeValue: $6uUbQ$uint24, + additionalCount: $6uUbQ$uint8 +}); +let $26a62205ad06574e$var$UVSMapping = new $6uUbQ$Struct({ + unicodeValue: $6uUbQ$uint24, + glyphID: $6uUbQ$uint16 +}); +let $26a62205ad06574e$var$DefaultUVS = new $6uUbQ$Array($26a62205ad06574e$var$UnicodeValueRange, $6uUbQ$uint32); +let $26a62205ad06574e$var$NonDefaultUVS = new $6uUbQ$Array($26a62205ad06574e$var$UVSMapping, $6uUbQ$uint32); +let $26a62205ad06574e$var$VarSelectorRecord = new $6uUbQ$Struct({ + varSelector: $6uUbQ$uint24, + defaultUVS: new $6uUbQ$Pointer($6uUbQ$uint32, $26a62205ad06574e$var$DefaultUVS, { + type: 'parent' + }), + nonDefaultUVS: new $6uUbQ$Pointer($6uUbQ$uint32, $26a62205ad06574e$var$NonDefaultUVS, { + type: 'parent' + }) +}); +let $26a62205ad06574e$var$CmapSubtable = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 0: { + length: $6uUbQ$uint16, + language: $6uUbQ$uint16, + codeMap: new $6uUbQ$LazyArray($6uUbQ$uint8, 256) + }, + 2: { + length: $6uUbQ$uint16, + language: $6uUbQ$uint16, + subHeaderKeys: new $6uUbQ$Array($6uUbQ$uint16, 256), + subHeaderCount: (t)=>Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new $6uUbQ$LazyArray($26a62205ad06574e$var$SubHeader, 'subHeaderCount'), + glyphIndexArray: new $6uUbQ$LazyArray($6uUbQ$uint16, 'subHeaderCount') + }, + 4: { + length: $6uUbQ$uint16, + language: $6uUbQ$uint16, + segCountX2: $6uUbQ$uint16, + segCount: (t)=>t.segCountX2 >> 1, + searchRange: $6uUbQ$uint16, + entrySelector: $6uUbQ$uint16, + rangeShift: $6uUbQ$uint16, + endCode: new $6uUbQ$LazyArray($6uUbQ$uint16, 'segCount'), + reservedPad: new $6uUbQ$Reserved($6uUbQ$uint16), + startCode: new $6uUbQ$LazyArray($6uUbQ$uint16, 'segCount'), + idDelta: new $6uUbQ$LazyArray($6uUbQ$int16, 'segCount'), + idRangeOffset: new $6uUbQ$LazyArray($6uUbQ$uint16, 'segCount'), + glyphIndexArray: new $6uUbQ$LazyArray($6uUbQ$uint16, (t)=>(t.length - t._currentOffset) / 2) + }, + 6: { + length: $6uUbQ$uint16, + language: $6uUbQ$uint16, + firstCode: $6uUbQ$uint16, + entryCount: $6uUbQ$uint16, + glyphIndices: new $6uUbQ$LazyArray($6uUbQ$uint16, 'entryCount') + }, + 8: { + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + length: $6uUbQ$uint32, + language: $6uUbQ$uint16, + is32: new $6uUbQ$LazyArray($6uUbQ$uint8, 8192), + nGroups: $6uUbQ$uint32, + groups: new $6uUbQ$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 10: { + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + length: $6uUbQ$uint32, + language: $6uUbQ$uint32, + firstCode: $6uUbQ$uint32, + entryCount: $6uUbQ$uint32, + glyphIndices: new $6uUbQ$LazyArray($6uUbQ$uint16, 'numChars') + }, + 12: { + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + length: $6uUbQ$uint32, + language: $6uUbQ$uint32, + nGroups: $6uUbQ$uint32, + groups: new $6uUbQ$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 13: { + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + length: $6uUbQ$uint32, + language: $6uUbQ$uint32, + nGroups: $6uUbQ$uint32, + groups: new $6uUbQ$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 14: { + length: $6uUbQ$uint32, + numRecords: $6uUbQ$uint32, + varSelectors: new $6uUbQ$LazyArray($26a62205ad06574e$var$VarSelectorRecord, 'numRecords') + } +}); +let $26a62205ad06574e$var$CmapEntry = new $6uUbQ$Struct({ + platformID: $6uUbQ$uint16, + encodingID: $6uUbQ$uint16, + table: new $6uUbQ$Pointer($6uUbQ$uint32, $26a62205ad06574e$var$CmapSubtable, { + type: 'parent', + lazy: true + }) +}); +var // character to glyph mapping +$26a62205ad06574e$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numSubtables: $6uUbQ$uint16, + tables: new $6uUbQ$Array($26a62205ad06574e$var$CmapEntry, 'numSubtables') +}); + + + +var // font header +$f2612a29f92ac062$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$int32, + revision: $6uUbQ$int32, + checkSumAdjustment: $6uUbQ$uint32, + magicNumber: $6uUbQ$uint32, + flags: $6uUbQ$uint16, + unitsPerEm: $6uUbQ$uint16, + created: new $6uUbQ$Array($6uUbQ$int32, 2), + modified: new $6uUbQ$Array($6uUbQ$int32, 2), + xMin: $6uUbQ$int16, + yMin: $6uUbQ$int16, + xMax: $6uUbQ$int16, + yMax: $6uUbQ$int16, + macStyle: new $6uUbQ$Bitfield($6uUbQ$uint16, [ + 'bold', + 'italic', + 'underline', + 'outline', + 'shadow', + 'condensed', + 'extended' + ]), + lowestRecPPEM: $6uUbQ$uint16, + fontDirectionHint: $6uUbQ$int16, + indexToLocFormat: $6uUbQ$int16, + glyphDataFormat: $6uUbQ$int16 // 0 for current format +}); + + + +var // horizontal header +$2c179dd593583073$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$int32, + ascent: $6uUbQ$int16, + descent: $6uUbQ$int16, + lineGap: $6uUbQ$int16, + advanceWidthMax: $6uUbQ$uint16, + minLeftSideBearing: $6uUbQ$int16, + minRightSideBearing: $6uUbQ$int16, + xMaxExtent: $6uUbQ$int16, + caretSlopeRise: $6uUbQ$int16, + caretSlopeRun: $6uUbQ$int16, + caretOffset: $6uUbQ$int16, + reserved: new $6uUbQ$Reserved($6uUbQ$int16, 4), + metricDataFormat: $6uUbQ$int16, + numberOfMetrics: $6uUbQ$uint16 // Number of advance widths in 'hmtx' table +}); + + + +let $bdc9060542264b85$var$HmtxEntry = new $6uUbQ$Struct({ + advance: $6uUbQ$uint16, + bearing: $6uUbQ$int16 +}); +var $bdc9060542264b85$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + metrics: new $6uUbQ$LazyArray($bdc9060542264b85$var$HmtxEntry, (t)=>t.parent.hhea.numberOfMetrics), + bearings: new $6uUbQ$LazyArray($6uUbQ$int16, (t)=>t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); + + + +var // maxiumum profile +$dbf51cb3d3fe409d$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$int32, + numGlyphs: $6uUbQ$uint16, + maxPoints: $6uUbQ$uint16, + maxContours: $6uUbQ$uint16, + maxComponentPoints: $6uUbQ$uint16, + maxComponentContours: $6uUbQ$uint16, + maxZones: $6uUbQ$uint16, + maxTwilightPoints: $6uUbQ$uint16, + maxStorage: $6uUbQ$uint16, + maxFunctionDefs: $6uUbQ$uint16, + maxInstructionDefs: $6uUbQ$uint16, + maxStackElements: $6uUbQ$uint16, + maxSizeOfInstructions: $6uUbQ$uint16, + maxComponentElements: $6uUbQ$uint16, + maxComponentDepth: $6uUbQ$uint16 // Maximum levels of recursion; 1 for simple components +}); + + + +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ function $e449ad78d50845fe$export$badc544e0651b6b1(platformID, encodingID, languageID = 0) { + if (platformID === 1 && $e449ad78d50845fe$export$479e671907f486d1[languageID]) return $e449ad78d50845fe$export$479e671907f486d1[languageID]; + return $e449ad78d50845fe$export$6fef87b7618bdf0b[platformID][encodingID]; +} +const $e449ad78d50845fe$var$SINGLE_BYTE_ENCODINGS = new Set([ + 'x-mac-roman', + 'x-mac-cyrillic', + 'iso-8859-6', + 'iso-8859-8' +]); +const $e449ad78d50845fe$var$MAC_ENCODINGS = { + 'x-mac-croatian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017D\xd8\u221E\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220F\u0161\u222B\xaa\xba\u03A9\u017E\xf8\xbf\xa1\xac\u221A\u0192\u2248\u0106\xab\u010C\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\uF8FF\xa9\u2044\u20AC\u2039\u203A\xc6\xbb\u2013\xb7\u201A\u201E\u2030\xc2\u0107\xc1\u010D\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u03C0\xcb\u02DA\xb8\xca\xe6\u02C7", + 'x-mac-gaelic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1E02\xb1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xe6\xf8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xff\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xb7\u1EF2\u1EF3\u204A\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83", + 'x-mac-greek': "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20AC\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xdf\xae\xa9\u03A3\u03AA\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xac\u039F\u03A1\u2248\u03A4\xab\xbb\u2026 \u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xf7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xad", + 'x-mac-icelandic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\xd0\xf0\xde\xfe\xfd\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-inuit': "\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xb0\u14A1\u14A5\u14A6\u2022\xb6\u14A7\xae\xa9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026 \u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142", + 'x-mac-ce': "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010C\xe4\u010D\u0106\u0107\xe9\u0179\u017A\u010E\xed\u010F\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011A\u011B\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xac\u221A\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xc1\u0164\u0165\xcd\u017D\u017E\u016A\xd3\xd4\u016B\u016E\xda\u016F\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017B\u0141\u017C\u0122\u02C7", + 'x-mac-romanian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\u0103\u0219\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-turkish': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\uF8A0\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7" +}; +const $e449ad78d50845fe$var$encodingCache = new Map(); +function $e449ad78d50845fe$export$1dceb3c14ed68bee(encoding) { + let cached = $e449ad78d50845fe$var$encodingCache.get(encoding); + if (cached) return cached; + // These encodings aren't supported by TextDecoder. + let mapping = $e449ad78d50845fe$var$MAC_ENCODINGS[encoding]; + if (mapping) { + let res = new Map(); + for(let i = 0; i < mapping.length; i++)res.set(mapping.charCodeAt(i), 0x80 + i); + $e449ad78d50845fe$var$encodingCache.set(encoding, res); + return res; + } + // Only single byte encodings can be mapped 1:1. + if ($e449ad78d50845fe$var$SINGLE_BYTE_ENCODINGS.has(encoding)) { + // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings. + // Use this to create a mapping of code points. + let decoder = new TextDecoder(encoding); + let mapping = new Uint8Array(0x80); + for(let i = 0; i < 0x80; i++)mapping[i] = 0x80 + i; + let res = new Map(); + let s = decoder.decode(mapping); + for(let i = 0; i < 0x80; i++)res.set(s.charCodeAt(i), 0x80 + i); + $e449ad78d50845fe$var$encodingCache.set(encoding, res); + return res; + } +} +const $e449ad78d50845fe$export$6fef87b7618bdf0b = [ + // unicode + [ + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be' + ], + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + [ + 'x-mac-roman', + 'shift-jis', + 'big5', + 'euc-kr', + 'iso-8859-6', + 'iso-8859-8', + 'x-mac-greek', + 'x-mac-cyrillic', + 'x-mac-symbol', + 'x-mac-devanagari', + 'x-mac-gurmukhi', + 'x-mac-gujarati', + 'Oriya', + 'Bengali', + 'Tamil', + 'Telugu', + 'Kannada', + 'Malayalam', + 'Sinhalese', + 'Burmese', + 'Khmer', + 'iso-8859-11', + 'Laotian', + 'Georgian', + 'Armenian', + 'gbk', + 'Tibetan', + 'Mongolian', + 'Geez', + 'x-mac-ce', + 'Vietnamese', + 'Sindhi' + ], + // ISO (deprecated) + [ + 'ascii', + null, + 'iso-8859-1' + ], + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + [ + 'symbol', + 'utf-16be', + 'shift-jis', + 'gb18030', + 'big5', + 'euc-kr', + 'johab', + null, + null, + null, + 'utf-16be' + ] +]; +const $e449ad78d50845fe$export$479e671907f486d1 = { + 15: 'x-mac-icelandic', + 17: 'x-mac-turkish', + 18: 'x-mac-croatian', + 24: 'x-mac-ce', + 25: 'x-mac-ce', + 26: 'x-mac-ce', + 27: 'x-mac-ce', + 28: 'x-mac-ce', + 30: 'x-mac-icelandic', + 37: 'x-mac-romanian', + 38: 'x-mac-ce', + 39: 'x-mac-ce', + 40: 'x-mac-ce', + 143: 'x-mac-inuit', + 146: 'x-mac-gaelic' +}; +const $e449ad78d50845fe$export$2092376fd002e13 = [ + // unicode + [], + { + 0: 'en', + 30: 'fo', + 60: 'ks', + 90: 'rw', + 1: 'fr', + 31: 'fa', + 61: 'ku', + 91: 'rn', + 2: 'de', + 32: 'ru', + 62: 'sd', + 92: 'ny', + 3: 'it', + 33: 'zh', + 63: 'bo', + 93: 'mg', + 4: 'nl', + 34: 'nl-BE', + 64: 'ne', + 94: 'eo', + 5: 'sv', + 35: 'ga', + 65: 'sa', + 128: 'cy', + 6: 'es', + 36: 'sq', + 66: 'mr', + 129: 'eu', + 7: 'da', + 37: 'ro', + 67: 'bn', + 130: 'ca', + 8: 'pt', + 38: 'cz', + 68: 'as', + 131: 'la', + 9: 'no', + 39: 'sk', + 69: 'gu', + 132: 'qu', + 10: 'he', + 40: 'si', + 70: 'pa', + 133: 'gn', + 11: 'ja', + 41: 'yi', + 71: 'or', + 134: 'ay', + 12: 'ar', + 42: 'sr', + 72: 'ml', + 135: 'tt', + 13: 'fi', + 43: 'mk', + 73: 'kn', + 136: 'ug', + 14: 'el', + 44: 'bg', + 74: 'ta', + 137: 'dz', + 15: 'is', + 45: 'uk', + 75: 'te', + 138: 'jv', + 16: 'mt', + 46: 'be', + 76: 'si', + 139: 'su', + 17: 'tr', + 47: 'uz', + 77: 'my', + 140: 'gl', + 18: 'hr', + 48: 'kk', + 78: 'km', + 141: 'af', + 19: 'zh-Hant', + 49: 'az-Cyrl', + 79: 'lo', + 142: 'br', + 20: 'ur', + 50: 'az-Arab', + 80: 'vi', + 143: 'iu', + 21: 'hi', + 51: 'hy', + 81: 'id', + 144: 'gd', + 22: 'th', + 52: 'ka', + 82: 'tl', + 145: 'gv', + 23: 'ko', + 53: 'mo', + 83: 'ms', + 146: 'ga', + 24: 'lt', + 54: 'ky', + 84: 'ms-Arab', + 147: 'to', + 25: 'pl', + 55: 'tg', + 85: 'am', + 148: 'el-polyton', + 26: 'hu', + 56: 'tk', + 86: 'ti', + 149: 'kl', + 27: 'es', + 57: 'mn-CN', + 87: 'om', + 150: 'az', + 28: 'lv', + 58: 'mn', + 88: 'so', + 151: 'nn', + 29: 'se', + 59: 'ps', + 89: 'sw' + }, + // ISO (deprecated) + [], + { + 0x0436: 'af', + 0x4009: 'en-IN', + 0x0487: 'rw', + 0x0432: 'tn', + 0x041C: 'sq', + 0x1809: 'en-IE', + 0x0441: 'sw', + 0x045B: 'si', + 0x0484: 'gsw', + 0x2009: 'en-JM', + 0x0457: 'kok', + 0x041B: 'sk', + 0x045E: 'am', + 0x4409: 'en-MY', + 0x0412: 'ko', + 0x0424: 'sl', + 0x1401: 'ar-DZ', + 0x1409: 'en-NZ', + 0x0440: 'ky', + 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', + 0x3409: 'en-PH', + 0x0454: 'lo', + 0x400A: 'es-BO', + 0x0C01: 'ar', + 0x4809: 'en-SG', + 0x0426: 'lv', + 0x340A: 'es-CL', + 0x0801: 'ar-IQ', + 0x1C09: 'en-ZA', + 0x0427: 'lt', + 0x240A: 'es-CO', + 0x2C01: 'ar-JO', + 0x2C09: 'en-TT', + 0x082E: 'dsb', + 0x140A: 'es-CR', + 0x3401: 'ar-KW', + 0x0809: 'en-GB', + 0x046E: 'lb', + 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', + 0x0409: 'en', + 0x042F: 'mk', + 0x300A: 'es-EC', + 0x1001: 'ar-LY', + 0x3009: 'en-ZW', + 0x083E: 'ms-BN', + 0x440A: 'es-SV', + 0x1801: 'ary', + 0x0425: 'et', + 0x043E: 'ms', + 0x100A: 'es-GT', + 0x2001: 'ar-OM', + 0x0438: 'fo', + 0x044C: 'ml', + 0x480A: 'es-HN', + 0x4001: 'ar-QA', + 0x0464: 'fil', + 0x043A: 'mt', + 0x080A: 'es-MX', + 0x0401: 'ar-SA', + 0x040B: 'fi', + 0x0481: 'mi', + 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', + 0x080C: 'fr-BE', + 0x047A: 'arn', + 0x180A: 'es-PA', + 0x1C01: 'aeb', + 0x0C0C: 'fr-CA', + 0x044E: 'mr', + 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', + 0x040C: 'fr', + 0x047C: 'moh', + 0x280A: 'es-PE', + 0x2401: 'ar-YE', + 0x140C: 'fr-LU', + 0x0450: 'mn', + 0x500A: 'es-PR', + 0x042B: 'hy', + 0x180C: 'fr-MC', + 0x0850: 'mn-CN', + 0x0C0A: 'es', + 0x044D: 'as', + 0x100C: 'fr-CH', + 0x0461: 'ne', + 0x040A: 'es', + 0x082C: 'az-Cyrl', + 0x0462: 'fy', + 0x0414: 'nb', + 0x540A: 'es-US', + 0x042C: 'az', + 0x0456: 'gl', + 0x0814: 'nn', + 0x380A: 'es-UY', + 0x046D: 'ba', + 0x0437: 'ka', + 0x0482: 'oc', + 0x200A: 'es-VE', + 0x042D: 'eu', + 0x0C07: 'de-AT', + 0x0448: 'or', + 0x081D: 'sv-FI', + 0x0423: 'be', + 0x0407: 'de', + 0x0463: 'ps', + 0x041D: 'sv', + 0x0845: 'bn', + 0x1407: 'de-LI', + 0x0415: 'pl', + 0x045A: 'syr', + 0x0445: 'bn-IN', + 0x1007: 'de-LU', + 0x0416: 'pt', + 0x0428: 'tg', + 0x201A: 'bs-Cyrl', + 0x0807: 'de-CH', + 0x0816: 'pt-PT', + 0x085F: 'tzm', + 0x141A: 'bs', + 0x0408: 'el', + 0x0446: 'pa', + 0x0449: 'ta', + 0x047E: 'br', + 0x046F: 'kl', + 0x046B: 'qu-BO', + 0x0444: 'tt', + 0x0402: 'bg', + 0x0447: 'gu', + 0x086B: 'qu-EC', + 0x044A: 'te', + 0x0403: 'ca', + 0x0468: 'ha', + 0x0C6B: 'qu', + 0x041E: 'th', + 0x0C04: 'zh-HK', + 0x040D: 'he', + 0x0418: 'ro', + 0x0451: 'bo', + 0x1404: 'zh-MO', + 0x0439: 'hi', + 0x0417: 'rm', + 0x041F: 'tr', + 0x0804: 'zh', + 0x040E: 'hu', + 0x0419: 'ru', + 0x0442: 'tk', + 0x1004: 'zh-SG', + 0x040F: 'is', + 0x243B: 'smn', + 0x0480: 'ug', + 0x0404: 'zh-TW', + 0x0470: 'ig', + 0x103B: 'smj-NO', + 0x0422: 'uk', + 0x0483: 'co', + 0x0421: 'id', + 0x143B: 'smj', + 0x042E: 'hsb', + 0x041A: 'hr', + 0x045D: 'iu', + 0x0C3B: 'se-FI', + 0x0420: 'ur', + 0x101A: 'hr-BA', + 0x085D: 'iu-Latn', + 0x043B: 'se', + 0x0843: 'uz-Cyrl', + 0x0405: 'cs', + 0x083C: 'ga', + 0x083B: 'se-SE', + 0x0443: 'uz', + 0x0406: 'da', + 0x0434: 'xh', + 0x203B: 'sms', + 0x042A: 'vi', + 0x048C: 'prs', + 0x0435: 'zu', + 0x183B: 'sma-NO', + 0x0452: 'cy', + 0x0465: 'dv', + 0x0410: 'it', + 0x1C3B: 'sms', + 0x0488: 'wo', + 0x0813: 'nl-BE', + 0x0810: 'it-CH', + 0x044F: 'sa', + 0x0485: 'sah', + 0x0413: 'nl', + 0x0411: 'ja', + 0x1C1A: 'sr-Cyrl-BA', + 0x0478: 'ii', + 0x0C09: 'en-AU', + 0x044B: 'kn', + 0x0C1A: 'sr', + 0x046A: 'yo', + 0x2809: 'en-BZ', + 0x043F: 'kk', + 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', + 0x0453: 'km', + 0x081A: 'sr-Latn', + 0x2409: 'en-029', + 0x0486: 'quc', + 0x046C: 'nso' + } +]; + + +let $2bcf221753ec8e32$var$NameRecord = new $6uUbQ$Struct({ + platformID: $6uUbQ$uint16, + encodingID: $6uUbQ$uint16, + languageID: $6uUbQ$uint16, + nameID: $6uUbQ$uint16, + length: $6uUbQ$uint16, + string: new $6uUbQ$Pointer($6uUbQ$uint16, new $6uUbQ$String('length', (t)=>(0, $e449ad78d50845fe$export$badc544e0651b6b1)(t.platformID, t.encodingID, t.languageID)), { + type: 'parent', + relativeTo: (ctx)=>ctx.parent.stringOffset, + allowNull: false + }) +}); +let $2bcf221753ec8e32$var$LangTagRecord = new $6uUbQ$Struct({ + length: $6uUbQ$uint16, + tag: new $6uUbQ$Pointer($6uUbQ$uint16, new $6uUbQ$String('length', 'utf16be'), { + type: 'parent', + relativeTo: (ctx)=>ctx.stringOffset + }) +}); +var $2bcf221753ec8e32$var$NameTable = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 0: { + count: $6uUbQ$uint16, + stringOffset: $6uUbQ$uint16, + records: new $6uUbQ$Array($2bcf221753ec8e32$var$NameRecord, 'count') + }, + 1: { + count: $6uUbQ$uint16, + stringOffset: $6uUbQ$uint16, + records: new $6uUbQ$Array($2bcf221753ec8e32$var$NameRecord, 'count'), + langTagCount: $6uUbQ$uint16, + langTags: new $6uUbQ$Array($2bcf221753ec8e32$var$LangTagRecord, 'langTagCount') + } +}); +var $2bcf221753ec8e32$export$2e2bcd8739ae039 = $2bcf221753ec8e32$var$NameTable; +const $2bcf221753ec8e32$var$NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; +$2bcf221753ec8e32$var$NameTable.process = function(stream) { + var records = {}; + for (let record of this.records){ + // find out what language this is for + let language = (0, $e449ad78d50845fe$export$2092376fd002e13)[record.platformID][record.languageID]; + if (language == null && this.langTags != null && record.languageID >= 0x8000) language = this.langTags[record.languageID - 0x8000].tag; + if (language == null) language = record.platformID + '-' + record.languageID; + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : $2bcf221753ec8e32$var$NAMES[record.nameID] || record.nameID; + if (records[key] == null) records[key] = {}; + let obj = records[key]; + if (record.nameID >= 256) obj = obj[record.nameID] || (obj[record.nameID] = {}); + if (typeof record.string === 'string' || typeof obj[language] !== 'string') obj[language] = record.string; + } + this.records = records; +}; +$2bcf221753ec8e32$var$NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + let records = []; + for(let key in this.records){ + let val = this.records[key]; + if (key === 'fontFeatures') continue; + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: $2bcf221753ec8e32$var$NAMES.indexOf(key), + length: val.en.length * 2, + string: val.en + }); + if (key === 'postscriptName') records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: $2bcf221753ec8e32$var$NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + this.records = records; + this.count = records.length; + this.stringOffset = $2bcf221753ec8e32$var$NameTable.size(this, null, false); +}; + + + +var $84b272aa31b70606$var$OS2 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + header: { + xAvgCharWidth: $6uUbQ$int16, + usWeightClass: $6uUbQ$uint16, + usWidthClass: $6uUbQ$uint16, + fsType: new $6uUbQ$Bitfield($6uUbQ$uint16, [ + null, + 'noEmbedding', + 'viewOnly', + 'editable', + null, + null, + null, + null, + 'noSubsetting', + 'bitmapOnly' + ]), + ySubscriptXSize: $6uUbQ$int16, + ySubscriptYSize: $6uUbQ$int16, + ySubscriptXOffset: $6uUbQ$int16, + ySubscriptYOffset: $6uUbQ$int16, + ySuperscriptXSize: $6uUbQ$int16, + ySuperscriptYSize: $6uUbQ$int16, + ySuperscriptXOffset: $6uUbQ$int16, + ySuperscriptYOffset: $6uUbQ$int16, + yStrikeoutSize: $6uUbQ$int16, + yStrikeoutPosition: $6uUbQ$int16, + sFamilyClass: $6uUbQ$int16, + panose: new $6uUbQ$Array($6uUbQ$uint8, 10), + ulCharRange: new $6uUbQ$Array($6uUbQ$uint32, 4), + vendorID: new $6uUbQ$String(4), + fsSelection: new $6uUbQ$Bitfield($6uUbQ$uint16, [ + 'italic', + 'underscore', + 'negative', + 'outlined', + 'strikeout', + 'bold', + 'regular', + 'useTypoMetrics', + 'wws', + 'oblique' + ]), + usFirstCharIndex: $6uUbQ$uint16, + usLastCharIndex: $6uUbQ$uint16 // The maximum Unicode index in this font + }, + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + 1: { + typoAscender: $6uUbQ$int16, + typoDescender: $6uUbQ$int16, + typoLineGap: $6uUbQ$int16, + winAscent: $6uUbQ$uint16, + winDescent: $6uUbQ$uint16, + codePageRange: new $6uUbQ$Array($6uUbQ$uint32, 2) + }, + 2: { + // these should be common with version 1 somehow + typoAscender: $6uUbQ$int16, + typoDescender: $6uUbQ$int16, + typoLineGap: $6uUbQ$int16, + winAscent: $6uUbQ$uint16, + winDescent: $6uUbQ$uint16, + codePageRange: new $6uUbQ$Array($6uUbQ$uint32, 2), + xHeight: $6uUbQ$int16, + capHeight: $6uUbQ$int16, + defaultChar: $6uUbQ$uint16, + breakChar: $6uUbQ$uint16, + maxContent: $6uUbQ$uint16 + }, + 5: { + typoAscender: $6uUbQ$int16, + typoDescender: $6uUbQ$int16, + typoLineGap: $6uUbQ$int16, + winAscent: $6uUbQ$uint16, + winDescent: $6uUbQ$uint16, + codePageRange: new $6uUbQ$Array($6uUbQ$uint32, 2), + xHeight: $6uUbQ$int16, + capHeight: $6uUbQ$int16, + defaultChar: $6uUbQ$uint16, + breakChar: $6uUbQ$uint16, + maxContent: $6uUbQ$uint16, + usLowerOpticalPointSize: $6uUbQ$uint16, + usUpperOpticalPointSize: $6uUbQ$uint16 + } +}); +let $84b272aa31b70606$var$versions = $84b272aa31b70606$var$OS2.versions; +$84b272aa31b70606$var$versions[3] = $84b272aa31b70606$var$versions[4] = $84b272aa31b70606$var$versions[2]; +var $84b272aa31b70606$export$2e2bcd8739ae039 = $84b272aa31b70606$var$OS2; + + + +var // PostScript information +$32d9e2eb9565d93c$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$fixed32, { + header: { + italicAngle: $6uUbQ$fixed32, + underlinePosition: $6uUbQ$int16, + underlineThickness: $6uUbQ$int16, + isFixedPitch: $6uUbQ$uint32, + minMemType42: $6uUbQ$uint32, + maxMemType42: $6uUbQ$uint32, + minMemType1: $6uUbQ$uint32, + maxMemType1: $6uUbQ$uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + 1: {}, + 2: { + numberOfGlyphs: $6uUbQ$uint16, + glyphNameIndex: new $6uUbQ$Array($6uUbQ$uint16, 'numberOfGlyphs'), + names: new $6uUbQ$Array(new $6uUbQ$String($6uUbQ$uint8)) + }, + 2.5: { + numberOfGlyphs: $6uUbQ$uint16, + offsets: new $6uUbQ$Array($6uUbQ$uint8, 'numberOfGlyphs') + }, + 3: {}, + 4: { + map: new $6uUbQ$Array($6uUbQ$uint32, (t)=>t.parent.maxp.numGlyphs) + } +}); + + + +var // An array of predefined values accessible by instructions +$5202bd9d9ad8eaac$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + controlValues: new $6uUbQ$Array($6uUbQ$int16) +}); + + + +var // A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +$5c0f37ca5ffb1850$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + instructions: new $6uUbQ$Array($6uUbQ$uint8) +}); + + + +let $2b2b260902b1c57e$var$loca = new $6uUbQ$VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new $6uUbQ$Array($6uUbQ$uint16) + }, + 1: { + offsets: new $6uUbQ$Array($6uUbQ$uint32) + } +}); +$2b2b260902b1c57e$var$loca.process = function() { + if (this.version === 0 && !this._processed) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] <<= 1; + this._processed = true; + } +}; +$2b2b260902b1c57e$var$loca.preEncode = function() { + if (this.version === 0 && this._processed !== false) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] >>>= 1; + this._processed = false; + } +}; +var $2b2b260902b1c57e$export$2e2bcd8739ae039 = $2b2b260902b1c57e$var$loca; + + + +var // Set of instructions executed whenever the point size or font transformation change +$7afb878c7bea4f66$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + controlValueProgram: new $6uUbQ$Array($6uUbQ$uint8) +}); + + + +var // only used for encoding +$6c92b6371bce8bd9$export$2e2bcd8739ae039 = new $6uUbQ$Array(new $6uUbQ$Buffer); + + + + +class $43e9821ef3717eec$export$2e2bcd8739ae039 { + getCFFVersion(ctx) { + while(ctx && !ctx.hdrSize)ctx = ctx.parent; + return ctx ? ctx.version : -1; + } + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE(); + if (count === 0) return []; + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) offsetType = $6uUbQ$uint8; + else if (offSize === 2) offsetType = $6uUbQ$uint16; + else if (offSize === 3) offsetType = $6uUbQ$uint24; + else if (offSize === 4) offsetType = $6uUbQ$uint32; + else throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + let ret = []; + let startPos = stream.pos + (count + 1) * offSize - 1; + let start = offsetType.decode(stream); + for(let i = 0; i < count; i++){ + let end = offsetType.decode(stream); + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else ret.push({ + offset: startPos + start, + length: end - start + }); + start = end; + } + stream.pos = startPos + start; + return ret; + } + size(arr, parent) { + let size = 2; + if (arr.length === 0) return size; + let type = this.type || new $6uUbQ$Buffer; + // find maximum offset to detminine offset type + let offset = 1; + for(let i = 0; i < arr.length; i++){ + let item = arr[i]; + offset += type.size(item, parent); + } + let offsetType; + if (offset <= 0xff) offsetType = $6uUbQ$uint8; + else if (offset <= 0xffff) offsetType = $6uUbQ$uint16; + else if (offset <= 0xffffff) offsetType = $6uUbQ$uint24; + else if (offset <= 0xffffffff) offsetType = $6uUbQ$uint32; + else throw new Error("Bad offset in CFFIndex"); + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + return size; + } + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) return; + let type = this.type || new $6uUbQ$Buffer; + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr){ + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + let offsetType; + if (offset <= 0xff) offsetType = $6uUbQ$uint8; + else if (offset <= 0xffff) offsetType = $6uUbQ$uint16; + else if (offset <= 0xffffff) offsetType = $6uUbQ$uint24; + else if (offset <= 0xffffffff) offsetType = $6uUbQ$uint32; + else throw new Error("Bad offset in CFFIndex"); + // write offset size + stream.writeUInt8(offsetType.size()); + // write elements + offset = 1; + offsetType.encode(stream, offset); + for (let size of sizes){ + offset += size; + offsetType.encode(stream, offset); + } + for (let item of arr)type.encode(stream, item, parent); + return; + } + constructor(type){ + this.type = type; + } +} + + + + + +const $c2d28e92708f99da$var$FLOAT_EOF = 0xf; +const $c2d28e92708f99da$var$FLOAT_LOOKUP = [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '.', + 'E', + 'E-', + null, + '-' +]; +const $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; +class $c2d28e92708f99da$export$2e2bcd8739ae039 { + static decode(stream, value) { + if (32 <= value && value <= 246) return value - 139; + if (247 <= value && value <= 250) return (value - 247) * 256 + stream.readUInt8() + 108; + if (251 <= value && value <= 254) return -(value - 251) * 256 - stream.readUInt8() - 108; + if (value === 28) return stream.readInt16BE(); + if (value === 29) return stream.readInt32BE(); + if (value === 30) { + let str = ''; + while(true){ + let b = stream.readUInt8(); + let n1 = b >> 4; + if (n1 === $c2d28e92708f99da$var$FLOAT_EOF) break; + str += $c2d28e92708f99da$var$FLOAT_LOOKUP[n1]; + let n2 = b & 15; + if (n2 === $c2d28e92708f99da$var$FLOAT_EOF) break; + str += $c2d28e92708f99da$var$FLOAT_LOOKUP[n2]; + } + return parseFloat(str); + } + return null; + } + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) value = 32768; + if ((value | 0) !== value) { + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + } else if (-107 <= value && value <= 107) return 1; + else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) return 2; + else if (-32768 <= value && value <= 32767) return 3; + else return 5; + } + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } else if ((val | 0) !== val) { + stream.writeUInt8(30); + let str = '' + val; + for(let i = 0; i < str.length; i += 2){ + let c1 = str[i]; + let n1 = $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP[c1] || +c1; + if (i === str.length - 1) var n2 = $c2d28e92708f99da$var$FLOAT_EOF; + else { + let c2 = str[i + 1]; + var n2 = $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + stream.writeUInt8(n1 << 4 | n2 & 15); + } + if (n2 !== $c2d28e92708f99da$var$FLOAT_EOF) return stream.writeUInt8($c2d28e92708f99da$var$FLOAT_EOF << 4); + } else if (-107 <= val && val <= 107) return stream.writeUInt8(val + 139); + else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} + + +class $61aa549f16d58b9b$export$2e2bcd8739ae039 { + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.decodeOperands(type[i], stream, ret, [ + op + ])); + else if (type.decode != null) return type.decode(stream, ret, operands); + else switch(type){ + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.encodeOperands(type[i], stream, ctx, op)[0]); + else if (type.encode != null) return type.encode(stream, operands, ctx); + else if (typeof operands === 'number') return [ + operands + ]; + else if (typeof operands === 'boolean') return [ + +operands + ]; + else if (Array.isArray(operands)) return operands; + else return [ + operands + ]; + } + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + // define hidden properties + Object.defineProperties(ret, { + parent: { + value: parent + }, + _startOffset: { + value: stream.pos + } + }); + // fill in defaults + for(let key in this.fields){ + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + while(stream.pos < end){ + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) b = b << 8 | stream.readUInt8(); + let field = this.fields[b]; + if (!field) throw new Error(`Unknown operator ${b}`); + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof (0, $6uUbQ$PropertyDescriptor)) Object.defineProperty(ret, field[1], val); + else ret[field[1]] = val; + } + operands = []; + } else operands.push((0, $c2d28e92708f99da$export$2e2bcd8739ae039).decode(stream, b)); + } + return ret; + } + size(dict, parent, includePointers = true) { + let ctx = { + parent: parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + let len = 0; + for(let k in this.fields){ + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || (0, $6uUbQ$fastdeepequal)(val, field[3])) continue; + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands)len += (0, $c2d28e92708f99da$export$2e2bcd8739ae039).size(op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + len += key.length; + } + if (includePointers) len += ctx.pointerSize; + return len; + } + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: dict, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + for (let field of this.ops){ + let val = dict[field[1]]; + if (val == null || (0, $6uUbQ$fastdeepequal)(val, field[3])) continue; + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands)(0, $c2d28e92708f99da$export$2e2bcd8739ae039).encode(stream, op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + for (let op of key)stream.writeUInt8(op); + } + let i = 0; + while(i < ctx.pointers.length){ + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + return; + } + constructor(ops = []){ + this.ops = ops; + this.fields = {}; + for (let field of ops){ + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } +} + + + + +class $0e34a43d05bde82c$export$2e2bcd8739ae039 extends $6uUbQ$Pointer { + decode(stream, parent, operands) { + this.offsetType = { + decode: ()=>operands[0] + }; + return super.decode(stream, parent, operands); + } + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: ()=>0 + }; + this.size(value, ctx); + return [ + new $0e34a43d05bde82c$var$Ptr(0) + ]; + } + let ptr = null; + this.offsetType = { + encode: (stream, val)=>ptr = val + }; + super.encode(stream, value, ctx); + return [ + new $0e34a43d05bde82c$var$Ptr(ptr) + ]; + } + constructor(type, options = {}){ + if (options.type == null) options.type = 'global'; + super(null, type, options); + } +} +class $0e34a43d05bde82c$var$Ptr { + valueOf() { + return this.val; + } + constructor(val){ + this.val = val; + this.forceLarge = true; + } +} + + + + + +class $6d59db2e29cc77b3$var$CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while(operands.length > numBlends)operands.pop(); + } +} +var $6d59db2e29cc77b3$export$2e2bcd8739ae039 = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type default + [ + 6, + 'BlueValues', + 'delta', + null + ], + [ + 7, + 'OtherBlues', + 'delta', + null + ], + [ + 8, + 'FamilyBlues', + 'delta', + null + ], + [ + 9, + 'FamilyOtherBlues', + 'delta', + null + ], + [ + [ + 12, + 9 + ], + 'BlueScale', + 'number', + 0.039625 + ], + [ + [ + 12, + 10 + ], + 'BlueShift', + 'number', + 7 + ], + [ + [ + 12, + 11 + ], + 'BlueFuzz', + 'number', + 1 + ], + [ + 10, + 'StdHW', + 'number', + null + ], + [ + 11, + 'StdVW', + 'number', + null + ], + [ + [ + 12, + 12 + ], + 'StemSnapH', + 'delta', + null + ], + [ + [ + 12, + 13 + ], + 'StemSnapV', + 'delta', + null + ], + [ + [ + 12, + 14 + ], + 'ForceBold', + 'boolean', + false + ], + [ + [ + 12, + 17 + ], + 'LanguageGroup', + 'number', + 0 + ], + [ + [ + 12, + 18 + ], + 'ExpansionFactor', + 'number', + 0.06 + ], + [ + [ + 12, + 19 + ], + 'initialRandomSeed', + 'number', + 0 + ], + [ + 20, + 'defaultWidthX', + 'number', + 0 + ], + [ + 21, + 'nominalWidthX', + 'number', + 0 + ], + [ + 22, + 'vsindex', + 'number', + 0 + ], + [ + 23, + 'blend', + $6d59db2e29cc77b3$var$CFFBlendOp, + null + ], + [ + 19, + 'Subrs', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039), { + type: 'local' + }), + null + ] +]); + + +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +var $229224aec43783c5$export$2e2bcd8739ae039 = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold" +]; + + +let $bc0433d9b7e41f5f$export$dee0027060fa13bd = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + '', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + '', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + '', + 'questiondown', + '', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + '', + 'ring', + 'cedilla', + '', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'AE', + '', + 'ordfeminine', + '', + '', + '', + '', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + '', + '', + '', + '', + '', + 'ae', + '', + '', + '', + 'dotlessi', + '', + '', + 'lslash', + 'oslash', + 'oe', + 'germandbls' +]; +let $bc0433d9b7e41f5f$export$4f58f497e14a53c3 = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + '', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + '', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + '', + '', + 'isuperior', + '', + '', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + '', + '', + 'rsuperior', + 'ssuperior', + 'tsuperior', + '', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + '', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + '', + '', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + '', + 'Dotaccentsmall', + '', + '', + 'Macronsmall', + '', + '', + 'figuredash', + 'hypheninferior', + '', + '', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + '', + '', + '', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + '', + '', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; + + +let $ef658f5c9a1488b2$export$c33b50336c234f16 = [ + '.notdef', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + 'questiondown', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + 'AE', + 'ordfeminine', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + 'ae', + 'dotlessi', + 'lslash', + 'oslash', + 'oe', + 'germandbls', + 'onesuperior', + 'logicalnot', + 'mu', + 'trademark', + 'Eth', + 'onehalf', + 'plusminus', + 'Thorn', + 'onequarter', + 'divide', + 'brokenbar', + 'degree', + 'thorn', + 'threequarters', + 'twosuperior', + 'registered', + 'minus', + 'eth', + 'multiply', + 'threesuperior', + 'copyright', + 'Aacute', + 'Acircumflex', + 'Adieresis', + 'Agrave', + 'Aring', + 'Atilde', + 'Ccedilla', + 'Eacute', + 'Ecircumflex', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Ntilde', + 'Oacute', + 'Ocircumflex', + 'Odieresis', + 'Ograve', + 'Otilde', + 'Scaron', + 'Uacute', + 'Ucircumflex', + 'Udieresis', + 'Ugrave', + 'Yacute', + 'Ydieresis', + 'Zcaron', + 'aacute', + 'acircumflex', + 'adieresis', + 'agrave', + 'aring', + 'atilde', + 'ccedilla', + 'eacute', + 'ecircumflex', + 'edieresis', + 'egrave', + 'iacute', + 'icircumflex', + 'idieresis', + 'igrave', + 'ntilde', + 'oacute', + 'ocircumflex', + 'odieresis', + 'ograve', + 'otilde', + 'scaron', + 'uacute', + 'ucircumflex', + 'udieresis', + 'ugrave', + 'yacute', + 'ydieresis', + 'zcaron' +]; +let $ef658f5c9a1488b2$export$3ed0f9e1fee8d489 = [ + '.notdef', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + 'Dotaccentsmall', + 'Macronsmall', + 'figuredash', + 'hypheninferior', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; +let $ef658f5c9a1488b2$export$dc28be11139d4120 = [ + '.notdef', + 'space', + 'dollaroldstyle', + 'dollarsuperior', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'hyphensuperior', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'centoldstyle', + 'figuredash', + 'hypheninferior', + 'onequarter', + 'onehalf', + 'threequarters', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior' +]; + + + +//######################## +// Scripts and Languages # +//######################## +let $7cbbe4e24ef3cb75$var$LangSysTable = new $6uUbQ$Struct({ + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + reqFeatureIndex: $6uUbQ$uint16, + featureCount: $6uUbQ$uint16, + featureIndexes: new $6uUbQ$Array($6uUbQ$uint16, 'featureCount') +}); +let $7cbbe4e24ef3cb75$var$LangSysRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + langSys: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$LangSysTable, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$var$Script = new $6uUbQ$Struct({ + defaultLangSys: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$LangSysTable), + count: $6uUbQ$uint16, + langSysRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LangSysRecord, 'count') +}); +let $7cbbe4e24ef3cb75$var$ScriptRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + script: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$Script, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$export$3e15fc05ce864229 = new $6uUbQ$Array($7cbbe4e24ef3cb75$var$ScriptRecord, $6uUbQ$uint16); +//####################### +// Features and Lookups # +//####################### +let $7cbbe4e24ef3cb75$var$FeatureParams = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + nameID: $6uUbQ$uint16 +}); +let $7cbbe4e24ef3cb75$export$6e91cf7616333d5 = new $6uUbQ$Struct({ + featureParams: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$FeatureParams), + lookupCount: $6uUbQ$uint16, + lookupListIndexes: new $6uUbQ$Array($6uUbQ$uint16, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$FeatureRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + feature: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$6e91cf7616333d5, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$export$aa18130def4b6cb4 = new $6uUbQ$Array($7cbbe4e24ef3cb75$var$FeatureRecord, $6uUbQ$uint16); +let $7cbbe4e24ef3cb75$var$LookupFlags = new $6uUbQ$Struct({ + markAttachmentType: $6uUbQ$uint8, + flags: new $6uUbQ$Bitfield($6uUbQ$uint8, [ + 'rightToLeft', + 'ignoreBaseGlyphs', + 'ignoreLigatures', + 'ignoreMarks', + 'useMarkFilteringSet' + ]) +}); +function $7cbbe4e24ef3cb75$export$df0008c6ff2da22a(SubTable) { + let Lookup = new $6uUbQ$Struct({ + lookupType: $6uUbQ$uint16, + flags: $7cbbe4e24ef3cb75$var$LookupFlags, + subTableCount: $6uUbQ$uint16, + subTables: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, SubTable), 'subTableCount'), + markFilteringSet: new $6uUbQ$Optional($6uUbQ$uint16, (t)=>t.flags.flags.useMarkFilteringSet) + }); + return new $6uUbQ$LazyArray(new $6uUbQ$Pointer($6uUbQ$uint16, Lookup), $6uUbQ$uint16); +} +//################# +// Coverage Table # +//################# +let $7cbbe4e24ef3cb75$var$RangeRecord = new $6uUbQ$Struct({ + start: $6uUbQ$uint16, + end: $6uUbQ$uint16, + startCoverageIndex: $6uUbQ$uint16 +}); +let $7cbbe4e24ef3cb75$export$17608c3f81a6111 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + glyphCount: $6uUbQ$uint16, + glyphs: new $6uUbQ$Array($6uUbQ$uint16, 'glyphCount') + }, + 2: { + rangeCount: $6uUbQ$uint16, + rangeRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$RangeRecord, 'rangeCount') + } +}); +//######################### +// Class Definition Table # +//######################### +let $7cbbe4e24ef3cb75$var$ClassRangeRecord = new $6uUbQ$Struct({ + start: $6uUbQ$uint16, + end: $6uUbQ$uint16, + class: $6uUbQ$uint16 +}); +let $7cbbe4e24ef3cb75$export$843d551fbbafef71 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + startGlyph: $6uUbQ$uint16, + glyphCount: $6uUbQ$uint16, + classValueArray: new $6uUbQ$Array($6uUbQ$uint16, 'glyphCount') + }, + 2: { + classRangeCount: $6uUbQ$uint16, + classRangeRecord: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$ClassRangeRecord, 'classRangeCount') + } +}); +let $7cbbe4e24ef3cb75$export$8215d14a63d9fb10 = new $6uUbQ$Struct({ + a: $6uUbQ$uint16, + b: $6uUbQ$uint16, + deltaFormat: $6uUbQ$uint16 +}); +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# +let $7cbbe4e24ef3cb75$var$LookupRecord = new $6uUbQ$Struct({ + sequenceIndex: $6uUbQ$uint16, + lookupListIndex: $6uUbQ$uint16 +}); +let $7cbbe4e24ef3cb75$var$Rule = new $6uUbQ$Struct({ + glyphCount: $6uUbQ$uint16, + lookupCount: $6uUbQ$uint16, + input: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$RuleSet = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$Rule), $6uUbQ$uint16); +let $7cbbe4e24ef3cb75$var$ClassRule = new $6uUbQ$Struct({ + glyphCount: $6uUbQ$uint16, + lookupCount: $6uUbQ$uint16, + classes: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$ClassSet = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$ClassRule), $6uUbQ$uint16); +let $7cbbe4e24ef3cb75$export$841858b892ce1f4c = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + ruleSetCount: $6uUbQ$uint16, + ruleSets: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$RuleSet), 'ruleSetCount') + }, + 2: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + classDef: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + classSetCnt: $6uUbQ$uint16, + classSet: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: $6uUbQ$uint16, + lookupCount: $6uUbQ$uint16, + coverages: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'glyphCount'), + lookupRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') + } +}); +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### +let $7cbbe4e24ef3cb75$var$ChainRule = new $6uUbQ$Struct({ + backtrackGlyphCount: $6uUbQ$uint16, + backtrack: new $6uUbQ$Array($6uUbQ$uint16, 'backtrackGlyphCount'), + inputGlyphCount: $6uUbQ$uint16, + input: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.inputGlyphCount - 1), + lookaheadGlyphCount: $6uUbQ$uint16, + lookahead: new $6uUbQ$Array($6uUbQ$uint16, 'lookaheadGlyphCount'), + lookupCount: $6uUbQ$uint16, + lookupRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$ChainRuleSet = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$ChainRule), $6uUbQ$uint16); +let $7cbbe4e24ef3cb75$export$5e6d09e6861162f6 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + chainCount: $6uUbQ$uint16, + chainRuleSets: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$ChainRuleSet), 'chainCount') + }, + 2: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + backtrackClassDef: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + inputClassDef: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + lookaheadClassDef: new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + chainCount: $6uUbQ$uint16, + chainClassSet: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$var$ChainRuleSet), 'chainCount') + }, + 3: { + backtrackGlyphCount: $6uUbQ$uint16, + backtrackCoverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'backtrackGlyphCount'), + inputGlyphCount: $6uUbQ$uint16, + inputCoverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'inputGlyphCount'), + lookaheadGlyphCount: $6uUbQ$uint16, + lookaheadCoverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'lookaheadGlyphCount'), + lookupCount: $6uUbQ$uint16, + lookupRecords: new $6uUbQ$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') + } +}); + + + +/******************* + * Variation Store * + *******************/ let $1a47b0c45c1c22fe$var$F2DOT14 = new $6uUbQ$Fixed(16, 'BE', 14); +let $1a47b0c45c1c22fe$var$RegionAxisCoordinates = new $6uUbQ$Struct({ + startCoord: $1a47b0c45c1c22fe$var$F2DOT14, + peakCoord: $1a47b0c45c1c22fe$var$F2DOT14, + endCoord: $1a47b0c45c1c22fe$var$F2DOT14 +}); +let $1a47b0c45c1c22fe$var$VariationRegionList = new $6uUbQ$Struct({ + axisCount: $6uUbQ$uint16, + regionCount: $6uUbQ$uint16, + variationRegions: new $6uUbQ$Array(new $6uUbQ$Array($1a47b0c45c1c22fe$var$RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); +let $1a47b0c45c1c22fe$var$DeltaSet = new $6uUbQ$Struct({ + shortDeltas: new $6uUbQ$Array($6uUbQ$int16, (t)=>t.parent.shortDeltaCount), + regionDeltas: new $6uUbQ$Array($6uUbQ$int8, (t)=>t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: (t)=>t.shortDeltas.concat(t.regionDeltas) +}); +let $1a47b0c45c1c22fe$var$ItemVariationData = new $6uUbQ$Struct({ + itemCount: $6uUbQ$uint16, + shortDeltaCount: $6uUbQ$uint16, + regionIndexCount: $6uUbQ$uint16, + regionIndexes: new $6uUbQ$Array($6uUbQ$uint16, 'regionIndexCount'), + deltaSets: new $6uUbQ$Array($1a47b0c45c1c22fe$var$DeltaSet, 'itemCount') +}); +let $1a47b0c45c1c22fe$export$fe1b122a2710f241 = new $6uUbQ$Struct({ + format: $6uUbQ$uint16, + variationRegionList: new $6uUbQ$Pointer($6uUbQ$uint32, $1a47b0c45c1c22fe$var$VariationRegionList), + variationDataCount: $6uUbQ$uint16, + itemVariationData: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint32, $1a47b0c45c1c22fe$var$ItemVariationData), 'variationDataCount') +}); +/********************** + * Feature Variations * + **********************/ let $1a47b0c45c1c22fe$var$ConditionTable = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + axisIndex: $6uUbQ$uint16, + axisIndex: $6uUbQ$uint16, + filterRangeMinValue: $1a47b0c45c1c22fe$var$F2DOT14, + filterRangeMaxValue: $1a47b0c45c1c22fe$var$F2DOT14 + } +}); +let $1a47b0c45c1c22fe$var$ConditionSet = new $6uUbQ$Struct({ + conditionCount: $6uUbQ$uint16, + conditionTable: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint32, $1a47b0c45c1c22fe$var$ConditionTable), 'conditionCount') +}); +let $1a47b0c45c1c22fe$var$FeatureTableSubstitutionRecord = new $6uUbQ$Struct({ + featureIndex: $6uUbQ$uint16, + alternateFeatureTable: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $7cbbe4e24ef3cb75$export$6e91cf7616333d5), { + type: 'parent' + }) +}); +let $1a47b0c45c1c22fe$var$FeatureTableSubstitution = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + substitutionCount: $6uUbQ$uint16, + substitutions: new $6uUbQ$Array($1a47b0c45c1c22fe$var$FeatureTableSubstitutionRecord, 'substitutionCount') +}); +let $1a47b0c45c1c22fe$var$FeatureVariationRecord = new $6uUbQ$Struct({ + conditionSet: new $6uUbQ$Pointer($6uUbQ$uint32, $1a47b0c45c1c22fe$var$ConditionSet, { + type: 'parent' + }), + featureTableSubstitution: new $6uUbQ$Pointer($6uUbQ$uint32, $1a47b0c45c1c22fe$var$FeatureTableSubstitution, { + type: 'parent' + }) +}); +let $1a47b0c45c1c22fe$export$441b70b7971dd419 = new $6uUbQ$Struct({ + majorVersion: $6uUbQ$uint16, + minorVersion: $6uUbQ$uint16, + featureVariationRecordCount: $6uUbQ$uint32, + featureVariationRecords: new $6uUbQ$Array($1a47b0c45c1c22fe$var$FeatureVariationRecord, 'featureVariationRecordCount') +}); + + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class $b84fd3dd9d8eddb2$var$PredefinedOp { + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) return this.predefinedOps[operands[0]]; + return this.type.decode(stream, parent, operands); + } + size(value, ctx) { + return this.type.size(value, ctx); + } + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) return index; + return this.type.encode(stream, value, ctx); + } + constructor(predefinedOps, type){ + this.predefinedOps = predefinedOps; + this.type = type; + } +} +class $b84fd3dd9d8eddb2$var$CFFEncodingVersion extends $6uUbQ$Number { + decode(stream) { + return $6uUbQ$uint8.decode(stream) & 0x7f; + } + constructor(){ + super('UInt8'); + } +} +let $b84fd3dd9d8eddb2$var$Range1 = new $6uUbQ$Struct({ + first: $6uUbQ$uint16, + nLeft: $6uUbQ$uint8 +}); +let $b84fd3dd9d8eddb2$var$Range2 = new $6uUbQ$Struct({ + first: $6uUbQ$uint16, + nLeft: $6uUbQ$uint16 +}); +let $b84fd3dd9d8eddb2$var$CFFCustomEncoding = new $6uUbQ$VersionedStruct(new $b84fd3dd9d8eddb2$var$CFFEncodingVersion(), { + 0: { + nCodes: $6uUbQ$uint8, + codes: new $6uUbQ$Array($6uUbQ$uint8, 'nCodes') + }, + 1: { + nRanges: $6uUbQ$uint8, + ranges: new $6uUbQ$Array($b84fd3dd9d8eddb2$var$Range1, 'nRanges') + } +}); +let $b84fd3dd9d8eddb2$var$CFFEncoding = new $b84fd3dd9d8eddb2$var$PredefinedOp([ + (0, $bc0433d9b7e41f5f$export$dee0027060fa13bd), + (0, $bc0433d9b7e41f5f$export$4f58f497e14a53c3) +], new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFCustomEncoding, { + lazy: true +})); +// Decodes an array of ranges until the total +// length is equal to the provided length. +class $b84fd3dd9d8eddb2$var$RangeArray extends $6uUbQ$Array { + decode(stream, parent) { + let length = (0, $6uUbQ$resolveLength)(this.length, stream, parent); + let count = 0; + let res = []; + while(count < length){ + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + return res; + } +} +let $b84fd3dd9d8eddb2$var$CFFCustomCharset = new $6uUbQ$VersionedStruct($6uUbQ$uint8, { + 0: { + glyphs: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.parent.CharStrings.length - 1) + }, + 1: { + ranges: new $b84fd3dd9d8eddb2$var$RangeArray($b84fd3dd9d8eddb2$var$Range1, (t)=>t.parent.CharStrings.length - 1) + }, + 2: { + ranges: new $b84fd3dd9d8eddb2$var$RangeArray($b84fd3dd9d8eddb2$var$Range2, (t)=>t.parent.CharStrings.length - 1) + } +}); +let $b84fd3dd9d8eddb2$var$CFFCharset = new $b84fd3dd9d8eddb2$var$PredefinedOp([ + (0, $ef658f5c9a1488b2$export$c33b50336c234f16), + (0, $ef658f5c9a1488b2$export$3ed0f9e1fee8d489), + (0, $ef658f5c9a1488b2$export$dc28be11139d4120) +], new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFCustomCharset, { + lazy: true +})); +let $b84fd3dd9d8eddb2$var$FDRange3 = new $6uUbQ$Struct({ + first: $6uUbQ$uint16, + fd: $6uUbQ$uint8 +}); +let $b84fd3dd9d8eddb2$var$FDRange4 = new $6uUbQ$Struct({ + first: $6uUbQ$uint32, + fd: $6uUbQ$uint16 +}); +let $b84fd3dd9d8eddb2$var$FDSelect = new $6uUbQ$VersionedStruct($6uUbQ$uint8, { + 0: { + fds: new $6uUbQ$Array($6uUbQ$uint8, (t)=>t.parent.CharStrings.length) + }, + 3: { + nRanges: $6uUbQ$uint16, + ranges: new $6uUbQ$Array($b84fd3dd9d8eddb2$var$FDRange3, 'nRanges'), + sentinel: $6uUbQ$uint16 + }, + 4: { + nRanges: $6uUbQ$uint32, + ranges: new $6uUbQ$Array($b84fd3dd9d8eddb2$var$FDRange4, 'nRanges'), + sentinel: $6uUbQ$uint32 + } +}); +let $b84fd3dd9d8eddb2$var$ptr = new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)((0, $6d59db2e29cc77b3$export$2e2bcd8739ae039)); +class $b84fd3dd9d8eddb2$var$CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return $b84fd3dd9d8eddb2$var$ptr.decode(stream, parent, [ + operands[1] + ]); + } + size(dict, ctx) { + return [ + (0, $6d59db2e29cc77b3$export$2e2bcd8739ae039).size(dict, ctx, false), + $b84fd3dd9d8eddb2$var$ptr.size(dict, ctx)[0] + ]; + } + encode(stream, dict, ctx) { + return [ + (0, $6d59db2e29cc77b3$export$2e2bcd8739ae039).size(dict, ctx, false), + $b84fd3dd9d8eddb2$var$ptr.encode(stream, dict, ctx)[0] + ]; + } +} +let $b84fd3dd9d8eddb2$var$FontDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + 18, + 'Private', + new $b84fd3dd9d8eddb2$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ] +]); +let $b84fd3dd9d8eddb2$var$CFFTopDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + [ + 12, + 30 + ], + 'ROS', + [ + 'sid', + 'sid', + 'number' + ], + null + ], + [ + 0, + 'version', + 'sid', + null + ], + [ + 1, + 'Notice', + 'sid', + null + ], + [ + [ + 12, + 0 + ], + 'Copyright', + 'sid', + null + ], + [ + 2, + 'FullName', + 'sid', + null + ], + [ + 3, + 'FamilyName', + 'sid', + null + ], + [ + 4, + 'Weight', + 'sid', + null + ], + [ + [ + 12, + 1 + ], + 'isFixedPitch', + 'boolean', + false + ], + [ + [ + 12, + 2 + ], + 'ItalicAngle', + 'number', + 0 + ], + [ + [ + 12, + 3 + ], + 'UnderlinePosition', + 'number', + -100 + ], + [ + [ + 12, + 4 + ], + 'UnderlineThickness', + 'number', + 50 + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ], + [ + [ + 12, + 6 + ], + 'CharstringType', + 'number', + 2 + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 13, + 'UniqueID', + 'number', + null + ], + [ + 5, + 'FontBBox', + 'array', + [ + 0, + 0, + 0, + 0 + ] + ], + [ + [ + 12, + 8 + ], + 'StrokeWidth', + 'number', + 0 + ], + [ + 14, + 'XUID', + 'array', + null + ], + [ + 15, + 'charset', + $b84fd3dd9d8eddb2$var$CFFCharset, + (0, $ef658f5c9a1488b2$export$c33b50336c234f16) + ], + [ + 16, + 'Encoding', + $b84fd3dd9d8eddb2$var$CFFEncoding, + (0, $bc0433d9b7e41f5f$export$dee0027060fa13bd) + ], + [ + 17, + 'CharStrings', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)), + null + ], + [ + 18, + 'Private', + new $b84fd3dd9d8eddb2$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 20 + ], + 'SyntheticBase', + 'number', + null + ], + [ + [ + 12, + 21 + ], + 'PostScript', + 'sid', + null + ], + [ + [ + 12, + 22 + ], + 'BaseFontName', + 'sid', + null + ], + [ + [ + 12, + 23 + ], + 'BaseFontBlend', + 'delta', + null + ], + // CID font specific + [ + [ + 12, + 31 + ], + 'CIDFontVersion', + 'number', + 0 + ], + [ + [ + 12, + 32 + ], + 'CIDFontRevision', + 'number', + 0 + ], + [ + [ + 12, + 33 + ], + 'CIDFontType', + 'number', + 0 + ], + [ + [ + 12, + 34 + ], + 'CIDCount', + 'number', + 8720 + ], + [ + [ + 12, + 35 + ], + 'UIDBase', + 'number', + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FontDict)), + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ] +]); +let $b84fd3dd9d8eddb2$var$VariationStore = new $6uUbQ$Struct({ + length: $6uUbQ$uint16, + itemVariationStore: (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241) +}); +let $b84fd3dd9d8eddb2$var$CFF2TopDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 17, + 'CharStrings', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)), + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FontDict)), + null + ], + [ + 24, + 'vstore', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$VariationStore), + null + ], + [ + 25, + 'maxstack', + 'number', + 193 + ] +]); +let $b84fd3dd9d8eddb2$var$CFFTop = new $6uUbQ$VersionedStruct($6uUbQ$fixed16, { + 1: { + hdrSize: $6uUbQ$uint8, + offSize: $6uUbQ$uint8, + nameIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)(new $6uUbQ$String('length')), + topDictIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFTopDict), + stringIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)(new $6uUbQ$String('length')), + globalSubrIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039) + }, + 2: { + hdrSize: $6uUbQ$uint8, + length: $6uUbQ$uint16, + topDict: $b84fd3dd9d8eddb2$var$CFF2TopDict, + globalSubrIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039) + } +}); +var $b84fd3dd9d8eddb2$export$2e2bcd8739ae039 = $b84fd3dd9d8eddb2$var$CFFTop; + + + + +class $822ac0d589e4e237$var$CFFFont { + static decode(stream) { + return new $822ac0d589e4e237$var$CFFFont(stream); + } + decode() { + let start = this.stream.pos; + let top = (0, $b84fd3dd9d8eddb2$export$2e2bcd8739ae039).decode(this.stream); + for(let key in top){ + let val = top[key]; + this[key] = val; + } + if (this.version < 2) { + if (this.topDictIndex.length !== 1) throw new Error("Only a single font is allowed in CFF"); + this.topDict = this.topDictIndex[0]; + } + this.isCIDFont = this.topDict.ROS != null; + return this; + } + string(sid) { + if (this.version >= 2) return null; + if (sid < (0, $229224aec43783c5$export$2e2bcd8739ae039).length) return (0, $229224aec43783c5$export$2e2bcd8739ae039)[sid]; + return this.stringIndex[sid - (0, $229224aec43783c5$export$2e2bcd8739ae039).length]; + } + get postscriptName() { + if (this.version < 2) return this.nameIndex[0]; + return null; + } + get fullName() { + return this.string(this.topDict.FullName); + } + get familyName() { + return this.string(this.topDict.FamilyName); + } + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) return null; + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) return null; + let { charset: charset } = this.topDict; + if (Array.isArray(charset)) return charset[gid]; + if (gid === 0) return '.notdef'; + gid -= 1; + switch(charset.version){ + case 0: + return this.string(charset.glyphs[gid]); + case 1: + case 2: + for(let i = 0; i < charset.ranges.length; i++){ + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) return this.string(range.first + (gid - range.offset)); + } + break; + } + return null; + } + fdForGlyph(gid) { + if (!this.topDict.FDSelect) return null; + switch(this.topDict.FDSelect.version){ + case 0: + return this.topDict.FDSelect.fds[gid]; + case 3: + case 4: + let { ranges: ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + while(low <= high){ + let mid = low + high >> 1; + if (gid < ranges[mid].first) high = mid - 1; + else if (mid < high && gid >= ranges[mid + 1].first) low = mid + 1; + else return ranges[mid].fd; + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) return this.topDict.FDArray[fd].Private; + return null; + } + if (this.version < 2) return this.topDict.Private; + return this.topDict.FDArray[0].Private; + } + constructor(stream){ + this.stream = stream; + this.decode(); + } +} +var $822ac0d589e4e237$export$2e2bcd8739ae039 = $822ac0d589e4e237$var$CFFFont; + + + +let $2bbf2bc1ce37cd8f$var$VerticalOrigin = new $6uUbQ$Struct({ + glyphIndex: $6uUbQ$uint16, + vertOriginY: $6uUbQ$int16 +}); +var $2bbf2bc1ce37cd8f$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + majorVersion: $6uUbQ$uint16, + minorVersion: $6uUbQ$uint16, + defaultVertOriginY: $6uUbQ$int16, + numVertOriginYMetrics: $6uUbQ$uint16, + metrics: new $6uUbQ$Array($2bbf2bc1ce37cd8f$var$VerticalOrigin, 'numVertOriginYMetrics') +}); + + + + +let $0941618dc22a946d$export$16b227cb15d716a0 = new $6uUbQ$Struct({ + height: $6uUbQ$uint8, + width: $6uUbQ$uint8, + horiBearingX: $6uUbQ$int8, + horiBearingY: $6uUbQ$int8, + horiAdvance: $6uUbQ$uint8, + vertBearingX: $6uUbQ$int8, + vertBearingY: $6uUbQ$int8, + vertAdvance: $6uUbQ$uint8 +}); +let $0941618dc22a946d$export$62c53e75f69bfe12 = new $6uUbQ$Struct({ + height: $6uUbQ$uint8, + width: $6uUbQ$uint8, + bearingX: $6uUbQ$int8, + bearingY: $6uUbQ$int8, + advance: $6uUbQ$uint8 +}); +let $0941618dc22a946d$var$EBDTComponent = new $6uUbQ$Struct({ + glyph: $6uUbQ$uint16, + xOffset: $6uUbQ$int8, + yOffset: $6uUbQ$int8 +}); +class $0941618dc22a946d$var$ByteAligned { +} +class $0941618dc22a946d$var$BitAligned { +} +let $0941618dc22a946d$export$f1f5ddeb20d14f = new $6uUbQ$VersionedStruct('version', { + 1: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + data: $0941618dc22a946d$var$ByteAligned + }, + 2: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + data: $0941618dc22a946d$var$BitAligned + }, + // format 3 is deprecated + // format 4 is not supported by Microsoft + 5: { + data: $0941618dc22a946d$var$BitAligned + }, + 6: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + data: $0941618dc22a946d$var$ByteAligned + }, + 7: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + data: $0941618dc22a946d$var$BitAligned + }, + 8: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + pad: new $6uUbQ$Reserved($6uUbQ$uint8), + numComponents: $6uUbQ$uint16, + components: new $6uUbQ$Array($0941618dc22a946d$var$EBDTComponent, 'numComponents') + }, + 9: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + pad: new $6uUbQ$Reserved($6uUbQ$uint8), + numComponents: $6uUbQ$uint16, + components: new $6uUbQ$Array($0941618dc22a946d$var$EBDTComponent, 'numComponents') + }, + 17: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + dataLen: $6uUbQ$uint32, + data: new $6uUbQ$Buffer('dataLen') + }, + 18: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + dataLen: $6uUbQ$uint32, + data: new $6uUbQ$Buffer('dataLen') + }, + 19: { + dataLen: $6uUbQ$uint32, + data: new $6uUbQ$Buffer('dataLen') + } +}); + + +let $9911c4c7201c13de$var$SBitLineMetrics = new $6uUbQ$Struct({ + ascender: $6uUbQ$int8, + descender: $6uUbQ$int8, + widthMax: $6uUbQ$uint8, + caretSlopeNumerator: $6uUbQ$int8, + caretSlopeDenominator: $6uUbQ$int8, + caretOffset: $6uUbQ$int8, + minOriginSB: $6uUbQ$int8, + minAdvanceSB: $6uUbQ$int8, + maxBeforeBL: $6uUbQ$int8, + minAfterBL: $6uUbQ$int8, + pad: new $6uUbQ$Reserved($6uUbQ$int8, 2) +}); +let $9911c4c7201c13de$var$CodeOffsetPair = new $6uUbQ$Struct({ + glyphCode: $6uUbQ$uint16, + offset: $6uUbQ$uint16 +}); +let $9911c4c7201c13de$var$IndexSubtable = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + header: { + imageFormat: $6uUbQ$uint16, + imageDataOffset: $6uUbQ$uint32 + }, + 1: { + offsetArray: new $6uUbQ$Array($6uUbQ$uint32, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 2: { + imageSize: $6uUbQ$uint32, + bigMetrics: (0, $0941618dc22a946d$export$16b227cb15d716a0) + }, + 3: { + offsetArray: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 4: { + numGlyphs: $6uUbQ$uint32, + glyphArray: new $6uUbQ$Array($9911c4c7201c13de$var$CodeOffsetPair, (t)=>t.numGlyphs + 1) + }, + 5: { + imageSize: $6uUbQ$uint32, + bigMetrics: (0, $0941618dc22a946d$export$16b227cb15d716a0), + numGlyphs: $6uUbQ$uint32, + glyphCodeArray: new $6uUbQ$Array($6uUbQ$uint16, 'numGlyphs') + } +}); +let $9911c4c7201c13de$var$IndexSubtableArray = new $6uUbQ$Struct({ + firstGlyphIndex: $6uUbQ$uint16, + lastGlyphIndex: $6uUbQ$uint16, + subtable: new $6uUbQ$Pointer($6uUbQ$uint32, $9911c4c7201c13de$var$IndexSubtable) +}); +let $9911c4c7201c13de$var$BitmapSizeTable = new $6uUbQ$Struct({ + indexSubTableArray: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($9911c4c7201c13de$var$IndexSubtableArray, 1), { + type: 'parent' + }), + indexTablesSize: $6uUbQ$uint32, + numberOfIndexSubTables: $6uUbQ$uint32, + colorRef: $6uUbQ$uint32, + hori: $9911c4c7201c13de$var$SBitLineMetrics, + vert: $9911c4c7201c13de$var$SBitLineMetrics, + startGlyphIndex: $6uUbQ$uint16, + endGlyphIndex: $6uUbQ$uint16, + ppemX: $6uUbQ$uint8, + ppemY: $6uUbQ$uint8, + bitDepth: $6uUbQ$uint8, + flags: new $6uUbQ$Bitfield($6uUbQ$uint8, [ + 'horizontal', + 'vertical' + ]) +}); +var $9911c4c7201c13de$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint32, + numSizes: $6uUbQ$uint32, + sizes: new $6uUbQ$Array($9911c4c7201c13de$var$BitmapSizeTable, 'numSizes') +}); + + + +let $abb847051efd51b1$var$ImageTable = new $6uUbQ$Struct({ + ppem: $6uUbQ$uint16, + resolution: $6uUbQ$uint16, + imageOffsets: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint32, 'void'), (t)=>t.parent.parent.maxp.numGlyphs + 1) +}); +var // This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +$abb847051efd51b1$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + flags: new $6uUbQ$Bitfield($6uUbQ$uint16, [ + 'renderOutlines' + ]), + numImgTables: $6uUbQ$uint32, + imageTables: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint32, $abb847051efd51b1$var$ImageTable), 'numImgTables') +}); + + + +let $eb629188f3dfefdd$var$LayerRecord = new $6uUbQ$Struct({ + gid: $6uUbQ$uint16, + paletteIndex: $6uUbQ$uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for +// the special case noted below. Each palette entry is 16 bits. +// A palette index of 0xFFFF is a special case indicating that +// the text foreground color should be used. +let $eb629188f3dfefdd$var$BaseGlyphRecord = new $6uUbQ$Struct({ + gid: $6uUbQ$uint16, + // and is not rendered for color. + firstLayerIndex: $6uUbQ$uint16, + // There will be numLayers consecutive entries for this base glyph. + numLayers: $6uUbQ$uint16 +}); +var $eb629188f3dfefdd$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numBaseGlyphRecords: $6uUbQ$uint16, + baseGlyphRecord: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($eb629188f3dfefdd$var$BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($eb629188f3dfefdd$var$LayerRecord, 'numLayerRecords'), { + lazy: true + }), + numLayerRecords: $6uUbQ$uint16 +}); + + + +let $08734b8e7dc64587$var$ColorRecord = new $6uUbQ$Struct({ + blue: $6uUbQ$uint8, + green: $6uUbQ$uint8, + red: $6uUbQ$uint8, + alpha: $6uUbQ$uint8 +}); +var $08734b8e7dc64587$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + header: { + numPaletteEntries: $6uUbQ$uint16, + numPalettes: $6uUbQ$uint16, + numColorRecords: $6uUbQ$uint16, + colorRecords: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($08734b8e7dc64587$var$ColorRecord, 'numColorRecords')), + colorRecordIndices: new $6uUbQ$Array($6uUbQ$uint16, 'numPalettes') + }, + 0: {}, + 1: { + offsetPaletteTypeArray: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($6uUbQ$uint32, 'numPalettes')), + offsetPaletteLabelArray: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($6uUbQ$uint16, 'numPalettes')), + offsetPaletteEntryLabelArray: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($6uUbQ$uint16, 'numPaletteEntries')) + } +}); + + + + + +let $497cef411d884e34$var$BaseCoord = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coordinate: $6uUbQ$int16 // X or Y value, in design units + }, + 2: { + coordinate: $6uUbQ$int16, + referenceGlyph: $6uUbQ$uint16, + baseCoordPoint: $6uUbQ$uint16 // Index of contour point on the referenceGlyph + }, + 3: { + coordinate: $6uUbQ$int16, + deviceTable: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) // Device table for X or Y value + } +}); +let $497cef411d884e34$var$BaseValues = new $6uUbQ$Struct({ + defaultIndex: $6uUbQ$uint16, + baseCoordCount: $6uUbQ$uint16, + baseCoords: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseCoord), 'baseCoordCount') +}); +let $497cef411d884e34$var$FeatMinMaxRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + minCoord: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseCoord, { + type: 'parent' + }), + maxCoord: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseCoord, { + type: 'parent' + }) // May be NULL +}); +let $497cef411d884e34$var$MinMax = new $6uUbQ$Struct({ + minCoord: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseCoord), + maxCoord: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseCoord), + featMinMaxCount: $6uUbQ$uint16, + featMinMaxRecords: new $6uUbQ$Array($497cef411d884e34$var$FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); +let $497cef411d884e34$var$BaseLangSysRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + minMax: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$MinMax, { + type: 'parent' + }) +}); +let $497cef411d884e34$var$BaseScript = new $6uUbQ$Struct({ + baseValues: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseValues), + defaultMinMax: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$MinMax), + baseLangSysCount: $6uUbQ$uint16, + baseLangSysRecords: new $6uUbQ$Array($497cef411d884e34$var$BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); +let $497cef411d884e34$var$BaseScriptRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + script: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseScript, { + type: 'parent' + }) +}); +let $497cef411d884e34$var$BaseScriptList = new $6uUbQ$Array($497cef411d884e34$var$BaseScriptRecord, $6uUbQ$uint16); +// Array of 4-byte baseline identification tags-must be in alphabetical order +let $497cef411d884e34$var$BaseTagList = new $6uUbQ$Array(new $6uUbQ$String(4), $6uUbQ$uint16); +let $497cef411d884e34$var$Axis = new $6uUbQ$Struct({ + baseTagList: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseTagList), + baseScriptList: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$BaseScriptList) +}); +var $497cef411d884e34$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint32, { + header: { + horizAxis: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$Axis), + vertAxis: new $6uUbQ$Pointer($6uUbQ$uint16, $497cef411d884e34$var$Axis) // May be NULL + }, + 0x00010000: {}, + 0x00010001: { + itemVariationStore: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)) + } +}); + + + + + +let $cf5f33c63ef209e6$var$AttachPoint = new $6uUbQ$Array($6uUbQ$uint16, $6uUbQ$uint16); +let $cf5f33c63ef209e6$var$AttachList = new $6uUbQ$Struct({ + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + glyphCount: $6uUbQ$uint16, + attachPoints: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$AttachPoint), 'glyphCount') +}); +let $cf5f33c63ef209e6$var$CaretValue = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coordinate: $6uUbQ$int16 + }, + 2: { + caretValuePoint: $6uUbQ$uint16 + }, + 3: { + coordinate: $6uUbQ$int16, + deviceTable: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) + } +}); +let $cf5f33c63ef209e6$var$LigGlyph = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$CaretValue), $6uUbQ$uint16); +let $cf5f33c63ef209e6$var$LigCaretList = new $6uUbQ$Struct({ + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + ligGlyphCount: $6uUbQ$uint16, + ligGlyphs: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$LigGlyph), 'ligGlyphCount') +}); +let $cf5f33c63ef209e6$var$MarkGlyphSetsDef = new $6uUbQ$Struct({ + markSetTableFormat: $6uUbQ$uint16, + markSetCount: $6uUbQ$uint16, + coverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint32, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'markSetCount') +}); +var $cf5f33c63ef209e6$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint32, { + header: { + glyphClassDef: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + attachList: new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$AttachList), + ligCaretList: new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$LigCaretList), + markAttachClassDef: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)) + }, + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new $6uUbQ$Pointer($6uUbQ$uint16, $cf5f33c63ef209e6$var$MarkGlyphSetsDef), + itemVariationStore: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)) + } +}); + + + + + +let $47e0e8ef515d9903$var$ValueFormat = new $6uUbQ$Bitfield($6uUbQ$uint16, [ + 'xPlacement', + 'yPlacement', + 'xAdvance', + 'yAdvance', + 'xPlaDevice', + 'yPlaDevice', + 'xAdvDevice', + 'yAdvDevice' +]); +let $47e0e8ef515d9903$var$types = { + xPlacement: $6uUbQ$int16, + yPlacement: $6uUbQ$int16, + xAdvance: $6uUbQ$int16, + yAdvance: $6uUbQ$int16, + xPlaDevice: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yPlaDevice: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + xAdvDevice: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yAdvDevice: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }) +}; +class $47e0e8ef515d9903$var$ValueRecord { + buildStruct(parent) { + let struct = parent; + while(!struct[this.key] && struct.parent)struct = struct.parent; + if (!struct[this.key]) return; + let fields = {}; + fields.rel = ()=>struct._startOffset; + let format = struct[this.key]; + for(let key in format)if (format[key]) fields[key] = $47e0e8ef515d9903$var$types[key]; + return new $6uUbQ$Struct(fields); + } + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } + constructor(key = 'valueFormat'){ + this.key = key; + } +} +let $47e0e8ef515d9903$var$PairValueRecord = new $6uUbQ$Struct({ + secondGlyph: $6uUbQ$uint16, + value1: new $47e0e8ef515d9903$var$ValueRecord('valueFormat1'), + value2: new $47e0e8ef515d9903$var$ValueRecord('valueFormat2') +}); +let $47e0e8ef515d9903$var$PairSet = new $6uUbQ$Array($47e0e8ef515d9903$var$PairValueRecord, $6uUbQ$uint16); +let $47e0e8ef515d9903$var$Class2Record = new $6uUbQ$Struct({ + value1: new $47e0e8ef515d9903$var$ValueRecord('valueFormat1'), + value2: new $47e0e8ef515d9903$var$ValueRecord('valueFormat2') +}); +let $47e0e8ef515d9903$var$Anchor = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + xCoordinate: $6uUbQ$int16, + yCoordinate: $6uUbQ$int16 + }, + 2: { + xCoordinate: $6uUbQ$int16, + yCoordinate: $6uUbQ$int16, + anchorPoint: $6uUbQ$uint16 + }, + 3: { + xCoordinate: $6uUbQ$int16, + yCoordinate: $6uUbQ$int16, + xDeviceTable: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)), + yDeviceTable: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) + } +}); +let $47e0e8ef515d9903$var$EntryExitRecord = new $6uUbQ$Struct({ + entryAnchor: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }), + exitAnchor: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }) +}); +let $47e0e8ef515d9903$var$MarkRecord = new $6uUbQ$Struct({ + class: $6uUbQ$uint16, + markAnchor: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }) +}); +let $47e0e8ef515d9903$var$MarkArray = new $6uUbQ$Array($47e0e8ef515d9903$var$MarkRecord, $6uUbQ$uint16); +let $47e0e8ef515d9903$var$BaseRecord = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$Anchor), (t)=>t.parent.classCount); +let $47e0e8ef515d9903$var$BaseArray = new $6uUbQ$Array($47e0e8ef515d9903$var$BaseRecord, $6uUbQ$uint16); +let $47e0e8ef515d9903$var$ComponentRecord = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$Anchor), (t)=>t.parent.parent.classCount); +let $47e0e8ef515d9903$var$LigatureAttach = new $6uUbQ$Array($47e0e8ef515d9903$var$ComponentRecord, $6uUbQ$uint16); +let $47e0e8ef515d9903$var$LigatureArray = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$LigatureAttach), $6uUbQ$uint16); +let $47e0e8ef515d9903$export$73a8cfb19cd43a0f = new $6uUbQ$VersionedStruct('lookupType', { + 1: new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat: $47e0e8ef515d9903$var$ValueFormat, + value: new $47e0e8ef515d9903$var$ValueRecord() + }, + 2: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat: $47e0e8ef515d9903$var$ValueFormat, + valueCount: $6uUbQ$uint16, + values: new $6uUbQ$LazyArray(new $47e0e8ef515d9903$var$ValueRecord(), 'valueCount') + } + }), + 2: new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat1: $47e0e8ef515d9903$var$ValueFormat, + valueFormat2: $47e0e8ef515d9903$var$ValueFormat, + pairSetCount: $6uUbQ$uint16, + pairSets: new $6uUbQ$LazyArray(new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$PairSet), 'pairSetCount') + }, + 2: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat1: $47e0e8ef515d9903$var$ValueFormat, + valueFormat2: $47e0e8ef515d9903$var$ValueFormat, + classDef1: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + classDef2: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + class1Count: $6uUbQ$uint16, + class2Count: $6uUbQ$uint16, + classRecords: new $6uUbQ$LazyArray(new $6uUbQ$LazyArray($47e0e8ef515d9903$var$Class2Record, 'class2Count'), 'class1Count') + } + }), + 3: { + format: $6uUbQ$uint16, + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + entryExitCount: $6uUbQ$uint16, + entryExitRecords: new $6uUbQ$Array($47e0e8ef515d9903$var$EntryExitRecord, 'entryExitCount') + }, + 4: { + format: $6uUbQ$uint16, + markCoverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + baseCoverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $6uUbQ$uint16, + markArray: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$MarkArray), + baseArray: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$BaseArray) + }, + 5: { + format: $6uUbQ$uint16, + markCoverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + ligatureCoverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $6uUbQ$uint16, + markArray: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$MarkArray), + ligatureArray: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$LigatureArray) + }, + 6: { + format: $6uUbQ$uint16, + mark1Coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + mark2Coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $6uUbQ$uint16, + mark1Array: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$MarkArray), + mark2Array: new $6uUbQ$Pointer($6uUbQ$uint16, $47e0e8ef515d9903$var$BaseArray) + }, + 7: (0, $7cbbe4e24ef3cb75$export$841858b892ce1f4c), + 8: (0, $7cbbe4e24ef3cb75$export$5e6d09e6861162f6), + 9: { + posFormat: $6uUbQ$uint16, + lookupType: $6uUbQ$uint16, + extension: new $6uUbQ$Pointer($6uUbQ$uint32, null) + } +}); +// Fix circular reference +$47e0e8ef515d9903$export$73a8cfb19cd43a0f.versions[9].extension.type = $47e0e8ef515d9903$export$73a8cfb19cd43a0f; +var $47e0e8ef515d9903$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint32, { + header: { + scriptList: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$3e15fc05ce864229)), + featureList: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$aa18130def4b6cb4)), + lookupList: new $6uUbQ$Pointer($6uUbQ$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)($47e0e8ef515d9903$export$73a8cfb19cd43a0f)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $1a47b0c45c1c22fe$export$441b70b7971dd419)) + } +}); + + + + + +let $d3f442064af66e06$var$Sequence = new $6uUbQ$Array($6uUbQ$uint16, $6uUbQ$uint16); +let $d3f442064af66e06$var$AlternateSet = $d3f442064af66e06$var$Sequence; +let $d3f442064af66e06$var$Ligature = new $6uUbQ$Struct({ + glyph: $6uUbQ$uint16, + compCount: $6uUbQ$uint16, + components: new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.compCount - 1) +}); +let $d3f442064af66e06$var$LigatureSet = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $d3f442064af66e06$var$Ligature), $6uUbQ$uint16); +let $d3f442064af66e06$var$GSUBLookup = new $6uUbQ$VersionedStruct('lookupType', { + 1: new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 1: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + deltaGlyphID: $6uUbQ$int16 + }, + 2: { + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + glyphCount: $6uUbQ$uint16, + substitute: new $6uUbQ$LazyArray($6uUbQ$uint16, 'glyphCount') + } + }), + 2: { + substFormat: $6uUbQ$uint16, + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $6uUbQ$uint16, + sequences: new $6uUbQ$LazyArray(new $6uUbQ$Pointer($6uUbQ$uint16, $d3f442064af66e06$var$Sequence), 'count') + }, + 3: { + substFormat: $6uUbQ$uint16, + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $6uUbQ$uint16, + alternateSet: new $6uUbQ$LazyArray(new $6uUbQ$Pointer($6uUbQ$uint16, $d3f442064af66e06$var$AlternateSet), 'count') + }, + 4: { + substFormat: $6uUbQ$uint16, + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $6uUbQ$uint16, + ligatureSets: new $6uUbQ$LazyArray(new $6uUbQ$Pointer($6uUbQ$uint16, $d3f442064af66e06$var$LigatureSet), 'count') + }, + 5: (0, $7cbbe4e24ef3cb75$export$841858b892ce1f4c), + 6: (0, $7cbbe4e24ef3cb75$export$5e6d09e6861162f6), + 7: { + substFormat: $6uUbQ$uint16, + lookupType: $6uUbQ$uint16, + extension: new $6uUbQ$Pointer($6uUbQ$uint32, null) + }, + 8: { + substFormat: $6uUbQ$uint16, + coverage: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + backtrackCoverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'backtrackGlyphCount'), + lookaheadGlyphCount: $6uUbQ$uint16, + lookaheadCoverage: new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'lookaheadGlyphCount'), + glyphCount: $6uUbQ$uint16, + substitutes: new $6uUbQ$Array($6uUbQ$uint16, 'glyphCount') + } +}); +// Fix circular reference +$d3f442064af66e06$var$GSUBLookup.versions[7].extension.type = $d3f442064af66e06$var$GSUBLookup; +var $d3f442064af66e06$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint32, { + header: { + scriptList: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$3e15fc05ce864229)), + featureList: new $6uUbQ$Pointer($6uUbQ$uint16, (0, $7cbbe4e24ef3cb75$export$aa18130def4b6cb4)), + lookupList: new $6uUbQ$Pointer($6uUbQ$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)($d3f442064af66e06$var$GSUBLookup)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $1a47b0c45c1c22fe$export$441b70b7971dd419)) + } +}); + + + + + +let $71cfb3c4767fbd0c$var$JstfGSUBModList = new $6uUbQ$Array($6uUbQ$uint16, $6uUbQ$uint16); +let $71cfb3c4767fbd0c$var$JstfPriority = new $6uUbQ$Struct({ + shrinkageEnableGSUB: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageDisableGSUB: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageEnableGPOS: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageDisableGPOS: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageJstfMax: new $6uUbQ$Pointer($6uUbQ$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)((0, $47e0e8ef515d9903$export$73a8cfb19cd43a0f))), + extensionEnableGSUB: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionDisableGSUB: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionEnableGPOS: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionDisableGPOS: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionJstfMax: new $6uUbQ$Pointer($6uUbQ$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)((0, $47e0e8ef515d9903$export$73a8cfb19cd43a0f))) +}); +let $71cfb3c4767fbd0c$var$JstfLangSys = new $6uUbQ$Array(new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfPriority), $6uUbQ$uint16); +let $71cfb3c4767fbd0c$var$JstfLangSysRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + jstfLangSys: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfLangSys) +}); +let $71cfb3c4767fbd0c$var$JstfScript = new $6uUbQ$Struct({ + extenderGlyphs: new $6uUbQ$Pointer($6uUbQ$uint16, new $6uUbQ$Array($6uUbQ$uint16, $6uUbQ$uint16)), + defaultLangSys: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfLangSys), + langSysCount: $6uUbQ$uint16, + langSysRecords: new $6uUbQ$Array($71cfb3c4767fbd0c$var$JstfLangSysRecord, 'langSysCount') +}); +let $71cfb3c4767fbd0c$var$JstfScriptRecord = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + script: new $6uUbQ$Pointer($6uUbQ$uint16, $71cfb3c4767fbd0c$var$JstfScript, { + type: 'parent' + }) +}); +var $71cfb3c4767fbd0c$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint32, + scriptCount: $6uUbQ$uint16, + scriptList: new $6uUbQ$Array($71cfb3c4767fbd0c$var$JstfScriptRecord, 'scriptCount') +}); + + + + +// TODO: add this to restructure +class $d059a6bd2d3b5b63$var$VariableSizeNumber { + decode(stream, parent) { + switch(this.size(0, parent)){ + case 1: + return stream.readUInt8(); + case 2: + return stream.readUInt16BE(); + case 3: + return stream.readUInt24BE(); + case 4: + return stream.readUInt32BE(); + } + } + size(val, parent) { + return (0, $6uUbQ$resolveLength)(this._size, null, parent); + } + constructor(size){ + this._size = size; + } +} +let $d059a6bd2d3b5b63$var$MapDataEntry = new $6uUbQ$Struct({ + entry: new $d059a6bd2d3b5b63$var$VariableSizeNumber((t)=>((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: (t)=>t.entry >> (t.parent.entryFormat & 0x000F) + 1, + innerIndex: (t)=>t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1 +}); +let $d059a6bd2d3b5b63$var$DeltaSetIndexMap = new $6uUbQ$Struct({ + entryFormat: $6uUbQ$uint16, + mapCount: $6uUbQ$uint16, + mapData: new $6uUbQ$Array($d059a6bd2d3b5b63$var$MapDataEntry, 'mapCount') +}); +var $d059a6bd2d3b5b63$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + majorVersion: $6uUbQ$uint16, + minorVersion: $6uUbQ$uint16, + itemVariationStore: new $6uUbQ$Pointer($6uUbQ$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)), + advanceWidthMapping: new $6uUbQ$Pointer($6uUbQ$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap), + LSBMapping: new $6uUbQ$Pointer($6uUbQ$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap), + RSBMapping: new $6uUbQ$Pointer($6uUbQ$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap) +}); + + + +let $dceeca3e1977ce30$var$Signature = new $6uUbQ$Struct({ + format: $6uUbQ$uint32, + length: $6uUbQ$uint32, + offset: $6uUbQ$uint32 +}); +let $dceeca3e1977ce30$var$SignatureBlock = new $6uUbQ$Struct({ + reserved: new $6uUbQ$Reserved($6uUbQ$uint16, 2), + cbSignature: $6uUbQ$uint32, + signature: new $6uUbQ$Buffer('cbSignature') +}); +var $dceeca3e1977ce30$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + ulVersion: $6uUbQ$uint32, + usNumSigs: $6uUbQ$uint16, + usFlag: $6uUbQ$uint16, + signatures: new $6uUbQ$Array($dceeca3e1977ce30$var$Signature, 'usNumSigs'), + signatureBlocks: new $6uUbQ$Array($dceeca3e1977ce30$var$SignatureBlock, 'usNumSigs') +}); + + + +let $8acd740a9435aad0$var$GaspRange = new $6uUbQ$Struct({ + rangeMaxPPEM: $6uUbQ$uint16, + rangeGaspBehavior: new $6uUbQ$Bitfield($6uUbQ$uint16, [ + 'grayscale', + 'gridfit', + 'symmetricSmoothing', + 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); +var $8acd740a9435aad0$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numRanges: $6uUbQ$uint16, + gaspRanges: new $6uUbQ$Array($8acd740a9435aad0$var$GaspRange, 'numRanges') // Sorted by ppem +}); + + + +let $b5f380243c34d6a0$var$DeviceRecord = new $6uUbQ$Struct({ + pixelSize: $6uUbQ$uint8, + maximumWidth: $6uUbQ$uint8, + widths: new $6uUbQ$Array($6uUbQ$uint8, (t)=>t.parent.parent.maxp.numGlyphs) +}); +var // The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +$b5f380243c34d6a0$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numRecords: $6uUbQ$int16, + sizeDeviceRecord: $6uUbQ$int32, + records: new $6uUbQ$Array($b5f380243c34d6a0$var$DeviceRecord, 'numRecords') +}); + + + +let $ca2df1256966e313$var$KernPair = new $6uUbQ$Struct({ + left: $6uUbQ$uint16, + right: $6uUbQ$uint16, + value: $6uUbQ$int16 +}); +let $ca2df1256966e313$var$ClassTable = new $6uUbQ$Struct({ + firstGlyph: $6uUbQ$uint16, + nGlyphs: $6uUbQ$uint16, + offsets: new $6uUbQ$Array($6uUbQ$uint16, 'nGlyphs'), + max: (t)=>t.offsets.length && Math.max.apply(Math, t.offsets) +}); +let $ca2df1256966e313$var$Kern2Array = new $6uUbQ$Struct({ + off: (t)=>t._startOffset - t.parent.parent._startOffset, + len: (t)=>((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2), + values: new $6uUbQ$LazyArray($6uUbQ$int16, 'len') +}); +let $ca2df1256966e313$var$KernSubtable = new $6uUbQ$VersionedStruct('format', { + 0: { + nPairs: $6uUbQ$uint16, + searchRange: $6uUbQ$uint16, + entrySelector: $6uUbQ$uint16, + rangeShift: $6uUbQ$uint16, + pairs: new $6uUbQ$Array($ca2df1256966e313$var$KernPair, 'nPairs') + }, + 2: { + rowWidth: $6uUbQ$uint16, + leftTable: new $6uUbQ$Pointer($6uUbQ$uint16, $ca2df1256966e313$var$ClassTable, { + type: 'parent' + }), + rightTable: new $6uUbQ$Pointer($6uUbQ$uint16, $ca2df1256966e313$var$ClassTable, { + type: 'parent' + }), + array: new $6uUbQ$Pointer($6uUbQ$uint16, $ca2df1256966e313$var$Kern2Array, { + type: 'parent' + }) + }, + 3: { + glyphCount: $6uUbQ$uint16, + kernValueCount: $6uUbQ$uint8, + leftClassCount: $6uUbQ$uint8, + rightClassCount: $6uUbQ$uint8, + flags: $6uUbQ$uint8, + kernValue: new $6uUbQ$Array($6uUbQ$int16, 'kernValueCount'), + leftClass: new $6uUbQ$Array($6uUbQ$uint8, 'glyphCount'), + rightClass: new $6uUbQ$Array($6uUbQ$uint8, 'glyphCount'), + kernIndex: new $6uUbQ$Array($6uUbQ$uint8, (t)=>t.leftClassCount * t.rightClassCount) + } +}); +let $ca2df1256966e313$var$KernTable = new $6uUbQ$VersionedStruct('version', { + 0: { + subVersion: $6uUbQ$uint16, + length: $6uUbQ$uint16, + format: $6uUbQ$uint8, + coverage: new $6uUbQ$Bitfield($6uUbQ$uint8, [ + 'horizontal', + 'minimum', + 'crossStream', + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: $ca2df1256966e313$var$KernSubtable, + padding: new $6uUbQ$Reserved($6uUbQ$uint8, (t)=>t.length - t._currentOffset) + }, + 1: { + length: $6uUbQ$uint32, + coverage: new $6uUbQ$Bitfield($6uUbQ$uint8, [ + null, + null, + null, + null, + null, + 'variation', + 'crossStream', + 'vertical' // Set if table has vertical kerning values + ]), + format: $6uUbQ$uint8, + tupleIndex: $6uUbQ$uint16, + subtable: $ca2df1256966e313$var$KernSubtable, + padding: new $6uUbQ$Reserved($6uUbQ$uint8, (t)=>t.length - t._currentOffset) + } +}); +var $ca2df1256966e313$export$2e2bcd8739ae039 = new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 0: { + nTables: $6uUbQ$uint16, + tables: new $6uUbQ$Array($ca2df1256966e313$var$KernTable, 'nTables') + }, + 1: { + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + nTables: $6uUbQ$uint32, + tables: new $6uUbQ$Array($ca2df1256966e313$var$KernTable, 'nTables') + } +}); + + + +var // Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +$7a9f92b0c46ebe33$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numGlyphs: $6uUbQ$uint16, + yPels: new $6uUbQ$Array($6uUbQ$uint8, 'numGlyphs') +}); + + + +var // PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +$2b2ccc419d152631$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + fontNumber: $6uUbQ$uint32, + pitch: $6uUbQ$uint16, + xHeight: $6uUbQ$uint16, + style: $6uUbQ$uint16, + typeFamily: $6uUbQ$uint16, + capHeight: $6uUbQ$uint16, + symbolSet: $6uUbQ$uint16, + typeface: new $6uUbQ$String(16), + characterComplement: new $6uUbQ$String(8), + fileName: new $6uUbQ$String(6), + strokeWeight: new $6uUbQ$String(1), + widthType: new $6uUbQ$String(1), + serifStyle: $6uUbQ$uint8, + reserved: new $6uUbQ$Reserved($6uUbQ$uint8) +}); + + + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. +let $ca5b40b9bcda9c9b$var$Ratio = new $6uUbQ$Struct({ + bCharSet: $6uUbQ$uint8, + xRatio: $6uUbQ$uint8, + yStartRatio: $6uUbQ$uint8, + yEndRatio: $6uUbQ$uint8 // Ending y-Ratio value +}); +let $ca5b40b9bcda9c9b$var$vTable = new $6uUbQ$Struct({ + yPelHeight: $6uUbQ$uint16, + yMax: $6uUbQ$int16, + yMin: $6uUbQ$int16 // Minimum value (in pels) for this yPelHeight +}); +let $ca5b40b9bcda9c9b$var$VdmxGroup = new $6uUbQ$Struct({ + recs: $6uUbQ$uint16, + startsz: $6uUbQ$uint8, + endsz: $6uUbQ$uint8, + entries: new $6uUbQ$Array($ca5b40b9bcda9c9b$var$vTable, 'recs') // The VDMX records +}); +var $ca5b40b9bcda9c9b$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + numRecs: $6uUbQ$uint16, + numRatios: $6uUbQ$uint16, + ratioRanges: new $6uUbQ$Array($ca5b40b9bcda9c9b$var$Ratio, 'numRatios'), + offsets: new $6uUbQ$Array($6uUbQ$uint16, 'numRatios'), + groups: new $6uUbQ$Array($ca5b40b9bcda9c9b$var$VdmxGroup, 'numRecs') // The actual VDMX groupings +}); + + + +var // Vertical Header Table +$69530a3c40755af0$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + ascent: $6uUbQ$int16, + descent: $6uUbQ$int16, + lineGap: $6uUbQ$int16, + advanceHeightMax: $6uUbQ$int16, + minTopSideBearing: $6uUbQ$int16, + minBottomSideBearing: $6uUbQ$int16, + yMaxExtent: $6uUbQ$int16, + caretSlopeRise: $6uUbQ$int16, + caretSlopeRun: $6uUbQ$int16, + caretOffset: $6uUbQ$int16, + reserved: new $6uUbQ$Reserved($6uUbQ$int16, 4), + metricDataFormat: $6uUbQ$int16, + numberOfMetrics: $6uUbQ$uint16 // Number of advance heights in the Vertical Metrics table +}); + + + +let $344073dd270f0e62$var$VmtxEntry = new $6uUbQ$Struct({ + advance: $6uUbQ$uint16, + bearing: $6uUbQ$int16 // The top sidebearing of the glyph +}); +var // Vertical Metrics Table +$344073dd270f0e62$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + metrics: new $6uUbQ$LazyArray($344073dd270f0e62$var$VmtxEntry, (t)=>t.parent.vhea.numberOfMetrics), + bearings: new $6uUbQ$LazyArray($6uUbQ$int16, (t)=>t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); + + + +let $3793b781918cfced$var$shortFrac = new $6uUbQ$Fixed(16, 'BE', 14); +let $3793b781918cfced$var$Correspondence = new $6uUbQ$Struct({ + fromCoord: $3793b781918cfced$var$shortFrac, + toCoord: $3793b781918cfced$var$shortFrac +}); +let $3793b781918cfced$var$Segment = new $6uUbQ$Struct({ + pairCount: $6uUbQ$uint16, + correspondence: new $6uUbQ$Array($3793b781918cfced$var$Correspondence, 'pairCount') +}); +var $3793b781918cfced$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + axisCount: $6uUbQ$uint32, + segment: new $6uUbQ$Array($3793b781918cfced$var$Segment, 'axisCount') +}); + + + + +class $6cb7dd5f47d82580$var$UnboundedArrayAccessor { + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + return this._items[index]; + } + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } + constructor(type, stream, parent){ + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } +} +class $6cb7dd5f47d82580$export$c5af1eebc882e39a extends $6uUbQ$Array { + decode(stream, parent) { + return new $6cb7dd5f47d82580$var$UnboundedArrayAccessor(this.type, stream, parent); + } + constructor(type){ + super(type, 0); + } +} +let $6cb7dd5f47d82580$export$8351f8c2ae2f103c = function(ValueType = $6uUbQ$uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + constructor(type){ + this.type = type; + } + } + ValueType = new Shadow(ValueType); + let BinarySearchHeader = new $6uUbQ$Struct({ + unitSize: $6uUbQ$uint16, + nUnits: $6uUbQ$uint16, + searchRange: $6uUbQ$uint16, + entrySelector: $6uUbQ$uint16, + rangeShift: $6uUbQ$uint16 + }); + let LookupSegmentSingle = new $6uUbQ$Struct({ + lastGlyph: $6uUbQ$uint16, + firstGlyph: $6uUbQ$uint16, + value: ValueType + }); + let LookupSegmentArray = new $6uUbQ$Struct({ + lastGlyph: $6uUbQ$uint16, + firstGlyph: $6uUbQ$uint16, + values: new $6uUbQ$Pointer($6uUbQ$uint16, new $6uUbQ$Array(ValueType, (t)=>t.lastGlyph - t.firstGlyph + 1), { + type: 'parent' + }) + }); + let LookupSingle = new $6uUbQ$Struct({ + glyph: $6uUbQ$uint16, + value: ValueType + }); + return new $6uUbQ$VersionedStruct($6uUbQ$uint16, { + 0: { + values: new $6cb7dd5f47d82580$export$c5af1eebc882e39a(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new $6uUbQ$Array(LookupSegmentSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new $6uUbQ$Array(LookupSegmentArray, (t)=>t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new $6uUbQ$Array(LookupSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: $6uUbQ$uint16, + count: $6uUbQ$uint16, + values: new $6uUbQ$Array(ValueType, 'count') + } + }); +}; +function $6cb7dd5f47d82580$export$79f7d93d790934ba(entryData = {}, lookupType = $6uUbQ$uint16) { + let entry = Object.assign({ + newState: $6uUbQ$uint16, + flags: $6uUbQ$uint16 + }, entryData); + let Entry = new $6uUbQ$Struct(entry); + let StateArray = new $6cb7dd5f47d82580$export$c5af1eebc882e39a(new $6uUbQ$Array($6uUbQ$uint16, (t)=>t.nClasses)); + let StateHeader = new $6uUbQ$Struct({ + nClasses: $6uUbQ$uint32, + classTable: new $6uUbQ$Pointer($6uUbQ$uint32, new $6cb7dd5f47d82580$export$8351f8c2ae2f103c(lookupType)), + stateArray: new $6uUbQ$Pointer($6uUbQ$uint32, StateArray), + entryTable: new $6uUbQ$Pointer($6uUbQ$uint32, new $6cb7dd5f47d82580$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader; +} +function $6cb7dd5f47d82580$export$105027425199cc51(entryData = {}, lookupType = $6uUbQ$uint16) { + let ClassLookupTable = new $6uUbQ$Struct({ + version () { + return 8; + }, + firstGlyph: $6uUbQ$uint16, + values: new $6uUbQ$Array($6uUbQ$uint8, $6uUbQ$uint16) + }); + let entry = Object.assign({ + newStateOffset: $6uUbQ$uint16, + // convert offset to stateArray index + newState: (t)=>(t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: $6uUbQ$uint16 + }, entryData); + let Entry = new $6uUbQ$Struct(entry); + let StateArray = new $6cb7dd5f47d82580$export$c5af1eebc882e39a(new $6uUbQ$Array($6uUbQ$uint8, (t)=>t.nClasses)); + let StateHeader1 = new $6uUbQ$Struct({ + nClasses: $6uUbQ$uint16, + classTable: new $6uUbQ$Pointer($6uUbQ$uint16, ClassLookupTable), + stateArray: new $6uUbQ$Pointer($6uUbQ$uint16, StateArray), + entryTable: new $6uUbQ$Pointer($6uUbQ$uint16, new $6cb7dd5f47d82580$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader1; +} + + +let $6a3746e8c708f5a3$var$BslnSubtable = new $6uUbQ$VersionedStruct('format', { + 0: { + deltas: new $6uUbQ$Array($6uUbQ$int16, 32) + }, + 1: { + deltas: new $6uUbQ$Array($6uUbQ$int16, 32), + mappingData: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($6uUbQ$uint16) + }, + 2: { + standardGlyph: $6uUbQ$uint16, + controlPoints: new $6uUbQ$Array($6uUbQ$uint16, 32) + }, + 3: { + standardGlyph: $6uUbQ$uint16, + controlPoints: new $6uUbQ$Array($6uUbQ$uint16, 32), + mappingData: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($6uUbQ$uint16) + } +}); +var $6a3746e8c708f5a3$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + format: $6uUbQ$uint16, + defaultBaseline: $6uUbQ$uint16, + subtable: $6a3746e8c708f5a3$var$BslnSubtable +}); + + + +let $d0c76fac617b308a$var$Setting = new $6uUbQ$Struct({ + setting: $6uUbQ$uint16, + nameIndex: $6uUbQ$int16, + name: (t)=>t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +let $d0c76fac617b308a$var$FeatureName = new $6uUbQ$Struct({ + feature: $6uUbQ$uint16, + nSettings: $6uUbQ$uint16, + settingTable: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array($d0c76fac617b308a$var$Setting, 'nSettings'), { + type: 'parent' + }), + featureFlags: new $6uUbQ$Bitfield($6uUbQ$uint8, [ + null, + null, + null, + null, + null, + null, + 'hasDefault', + 'exclusive' + ]), + defaultSetting: $6uUbQ$uint8, + nameIndex: $6uUbQ$int16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +var $d0c76fac617b308a$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + featureNameCount: $6uUbQ$uint16, + reserved1: new $6uUbQ$Reserved($6uUbQ$uint16), + reserved2: new $6uUbQ$Reserved($6uUbQ$uint32), + featureNames: new $6uUbQ$Array($d0c76fac617b308a$var$FeatureName, 'featureNameCount') +}); + + + +let $e83fd065f00fcd01$var$Axis = new $6uUbQ$Struct({ + axisTag: new $6uUbQ$String(4), + minValue: $6uUbQ$fixed32, + defaultValue: $6uUbQ$fixed32, + maxValue: $6uUbQ$fixed32, + flags: $6uUbQ$uint16, + nameID: $6uUbQ$uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID] +}); +let $e83fd065f00fcd01$var$Instance = new $6uUbQ$Struct({ + nameID: $6uUbQ$uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID], + flags: $6uUbQ$uint16, + coord: new $6uUbQ$Array($6uUbQ$fixed32, (t)=>t.parent.axisCount), + postscriptNameID: new $6uUbQ$Optional($6uUbQ$uint16, (t)=>t.parent.instanceSize - t._currentOffset > 0) +}); +var $e83fd065f00fcd01$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + offsetToData: $6uUbQ$uint16, + countSizePairs: $6uUbQ$uint16, + axisCount: $6uUbQ$uint16, + axisSize: $6uUbQ$uint16, + instanceCount: $6uUbQ$uint16, + instanceSize: $6uUbQ$uint16, + axis: new $6uUbQ$Array($e83fd065f00fcd01$var$Axis, 'axisCount'), + instance: new $6uUbQ$Array($e83fd065f00fcd01$var$Instance, 'instanceCount') +}); + + + +let $dbe33c8d3a7f131c$var$shortFrac = new $6uUbQ$Fixed(16, 'BE', 14); +class $dbe33c8d3a7f131c$var$Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2; + } +} +let $dbe33c8d3a7f131c$var$gvar = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + axisCount: $6uUbQ$uint16, + globalCoordCount: $6uUbQ$uint16, + globalCoords: new $6uUbQ$Pointer($6uUbQ$uint32, new $6uUbQ$Array(new $6uUbQ$Array($dbe33c8d3a7f131c$var$shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: $6uUbQ$uint16, + flags: $6uUbQ$uint16, + offsetToData: $6uUbQ$uint32, + offsets: new $6uUbQ$Array(new $6uUbQ$Pointer($dbe33c8d3a7f131c$var$Offset, 'void', { + relativeTo: (ctx)=>ctx.offsetToData, + allowNull: false + }), (t)=>t.glyphCount + 1) +}); +var $dbe33c8d3a7f131c$export$2e2bcd8739ae039 = $dbe33c8d3a7f131c$var$gvar; + + + + +let $05b01887df96c4ee$var$ClassTable = new $6uUbQ$Struct({ + length: $6uUbQ$uint16, + coverage: $6uUbQ$uint16, + subFeatureFlags: $6uUbQ$uint32, + stateTable: new (0, $6cb7dd5f47d82580$export$105027425199cc51) +}); +let $05b01887df96c4ee$var$WidthDeltaRecord = new $6uUbQ$Struct({ + justClass: $6uUbQ$uint32, + beforeGrowLimit: $6uUbQ$fixed32, + beforeShrinkLimit: $6uUbQ$fixed32, + afterGrowLimit: $6uUbQ$fixed32, + afterShrinkLimit: $6uUbQ$fixed32, + growFlags: $6uUbQ$uint16, + shrinkFlags: $6uUbQ$uint16 +}); +let $05b01887df96c4ee$var$WidthDeltaCluster = new $6uUbQ$Array($05b01887df96c4ee$var$WidthDeltaRecord, $6uUbQ$uint32); +let $05b01887df96c4ee$var$ActionData = new $6uUbQ$VersionedStruct('actionType', { + 0: { + lowerLimit: $6uUbQ$fixed32, + upperLimit: $6uUbQ$fixed32, + order: $6uUbQ$uint16, + glyphs: new $6uUbQ$Array($6uUbQ$uint16, $6uUbQ$uint16) + }, + 1: { + addGlyph: $6uUbQ$uint16 + }, + 2: { + substThreshold: $6uUbQ$fixed32, + addGlyph: $6uUbQ$uint16, + substGlyph: $6uUbQ$uint16 + }, + 3: {}, + 4: { + variationAxis: $6uUbQ$uint32, + minimumLimit: $6uUbQ$fixed32, + noStretchValue: $6uUbQ$fixed32, + maximumLimit: $6uUbQ$fixed32 + }, + 5: { + flags: $6uUbQ$uint16, + glyph: $6uUbQ$uint16 + } +}); +let $05b01887df96c4ee$var$Action = new $6uUbQ$Struct({ + actionClass: $6uUbQ$uint16, + actionType: $6uUbQ$uint16, + actionLength: $6uUbQ$uint32, + actionData: $05b01887df96c4ee$var$ActionData, + padding: new $6uUbQ$Reserved($6uUbQ$uint8, (t)=>t.actionLength - t._currentOffset) +}); +let $05b01887df96c4ee$var$PostcompensationAction = new $6uUbQ$Array($05b01887df96c4ee$var$Action, $6uUbQ$uint32); +let $05b01887df96c4ee$var$PostCompensationTable = new $6uUbQ$Struct({ + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)(new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$PostcompensationAction)) +}); +let $05b01887df96c4ee$var$JustificationTable = new $6uUbQ$Struct({ + classTable: new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$ClassTable, { + type: 'parent' + }), + wdcOffset: $6uUbQ$uint16, + postCompensationTable: new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$PostCompensationTable, { + type: 'parent' + }), + widthDeltaClusters: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)(new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$WidthDeltaCluster, { + type: 'parent', + relativeTo: (ctx)=>ctx.wdcOffset + })) +}); +var $05b01887df96c4ee$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint32, + format: $6uUbQ$uint16, + horizontal: new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$JustificationTable), + vertical: new $6uUbQ$Pointer($6uUbQ$uint16, $05b01887df96c4ee$var$JustificationTable) +}); + + + + +let $03ee6ebd54db1053$var$LigatureData = { + action: $6uUbQ$uint16 +}; +let $03ee6ebd54db1053$var$ContextualData = { + markIndex: $6uUbQ$uint16, + currentIndex: $6uUbQ$uint16 +}; +let $03ee6ebd54db1053$var$InsertionData = { + currentInsertIndex: $6uUbQ$uint16, + markedInsertIndex: $6uUbQ$uint16 +}; +let $03ee6ebd54db1053$var$SubstitutionTable = new $6uUbQ$Struct({ + items: new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)(new $6uUbQ$Pointer($6uUbQ$uint32, new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c))) +}); +let $03ee6ebd54db1053$var$SubtableData = new $6uUbQ$VersionedStruct('type', { + 0: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba) + }, + 1: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$ContextualData), + substitutionTable: new $6uUbQ$Pointer($6uUbQ$uint32, $03ee6ebd54db1053$var$SubstitutionTable) + }, + 2: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$LigatureData), + ligatureActions: new $6uUbQ$Pointer($6uUbQ$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($6uUbQ$uint32)), + components: new $6uUbQ$Pointer($6uUbQ$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($6uUbQ$uint16)), + ligatureList: new $6uUbQ$Pointer($6uUbQ$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($6uUbQ$uint16)) + }, + 4: { + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c) + }, + 5: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$InsertionData), + insertionActions: new $6uUbQ$Pointer($6uUbQ$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($6uUbQ$uint16)) + } +}); +let $03ee6ebd54db1053$var$Subtable = new $6uUbQ$Struct({ + length: $6uUbQ$uint32, + coverage: $6uUbQ$uint24, + type: $6uUbQ$uint8, + subFeatureFlags: $6uUbQ$uint32, + table: $03ee6ebd54db1053$var$SubtableData, + padding: new $6uUbQ$Reserved($6uUbQ$uint8, (t)=>t.length - t._currentOffset) +}); +let $03ee6ebd54db1053$var$FeatureEntry = new $6uUbQ$Struct({ + featureType: $6uUbQ$uint16, + featureSetting: $6uUbQ$uint16, + enableFlags: $6uUbQ$uint32, + disableFlags: $6uUbQ$uint32 +}); +let $03ee6ebd54db1053$var$MorxChain = new $6uUbQ$Struct({ + defaultFlags: $6uUbQ$uint32, + chainLength: $6uUbQ$uint32, + nFeatureEntries: $6uUbQ$uint32, + nSubtables: $6uUbQ$uint32, + features: new $6uUbQ$Array($03ee6ebd54db1053$var$FeatureEntry, 'nFeatureEntries'), + subtables: new $6uUbQ$Array($03ee6ebd54db1053$var$Subtable, 'nSubtables') +}); +var $03ee6ebd54db1053$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$uint16, + unused: new $6uUbQ$Reserved($6uUbQ$uint16), + nChains: $6uUbQ$uint32, + chains: new $6uUbQ$Array($03ee6ebd54db1053$var$MorxChain, 'nChains') +}); + + + + +let $b7492a80b0d1a056$var$OpticalBounds = new $6uUbQ$Struct({ + left: $6uUbQ$int16, + top: $6uUbQ$int16, + right: $6uUbQ$int16, + bottom: $6uUbQ$int16 +}); +var $b7492a80b0d1a056$export$2e2bcd8739ae039 = new $6uUbQ$Struct({ + version: $6uUbQ$fixed32, + format: $6uUbQ$uint16, + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($b7492a80b0d1a056$var$OpticalBounds) +}); + + +let $c3395722bea751e2$var$tables = {}; +var $c3395722bea751e2$export$2e2bcd8739ae039 = $c3395722bea751e2$var$tables; +$c3395722bea751e2$var$tables.cmap = (0, $26a62205ad06574e$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.head = (0, $f2612a29f92ac062$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hhea = (0, $2c179dd593583073$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hmtx = (0, $bdc9060542264b85$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.maxp = (0, $dbf51cb3d3fe409d$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.name = (0, $2bcf221753ec8e32$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['OS/2'] = (0, $84b272aa31b70606$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.post = (0, $32d9e2eb9565d93c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.fpgm = (0, $5c0f37ca5ffb1850$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.loca = (0, $2b2b260902b1c57e$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.prep = (0, $7afb878c7bea4f66$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['cvt '] = (0, $5202bd9d9ad8eaac$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.glyf = (0, $6c92b6371bce8bd9$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['CFF '] = (0, $822ac0d589e4e237$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['CFF2'] = (0, $822ac0d589e4e237$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.VORG = (0, $2bbf2bc1ce37cd8f$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.EBLC = (0, $9911c4c7201c13de$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.CBLC = $c3395722bea751e2$var$tables.EBLC; +$c3395722bea751e2$var$tables.sbix = (0, $abb847051efd51b1$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.COLR = (0, $eb629188f3dfefdd$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.CPAL = (0, $08734b8e7dc64587$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.BASE = (0, $497cef411d884e34$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GDEF = (0, $cf5f33c63ef209e6$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GPOS = (0, $47e0e8ef515d9903$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GSUB = (0, $d3f442064af66e06$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.JSTF = (0, $71cfb3c4767fbd0c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.HVAR = (0, $d059a6bd2d3b5b63$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.DSIG = (0, $dceeca3e1977ce30$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.gasp = (0, $8acd740a9435aad0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hdmx = (0, $b5f380243c34d6a0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.kern = (0, $ca2df1256966e313$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.LTSH = (0, $7a9f92b0c46ebe33$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.PCLT = (0, $2b2ccc419d152631$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.VDMX = (0, $ca5b40b9bcda9c9b$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.vhea = (0, $69530a3c40755af0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.vmtx = (0, $344073dd270f0e62$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.avar = (0, $3793b781918cfced$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.bsln = (0, $6a3746e8c708f5a3$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.feat = (0, $d0c76fac617b308a$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.fvar = (0, $e83fd065f00fcd01$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.gvar = (0, $dbe33c8d3a7f131c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.just = (0, $05b01887df96c4ee$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.morx = (0, $03ee6ebd54db1053$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.opbd = (0, $b7492a80b0d1a056$export$2e2bcd8739ae039); + + +let $816c07a04b6dba87$var$TableEntry = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + checkSum: $6uUbQ$uint32, + offset: new $6uUbQ$Pointer($6uUbQ$uint32, 'void', { + type: 'global' + }), + length: $6uUbQ$uint32 +}); +let $816c07a04b6dba87$var$Directory = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + numTables: $6uUbQ$uint16, + searchRange: $6uUbQ$uint16, + entrySelector: $6uUbQ$uint16, + rangeShift: $6uUbQ$uint16, + tables: new $6uUbQ$Array($816c07a04b6dba87$var$TableEntry, 'numTables') +}); +$816c07a04b6dba87$var$Directory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +$816c07a04b6dba87$var$Directory.preEncode = function() { + if (!Array.isArray(this.tables)) { + let tables = []; + for(let tag in this.tables){ + let table = this.tables[tag]; + if (table) tables.push({ + tag: tag, + checkSum: 0, + offset: new $6uUbQ$VoidPointer((0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag], table), + length: (0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag].size(table) + }); + } + this.tables = tables; + } + this.tag = 'true'; + this.numTables = this.tables.length; + let maxExponentFor2 = Math.floor(Math.log(this.numTables) / Math.LN2); + let maxPowerOf2 = Math.pow(2, maxExponentFor2); + this.searchRange = maxPowerOf2 * 16; + this.entrySelector = Math.log(maxPowerOf2) / Math.LN2; + this.rangeShift = this.numTables * 16 - this.searchRange; +}; +var $816c07a04b6dba87$export$2e2bcd8739ae039 = $816c07a04b6dba87$var$Directory; + + + + +function $12727730ddfc8bfe$export$2e0ae67339d5f1ac(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while(min <= max){ + let mid = min + max >> 1; + let res = cmp(arr[mid]); + if (res < 0) max = mid - 1; + else if (res > 0) min = mid + 1; + else return mid; + } + return -1; +} +function $12727730ddfc8bfe$export$d02631cccf789723(index, end) { + let range = []; + while(index < end)range.push(index++); + return range; +} +const $12727730ddfc8bfe$export$3d28c1996ced1f14 = new TextDecoder('ascii'); +// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license. +const $12727730ddfc8bfe$var$CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const $12727730ddfc8bfe$var$LOOKUP = new Uint8Array(256); +for(let i = 0; i < $12727730ddfc8bfe$var$CHARS.length; i++)$12727730ddfc8bfe$var$LOOKUP[$12727730ddfc8bfe$var$CHARS.charCodeAt(i)] = i; +function $12727730ddfc8bfe$export$94fdf11bafc8de6b(base64) { + let bufferLength = base64.length * 0.75; + if (base64[base64.length - 1] === '=') { + bufferLength--; + if (base64[base64.length - 2] === '=') bufferLength--; + } + let bytes = new Uint8Array(bufferLength); + let p = 0; + for(let i = 0, len = base64.length; i < len; i += 4){ + let encoded1 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i)]; + let encoded2 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 1)]; + let encoded3 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 2)]; + let encoded4 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4; + bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; + bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return bytes; +} + + + + +class $f08dd41ef10b694c$export$2e2bcd8739ae039 { + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs)for (let cmap of cmapTable.tables){ + if (cmap.platformID === platformID && cmap.encodingID === encodingID) return cmap.table; + } + return null; + } + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) codepoint = this.encoding.get(codepoint) || codepoint; + else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) return gid; + } + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return cmap.codeMap.get(codepoint) || 0; + case 4: + { + let min = 0; + let max = cmap.segCount - 1; + while(min <= max){ + let mid = min + max >> 1; + if (codepoint < cmap.startCode.get(mid)) max = mid - 1; + else if (codepoint > cmap.endCode.get(mid)) min = mid + 1; + else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + if (rangeOffset === 0) gid = codepoint + cmap.idDelta.get(mid); + else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) gid += cmap.idDelta.get(mid); + } + return gid & 0xffff; + } + } + return 0; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + case 12: + case 13: + { + let min = 0; + let max = cmap.nGroups - 1; + while(min <= max){ + let mid = min + max >> 1; + let group = cmap.groups.get(mid); + if (codepoint < group.startCharCode) max = mid - 1; + else if (codepoint > group.endCharCode) min = mid + 1; + else { + if (cmap.version === 12) return group.glyphID + (codepoint - group.startCharCode); + else return group.glyphID; + } + } + return 0; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) return 0; + let selectors = this.uvs.varSelectors.toArray(); + let i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(selectors, (x)=>variationSelector - x.varSelector); + let sel = selectors[i]; + if (i !== -1 && sel.defaultUVS) i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(sel.defaultUVS, (x)=>codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? 1 : 0); + if (i !== -1 && sel.nonDefaultUVS) { + i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(sel.nonDefaultUVS, (x)=>codepoint - x.unicodeValue); + if (i !== -1) return sel.nonDefaultUVS[i].glyphID; + } + return 0; + } + getCharacterSet() { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return (0, $12727730ddfc8bfe$export$d02631cccf789723)(0, cmap.codeMap.length); + case 4: + { + let res = []; + let endCodes = cmap.endCode.toArray(); + for(let i = 0; i < endCodes.length; i++){ + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(start, tail)); + } + return res; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return (0, $12727730ddfc8bfe$export$d02631cccf789723)(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + case 12: + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + { + let res = []; + for(let i = 0; i < 256; i++)if (cmap.codeMap.get(i) === gid) res.push(i); + return res; + } + case 4: + { + let res = []; + for(let i = 0; i < cmap.segCount; i++){ + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + for(var c = start; c <= end; c++){ + let g = 0; + if (rangeOffset === 0) g = c + delta; + else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) g += delta; + } + if (g === gid) res.push(c); + } + } + return res; + } + case 12: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) res.push(group.startCharCode + (gid - group.glyphID)); + return res; + } + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid === group.glyphID) res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + constructor(cmapTable){ + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [ + 3, + 10 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + // 16-bit subtables + [ + 3, + 1 + ], + [ + 0, + 3 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ]); + // If not unicode cmap was found, take the first table with a supported encoding. + if (!this.cmap) for (let cmap of cmapTable.tables){ + let encoding = (0, $e449ad78d50845fe$export$badc544e0651b6b1)(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + let mapping = (0, $e449ad78d50845fe$export$1dceb3c14ed68bee)(encoding); + if (mapping) { + this.cmap = cmap.table; + this.encoding = mapping; + } + } + if (!this.cmap) throw new Error("Could not find a supported cmap table"); + this.uvs = this.findSubtable(cmapTable, [ + [ + 0, + 5 + ] + ]); + if (this.uvs && this.uvs.version !== 14) this.uvs = null; + } +} +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f08dd41ef10b694c$export$2e2bcd8739ae039.prototype, "getCharacterSet", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f08dd41ef10b694c$export$2e2bcd8739ae039.prototype, "codePointsForGlyph", null); + + + +class $0bba3a9db57637f3$export$2e2bcd8739ae039 { + process(glyphs, positions) { + for(let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++){ + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + getKerning(left, right) { + let res = 0; + for (let table of this.kern.tables){ + if (table.coverage.crossStream) continue; + switch(table.version){ + case 0: + if (!table.coverage.horizontal) continue; + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) continue; + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + let val = 0; + let s = table.subtable; + switch(table.format){ + case 0: + let pairIdx = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(s.pairs, function(pair) { + return left - pair.left || right - pair.right; + }); + if (pairIdx >= 0) val = s.pairs[pairIdx].value; + break; + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + else leftOffset = s.array.off; + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) return 0; + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) res = val; + else res += val; + } + return res; + } + constructor(font){ + this.kern = font.kern; + } +} + + + +class $0a4bdfeb6dfd6f5e$export$2e2bcd8739ae039 { + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for(let index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.isMark) clusterEnd = index; + else { + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + clusterStart = clusterEnd = index; + } + } + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + return positions; + } + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) // LTR. TODO: RTL support. + baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length; + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + // position each of the mark glyphs relative to the base glyph + for(let index = clusterStart + 1; index <= clusterEnd; index++){ + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + // x positioning + switch(combiningClass){ + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + default: + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + // y positioning + switch(combiningClass){ + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') baseBox.minY += yGap; + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') baseBox.maxY += yGap; + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + return; + } + getCombiningClass(codePoint) { + let combiningClass = (0, $6uUbQ$getCombiningClass)(codePoint); + // Thai / Lao need some per-character work + if ((codePoint & -256) === 0x0e00) { + if (combiningClass === 'Not_Reordered') switch(codePoint){ + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + case 0x0ebc: + return 'Below'; + } + else if (codePoint === 0x0e3a) return 'Below_Right'; + } + switch(combiningClass){ + // Hebrew + case 'CCC10': + case 'CCC11': + case 'CCC12': + case 'CCC13': + case 'CCC14': + case 'CCC15': + case 'CCC16': + case 'CCC17': + case 'CCC18': + case 'CCC20': + case 'CCC22': + return 'Below'; + case 'CCC23': + return 'Attached_Above'; + case 'CCC24': + return 'Above_Right'; + case 'CCC25': + case 'CCC19': + return 'Above_Left'; + case 'CCC26': + return 'Above'; + case 'CCC21': + break; + // Arabic and Syriac + case 'CCC27': + case 'CCC28': + case 'CCC30': + case 'CCC31': + case 'CCC33': + case 'CCC34': + case 'CCC35': + case 'CCC36': + return 'Above'; + case 'CCC29': + case 'CCC32': + return 'Below'; + // Thai + case 'CCC103': + return 'Below_Right'; + case 'CCC107': + return 'Above_Right'; + // Lao + case 'CCC118': + return 'Below'; + case 'CCC122': + return 'Above'; + // Tibetan + case 'CCC129': + case 'CCC132': + return 'Below'; + case 'CCC130': + return 'Above'; + } + return combiningClass; + } + constructor(font){ + this.font = font; + } +} + + +/** + * Represents a glyph bounding box + */ class $f34600ab9d7f70d8$export$2e2bcd8739ae039 { + /** + * The width of the bounding box + * @type {number} + */ get width() { + return this.maxX - this.minX; + } + /** + * The height of the bounding box + * @type {number} + */ get height() { + return this.maxY - this.minY; + } + addPoint(x, y) { + if (Math.abs(x) !== Infinity) { + if (x < this.minX) this.minX = x; + if (x > this.maxX) this.maxX = x; + } + if (Math.abs(y) !== Infinity) { + if (y < this.minY) this.minY = y; + if (y > this.maxY) this.maxY = y; + } + } + copy() { + return new $f34600ab9d7f70d8$export$2e2bcd8739ae039(this.minX, this.minY, this.maxX, this.maxY); + } + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity){ + /** + * The minimum X position in the bounding box + * @type {number} + */ this.minX = minX; + /** + * The minimum Y position in the bounding box + * @type {number} + */ this.minY = minY; + /** + * The maxmimum X position in the bounding box + * @type {number} + */ this.maxX = maxX; + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ this.maxY = maxY; + } +} + + + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const $130d1a642ebcd2b7$var$UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: [ + 'bng2', + 'beng' + ], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: [ + 'dev2', + 'deva' + ], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: [ + 'gjr2', + 'gujr' + ], + Gurmukhi: [ + 'gur2', + 'guru' + ], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: [ + 'knd2', + 'knda' + ], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: [ + 'mlm2', + 'mlym' + ], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: [ + 'mym2', + 'mymr' + ], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: [ + 'ory2', + 'orya' + ], + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: [ + 'tml2', + 'taml' + ], + Tai_Viet: 'tavt', + Telugu: [ + 'tel2', + 'telu' + ], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; +const $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS = {}; +for(let script in $130d1a642ebcd2b7$var$UNICODE_SCRIPTS){ + let tag = $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + if (Array.isArray(tag)) for (let t of tag)$130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[t] = script; + else $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[tag] = script; +} +function $130d1a642ebcd2b7$export$b32f0b5f69d65e51(script) { + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; +} +function $130d1a642ebcd2b7$export$ce50e82f12a827a4(tag) { + return $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[tag]; +} +function $130d1a642ebcd2b7$export$e5cb25e204fb8450(string) { + let len = string.length; + let idx = 0; + while(idx < len){ + let code = string.charCodeAt(idx++); + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + let script = (0, $6uUbQ$getScript)(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + } + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS.Unknown; +} +function $130d1a642ebcd2b7$export$16fab0757cfc223d(codePoints) { + for(let i = 0; i < codePoints.length; i++){ + let codePoint = codePoints[i]; + let script = (0, $6uUbQ$getScript)(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + } + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS.Unknown; +} +// The scripts in this map are written from right to left +const $130d1a642ebcd2b7$var$RTL = { + arab: true, + hebr: true, + syrc: true, + thaa: true, + cprt: true, + khar: true, + phnx: true, + 'nko ': true, + lydi: true, + avst: true, + armi: true, + phli: true, + prti: true, + sarb: true, + orkh: true, + samr: true, + mand: true, + merc: true, + mero: true, + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, + mend: true, + nbat: true, + narb: true, + palm: true, + phlp: true // Psalter Pahlavi +}; +function $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script) { + if ($130d1a642ebcd2b7$var$RTL[script]) return 'rtl'; + return 'ltr'; +} + + +class $be07b3e97a42687a$export$2e2bcd8739ae039 { + /** + * The total advance width of the run. + * @type {number} + */ get advanceWidth() { + let width = 0; + for (let position of this.positions)width += position.xAdvance; + return width; + } + /** + * The total advance height of the run. + * @type {number} + */ get advanceHeight() { + let height = 0; + for (let position of this.positions)height += position.yAdvance; + return height; + } + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ get bbox() { + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + let x = 0; + let y = 0; + for(let index = 0; index < this.glyphs.length; index++){ + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + x += p.xAdvance; + y += p.yAdvance; + } + return bbox; + } + constructor(glyphs, features, script, language, direction){ + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ this.glyphs = glyphs; + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ this.positions = null; + /** + * The script that was requested for shaping. This was either passed in or detected automatically. + * @type {string} + */ this.script = script; + /** + * The language requested for shaping, as passed in. If `null`, the default language for the + * script was used. + * @type {string} + */ this.language = language || null; + /** + * The direction requested for shaping, as passed in (either ltr or rtl). + * If `null`, the default direction of the script is used. + * @type {string} + */ this.direction = direction || $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script); + /** + * The features requested during shaping. This is a combination of user + * specified features and features chosen by the shaper. + * @type {object} + */ this.features = {}; + // Convert features to an object + if (Array.isArray(features)) for (let tag of features)this.features[tag] = true; + else if (typeof features === 'object') this.features = features; + } +} + + +/** + * Represents positioning information for a glyph in a GlyphRun. + */ class $1ac75d9a55b67f01$export$2e2bcd8739ae039 { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0){ + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ this.xAdvance = xAdvance; + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ this.yAdvance = yAdvance; + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ this.xOffset = xOffset; + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ this.yOffset = yOffset; + } +} + + + +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const $3b6302b64eccc32c$var$features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; +const $3b6302b64eccc32c$var$feature = (name, selector)=>[ + $3b6302b64eccc32c$var$features[name].code, + $3b6302b64eccc32c$var$features[name][selector] + ]; +const $3b6302b64eccc32c$var$OTMapping = { + rlig: $3b6302b64eccc32c$var$feature('ligatures', 'requiredLigatures'), + clig: $3b6302b64eccc32c$var$feature('ligatures', 'contextualLigatures'), + dlig: $3b6302b64eccc32c$var$feature('ligatures', 'rareLigatures'), + hlig: $3b6302b64eccc32c$var$feature('ligatures', 'historicalLigatures'), + liga: $3b6302b64eccc32c$var$feature('ligatures', 'commonLigatures'), + hist: $3b6302b64eccc32c$var$feature('ligatures', 'historicalLigatures'), + smcp: $3b6302b64eccc32c$var$feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: $3b6302b64eccc32c$var$feature('lowerCase', 'lowerCasePetiteCaps'), + frac: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + dnom: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + numr: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + afrc: $3b6302b64eccc32c$var$feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + case: $3b6302b64eccc32c$var$feature('caseSensitiveLayout', 'caseSensitiveLayout'), + ccmp: $3b6302b64eccc32c$var$feature('unicodeDecomposition', 'canonicalComposition'), + cpct: $3b6302b64eccc32c$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + valt: $3b6302b64eccc32c$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: $3b6302b64eccc32c$var$feature('contextualAlternates', 'swashAlternates'), + cswh: $3b6302b64eccc32c$var$feature('contextualAlternates', 'contextualSwashAlternates'), + curs: $3b6302b64eccc32c$var$feature('cursiveConnection', 'cursive'), + c2pc: $3b6302b64eccc32c$var$feature('upperCase', 'upperCasePetiteCaps'), + c2sc: $3b6302b64eccc32c$var$feature('upperCase', 'upperCaseSmallCaps'), + init: $3b6302b64eccc32c$var$feature('smartSwash', 'wordInitialSwashes'), + fin2: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + medi: $3b6302b64eccc32c$var$feature('smartSwash', 'nonFinalSwashes'), + med2: $3b6302b64eccc32c$var$feature('smartSwash', 'nonFinalSwashes'), + fin3: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + fina: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + pkna: $3b6302b64eccc32c$var$feature('kanaSpacing', 'proportionalKana'), + half: $3b6302b64eccc32c$var$feature('textSpacing', 'halfWidthText'), + halt: $3b6302b64eccc32c$var$feature('textSpacing', 'altHalfWidthText'), + hkna: $3b6302b64eccc32c$var$feature('alternateKana', 'alternateHorizKana'), + vkna: $3b6302b64eccc32c$var$feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + ital: $3b6302b64eccc32c$var$feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: $3b6302b64eccc32c$var$feature('numberCase', 'upperCaseNumbers'), + onum: $3b6302b64eccc32c$var$feature('numberCase', 'lowerCaseNumbers'), + mgrk: $3b6302b64eccc32c$var$feature('mathematicalExtras', 'mathematicalGreek'), + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + calt: $3b6302b64eccc32c$var$feature('contextualAlternates', 'contextualAlternates'), + vrt2: $3b6302b64eccc32c$var$feature('verticalSubstitution', 'substituteVerticalForms'), + vert: $3b6302b64eccc32c$var$feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: $3b6302b64eccc32c$var$feature('numberSpacing', 'monospacedNumbers'), + pnum: $3b6302b64eccc32c$var$feature('numberSpacing', 'proportionalNumbers'), + sups: $3b6302b64eccc32c$var$feature('verticalPosition', 'superiors'), + subs: $3b6302b64eccc32c$var$feature('verticalPosition', 'inferiors'), + ordn: $3b6302b64eccc32c$var$feature('verticalPosition', 'ordinals'), + pwid: $3b6302b64eccc32c$var$feature('textSpacing', 'proportionalText'), + hwid: $3b6302b64eccc32c$var$feature('textSpacing', 'halfWidthText'), + qwid: $3b6302b64eccc32c$var$feature('textSpacing', 'quarterWidthText'), + twid: $3b6302b64eccc32c$var$feature('textSpacing', 'thirdWidthText'), + fwid: $3b6302b64eccc32c$var$feature('textSpacing', 'proportionalText'), + palt: $3b6302b64eccc32c$var$feature('textSpacing', 'altProportionalText'), + trad: $3b6302b64eccc32c$var$feature('characterShape', 'traditionalCharacters'), + smpl: $3b6302b64eccc32c$var$feature('characterShape', 'simplifiedCharacters'), + jp78: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1978Characters'), + jp83: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1983Characters'), + jp90: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1990Characters'), + jp04: $3b6302b64eccc32c$var$feature('characterShape', 'JIS2004Characters'), + expt: $3b6302b64eccc32c$var$feature('characterShape', 'expertCharacters'), + hojo: $3b6302b64eccc32c$var$feature('characterShape', 'hojoCharacters'), + nlck: $3b6302b64eccc32c$var$feature('characterShape', 'NLCCharacters'), + tnam: $3b6302b64eccc32c$var$feature('characterShape', 'traditionalNamesCharacters'), + ruby: $3b6302b64eccc32c$var$feature('rubyKana', 'rubyKana'), + titl: $3b6302b64eccc32c$var$feature('styleOptions', 'titlingCaps'), + zero: $3b6302b64eccc32c$var$feature('typographicExtras', 'slashedZero'), + ss01: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwenty') +}; +// salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose +// Add cv01-cv99 features +for(let i = 1; i <= 99; i++)$3b6302b64eccc32c$var$OTMapping[`cv${`00${i}`.slice(-2)}`] = [ + $3b6302b64eccc32c$var$features.characterAlternatives.code, + i +]; +// create inverse mapping +let $3b6302b64eccc32c$var$AATMapping = {}; +for(let ot in $3b6302b64eccc32c$var$OTMapping){ + let aat = $3b6302b64eccc32c$var$OTMapping[ot]; + if ($3b6302b64eccc32c$var$AATMapping[aat[0]] == null) $3b6302b64eccc32c$var$AATMapping[aat[0]] = {}; + $3b6302b64eccc32c$var$AATMapping[aat[0]][aat[1]] = ot; +} +function $3b6302b64eccc32c$export$b813f7d2a1677c16(features) { + let res = {}; + for(let k in features){ + let r; + if (r = $3b6302b64eccc32c$var$OTMapping[k]) { + if (res[r[0]] == null) res[r[0]] = {}; + res[r[0]][r[1]] = features[k]; + } + } + return res; +} +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function $3b6302b64eccc32c$var$mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) var typeCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type].code; + else var typeCode = type; + if (isNaN(setting)) var settingCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type][setting]; + else var settingCode = setting; + return [ + typeCode, + settingCode + ]; +} +function $3b6302b64eccc32c$export$bd6df347a4f391c4(features) { + let res = {}; + if (Array.isArray(features)) for(let k = 0; k < features.length; k++){ + let r; + let f = $3b6302b64eccc32c$var$mapFeatureStrings(features[k]); + if (r = $3b6302b64eccc32c$var$AATMapping[f[0]] && $3b6302b64eccc32c$var$AATMapping[f[0]][f[1]]) res[r] = true; + } + else if (typeof features === 'object') for(let type in features){ + let feature = features[type]; + for(let setting in feature){ + let r; + let f = $3b6302b64eccc32c$var$mapFeatureStrings([ + type, + setting + ]); + if (feature[setting] && (r = $3b6302b64eccc32c$var$AATMapping[f[0]] && $3b6302b64eccc32c$var$AATMapping[f[0]][f[1]])) res[r] = true; + } + } + return Object.keys(res); +} + + + + + + + +class $ff5ce077dae0f144$export$2e2bcd8739ae039 { + lookup(glyph) { + switch(this.table.version){ + case 0: + return this.table.values.getItem(glyph); + case 2: + case 4: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.firstGlyph === 0xffff) return null; + if (glyph < seg.firstGlyph) max = mid - 1; + else if (glyph > seg.lastGlyph) min = mid + 1; + else { + if (this.table.version === 2) return seg.value; + else return seg.values[glyph - seg.firstGlyph]; + } + } + return null; + } + case 6: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.glyph === 0xffff) return null; + if (glyph < seg.glyph) max = mid - 1; + else if (glyph > seg.glyph) min = mid + 1; + else return seg.value; + } + return null; + } + case 8: + return this.table.values[glyph - this.table.firstGlyph]; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + glyphsForValue(classValue) { + let res = []; + switch(this.table.version){ + case 2: + case 4: + for (let segment of this.table.segments)if (this.table.version === 2 && segment.value === classValue) res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(segment.firstGlyph, segment.lastGlyph + 1)); + else { + for(let index = 0; index < segment.values.length; index++)if (segment.values[index] === classValue) res.push(segment.firstGlyph + index); + } + break; + case 6: + for (let segment of this.table.segments)if (segment.value === classValue) res.push(segment.glyph); + break; + case 8: + for(let i = 0; i < this.table.values.length; i++)if (this.table.values[i] === classValue) res.push(this.table.firstGlyph + i); + break; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + return res; + } + constructor(table){ + this.table = table; + } +} +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $ff5ce077dae0f144$export$2e2bcd8739ae039.prototype, "glyphsForValue", null); + + +const $50c7aac9316f2948$var$START_OF_TEXT_STATE = 0; +const $50c7aac9316f2948$var$START_OF_LINE_STATE = 1; +const $50c7aac9316f2948$var$END_OF_TEXT_CLASS = 0; +const $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS = 1; +const $50c7aac9316f2948$var$DELETED_GLYPH_CLASS = 2; +const $50c7aac9316f2948$var$END_OF_LINE_CLASS = 3; +const $50c7aac9316f2948$var$DONT_ADVANCE = 0x4000; +class $50c7aac9316f2948$export$2e2bcd8739ae039 { + process(glyphs, reverse, processEntry) { + let currentState = $50c7aac9316f2948$var$START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + while(dir === 1 && index <= glyphs.length || dir === -1 && index >= -1){ + let glyph = null; + let classCode = $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + if (index === glyphs.length || index === -1) classCode = $50c7aac9316f2948$var$END_OF_TEXT_CLASS; + else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) classCode = $50c7aac9316f2948$var$DELETED_GLYPH_CLASS; + else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) classCode = $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS; + } + } + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + if (classCode !== $50c7aac9316f2948$var$END_OF_TEXT_CLASS && classCode !== $50c7aac9316f2948$var$DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & $50c7aac9316f2948$var$DONT_ADVANCE); + } + currentState = entry.newState; + if (shouldAdvance) index += dir; + } + return glyphs; + } + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) return; + visited.add(state); + let { nClasses: nClasses, stateArray: stateArray, entryTable: entryTable } = this.stateTable; + let row = stateArray.getItem(state); + // Skip predefined classes + for(let classCode = 4; classCode < nClasses; classCode++){ + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)){ + if (opts.enter) opts.enter(glyph, entry); + if (entry.newState !== 0) this.traverse(opts, entry.newState, visited); + if (opts.exit) opts.exit(glyph, entry); + } + } + } + constructor(stateTable){ + this.stateTable = stateTable; + this.lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(stateTable.classTable); + } +} + + + + +// indic replacement flags +const $55f71433a605c87d$var$MARK_FIRST = 0x8000; +const $55f71433a605c87d$var$MARK_LAST = 0x2000; +const $55f71433a605c87d$var$VERB = 0x000F; +// contextual substitution and glyph insertion flag +const $55f71433a605c87d$var$SET_MARK = 0x8000; +// ligature entry flags +const $55f71433a605c87d$var$SET_COMPONENT = 0x8000; +const $55f71433a605c87d$var$PERFORM_ACTION = 0x2000; +// ligature action masks +const $55f71433a605c87d$var$LAST_MASK = 0x80000000; +const $55f71433a605c87d$var$STORE_MASK = 0x40000000; +const $55f71433a605c87d$var$OFFSET_MASK = 0x3FFFFFFF; +const $55f71433a605c87d$var$VERTICAL_ONLY = 0x800000; +const $55f71433a605c87d$var$REVERSE_DIRECTION = 0x400000; +const $55f71433a605c87d$var$HORIZONTAL_AND_VERTICAL = 0x200000; +// glyph insertion flags +const $55f71433a605c87d$var$CURRENT_IS_KASHIDA_LIKE = 0x2000; +const $55f71433a605c87d$var$MARKED_IS_KASHIDA_LIKE = 0x1000; +const $55f71433a605c87d$var$CURRENT_INSERT_BEFORE = 0x0800; +const $55f71433a605c87d$var$MARKED_INSERT_BEFORE = 0x0400; +const $55f71433a605c87d$var$CURRENT_INSERT_COUNT = 0x03E0; +const $55f71433a605c87d$var$MARKED_INSERT_COUNT = 0x001F; +class $55f71433a605c87d$export$2e2bcd8739ae039 { + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:boolean}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + // enable/disable the requested features + for (let feature of chain.features){ + let f; + if (f = features[feature.featureType]) { + if (f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } else if (f[feature.featureSetting] === false) { + flags |= ~feature.disableFlags; + flags &= ~feature.enableFlags; + } + } + } + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.processSubtable(subtable, glyphs); + } + // remove deleted glyphs + let index = glyphs.length - 1; + while(index >= 0){ + if (glyphs[index].id === 0xffff) glyphs.splice(index, 1); + index--; + } + return glyphs; + } + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let reverse = !!(this.subtable.coverage & $55f71433a605c87d$var$REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + getStateMachine(subtable) { + return new (0, $50c7aac9316f2948$export$2e2bcd8739ae039)(subtable.table.stateTable); + } + getProcessor() { + switch(this.subtable.type){ + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + processIndicRearragement(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$MARK_FIRST) this.firstGlyph = index; + if (entry.flags & $55f71433a605c87d$var$MARK_LAST) this.lastGlyph = index; + $55f71433a605c87d$var$reorderGlyphs(this.glyphs, entry.flags & $55f71433a605c87d$var$VERB, this.firstGlyph, this.lastGlyph); + } + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.flags & $55f71433a605c87d$var$SET_MARK) this.markedGlyph = index; + } + processLigature(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$SET_COMPONENT) this.ligatureStack.push(index); + if (entry.flags & $55f71433a605c87d$var$PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + while(!last){ + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + let action = actions.getItem(actionIndex++); + last = !!(action & $55f71433a605c87d$var$LAST_MASK); + let store = !!(action & $55f71433a605c87d$var$STORE_MASK); + let offset = (action & $55f71433a605c87d$var$OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + let component = components.getItem(offset); + ligatureIndex += component; + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(subtable.table.lookupTable); + for(index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while(count--){ + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + if (!isBefore) glyphIndex++; + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$SET_MARK) this.markedIndex = index; + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & $55f71433a605c87d$var$MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $55f71433a605c87d$var$MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & $55f71433a605c87d$var$CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $55f71433a605c87d$var$CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains)for (let feature of chain.features)features.push([ + feature.featureType, + feature.featureSetting + ]); + return features; + } + generateInputs(gid) { + if (!this.inputCache) this.generateInputCache(); + return this.inputCache[gid] || []; + } + generateInputCache() { + this.inputCache = {}; + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.generateInputsForSubtable(subtable); + } + } + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) return; + let reverse = !!(subtable.coverage & $55f71433a605c87d$var$REVERSE_DIRECTION); + if (reverse) throw new Error('Reverse subtable, not supported.'); + this.subtable = subtable; + this.ligatureStack = []; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let input = []; + let stack = []; + this.glyphs = []; + stateMachine.traverse({ + enter: (glyph, entry)=>{ + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for(let i = 0; i < glyphs.length && count <= 1; i++)if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + if (count === 1) { + let result = input.map((g)=>g.id); + let cache = this.inputCache[found]; + if (cache) cache.push(result); + else this.inputCache[found] = [ + result + ]; + } + }, + exit: ()=>{ + ({ glyphs: this.glyphs, ligatureStack: this.ligatureStack } = stack.pop()); + input.pop(); + } + }); + } + constructor(font){ + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } +} +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $55f71433a605c87d$export$2e2bcd8739ae039.prototype, "getStateMachine", null); +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function $55f71433a605c87d$var$swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) end.reverse(); + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) start.reverse(); + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} +function $55f71433a605c87d$var$reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch(verb){ + case 0: + return glyphs; + case 1: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 0 + ]); + case 2: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 1 + ]); + case 3: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 1 + ]); + case 4: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ]); + case 5: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ], true, false); + case 6: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ]); + case 7: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ], false, true); + case 8: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ]); + case 9: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ], false, true); + case 10: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ]); + case 11: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ], true, false); + case 12: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ]); + case 13: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, false); + case 14: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], false, true); + case 15: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, true); + default: + throw new Error(`Unknown verb: ${verb}`); + } +} + + +class $ba6dd74203be8728$export$2e2bcd8739ae039 { + substitute(glyphRun) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + if (glyphRun.direction === 'rtl') glyphRun.glyphs.reverse(); + this.morxProcessor.process(glyphRun.glyphs, $3b6302b64eccc32c$export$b813f7d2a1677c16(glyphRun.features)); + } + getAvailableFeatures(script, language) { + return $3b6302b64eccc32c$export$bd6df347a4f391c4(this.morxProcessor.getSupportedFeatures()); + } + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + for (let glyphs of glyphStrings)this._addStrings(glyphs, 0, result, ''); + return result; + } + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + for (let codePoint of codePoints){ + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) this._addStrings(glyphs, index + 1, strings, s); + else strings.add(s); + } + } + constructor(font){ + this.font = font; + this.morxProcessor = new (0, $55f71433a605c87d$export$2e2bcd8739ae039)(font); + this.fallbackPosition = false; + } +} + + + +class $94d7a73bd2edfc9a$export$2e2bcd8739ae039 { + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ _addFeatures(features, global) { + let stageIndex = this.stages.length - 1; + let stage = this.stages[stageIndex]; + for (let feature of features)if (this.allFeatures[feature] == null) { + stage.push(feature); + this.allFeatures[feature] = stageIndex; + if (global) this.globalFeatures[feature] = true; + } + } + /** + * Add features to the last stage + */ add(arg, global = true) { + if (this.stages.length === 0) this.stages.push([]); + if (typeof arg === 'string') arg = [ + arg + ]; + if (Array.isArray(arg)) this._addFeatures(arg, global); + else if (typeof arg === 'object') { + this._addFeatures(arg.global || [], true); + this._addFeatures(arg.local || [], false); + } else throw new Error("Unsupported argument to ShapingPlan#add"); + } + /** + * Add a new stage + */ addStage(arg, global) { + if (typeof arg === 'function') this.stages.push(arg, []); + else { + this.stages.push([]); + this.add(arg, global); + } + } + setFeatureOverrides(features) { + if (Array.isArray(features)) this.add(features); + else if (typeof features === 'object') for(let tag in features){ + if (features[tag]) this.add(tag); + else if (this.allFeatures[tag] != null) { + let stage = this.stages[this.allFeatures[tag]]; + stage.splice(stage.indexOf(tag), 1); + delete this.allFeatures[tag]; + delete this.globalFeatures[tag]; + } + } + } + /** + * Assigns the global features to the given glyphs + */ assignGlobalFeatures(glyphs) { + for (let glyph of glyphs)for(let feature in this.globalFeatures)glyph.features[feature] = true; + } + /** + * Executes the planned stages using the given OTProcessor + */ process(processor, glyphs, positions) { + for (let stage of this.stages){ + if (typeof stage === 'function') { + if (!positions) stage(this.font, glyphs, this); + } else if (stage.length > 0) processor.applyFeatures(stage, glyphs, positions); + } + } + constructor(font, script, direction){ + this.font = font; + this.script = script; + this.direction = direction; + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } +} + + + + +const $649970d87335b30f$var$VARIATION_FEATURES = [ + 'rvrn' +]; +const $649970d87335b30f$var$COMMON_FEATURES = [ + 'ccmp', + 'locl', + 'rlig', + 'mark', + 'mkmk' +]; +const $649970d87335b30f$var$FRACTIONAL_FEATURES = [ + 'frac', + 'numr', + 'dnom' +]; +const $649970d87335b30f$var$HORIZONTAL_FEATURES = [ + 'calt', + 'clig', + 'liga', + 'rclt', + 'curs', + 'kern' +]; +const $649970d87335b30f$var$VERTICAL_FEATURES = [ + 'vert' +]; +const $649970d87335b30f$var$DIRECTIONAL_FEATURES = { + ltr: [ + 'ltra', + 'ltrm' + ], + rtl: [ + 'rtla', + 'rtlm' + ] +}; +class $649970d87335b30f$export$2e2bcd8739ae039 { + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + static planPreprocessing(plan) { + plan.add({ + global: [ + ...$649970d87335b30f$var$VARIATION_FEATURES, + ...$649970d87335b30f$var$DIRECTIONAL_FEATURES[plan.direction] + ], + local: $649970d87335b30f$var$FRACTIONAL_FEATURES + }); + } + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + static planPostprocessing(plan, userFeatures) { + plan.add([ + ...$649970d87335b30f$var$COMMON_FEATURES, + ...$649970d87335b30f$var$HORIZONTAL_FEATURES + ]); + plan.setFeatureOverrides(userFeatures); + } + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + for(let i = 0; i < glyphs.length; i++){ + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { + let start = i; + let end = i + 1; + // Apply numerator + while(start > 0 && (0, $6uUbQ$isDigit)(glyphs[start - 1].codePoints[0])){ + glyphs[start - 1].features.numr = true; + glyphs[start - 1].features.frac = true; + start--; + } + // Apply denominator + while(end < glyphs.length && (0, $6uUbQ$isDigit)(glyphs[end].codePoints[0])){ + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } + } + } +} +(0, $6uUbQ$_)($649970d87335b30f$export$2e2bcd8739ae039, "zeroMarkWidths", 'AFTER_GPOS'); + + + + + + +const $764eb544bbe1ccf0$var$trie = new (0, $6uUbQ$unicodetrie)((0, $12727730ddfc8bfe$export$94fdf11bafc8de6b)("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==")); +const $764eb544bbe1ccf0$var$FEATURES = [ + 'isol', + 'fina', + 'fin2', + 'fin3', + 'medi', + 'med2', + 'init' +]; +const $764eb544bbe1ccf0$var$ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; +const $764eb544bbe1ccf0$var$ISOL = 'isol'; +const $764eb544bbe1ccf0$var$FINA = 'fina'; +const $764eb544bbe1ccf0$var$FIN2 = 'fin2'; +const $764eb544bbe1ccf0$var$FIN3 = 'fin3'; +const $764eb544bbe1ccf0$var$MEDI = 'medi'; +const $764eb544bbe1ccf0$var$MED2 = 'med2'; +const $764eb544bbe1ccf0$var$INIT = 'init'; +const $764eb544bbe1ccf0$var$NONE = null; +// Each entry is [prevAction, curAction, nextState] +const $764eb544bbe1ccf0$var$STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 2: prev was D/L in ISOL form, willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 1 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 3 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 4 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 6 + ] + ], + // State 3: prev was D in FINA form, willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 1 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 3 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 4 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 6 + ] + ], + // State 4: prev was FINA ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 6: prev was DALATH/RISH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$FIN3, + 5 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ] +]; +class $764eb544bbe1ccf0$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ccmp', + 'locl' + ]); + for(let i = 0; i < $764eb544bbe1ccf0$var$FEATURES.length; i++){ + let feature = $764eb544bbe1ccf0$var$FEATURES[i]; + plan.addStage(feature, false); + } + plan.addStage('mset'); + } + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + let prev = -1; + let state = 0; + let actions = []; + // Apply the state machine to map glyphs to features + for(let i = 0; i < glyphs.length; i++){ + let curAction, prevAction; + var glyph = glyphs[i]; + let type = $764eb544bbe1ccf0$var$getShapingClass(glyph.codePoints[0]); + if (type === $764eb544bbe1ccf0$var$ShapingClasses.Transparent) { + actions[i] = $764eb544bbe1ccf0$var$NONE; + continue; + } + [prevAction, curAction, state] = $764eb544bbe1ccf0$var$STATE_TABLE[state][type]; + if (prevAction !== $764eb544bbe1ccf0$var$NONE && prev !== -1) actions[prev] = prevAction; + actions[i] = curAction; + prev = i; + } + // Apply the chosen features to their respective glyphs + for(let index = 0; index < glyphs.length; index++){ + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) glyph.features[feature] = true; + } + } +} +function $764eb544bbe1ccf0$var$getShapingClass(codePoint) { + let res = $764eb544bbe1ccf0$var$trie.get(codePoint); + if (res) return res - 1; + let category = (0, $6uUbQ$getCategory)(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') return $764eb544bbe1ccf0$var$ShapingClasses.Transparent; + return $764eb544bbe1ccf0$var$ShapingClasses.Non_Joining; +} + + + + + +class $85d408632270248b$export$2e2bcd8739ae039 { + reset(options = {}, index = 0) { + this.options = options; + this.flags = options.flags || {}; + this.markAttachmentType = options.markAttachmentType || 0; + this.index = index; + } + get cur() { + return this.glyphs[this.index] || null; + } + shouldIgnore(glyph) { + return this.flags.ignoreMarks && glyph.isMark || this.flags.ignoreBaseGlyphs && glyph.isBase || this.flags.ignoreLigatures && glyph.isLigature || this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType; + } + move(dir) { + this.index += dir; + while(0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index]))this.index += dir; + if (0 > this.index || this.index >= this.glyphs.length) return null; + return this.glyphs[this.index]; + } + next() { + return this.move(1); + } + prev() { + return this.move(-1); + } + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while(count--)this.move(dir); + return this.glyphs[this.index]; + } + constructor(glyphs, options){ + this.glyphs = glyphs; + this.reset(options); + } +} + + + +const $a83b9c36aaa94fd3$var$DEFAULT_SCRIPTS = [ + 'DFLT', + 'dflt', + 'latn' +]; +class $a83b9c36aaa94fd3$export$2e2bcd8739ae039 { + findScript(script) { + if (this.table.scriptList == null) return null; + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script)for (let entry of this.table.scriptList){ + if (entry.tag === s) return entry; + } + return null; + } + selectScript(script, language, direction) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (!entry) entry = this.findScript($a83b9c36aaa94fd3$var$DEFAULT_SCRIPTS); + if (!entry) return this.scriptTag; + this.scriptTag = entry.tag; + this.script = entry.script; + this.language = null; + this.languageTag = null; + changed = true; + } + if (!direction || direction !== this.direction) this.direction = direction || $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script); + if (language && language.length < 4) language += ' '.repeat(4 - language.length); + if (!language || language !== this.languageTag) { + this.language = null; + for (let lang of this.script.langSysRecords)if (lang.tag === language) { + this.language = lang.langSys; + this.languageTag = lang.tag; + break; + } + if (!this.language) { + this.language = this.script.defaultLangSys; + this.languageTag = null; + } + changed = true; + } + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) for (let featureIndex of this.language.featureIndexes){ + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + return this.scriptTag; + } + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures){ + let feature = this.features[tag]; + if (!feature) continue; + for (let lookupIndex of feature.lookupListIndexes){ + if (exclude && exclude.indexOf(lookupIndex) !== -1) continue; + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + lookups.sort((a, b)=>a.index - b.index); + return lookups; + } + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) return null; + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions){ + if (substitution.featureIndex === featureIndex) return substitution.alternateFeatureTable; + } + return null; + } + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) return -1; + let records = variations.featureVariationRecords; + for(let i = 0; i < records.length; i++){ + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) return i; + } + return -1; + } + variationConditionsMatch(conditions, coords) { + return conditions.every((condition)=>{ + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new (0, $85d408632270248b$export$2e2bcd8739ae039)(glyphs); + for (let { feature: feature, lookup: lookup } of lookups){ + this.currentFeature = feature; + this.glyphIterator.reset(lookup.flags); + while(this.glyphIterator.index < glyphs.length){ + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + for (let table of lookup.subTables){ + let res = this.applyLookup(lookup.lookupType, table); + if (res) break; + } + this.glyphIterator.next(); + } + } + } + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + applyLookupList(lookupRecords) { + let options = this.glyphIterator.options; + let glyphIndex = this.glyphIterator.index; + for (let lookupRecord of lookupRecords){ + // Reset flags and find glyph index for this lookup record + this.glyphIterator.reset(options, glyphIndex); + this.glyphIterator.increment(lookupRecord.sequenceIndex); + // Get the lookup and setup flags for subtables + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); + // Apply lookup subtables until one matches + for (let table of lookup.subTables){ + if (this.applyLookup(lookup.lookupType, table)) break; + } + } + this.glyphIterator.reset(options, glyphIndex); + return true; + } + coverageIndex(coverage, glyph) { + if (glyph == null) glyph = this.glyphIterator.cur.id; + switch(coverage.version){ + case 1: + return coverage.glyphs.indexOf(glyph); + case 2: + for (let range of coverage.rangeRecords){ + if (range.start <= glyph && glyph <= range.end) return range.startCoverageIndex + glyph - range.start; + } + break; + } + return -1; + } + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + while(idx < sequence.length && glyph && fn(sequence[idx], glyph)){ + if (matched) matched.push(this.glyphIterator.index); + idx++; + glyph = this.glyphIterator.next(); + } + this.glyphIterator.index = pos; + if (idx < sequence.length) return false; + return matched || true; + } + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>component === glyph.id); + } + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>{ + // If the current feature doesn't apply to this glyph, + if (!(this.currentFeature in glyph.features)) return false; + return component === glyph.id; + }, []); + } + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph)=>this.coverageIndex(coverage, glyph.id) >= 0); + } + getClassID(glyph, classDef) { + switch(classDef.version){ + case 1: + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) return classDef.classValueArray[i]; + break; + case 2: + for (let range of classDef.classRangeRecord){ + if (range.start <= glyph && glyph <= range.end) return range.class; + } + break; + } + return 0; + } + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph)=>classID === this.getClassID(glyph.id, classDef)); + } + applyContext(table) { + let index, set; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + set = table.ruleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(1, rule.input)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) return false; + set = table.classSet[index]; + for (let rule of set){ + if (this.classSequenceMatches(1, rule.classes, table.classDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + applyChainingContext(table) { + let index; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let set = table.chainRuleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) return false; + for (let rule of rules){ + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, rule.input, table.inputClassDef) && this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + constructor(font, table){ + this.font = font; + this.table = table; + this.script = null; + this.scriptTag = null; + this.language = null; + this.languageTag = null; + this.features = {}; + this.lookups = {}; + // Setup variation substitutions + this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; + // initialize to default script + language + this.selectScript(); + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + this.currentFeature = null; + } +} + + +class $10e7b257e1a9a756$export$2e2bcd8739ae039 { + get id() { + return this._id; + } + set id(id) { + this._id = id; + this.substituted = true; + let GDEF = this._font.GDEF; + if (GDEF && GDEF.glyphClassDef) { + // TODO: clean this up + let classID = (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.glyphClassDef); + this.isBase = classID === 1; + this.isLigature = classID === 2; + this.isMark = classID === 3; + this.markAttachmentType = GDEF.markAttachClassDef ? (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.markAttachClassDef) : 0; + } else { + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $6uUbQ$isMark)); + this.isBase = !this.isMark; + this.isLigature = this.codePoints.length > 1; + this.markAttachmentType = 0; + } + } + copy() { + return new $10e7b257e1a9a756$export$2e2bcd8739ae039(this._font, this.id, this.codePoints, this.features); + } + constructor(font, id, codePoints = [], features){ + this._font = font; + this.codePoints = codePoints; + this.id = id; + this.features = {}; + if (Array.isArray(features)) for(let i = 0; i < features.length; i++){ + let feature = features[i]; + this.features[feature] = true; + } + else if (typeof features === 'object') Object.assign(this.features, features); + this.ligatureID = null; + this.ligatureComponent = null; + this.isLigated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + this.isMultiplied = false; + } +} + + +class $e1c6bbc8cb416f8c$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ljmo', + 'vjmo', + 'tjmo' + ], false); + } + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while(i < glyphs.length){ + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = $e1c6bbc8cb416f8c$var$getType(code); + [action, state] = $e1c6bbc8cb416f8c$var$STATE_TABLE[state][type]; + switch(action){ + case $e1c6bbc8cb416f8c$var$DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) i = $e1c6bbc8cb416f8c$var$decompose(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = $e1c6bbc8cb416f8c$var$compose(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + $e1c6bbc8cb416f8c$var$reorderToneMark(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = $e1c6bbc8cb416f8c$var$insertDottedCircle(glyphs, i, plan.font); + break; + } + i++; + } + } +} +(0, $6uUbQ$_)($e1c6bbc8cb416f8c$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +const $e1c6bbc8cb416f8c$var$HANGUL_BASE = 0xac00; +const $e1c6bbc8cb416f8c$var$HANGUL_END = 0xd7a4; +const $e1c6bbc8cb416f8c$var$HANGUL_COUNT = $e1c6bbc8cb416f8c$var$HANGUL_END - $e1c6bbc8cb416f8c$var$HANGUL_BASE + 1; +const $e1c6bbc8cb416f8c$var$L_BASE = 0x1100; // lead +const $e1c6bbc8cb416f8c$var$V_BASE = 0x1161; // vowel +const $e1c6bbc8cb416f8c$var$T_BASE = 0x11a7; // trail +const $e1c6bbc8cb416f8c$var$L_COUNT = 19; +const $e1c6bbc8cb416f8c$var$V_COUNT = 21; +const $e1c6bbc8cb416f8c$var$T_COUNT = 28; +const $e1c6bbc8cb416f8c$var$L_END = $e1c6bbc8cb416f8c$var$L_BASE + $e1c6bbc8cb416f8c$var$L_COUNT - 1; +const $e1c6bbc8cb416f8c$var$V_END = $e1c6bbc8cb416f8c$var$V_BASE + $e1c6bbc8cb416f8c$var$V_COUNT - 1; +const $e1c6bbc8cb416f8c$var$T_END = $e1c6bbc8cb416f8c$var$T_BASE + $e1c6bbc8cb416f8c$var$T_COUNT - 1; +const $e1c6bbc8cb416f8c$var$DOTTED_CIRCLE = 0x25cc; +const $e1c6bbc8cb416f8c$var$isL = (code)=>0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const $e1c6bbc8cb416f8c$var$isV = (code)=>0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const $e1c6bbc8cb416f8c$var$isT = (code)=>0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const $e1c6bbc8cb416f8c$var$isTone = (code)=>0x302e <= code && code <= 0x302f; +const $e1c6bbc8cb416f8c$var$isLVT = (code)=>$e1c6bbc8cb416f8c$var$HANGUL_BASE <= code && code <= $e1c6bbc8cb416f8c$var$HANGUL_END; +const $e1c6bbc8cb416f8c$var$isLV = (code)=>code - $e1c6bbc8cb416f8c$var$HANGUL_BASE < $e1c6bbc8cb416f8c$var$HANGUL_COUNT && (code - $e1c6bbc8cb416f8c$var$HANGUL_BASE) % $e1c6bbc8cb416f8c$var$T_COUNT === 0; +const $e1c6bbc8cb416f8c$var$isCombiningL = (code)=>$e1c6bbc8cb416f8c$var$L_BASE <= code && code <= $e1c6bbc8cb416f8c$var$L_END; +const $e1c6bbc8cb416f8c$var$isCombiningV = (code)=>$e1c6bbc8cb416f8c$var$V_BASE <= code && code <= $e1c6bbc8cb416f8c$var$V_END; +const $e1c6bbc8cb416f8c$var$isCombiningT = (code)=>$e1c6bbc8cb416f8c$var$T_BASE + 1 && 1 <= code && code <= $e1c6bbc8cb416f8c$var$T_END; +// Character categories +const $e1c6bbc8cb416f8c$var$X = 0; // Other character +const $e1c6bbc8cb416f8c$var$L = 1; // Leading consonant +const $e1c6bbc8cb416f8c$var$V = 2; // Medial vowel +const $e1c6bbc8cb416f8c$var$T = 3; // Trailing consonant +const $e1c6bbc8cb416f8c$var$LV = 4; // Composed syllable +const $e1c6bbc8cb416f8c$var$LVT = 5; // Composed syllable +const $e1c6bbc8cb416f8c$var$M = 6; // Tone mark +// This function classifies a character using the above categories. +function $e1c6bbc8cb416f8c$var$getType(code) { + if ($e1c6bbc8cb416f8c$var$isL(code)) return $e1c6bbc8cb416f8c$var$L; + if ($e1c6bbc8cb416f8c$var$isV(code)) return $e1c6bbc8cb416f8c$var$V; + if ($e1c6bbc8cb416f8c$var$isT(code)) return $e1c6bbc8cb416f8c$var$T; + if ($e1c6bbc8cb416f8c$var$isLV(code)) return $e1c6bbc8cb416f8c$var$LV; + if ($e1c6bbc8cb416f8c$var$isLVT(code)) return $e1c6bbc8cb416f8c$var$LVT; + if ($e1c6bbc8cb416f8c$var$isTone(code)) return $e1c6bbc8cb416f8c$var$M; + return $e1c6bbc8cb416f8c$var$X; +} +// State machine actions +const $e1c6bbc8cb416f8c$var$NO_ACTION = 0; +const $e1c6bbc8cb416f8c$var$DECOMPOSE = 1; +const $e1c6bbc8cb416f8c$var$COMPOSE = 2; +const $e1c6bbc8cb416f8c$var$TONE_MARK = 4; +const $e1c6bbc8cb416f8c$var$INVALID = 5; +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const $e1c6bbc8cb416f8c$var$STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$INVALID, + 0 + ] + ], + // State 1: + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$COMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$INVALID, + 0 + ] + ], + // State 2: or + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$COMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$TONE_MARK, + 0 + ] + ], + // State 3: or + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$TONE_MARK, + 0 + ] + ] +]; +function $e1c6bbc8cb416f8c$var$getGlyph(font, code, features) { + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, font.glyphForCodePoint(code).id, [ + code + ], features); +} +function $e1c6bbc8cb416f8c$var$decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let s = code - $e1c6bbc8cb416f8c$var$HANGUL_BASE; + let t = $e1c6bbc8cb416f8c$var$T_BASE + s % $e1c6bbc8cb416f8c$var$T_COUNT; + s = s / $e1c6bbc8cb416f8c$var$T_COUNT | 0; + let l = $e1c6bbc8cb416f8c$var$L_BASE + s / $e1c6bbc8cb416f8c$var$V_COUNT | 0; + let v = $e1c6bbc8cb416f8c$var$V_BASE + s % $e1c6bbc8cb416f8c$var$V_COUNT; + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== $e1c6bbc8cb416f8c$var$T_BASE && !font.hasGlyphForCodePoint(t)) return i; + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = $e1c6bbc8cb416f8c$var$getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + let vjmo = $e1c6bbc8cb416f8c$var$getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + let insert = [ + ljmo, + vjmo + ]; + if (t > $e1c6bbc8cb416f8c$var$T_BASE) { + let tjmo = $e1c6bbc8cb416f8c$var$getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} +function $e1c6bbc8cb416f8c$var$compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = $e1c6bbc8cb416f8c$var$getType(code); + let prev = glyphs[i - 1].codePoints[0]; + let prevType = $e1c6bbc8cb416f8c$var$getType(prev); + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === $e1c6bbc8cb416f8c$var$LV && type === $e1c6bbc8cb416f8c$var$T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === $e1c6bbc8cb416f8c$var$V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + // Make sure L and V are combining characters + if ($e1c6bbc8cb416f8c$var$isCombiningL(l) && $e1c6bbc8cb416f8c$var$isCombiningV(v)) lv = $e1c6bbc8cb416f8c$var$HANGUL_BASE + ((l - $e1c6bbc8cb416f8c$var$L_BASE) * $e1c6bbc8cb416f8c$var$V_COUNT + (v - $e1c6bbc8cb416f8c$var$V_BASE)) * $e1c6bbc8cb416f8c$var$T_COUNT; + } + let t = tjmo && tjmo.codePoints[0] || $e1c6bbc8cb416f8c$var$T_BASE; + if (lv != null && (t === $e1c6bbc8cb416f8c$var$T_BASE || $e1c6bbc8cb416f8c$var$isCombiningT(t))) { + let s = lv + (t - $e1c6bbc8cb416f8c$var$T_BASE); + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === $e1c6bbc8cb416f8c$var$V ? 3 : 2; + glyphs.splice(i - del + 1, del, $e1c6bbc8cb416f8c$var$getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) ljmo.features.ljmo = true; + if (vjmo) vjmo.features.vjmo = true; + if (tjmo) tjmo.features.tjmo = true; + if (prevType === $e1c6bbc8cb416f8c$var$LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + $e1c6bbc8cb416f8c$var$decompose(glyphs, i - 1, font); + return i + 1; + } + return i; +} +function $e1c6bbc8cb416f8c$var$getLength(code) { + switch($e1c6bbc8cb416f8c$var$getType(code)){ + case $e1c6bbc8cb416f8c$var$LV: + case $e1c6bbc8cb416f8c$var$LVT: + return 1; + case $e1c6bbc8cb416f8c$var$V: + return 2; + case $e1c6bbc8cb416f8c$var$T: + return 3; + } +} +function $e1c6bbc8cb416f8c$var$reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) return; + let prev = glyphs[i - 1].codePoints[0]; + let len = $e1c6bbc8cb416f8c$var$getLength(prev); + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} +function $e1c6bbc8cb416f8c$var$insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + if (font.hasGlyphForCodePoint($e1c6bbc8cb416f8c$var$DOTTED_CIRCLE)) { + let dottedCircle = $e1c6bbc8cb416f8c$var$getGlyph(font, $e1c6bbc8cb416f8c$var$DOTTED_CIRCLE, glyph.features); + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + return i; +} + + + + + + + + + +var $4b0735ca6c692ea5$exports = {}; +$4b0735ca6c692ea5$exports = JSON.parse("{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}"); + + +var $aa333a9607471296$exports = {}; +$aa333a9607471296$exports = JSON.parse("{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,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,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}"); + + +// Cateories used in the OpenType spec: +// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx +const $90a9d3398ee54fe5$export$a513ea61a7bee91c = { + X: 1, + C: 2, + V: 4, + N: 8, + H: 16, + ZWNJ: 32, + ZWJ: 64, + M: 128, + SM: 256, + VD: 512, + A: 1024, + Placeholder: 2048, + Dotted_Circle: 4096, + RS: 8192, + Coeng: 16384, + Repha: 32768, + Ra: 65536, + CM: 131072, + Symbol: 262144 // Avagraha, etc that take marks (SM,A,VD). +}; +const $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0 = { + Start: 1, + Ra_To_Become_Reph: 2, + Pre_M: 4, + Pre_C: 8, + Base_C: 16, + After_Main: 32, + Above_C: 64, + Before_Sub: 128, + Below_C: 256, + After_Sub: 512, + Before_Post: 1024, + Post_C: 2048, + After_Post: 4096, + Final_C: 8192, + SMVD: 16384, + End: 32768 +}; +const $90a9d3398ee54fe5$export$8519deaa7de2b07 = $90a9d3398ee54fe5$export$a513ea61a7bee91c.C | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Ra | $90a9d3398ee54fe5$export$a513ea61a7bee91c.CM | $90a9d3398ee54fe5$export$a513ea61a7bee91c.V | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Placeholder | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Dotted_Circle; +const $90a9d3398ee54fe5$export$bbcd928767338e0d = $90a9d3398ee54fe5$export$a513ea61a7bee91c.ZWJ | $90a9d3398ee54fe5$export$a513ea61a7bee91c.ZWNJ; +const $90a9d3398ee54fe5$export$ca9599b2a300afc = $90a9d3398ee54fe5$export$a513ea61a7bee91c.H | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Coeng; +const $90a9d3398ee54fe5$export$e99d119da76a0fc5 = { + Default: { + hasOldSpec: false, + virama: 0, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Devanagari: { + hasOldSpec: true, + virama: 0x094D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Bengali: { + hasOldSpec: true, + virama: 0x09CD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gurmukhi: { + hasOldSpec: true, + virama: 0x0A4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gujarati: { + hasOldSpec: true, + virama: 0x0ACD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Oriya: { + hasOldSpec: true, + virama: 0x0B4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Tamil: { + hasOldSpec: true, + virama: 0x0BCD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Telugu: { + hasOldSpec: true, + virama: 0x0C4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Explicit', + blwfMode: 'Post_Only' + }, + Kannada: { + hasOldSpec: true, + virama: 0x0CCD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Post_Only' + }, + Malayalam: { + hasOldSpec: true, + virama: 0x0D4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Log_Repha', + blwfMode: 'Pre_And_Post' + }, + // Handled by UniversalShaper + // Sinhala: { + // hasOldSpec: false, + // virama: 0x0DCA, + // basePos: 'Last_Sinhala', + // rephPos: POSITIONS.After_Main, + // rephMode: 'Explicit', + // blwfMode: 'Pre_And_Post' + // }, + Khmer: { + hasOldSpec: false, + virama: 0x17D2, + basePos: 'First', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Ra_To_Become_Reph, + rephMode: 'Vis_Repha', + blwfMode: 'Pre_And_Post' + } +}; +const $90a9d3398ee54fe5$export$f647c9cfdd77d95a = { + // Khmer + 0x17BE: [ + 0x17C1, + 0x17BE + ], + 0x17BF: [ + 0x17C1, + 0x17BF + ], + 0x17C0: [ + 0x17C1, + 0x17C0 + ], + 0x17C4: [ + 0x17C1, + 0x17C4 + ], + 0x17C5: [ + 0x17C1, + 0x17C5 + ] +}; + + + +const { decompositions: $7826f90f6f0cecc9$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$exports))); +const $7826f90f6f0cecc9$var$trie = new (0, $6uUbQ$unicodetrie)((0, $12727730ddfc8bfe$export$94fdf11bafc8de6b)("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiOvwRP0evH6fE68AzOH+Ke2eWYhw3PcGnuxvkr4A3QaGRZB7wFLAEHg2XgiEZ/fHKcp/ceBh/A+cngFPCpRm6vM3E8l8a5gN67GMdvgqsbeX2ap9yI601gM7gN3AG20mfuo8cdOP6GpvdUg9oKxz839GV90RDO2/glxN1B790NXsN1rZll7WYRdw+c70uvTwIHNAfTO0RyL5TDmnnbc3l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2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=")); +const $7826f90f6f0cecc9$var$stateMachine = new (0, $6uUbQ$dfa)((0, (/*@__PURE__*/$parcel$interopDefault($4b0735ca6c692ea5$exports)))); +class $7826f90f6f0cecc9$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($7826f90f6f0cecc9$var$setupSyllables); + plan.addStage([ + 'locl', + 'ccmp' + ]); + plan.addStage($7826f90f6f0cecc9$var$initialReordering); + plan.addStage('nukt'); + plan.addStage('akhn'); + plan.addStage('rphf', false); + plan.addStage('rkrf'); + plan.addStage('pref', false); + plan.addStage('blwf', false); + plan.addStage('abvf', false); + plan.addStage('half', false); + plan.addStage('pstf', false); + plan.addStage('vatu'); + plan.addStage('cjct'); + plan.addStage('cfar', false); + plan.addStage($7826f90f6f0cecc9$var$finalReordering); + plan.addStage({ + local: [ + 'init' + ], + global: [ + 'pres', + 'abvs', + 'blws', + 'psts', + 'haln', + 'dist', + 'abvm', + 'blwm', + 'calt', + 'clig' + ] + }); + // Setup the indic config for the selected script + plan.unicodeScript = $130d1a642ebcd2b7$export$ce50e82f12a827a4(plan.script); + plan.indicConfig = (0, $90a9d3398ee54fe5$export$e99d119da76a0fc5)[plan.unicodeScript] || (0, $90a9d3398ee54fe5$export$e99d119da76a0fc5).Default; + plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; + // TODO: turn off kern (Khmer) and liga features. + } + static assignFeatures(plan, glyphs) { + // Decompose split matras + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + let d = (0, $90a9d3398ee54fe5$export$f647c9cfdd77d95a)[codepoint] || $7826f90f6f0cecc9$var$decompositions[codepoint]; + if (d) { + let decomposed = d.map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $6uUbQ$_)($7826f90f6f0cecc9$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +function $7826f90f6f0cecc9$var$indicCategory(glyph) { + return $7826f90f6f0cecc9$var$trie.get(glyph.codePoints[0]) >> 8; +} +function $7826f90f6f0cecc9$var$indicPosition(glyph) { + return 1 << ($7826f90f6f0cecc9$var$trie.get(glyph.codePoints[0]) & 0xff); +} +class $7826f90f6f0cecc9$var$IndicInfo { + constructor(category, position, syllableType, syllable){ + this.category = category; + this.position = position; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $7826f90f6f0cecc9$var$setupSyllables(font, glyphs) { + let syllable = 0; + let last = 0; + for (let [start, end, tags] of $7826f90f6f0cecc9$var$stateMachine.match(glyphs.map($7826f90f6f0cecc9$var$indicCategory))){ + if (start > last) { + ++syllable; + for(let i = last; i < start; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).X, (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(glyphs[i]), $7826f90f6f0cecc9$var$indicPosition(glyphs[i]), tags[0], syllable); + last = end + 1; + } + if (last < glyphs.length) { + ++syllable; + for(let i = last; i < glyphs.length; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).X, (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } +} +function $7826f90f6f0cecc9$var$isConsonant(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$8519deaa7de2b07); +} +function $7826f90f6f0cecc9$var$isJoiner(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$bbcd928767338e0d); +} +function $7826f90f6f0cecc9$var$isHalantOrCoeng(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$ca9599b2a300afc); +} +function $7826f90f6f0cecc9$var$wouldSubstitute(glyphs, feature) { + for (let glyph of glyphs)glyph.features = { + [feature]: true + }; + let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor; + GSUB.applyFeatures([ + feature + ], glyphs); + return glyphs.length === 1; +} +function $7826f90f6f0cecc9$var$consonantPosition(font, consonant, virama) { + let glyphs = [ + virama, + consonant, + virama + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'blwf') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'blwf')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C; + else if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'pstf') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'pstf')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C; + else if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'pref') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'pref')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C; + return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; +} +function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + let virama = font.glyphForCodePoint(indicConfig.virama).id; + if (virama) { + let info = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, virama, [ + indicConfig.virama + ]); + for(let i = 0; i < glyphs.length; i++)if (glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) glyphs[i].shaperInfo.position = $7826f90f6f0cecc9$var$consonantPosition(font, glyphs[i].copy(), info); + } + for(let start = 0, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, start)){ + let { category: category, syllableType: syllableType } = glyphs[start].shaperInfo; + if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') continue; + if (syllableType === 'broken_cluster' && dottedCircle) { + let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(g), $7826f90f6f0cecc9$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable); + // Insert after possible Repha. + let i = start; + while(i < end && glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha)i++; + glyphs.splice(i++, 0, g); + end++; + } + // 1. Find base consonant: + // + // The shaping engine finds the base consonant of the syllable, using the + // following algorithm: starting from the end of the syllable, move backwards + // until a consonant is found that does not have a below-base or post-base + // form (post-base forms have to follow below-base forms), or that is not a + // pre-base reordering Ra, or arrive at the first consonant. The consonant + // stopped at will be the base. + let base = end; + let limit = start; + let hasReph = false; + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + if (indicConfig.rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === 'Implicit' && !$7826f90f6f0cecc9$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) { + // See if it matches the 'rphf' feature. + let g = [ + glyphs[start].copy(), + glyphs[start + 1].copy(), + glyphs[start + 2].copy() + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(g.slice(0, 2), 'rphf') || indicConfig.rephMode === 'Explicit' && $7826f90f6f0cecc9$var$wouldSubstitute(g, 'rphf')) { + limit += 2; + while(limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha) { + limit++; + while(limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + switch(indicConfig.basePos){ + case 'Last': + { + // starting from the end of the syllable, move backwards + let i = end; + let seenBelow = false; + do { + let info = glyphs[--i].shaperInfo; + // until a consonant is found + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) { + // that does not have a below-base or post-base form + // (post-base forms have to follow below-base forms), + if (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C && (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C || seenBelow)) { + base = i; + break; + } + // or that is not a pre-base reordering Ra, + // + // IMPLEMENTATION NOTES: + // + // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped + // by the logic above already. + // + // or arrive at the first consonant. The consonant stopped at will + // be the base. + if (info.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C) seenBelow = true; + base = i; + } else if (start < i && info.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ && glyphs[i - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) break; + }while (i > limit); + break; + } + case 'First': + // The first consonant is always the base. + base = start; + // Mark all subsequent consonants as below. + for(let i = base + 1; i < end; i++)if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) glyphs[i].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C; + } + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + // + // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ) + if (hasReph && base === start && limit - base <= 2) hasReph = false; + // 2. Decompose and reorder Matras: + // + // Each matra and any syllable modifier sign in the cluster are moved to the + // appropriate position relative to the consonant(s) in the cluster. The + // shaping engine decomposes two- or three-part matras into their constituent + // parts before any repositioning. Matra characters are classified by which + // consonant in a conjunct they have affinity for and are reordered to the + // following positions: + // + // o Before first half form in the syllable + // o After subjoined consonants + // o After post-form consonant + // o After main consonant (for above marks) + // + // IMPLEMENTATION NOTES: + // + // The normalize() routine has already decomposed matras for us, so we don't + // need to worry about that. + // 3. Reorder marks to canonical order: + // + // Adjacent nukta and halant or nukta and vedic sign are always repositioned + // if necessary, so that the nukta is first. + // + // IMPLEMENTATION NOTES: + // + // We don't need to do this: the normalize() routine already did this for us. + // Reorder characters + for(let i = start; i < base; i++){ + let info = glyphs[i].shaperInfo; + info.position = Math.min((0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_C, info.position); + } + if (base < end) glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; + // Mark final consonants. A final consonant is one appearing after a matra, + // like in Khmer. + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + for(let j = i + 1; j < end; j++)if ($7826f90f6f0cecc9$var$isConsonant(glyphs[j])) { + glyphs[j].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Final_C; + break; + } + break; + } + // Handle beginning Ra + if (hasReph) glyphs[start].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; + // For old-style Indic script tags, move the first post-base Halant after + // last consonant. + // + // Reports suggest that in some scripts Uniscribe does this only if there + // is *not* a Halant after last consonant already (eg. Kannada), while it + // does it unconditionally in other scripts (eg. Malayalam). We don't + // currently know about other scripts, so we single out Malayalam for now. + // + // Kannada test case: + // U+0C9A,U+0CCD,U+0C9A,U+0CCD + // With some versions of Lohit Kannada. + // https://bugs.freedesktop.org/show_bug.cgi?id=59118 + // + // Malayalam test case: + // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + // With lohit-ttf-20121122/Lohit-Malayalam.ttf + if (plan.isOldSpec) { + let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam'; + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) { + let j; + for(j = end - 1; j > i; j--){ + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[j]) || disallowDoubleHalants && glyphs[j].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) break; + } + if (glyphs[j].shaperInfo.category !== (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && j > i) { + // Move Halant to after last consonant. + let t = glyphs[i]; + glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i)); + glyphs[j] = t; + } + break; + } + } + // Attach misc marks to previous char to move with them. + let lastPos = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Start; + for(let i = start; i < end; i++){ + let info = glyphs[i].shaperInfo; + if (info.category & ((0, $90a9d3398ee54fe5$export$bbcd928767338e0d) | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).N | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).RS | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).CM | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc) & info.category)) { + info.position = lastPos; + if (info.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && info.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + // Uniscribe doesn't move the Halant with Left Matra. + // TEST: U+092B,U+093F,U+094DE + // We follow. This is important for the Sinhala + // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + // where U+0DD9 is a left matra and U+0DCA is the virama. + // We don't want to move the virama with the left matra. + // TEST: U+0D9A,U+0DDA + for(let j = i; j > start; j--)if (glyphs[j - 1].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + info.position = glyphs[j - 1].shaperInfo.position; + break; + } + } + } else if (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD) lastPos = info.position; + } + // For post-base consonants let them own anything before them + // since the last consonant or matra. + let last = base; + for(let i = base + 1; i < end; i++){ + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) { + for(let j = last + 1; j < i; j++)if (glyphs[j].shaperInfo.position < (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD) glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position; + last = i; + } else if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) last = i; + } + let arr = glyphs.slice(start, end); + arr.sort((a, b)=>a.shaperInfo.position - b.shaperInfo.position); + glyphs.splice(start, arr.length, ...arr); + // Find base again + for(let i = start; i < end; i++)if (glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) { + base = i; + break; + } + // Setup features now + // Reph + for(let i = start; i < end && glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; i++)glyphs[i].features.rphf = true; + // Pre-base + let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post'; + for(let i = start; i < base; i++){ + glyphs[i].features.half = true; + if (blwf) glyphs[i].features.blwf = true; + } + // Post-base + for(let i = base + 1; i < end; i++){ + glyphs[i].features.abvf = true; + glyphs[i].features.pstf = true; + glyphs[i].features.blwf = true; + } + if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') { + // Old-spec eye-lash Ra needs special handling. From the + // spec: + // + // "The feature 'below-base form' is applied to consonants + // having below-base forms and following the base consonant. + // The exception is vattu, which may appear below half forms + // as well as below the base glyph. The feature 'below-base + // form' will be applied to all such occurrences of Ra as well." + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+0915 + // with Sanskrit 2003 font. + // + // However, note that Ra,Halant,ZWJ is the correct way to + // request eyelash form of Ra, so we wouldbn't inhibit it + // in that sequence. + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915 + for(let i = start; i + 1 < base; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Ra && glyphs[i + 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && (i + 1 === base || glyphs[i + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) { + glyphs[i].features.blwf = true; + glyphs[i + 1].features.blwf = true; + } + } + let prefLen = 2; + if (features.pref && base + prefLen < end) // Find a Halant,Ra sequence and mark it for pre-base reordering processing. + for(let i = base + 1; i + prefLen - 1 < end; i++){ + let g = [ + glyphs[i].copy(), + glyphs[i + 1].copy() + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(g, 'pref')) { + for(let j = 0; j < prefLen; j++)glyphs[i++].features.pref = true; + // Mark the subsequent stuff with 'cfar'. Used in Khmer. + // Read the feature spec. + // This allows distinguishing the following cases with MS Khmer fonts: + // U+1784,U+17D2,U+179A,U+17D2,U+1782 + // U+1784,U+17D2,U+1782,U+17D2,U+179A + if (features.cfar) for(; i < end; i++)glyphs[i].features.cfar = true; + break; + } + } + // Apply ZWJ/ZWNJ effects + for(let i = start + 1; i < end; i++)if ($7826f90f6f0cecc9$var$isJoiner(glyphs[i])) { + let nonJoiner = glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWNJ; + let j = i; + do { + j--; + // ZWJ/ZWNJ should disable CJCT. They do that by simply + // being there, since we don't skip them for the CJCT + // feature (ie. F_MANUAL_ZWJ) + // A ZWNJ disables HALF. + if (nonJoiner) delete glyphs[j].features.half; + }while (j > start && !$7826f90f6f0cecc9$var$isConsonant(glyphs[j])); + } + } +} +function $7826f90f6f0cecc9$var$finalReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + for(let start = 0, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, start)){ + // 4. Final reordering: + // + // After the localized forms and basic shaping forms GSUB features have been + // applied (see below), the shaping engine performs some final glyph + // reordering before applying all the remaining font features to the entire + // cluster. + let tryPref = !!features.pref; + // Find base again + let base = start; + for(; base < end; base++)if (glyphs[base].shaperInfo.position >= (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) { + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) { + // Ok, this was a 'pref' candidate but didn't form any. + // Base is around here... + base = i; + while(base < end && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[base]))base++; + glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).BASE_C; + tryPref = false; + } + break; + } + } + // For Malayalam, skip over unformed below- (but NOT post-) forms. + if (plan.unicodeScript === 'Malayalam') for(let i = base + 1; i < end; i++){ + while(i < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[i]))i++; + if (i === end || !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[i])) break; + i++; // Skip halant. + while(i < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[i]))i++; + if (i < end && $7826f90f6f0cecc9$var$isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C) { + base = i; + glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; + } + } + if (start < base && glyphs[base].shaperInfo.position > (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) base--; + break; + } + if (base === end && start < base && glyphs[base - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ) base--; + if (base < end) while(start < base && glyphs[base].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).N | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc)))base--; + // o Reorder matras: + // + // If a pre-base matra character had been reordered before applying basic + // features, the glyph can be moved closer to the main consonant based on + // whether half-forms had been formed. Actual position for the matra is + // defined as “after last standalone halant glyph, after initial matra + // position and before the main consonant”. If ZWJ or ZWNJ follow this + // halant, position is moved after it. + // + if (start + 1 < end && start < base) { + // If we lost track of base, alas, position before last thingy. + let newPos = base === end ? base - 2 : base - 1; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc))))newPos--; + // If we found no Halant we are done. + // Otherwise only proceed if the Halant does + // not belong to the Matra itself! + if ($7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) // If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos + 1 < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[newPos + 1])) newPos++; + } else newPos = start; // No move. + } + if (start < newPos && glyphs[newPos].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + // Now go see if there's actually any matras... + for(let i = newPos; i > start; i--)if (glyphs[i - 1].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + let oldPos = i - 1; + if (oldPos < base && base <= newPos) base--; + let tmp = glyphs[oldPos]; + glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos)); + glyphs[newPos] = tmp; + newPos--; + } + } + } + // o Reorder reph: + // + // Reph’s original position is always at the beginning of the syllable, + // (i.e. it is not reordered at the character reordering stage). However, + // it will be reordered according to the basic-forms shaping results. + // Possible positions for reph, depending on the script, are; after main, + // before post-base consonant forms, and after post-base consonant forms. + // Two cases: + // + // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then + // we should only move it if the sequence ligated to the repha form. + // + // - If repha is encoded separately and in the logical position, we should only + // move it if it did NOT ligate. If it ligated, it's probably the font trying + // to make it work without the reordering. + if (start + 1 < end && glyphs[start].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && glyphs[start].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)) { + let newRephPos; + let rephPos = indicConfig.rephPos; + let found = false; + // 1. If reph should be positioned after post-base consonant forms, + // proceed to step 5. + if (rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Post) { + // 2. If the reph repositioning class is not after post-base: target + // position is after the first explicit halant glyph between the + // first post-reph consonant and last main consonant. If ZWJ or ZWNJ + // are following this halant, position is moved after it. If such + // position is found, this is the target position. Otherwise, + // proceed to the next step. + // + // Note: in old-implementation fonts, where classifications were + // fixed in shaping engine, there was no case where reph position + // will be found on this step. + newRephPos = start + 1; + while(newRephPos < base && !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $7826f90f6f0cecc9$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + // 3. If reph should be repositioned after the main consonant: find the + // first consonant not ligated with main, or find the first + // consonant that is not a potential pre-base reordering Ra. + if (!found && rephPos === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Main) { + newRephPos = base; + while(newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Main)newRephPos++; + found = newRephPos < end; + } + // 4. If reph should be positioned before post-base consonant, find + // first post-base classified consonant not ligated with main. If no + // consonant is found, the target position should be before the + // first matra, syllable modifier sign or vedic sign. + // + // This is our take on what step 4 is trying to say (and failing, BADLY). + if (!found && rephPos === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Sub) { + newRephPos = base; + while(newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & ((0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C | (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Post | (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD)))newRephPos++; + found = newRephPos < end; + } + } + // 5. If no consonant is found in steps 3 or 4, move reph to a position + // immediately before the first post-base matra, syllable modifier + // sign or vedic sign that has a reordering class after the intended + // reph position. For example, if the reordering position for reph + // is post-main, it will skip above-base matras that also have a + // post-main position. + if (!found) { + // Copied from step 2. + newRephPos = start + 1; + while(newRephPos < base && !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $7826f90f6f0cecc9$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + } + // 6. Otherwise, reorder reph to the end of the syllable. + if (!found) { + newRephPos = end - 1; + while(newRephPos > start && glyphs[newRephPos].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD)newRephPos--; + // If the Reph is to be ending up after a Matra,Halant sequence, + // position it before that Halant so it can interact with the Matra. + // However, if it's a plain Consonant,Halant we shouldn't do that. + // Uniscribe doesn't do this. + // TEST: U+0930,U+094D,U+0915,U+094B,U+094D + if ($7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + for(let i = base + 1; i < newRephPos; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) newRephPos--; + } + } + let reph = glyphs[start]; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start)); + glyphs[newRephPos] = reph; + if (start < base && base <= newRephPos) base--; + } + // o Reorder pre-base reordering consonants: + // + // If a pre-base reordering consonant is found, reorder it according to + // the following rules: + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + // 1. Only reorder a glyph produced by substitution during application + // of the feature. (Note that a font may shape a Ra consonant with + // the feature generally but block it in certain contexts.) + // Note: We just check that something got substituted. We don't check that + // the feature actually did it... + // + // Reorder pref only if it ligated. + if (glyphs[i].isLigated && !glyphs[i].isMultiplied) { + // 2. Try to find a target position the same way as for pre-base matra. + // If it is found, reorder pre-base consonant glyph. + // + // 3. If position is not found, reorder immediately before main + // consonant. + let newPos = base; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos - 1].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc))))newPos--; + // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a + // split matra, it should be reordered to *before* the left part of such matra. + if (newPos > start && glyphs[newPos - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + let oldPos = i; + for(let j = base + 1; j < oldPos; j++)if (glyphs[j].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + newPos--; + break; + } + } + } + if (newPos > start && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newPos - 1])) // -> If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[newPos])) newPos++; + } + let oldPos = i; + let tmp = glyphs[oldPos]; + glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos)); + glyphs[newPos] = tmp; + if (newPos <= base && base < oldPos) base++; + } + break; + } + } + // Apply 'init' to the Left Matra if it's a word start. + if (glyphs[start].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M && (!start || !/Cf|Mn/.test((0, $6uUbQ$getCategory)(glyphs[start - 1].codePoints[0])))) glyphs[start].features.init = true; + } +} +function $7826f90f6f0cecc9$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + + + + + + + + + +const { categories: $7ab494fe977143c6$var$categories, decompositions: $7ab494fe977143c6$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$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fft94ZU18hOXKR+JqUO8f4+5dvLsmWlMQb/Vov+CUDlpTGUndeQlG3fdZWdRPoPgl3mmDlsLnaey/4X3tVuU+o6L3/Pym+qlLV/jk6rlBRd8394hZ6JdnuqIv2ykOh3pfq96Wkq/E8qu2xl88/tOJ4R3tfmpbGi3c5T859bzqr7MbsN03iI5itUNj5eaEKWqIX/KJCQ/iFWNZMmHXs8ovWk53JzFq5vPul6zDjLV36pX7bzvNzB0YlQOZephWtRS5T7eeSq8030R77/HvC1d7tN83Zt9yltrDdwSR0XxsZd5l+MvvvU1/M9jSnj+Nh6FPJbBld/w6XHXH5MZeXrOfS/65g9RTl1JCa8chzX2RZ9/3lXSh4/VqWfEBNq4b82Ytp6m+9Qqxir1jX+rfPdT1vvsWhM6bPbmON6E1LnPCZW7L0qqXswmtqf0MQelZj4myrzYtzvIYmURlvtqapyx+gzRfd0XPfahVSOquMoG+dibBdl46iyfdbV1qvUW9m8+KTudMvkzZe/pqTJ+pWTflX5zw1fVfox6ZTVc8hvHflOSb+OuG1JsZ0kufXAJf8D")); +const $7ab494fe977143c6$var$stateMachine = new (0, $6uUbQ$dfa)((0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$exports)))); +class $7ab494fe977143c6$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($7ab494fe977143c6$var$setupSyllables); + // Default glyph pre-processing group + plan.addStage([ + 'locl', + 'ccmp', + 'nukt', + 'akhn' + ]); + // Reordering group + plan.addStage($7ab494fe977143c6$var$clearSubstitutionFlags); + plan.addStage([ + 'rphf' + ], false); + plan.addStage($7ab494fe977143c6$var$recordRphf); + plan.addStage($7ab494fe977143c6$var$clearSubstitutionFlags); + plan.addStage([ + 'pref' + ]); + plan.addStage($7ab494fe977143c6$var$recordPref); + // Orthographic unit shaping group + plan.addStage([ + 'rkrf', + 'abvf', + 'blwf', + 'half', + 'pstf', + 'vatu', + 'cjct' + ]); + plan.addStage($7ab494fe977143c6$var$reorder); + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + // Standard topographic presentation and positional feature application + plan.addStage([ + 'abvs', + 'blws', + 'pres', + 'psts', + 'dist', + 'abvm', + 'blwm' + ]); + } + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + if ($7ab494fe977143c6$var$decompositions[codepoint]) { + let decomposed = $7ab494fe977143c6$var$decompositions[codepoint].map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $6uUbQ$_)($7ab494fe977143c6$export$2e2bcd8739ae039, "zeroMarkWidths", 'BEFORE_GPOS'); +function $7ab494fe977143c6$var$useCategory(glyph) { + return $7ab494fe977143c6$var$trie.get(glyph.codePoints[0]); +} +class $7ab494fe977143c6$var$USEInfo { + constructor(category, syllableType, syllable){ + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $7ab494fe977143c6$var$setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of $7ab494fe977143c6$var$stateMachine.match(glyphs.map($7ab494fe977143c6$var$useCategory))){ + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $7ab494fe977143c6$var$USEInfo($7ab494fe977143c6$var$categories[$7ab494fe977143c6$var$useCategory(glyphs[i])], tags[0], syllable); + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for(let i = start; i < start + limit; i++)glyphs[i].features.rphf = true; + } +} +function $7ab494fe977143c6$var$clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs)glyph.substituted = false; +} +function $7ab494fe977143c6$var$recordRphf(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted && glyph.features.rphf) // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; +} +function $7ab494fe977143c6$var$recordPref(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted) // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; +} +function $7ab494fe977143c6$var$reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + for(let start = 0, end = $7ab494fe977143c6$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7ab494fe977143c6$var$nextSyllable(glyphs, start)){ + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') continue; + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = info; + // Insert after possible Repha. + for(i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + // Move things forward. + if (info.category === 'R' && end - start > 1) // Got a repha. Reorder it to after first base, before first halant. + for(i = start + 1; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($7ab494fe977143c6$var$isBase(info) || $7ab494fe977143c6$var$isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if ($7ab494fe977143c6$var$isHalant(glyphs[i])) i--; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + // Move things back. + for(i = start, j = end; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($7ab494fe977143c6$var$isBase(info) || $7ab494fe977143c6$var$isHalant(glyphs[i])) // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = $7ab494fe977143c6$var$isHalant(glyphs[i]) ? i + 1 : i; + else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } +} +function $7ab494fe977143c6$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} +function $7ab494fe977143c6$var$isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} +function $7ab494fe977143c6$var$isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} + + +const $102b6fe50f1d50b4$var$SHAPERS = { + arab: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mong: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + syrc: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + 'nko ': (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + phag: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mand: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mani: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + phlp: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + hang: (0, $e1c6bbc8cb416f8c$export$2e2bcd8739ae039), + bng2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + beng: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + dev2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + deva: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gjr2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gujr: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + guru: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gur2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + knda: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + knd2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + mlm2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + mlym: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + ory2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + orya: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + taml: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + tml2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + telu: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + tel2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + khmr: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + bali: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + batk: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + brah: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + bugi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + buhd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + cakm: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + cham: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + dupl: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + egyp: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + gran: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + hano: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + java: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + kthi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + kali: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + khar: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + khoj: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sind: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + lepc: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + limb: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + mahj: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + modi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + saur: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + shrd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sidd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sinh: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + sund: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sylo: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tglg: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tagb: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tale: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + lana: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tavt: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + takr: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tibt: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tfng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tirh: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + latn: (0, $649970d87335b30f$export$2e2bcd8739ae039), + DFLT: (0, $649970d87335b30f$export$2e2bcd8739ae039 // Default + ) +}; +function $102b6fe50f1d50b4$export$7877a478dd30fd3d(script) { + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script){ + let shaper = $102b6fe50f1d50b4$var$SHAPERS[s]; + if (shaper) return shaper; + } + return 0, $649970d87335b30f$export$2e2bcd8739ae039; +} + + + + + +class $0a876c45f1f7c41c$export$2e2bcd8739ae039 extends (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039) { + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let glyph = this.glyphIterator.cur; + switch(table.version){ + case 1: + glyph.id = glyph.id + table.deltaGlyphID & 0xffff; + break; + case 2: + glyph.id = table.substitute.get(index); + break; + } + return true; + } + case 2: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + if (sequence.length === 0) { + // If the sequence length is zero, delete the glyph. + // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it. + this.glyphs.splice(this.glyphIterator.index, 1); + return true; + } + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i)=>{ + let glyph = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + glyph.isMultiplied = true; + return glyph; + }); + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + return false; + } + case 3: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + return false; + } + case 4: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + for (let ligature of table.ligatureSets.get(index)){ + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) continue; + let curGlyph = this.glyphIterator.cur; + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched)characters.push(...this.glyphs[index].codePoints); + // Create the replacement ligature glyph + let ligatureGlyph = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for(let i = 0; i < matched.length && isMarkLigature; i++)isMarkLigature = this.glyphs[matched[i]].isMark; + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched){ + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) idx = matchIndex; + else while(idx < matchIndex){ + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) for(let i = idx; i < this.glyphs.length; i++){ + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else break; + } + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for(let i = matched.length - 1; i >= 0; i--)this.glyphs.splice(matched[i], 1); + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + return false; + } + case 5: + return this.applyContext(table); + case 6: + return this.applyChainingContext(table); + case 7: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} + + + +class $c96c93587d49c14d$export$2e2bcd8739ae039 extends (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039) { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) position.xAdvance += value.xAdvance; + if (value.yAdvance != null) position.yAdvance += value.yAdvance; + if (value.xPlacement != null) position.xOffset += value.xPlacement; + if (value.yPlacement != null) position.yOffset += value.yPlacement; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (value.xPlaDevice) position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b); + if (value.yPlaDevice) position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b); + if (value.xAdvDevice) position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b); + if (value.yAdvDevice) position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b); + } + // TODO: device tables + } + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + this.applyPositionValue(0, table.value); + break; + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + return true; + } + case 2: + { + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) return false; + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + let set = table.pairSets.get(index); + for (let pair of set)if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + return false; + case 2: + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) return false; + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + case 3: + { + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) return false; + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) return false; + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) return false; + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + let d; + switch(this.direction){ + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + return true; + } + case 4: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)); + if (baseGlyphIndex < 0) return false; + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) return false; + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 5: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + if (baseGlyphIndex < 0) return false; + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) return false; + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent > 0 ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1; + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 6: + { + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) return false; + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) return false; + let cur = this.glyphIterator.cur; + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) good = true; + else if (cur.ligatureComponent === prev.ligatureComponent) good = true; + } else // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if (cur.ligatureID && !cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) good = true; + if (!good) return false; + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) return false; + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + case 7: + return this.applyContext(table); + case 8: + return this.applyChainingContext(table); + case 9: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + getAnchor(anchor) { + // TODO: contour point, device tables + let x = anchor.xCoordinate; + let y = anchor.yCoordinate; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (anchor.xDeviceTable) x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b); + if (anchor.yDeviceTable) y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b); + } + return { + x: x, + y: y + }; + } + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + for(var i = 0; i < this.glyphs.length; i++)this.fixCursiveAttachment(i); + this.fixMarkAttachment(); + } + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + fixMarkAttachment() { + for(let i = 0; i < this.glyphs.length; i++){ + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + if (this.direction === 'ltr') for(let k = j; k < i; k++){ + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + else for(let k = j + 1; k < i + 1; k++){ + this.positions[i].xOffset += this.positions[k].xAdvance; + this.positions[i].yOffset += this.positions[k].yAdvance; + } + } + } + } +} + + +class $a62492810de27e3d$export$2e2bcd8739ae039 { + setup(glyphRun) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphRun.glyphs.map((glyph)=>new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, glyph.id, [ + ...glyph.codePoints + ])); + // Select a script based on what is available in GSUB/GPOS. + let script = null; + if (this.GPOSProcessor) script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + if (this.GSUBProcessor) script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = $102b6fe50f1d50b4$export$7877a478dd30fd3d(script); + this.plan = new (0, $94d7a73bd2edfc9a$export$2e2bcd8739ae039)(this.font, script, glyphRun.direction); + this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); + // Assign chosen features to output glyph run + for(let key in this.plan.allFeatures)glyphRun.features[key] = true; + } + substitute(glyphRun) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + // Map glyph infos back to normal Glyph objects + glyphRun.glyphs = this.glyphInfos.map((glyphInfo)=>this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + } + position(glyphRun) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') this.zeroMarkAdvances(glyphRun.positions); + if (this.GPOSProcessor) this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions); + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') this.zeroMarkAdvances(glyphRun.positions); + // Reverse the glyphs and positions if the script is right-to-left + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + glyphRun.positions.reverse(); + } + return this.GPOSProcessor && this.GPOSProcessor.features; + } + zeroMarkAdvances(positions) { + for(let i = 0; i < this.glyphInfos.length; i++)if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + getAvailableFeatures(script, language) { + let features = []; + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + return features; + } + constructor(font){ + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + this.fallbackPosition = true; + if (font.GSUB) this.GSUBProcessor = new (0, $0a876c45f1f7c41c$export$2e2bcd8739ae039)(font, font.GSUB); + if (font.GPOS) this.GPOSProcessor = new (0, $c96c93587d49c14d$export$2e2bcd8739ae039)(font, font.GPOS); + } +} + + +class $4c0a7fa5df7a9ab1$export$2e2bcd8739ae039 { + layout(string, features, script, language, direction) { + // Make the features parameter optional + if (typeof features === 'string') { + direction = language; + language = script; + script = features; + features = []; + } + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) script = $130d1a642ebcd2b7$export$e5cb25e204fb8450(string); + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string)codePoints.push(...glyph.codePoints); + script = $130d1a642ebcd2b7$export$16fab0757cfc223d(codePoints); + } + var glyphs = string; + } + let glyphRun = new (0, $be07b3e97a42687a$export$2e2bcd8739ae039)(glyphs, features, script, language, direction); + // Return early if there are no glyphs + if (glyphs.length === 0) { + glyphRun.positions = []; + return glyphRun; + } + // Setup the advanced layout engine + if (this.engine && this.engine.setup) this.engine.setup(glyphRun); + // Substitute and position the glyphs + this.substitute(glyphRun); + this.position(glyphRun); + this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) this.engine.cleanup(); + return glyphRun; + } + substitute(glyphRun) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) this.engine.substitute(glyphRun); + } + position(glyphRun) { + // Get initial glyph positions + glyphRun.positions = glyphRun.glyphs.map((glyph)=>new (0, $1ac75d9a55b67f01$export$2e2bcd8739ae039)(glyph.advanceWidth)); + let positioned = null; + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) positioned = this.engine.position(glyphRun); + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned && (!this.engine || this.engine.fallbackPosition)) { + if (!this.unicodeLayoutEngine) this.unicodeLayoutEngine = new (0, $0a4bdfeb6dfd6f5e$export$2e2bcd8739ae039)(this.font); + this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions); + } + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) { + if (!this.kernProcessor) this.kernProcessor = new (0, $0bba3a9db57637f3$export$2e2bcd8739ae039)(this.font); + this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions); + glyphRun.features.kern = true; + } + } + hideDefaultIgnorables(glyphs, positions) { + let space = this.font.glyphForCodePoint(0x20); + for(let i = 0; i < glyphs.length; i++)if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) { + glyphs[i] = space; + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + isDefaultIgnorable(ch) { + // From DerivedCoreProperties.txt in the Unicode database, + // minus U+115F, U+1160, U+3164 and U+FFA0, which is what + // Harfbuzz and Uniscribe do. + let plane = ch >> 16; + if (plane === 0) // BMP + switch(ch >> 8){ + case 0x00: + return ch === 0x00AD; + case 0x03: + return ch === 0x034F; + case 0x06: + return ch === 0x061C; + case 0x17: + return 0x17B4 <= ch && ch <= 0x17B5; + case 0x18: + return 0x180B <= ch && ch <= 0x180E; + case 0x20: + return 0x200B <= ch && ch <= 0x200F || 0x202A <= ch && ch <= 0x202E || 0x2060 <= ch && ch <= 0x206F; + case 0xFE: + return 0xFE00 <= ch && ch <= 0xFE0F || ch === 0xFEFF; + case 0xFF: + return 0xFFF0 <= ch && ch <= 0xFFF8; + default: + return false; + } + else // Other planes + switch(plane){ + case 0x01: + return 0x1BCA0 <= ch && ch <= 0x1BCA3 || 0x1D173 <= ch && ch <= 0x1D17A; + case 0x0E: + return 0xE0000 <= ch && ch <= 0xE0FFF; + default: + return false; + } + } + getAvailableFeatures(script, language) { + let features = []; + if (this.engine) features.push(...this.engine.getAvailableFeatures(script, language)); + if (this.font.kern && features.indexOf('kern') === -1) features.push('kern'); + return features; + } + stringsForGlyph(gid) { + let result = new Set; + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints)result.add(String.fromCodePoint(codePoint)); + if (this.engine && this.engine.stringsForGlyph) for (let string of this.engine.stringsForGlyph(gid))result.add(string); + return Array.from(result); + } + constructor(font){ + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) this.engine = new (0, $ba6dd74203be8728$export$2e2bcd8739ae039)(this.font); + else if (this.font.GSUB || this.font.GPOS) this.engine = new (0, $a62492810de27e3d$export$2e2bcd8739ae039)(this.font); + } +} + + + + + + +const $f43aec954cdfdf21$var$SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; +class $f43aec954cdfdf21$export$2e2bcd8739ae039 { + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ toFunction() { + return (ctx)=>{ + this.commands.forEach((c)=>{ + return ctx[c.command].apply(ctx, c.args); + }); + }; + } + /** + * Converts the path to an SVG path data string + * @return {string} + */ toSVG() { + let cmds = this.commands.map((c)=>{ + let args = c.args.map((arg)=>Math.round(arg * 100) / 100); + return `${$f43aec954cdfdf21$var$SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + return cmds.join(''); + } + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ get cbox() { + if (!this._cbox) { + let cbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + for (let command of this.commands)for(let i = 0; i < command.args.length; i += 2)cbox.addPoint(command.args[i], command.args[i + 1]); + this._cbox = Object.freeze(cbox); + } + return this._cbox; + } + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ get bbox() { + if (this._bbox) return this._bbox; + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + let cx = 0, cy = 0; + let f = (t)=>Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; + for (let c of this.commands)switch(c.command){ + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + var p0 = [ + cx, + cy + ]; + var p1 = [ + cp1x, + cp1y + ]; + var p2 = [ + cp2x, + cp2y + ]; + var p3 = [ + p3x, + p3y + ]; + for(var i = 0; i <= 1; i++){ + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + if (a === 0) { + if (b === 0) continue; + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) bbox.addPoint(f(t), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t)); + } + continue; + } + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) continue; + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) bbox.addPoint(f(t1), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t1)); + } + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) bbox.addPoint(f(t2), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t2)); + } + } + cx = p3x; + cy = p3y; + break; + } + return this._bbox = Object.freeze(bbox); + } + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ mapPoints(fn) { + let path = new $f43aec954cdfdf21$export$2e2bcd8739ae039; + for (let c of this.commands){ + let args = []; + for(let i = 0; i < c.args.length; i += 2){ + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + path[c.command](...args); + } + return path; + } + /** + * Transforms the path by the given matrix. + */ transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y)=>{ + const tx = m0 * x + m2 * y + m4; + const ty = m1 * x + m3 * y + m5; + return [ + tx, + ty + ]; + }); + } + /** + * Translates the path by the given offset. + */ translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + /** + * Rotates the path by the given angle (in radians). + */ rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + /** + * Scales the path. + */ scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } + constructor(){ + this.commands = []; + this._bbox = null; + this._cbox = null; + } +} +for (let command of [ + 'moveTo', + 'lineTo', + 'quadraticCurveTo', + 'bezierCurveTo', + 'closePath' +])$f43aec954cdfdf21$export$2e2bcd8739ae039.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command: command, + args: args + }); + return this; +}; + + + +var $7713b9b7b438dff8$export$2e2bcd8739ae039 = [ + '.notdef', + '.null', + 'nonmarkingreturn', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quotesingle', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'grave', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'Adieresis', + 'Aring', + 'Ccedilla', + 'Eacute', + 'Ntilde', + 'Odieresis', + 'Udieresis', + 'aacute', + 'agrave', + 'acircumflex', + 'adieresis', + 'atilde', + 'aring', + 'ccedilla', + 'eacute', + 'egrave', + 'ecircumflex', + 'edieresis', + 'iacute', + 'igrave', + 'icircumflex', + 'idieresis', + 'ntilde', + 'oacute', + 'ograve', + 'ocircumflex', + 'odieresis', + 'otilde', + 'uacute', + 'ugrave', + 'ucircumflex', + 'udieresis', + 'dagger', + 'degree', + 'cent', + 'sterling', + 'section', + 'bullet', + 'paragraph', + 'germandbls', + 'registered', + 'copyright', + 'trademark', + 'acute', + 'dieresis', + 'notequal', + 'AE', + 'Oslash', + 'infinity', + 'plusminus', + 'lessequal', + 'greaterequal', + 'yen', + 'mu', + 'partialdiff', + 'summation', + 'product', + 'pi', + 'integral', + 'ordfeminine', + 'ordmasculine', + 'Omega', + 'ae', + 'oslash', + 'questiondown', + 'exclamdown', + 'logicalnot', + 'radical', + 'florin', + 'approxequal', + 'Delta', + 'guillemotleft', + 'guillemotright', + 'ellipsis', + 'nonbreakingspace', + 'Agrave', + 'Atilde', + 'Otilde', + 'OE', + 'oe', + 'endash', + 'emdash', + 'quotedblleft', + 'quotedblright', + 'quoteleft', + 'quoteright', + 'divide', + 'lozenge', + 'ydieresis', + 'Ydieresis', + 'fraction', + 'currency', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'daggerdbl', + 'periodcentered', + 'quotesinglbase', + 'quotedblbase', + 'perthousand', + 'Acircumflex', + 'Ecircumflex', + 'Aacute', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Oacute', + 'Ocircumflex', + 'apple', + 'Ograve', + 'Uacute', + 'Ucircumflex', + 'Ugrave', + 'dotlessi', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'Lslash', + 'lslash', + 'Scaron', + 'scaron', + 'Zcaron', + 'zcaron', + 'brokenbar', + 'Eth', + 'eth', + 'Yacute', + 'yacute', + 'Thorn', + 'thorn', + 'minus', + 'multiply', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'onehalf', + 'onequarter', + 'threequarters', + 'franc', + 'Gbreve', + 'gbreve', + 'Idotaccent', + 'Scedilla', + 'scedilla', + 'Cacute', + 'cacute', + 'Ccaron', + 'ccaron', + 'dcroat' +]; + + +class $f92906be28e61769$export$2e2bcd8739ae039 { + _getPath() { + return new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)(); + } + _getCBox() { + return this.path.cbox; + } + _getBBox() { + return this.path.bbox; + } + _getTableMetrics(table) { + if (this.id < table.metrics.length) return table.metrics.get(this.id); + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + return res; + } + _getMetrics(cbox) { + if (this._metrics) return this._metrics; + let { advance: advanceWidth, bearing: leftBearing } = this._getTableMetrics(this._font.hmtx); + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) var { advance: advanceHeight, bearing: topBearing } = this._getTableMetrics(this._font.vmtx); + else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) ({ cbox: cbox } = this); + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + } else { + let { hhea: hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + if (this._font._variationProcessor && this._font.HVAR) advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + return this._metrics = { + advanceWidth: advanceWidth, + advanceHeight: advanceHeight, + leftBearing: leftBearing, + topBearing: topBearing + }; + } + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ get cbox() { + return this._getCBox(); + } + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ get bbox() { + return this._getBBox(); + } + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + /** + * The glyph's advance width. + * @type {number} + */ get advanceWidth() { + return this._getMetrics().advanceWidth; + } + /** + * The glyph's advance height. + * @type {number} + */ get advanceHeight() { + return this._getMetrics().advanceHeight; + } + get ligatureCaretPositions() {} + _getName() { + let { post: post } = this._font; + if (!post) return null; + switch(post.version){ + case 1: + return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[this.id]; + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < (0, $7713b9b7b438dff8$export$2e2bcd8739ae039).length) return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[id]; + return post.names[id - (0, $7713b9b7b438dff8$export$2e2bcd8739ae039).length]; + case 2.5: + return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[this.id + post.offsets[this.id]]; + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + /** + * The glyph's name + * @type {string} + */ get name() { + return this._getName(); + } + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ render(ctx, size) { + ctx.save(); + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + ctx.restore(); + } + constructor(id, codePoints, font){ + /** + * The glyph id in the font + * @type {number} + */ this.id = id; + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ this.codePoints = codePoints; + this._font = font; + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $6uUbQ$isMark)); + this.isLigature = this.codePoints.length > 1; + } +} +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "cbox", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "path", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "advanceWidth", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "advanceHeight", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "name", null); + + + + + +// The header for both simple and composite glyphs +let $69aac16029968692$var$GlyfHeader = new $6uUbQ$Struct({ + numberOfContours: $6uUbQ$int16, + xMin: $6uUbQ$int16, + yMin: $6uUbQ$int16, + xMax: $6uUbQ$int16, + yMax: $6uUbQ$int16 +}); +// Flags for simple glyphs +const $69aac16029968692$var$ON_CURVE = 1; +const $69aac16029968692$var$X_SHORT_VECTOR = 2; +const $69aac16029968692$var$Y_SHORT_VECTOR = 4; +const $69aac16029968692$var$REPEAT = 8; +const $69aac16029968692$var$SAME_X = 16; +const $69aac16029968692$var$SAME_Y = 32; +// Flags for composite glyphs +const $69aac16029968692$var$ARG_1_AND_2_ARE_WORDS = 1; +const $69aac16029968692$var$ARGS_ARE_XY_VALUES = 2; +const $69aac16029968692$var$ROUND_XY_TO_GRID = 4; +const $69aac16029968692$var$WE_HAVE_A_SCALE = 8; +const $69aac16029968692$var$MORE_COMPONENTS = 32; +const $69aac16029968692$var$WE_HAVE_AN_X_AND_Y_SCALE = 64; +const $69aac16029968692$var$WE_HAVE_A_TWO_BY_TWO = 128; +const $69aac16029968692$var$WE_HAVE_INSTRUCTIONS = 256; +const $69aac16029968692$var$USE_MY_METRICS = 512; +const $69aac16029968692$var$OVERLAP_COMPOUND = 1024; +const $69aac16029968692$var$SCALED_COMPONENT_OFFSET = 2048; +const $69aac16029968692$var$UNSCALED_COMPONENT_OFFSET = 4096; +class $69aac16029968692$export$baf26146a414f24a { + copy() { + return new $69aac16029968692$export$baf26146a414f24a(this.onCurve, this.endContour, this.x, this.y); + } + constructor(onCurve, endContour, x = 0, y = 0){ + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } +} +// Represents a component in a composite glyph +class $69aac16029968692$var$Component { + constructor(glyphID, dx, dy){ + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} +class $69aac16029968692$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) return this.path.cbox; + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = $69aac16029968692$var$GlyfHeader.decode(stream); + let cbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) val = -val; + val += prev; + } else if (same) var val = prev; + else var val = prev + stream.readInt16BE(); + return val; + } + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) return null; + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + let glyph = $69aac16029968692$var$GlyfHeader.decode(stream); + if (glyph.numberOfContours > 0) this._decodeSimple(glyph, stream); + else if (glyph.numberOfContours < 0) this._decodeComposite(glyph, stream, startPos); + return glyph; + } + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + let endPtsOfContours = new $6uUbQ$Array($6uUbQ$uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new $6uUbQ$Array($6uUbQ$uint8, $6uUbQ$uint16).decode(stream); + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + while(flags.length < numCoords){ + var flag = stream.readUInt8(); + flags.push(flag); + // check for repeat flag + if (flag & $69aac16029968692$var$REPEAT) { + let count = stream.readUInt8(); + for(let j = 0; j < count; j++)flags.push(flag); + } + } + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + let point = new $69aac16029968692$export$baf26146a414f24a(!!(flag & $69aac16029968692$var$ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + let px = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & $69aac16029968692$var$X_SHORT_VECTOR, flag & $69aac16029968692$var$SAME_X); + } + let py = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & $69aac16029968692$var$Y_SHORT_VECTOR, flag & $69aac16029968692$var$SAME_Y); + } + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + return; + } + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = $69aac16029968692$var$MORE_COMPONENTS; + while(flags & $69aac16029968692$var$MORE_COMPONENTS){ + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) haveInstructions = (flags & $69aac16029968692$var$WE_HAVE_INSTRUCTIONS) !== 0; + if (flags & $69aac16029968692$var$ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + var component = new $69aac16029968692$var$Component(glyphID, dx, dy); + component.pos = gPos; + if (flags & $69aac16029968692$var$WE_HAVE_A_SCALE) // fixed number with 14 bits of fraction + component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + else if (flags & $69aac16029968692$var$WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & $69aac16029968692$var$WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } + glyph.components.push(component); + } + if (this._font._variationProcessor) { + let points = []; + for(let j = 0; j < glyph.components.length; j++){ + var component = glyph.components[j]; + points.push(new $69aac16029968692$export$baf26146a414f24a(true, true, component.dx, component.dy)); + } + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + for(let i = 0; i < points.length; i++){ + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + return haveInstructions; + } + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) this._metrics = (0, $f92906be28e61769$export$2e2bcd8739ae039).prototype._getMetrics.call(this, cbox); + let { advanceWidth: advanceWidth, advanceHeight: advanceHeight, leftBearing: leftBearing, topBearing: topBearing } = this._metrics; + return [ + new $69aac16029968692$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing, 0), + new $69aac16029968692$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new $69aac16029968692$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing), + new $69aac16029968692$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) return []; + let points = []; + if (glyph.numberOfContours < 0) // resolve composite glyphs + for (let component of glyph.components){ + let contours = this._font.getGlyph(component.glyphID)._getContours(); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + for(let j = 0; j < contour.length; j++){ + let point = contour[j]; + let x = point.x * component.scaleX + point.y * component.scale01 + component.dx; + let y = point.y * component.scaleY + point.x * component.scale10 + component.dy; + points.push(new $69aac16029968692$export$baf26146a414f24a(point.onCurve, point.endContour, x, y)); + } + } + } + else points = glyph.points || []; + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + let contours = []; + let cur = []; + for(let k = 0; k < points.length; k++){ + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + return contours; + } + _getMetrics() { + if (this._metrics) return this._metrics; + let cbox = this._getCBox(true); + super._getMetrics(cbox); + if (this._font._variationProcessor && !this._font.HVAR) // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + return this._metrics; + } + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + else // Start at the middle if both the first and last points are off curve + firstPt = new $69aac16029968692$export$baf26146a414f24a(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + var curvePt = firstPt; + } + path.moveTo(firstPt.x, firstPt.y); + for(let j = start; j < contour.length; j++){ + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + if (prevPt.onCurve && pt.onCurve) path.lineTo(pt.x, pt.y); + else if (prevPt.onCurve && !pt.onCurve) var curvePt = pt; + else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + } else throw new Error("Unknown TTF path state"); + } + // Connect the first and last points + if (curvePt) path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + path.closePath(); + } + return path; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'TTF'); + } +} + + + + + +class $62cc5109c6101893$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + _getName() { + if (this._font.CFF2) return super._getName(); + return this._font['CFF '].getGlyphName(this.id); + } + bias(s) { + if (s.length < 1240) return 107; + else if (s.length < 33900) return 1131; + else return 32768; + } + _getPath() { + let cff = this._font.CFF2 || this._font['CFF ']; + let { stream: stream } = cff; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + let path = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039); + let stack = []; + let trans = []; + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + let privateDict = cff.privateDictForGlyph(this.id) || {}; + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + function checkWidth() { + if (width == null) width = stack.shift() + privateDict.nominalWidthX; + } + function parseStems() { + if (stack.length % 2 !== 0) checkWidth(); + nStems += stack.length >> 1; + return stack.length = 0; + } + function moveTo(x, y) { + if (open) path.closePath(); + path.moveTo(x, y); + open = true; + } + let parse = function() { + while(stream.pos < end){ + let op = stream.readUInt8(); + if (op < 32) { + let index, subr, phase; + let c1x, c1y, c2x, c2y, c3x, c3y; + let c4x, c4y, c5x, c5y, c6x, c6y; + let pts; + switch(op){ + case 1: + case 3: + case 18: + case 23: + parseStems(); + break; + case 4: + if (stack.length > 1) checkWidth(); + y += stack.shift(); + moveTo(x, y); + break; + case 5: + while(stack.length >= 2){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + case 6: + case 7: + phase = op === 6; + while(stack.length >= 1){ + if (phase) x += stack.shift(); + else y += stack.shift(); + path.lineTo(x, y); + phase = !phase; + } + break; + case 8: + while(stack.length > 0){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 10: + index = stack.pop() + subrsBias; + subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 11: + if (cff.version >= 2) break; + return; + case 14: + if (cff.version >= 2) break; + if (stack.length > 0) checkWidth(); + if (open) { + path.closePath(); + open = false; + } + break; + case 15: + if (cff.version < 2) throw new Error('vsindex operator not supported in CFF v1'); + vsindex = stack.pop(); + break; + case 16: + { + if (cff.version < 2) throw new Error('blend operator not supported in CFF v1'); + if (!variationProcessor) throw new Error('blend operator in non-variation font'); + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + for(let i = 0; i < numBlends; i++){ + let sum = stack[base + i]; + for(let j = 0; j < blendVector.length; j++)sum += blendVector[j] * stack[delta++]; + stack[base + i] = sum; + } + while(numOperands--)stack.pop(); + break; + } + case 19: + case 20: + parseStems(); + stream.pos += nStems + 7 >> 3; + break; + case 21: + if (stack.length > 2) checkWidth(); + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + case 22: + if (stack.length > 1) checkWidth(); + x += stack.shift(); + moveTo(x, y); + break; + case 24: + while(stack.length >= 8){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + case 25: + while(stack.length >= 8){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + case 26: + if (stack.length % 2) x += stack.shift(); + while(stack.length >= 4){ + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 27: + if (stack.length % 2) y += stack.shift(); + while(stack.length >= 4){ + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 28: + stack.push(stream.readInt16BE()); + break; + case 29: + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 30: + case 31: + phase = op === 31; + while(stack.length >= 4){ + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + case 12: + op = stream.readUInt8(); + switch(op){ + case 3: + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + case 4: + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + case 5: + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + case 9: + a = stack.pop(); + stack.push(Math.abs(a)); + break; + case 10: + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + case 11: + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + case 12: + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + case 14: + a = stack.pop(); + stack.push(-a); + break; + case 15: + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + case 18: + stack.pop(); + break; + case 20: + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + case 21: + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + case 22: + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + case 23: + stack.push(Math.random()); + break; + case 24: + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + case 26: + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + case 27: + a = stack.pop(); + stack.push(a, a); + break; + case 28: + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + case 29: + idx = stack.pop(); + if (idx < 0) idx = 0; + else if (idx > stack.length - 1) idx = stack.length - 1; + stack.push(stack[idx]); + break; + case 30: + let n = stack.pop(); + let j = stack.pop(); + if (j >= 0) while(j > 0){ + var t = stack[n - 1]; + for(let i = n - 2; i >= 0; i--)stack[i + 1] = stack[i]; + stack[0] = t; + j--; + } + else while(j < 0){ + var t = stack[0]; + for(let i = 0; i <= n; i++)stack[i] = stack[i + 1]; + stack[n - 1] = t; + j++; + } + break; + case 34: + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y; + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 35: + pts = []; + for(let i = 0; i <= 5; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + case 36: + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 37: + let startx = x; + let starty = y; + pts = []; + for(let i = 0; i <= 4; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + if (Math.abs(x - startx) > Math.abs(y - starty)) { + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + default: + throw new Error(`Unknown op: ${op}`); + } + } else if (op < 247) stack.push(op - 139); + else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else stack.push(stream.readInt32BE() / 65536); + } + }; + parse(); + if (open) path.closePath(); + return path; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'CFF'); + } +} + + + + + +let $25d8f049c222084c$var$SBIXImage = new $6uUbQ$Struct({ + originX: $6uUbQ$uint16, + originY: $6uUbQ$uint16, + type: new $6uUbQ$String(4), + data: new $6uUbQ$Buffer((t)=>t.parent.buflen - t._currentOffset) +}); +class $25d8f049c222084c$export$2e2bcd8739ae039 extends (0, $69aac16029968692$export$2e2bcd8739ae039) { + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ getImageForSize(size) { + for(let i = 0; i < this._font.sbix.imageTables.length; i++){ + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) break; + } + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + if (start === end) return null; + this._font.stream.pos = start; + return $25d8f049c222084c$var$SBIXImage.decode(this._font.stream, { + buflen: end - start + }); + } + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, { + height: size, + x: img.originX, + y: (this.bbox.minY - img.originY) * scale + }); + } + if (this._font.sbix.flags.renderOutlines) super.render(ctx, size); + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'SBIX'); + } +} + + + + + +class $0d411f0165859681$var$COLRLayer { + constructor(glyph, color){ + this.glyph = glyph; + this.color = color; + } +} +class $0d411f0165859681$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + _getBBox() { + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + for(let i = 0; i < this.layers.length; i++){ + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + return bbox; + } + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + while(low <= high){ + let mid = low + high >> 1; + var rec = colr.baseGlyphRecord[mid]; + if (this.id < rec.gid) high = mid - 1; + else if (this.id > rec.gid) low = mid + 1; + else { + var baseLayer = rec; + break; + } + } + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + return [ + new $0d411f0165859681$var$COLRLayer(g, color) + ]; + } + // otherwise, return an array of all the layers + let layers = []; + for(let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++){ + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new $0d411f0165859681$var$COLRLayer(g, color)); + } + return layers; + } + render(ctx, size) { + for (let { glyph: glyph, color: color } of this.layers){ + ctx.fillColor([ + color.red, + color.green, + color.blue + ], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + return; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'COLR'); + } +} + + +const $0bb840cac04e911b$var$TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const $0bb840cac04e911b$var$TUPLE_COUNT_MASK = 0x0fff; +const $0bb840cac04e911b$var$EMBEDDED_TUPLE_COORD = 0x8000; +const $0bb840cac04e911b$var$INTERMEDIATE_TUPLE = 0x4000; +const $0bb840cac04e911b$var$PRIVATE_POINT_NUMBERS = 0x2000; +const $0bb840cac04e911b$var$TUPLE_INDEX_MASK = 0x0fff; +const $0bb840cac04e911b$var$POINTS_ARE_WORDS = 0x80; +const $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK = 0x7f; +const $0bb840cac04e911b$var$DELTAS_ARE_ZERO = 0x80; +const $0bb840cac04e911b$var$DELTAS_ARE_WORDS = 0x40; +const $0bb840cac04e911b$var$DELTA_RUN_COUNT_MASK = 0x3f; +class $0bb840cac04e911b$export$2e2bcd8739ae039 { + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for(var i = 0; i < this.font.fvar.axis.length; i++){ + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + else normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) for(var i = 0; i < this.font.avar.segment.length; i++){ + let segment = this.font.avar.segment[i]; + for(let j = 0; j < segment.correspondence.length; j++){ + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / (pair.fromCoord - prev.fromCoord + Number.EPSILON) + prev.toCoord; + break; + } + } + } + return normalized; + } + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) return; + let { gvar: gvar } = this.font; + if (gid >= gvar.glyphCount) return; + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) return; + // Read the gvar data for this glyph + let { stream: stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) return; + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + if (tupleCount & $0bb840cac04e911b$var$TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + let origPoints = glyphPoints.map((pt)=>pt.copy()); + tupleCount &= $0bb840cac04e911b$var$TUPLE_COUNT_MASK; + for(let i = 0; i < tupleCount; i++){ + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + if (tupleIndex & $0bb840cac04e911b$var$EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for(let a = 0; a < gvar.axisCount; a++)tupleCoords.push(stream.readInt16BE() / 16384); + } else { + if ((tupleIndex & $0bb840cac04e911b$var$TUPLE_INDEX_MASK) >= gvar.globalCoordCount) throw new Error('Invalid gvar table'); + var tupleCoords = gvar.globalCoords[tupleIndex & $0bb840cac04e911b$var$TUPLE_INDEX_MASK]; + } + if (tupleIndex & $0bb840cac04e911b$var$INTERMEDIATE_TUPLE) { + var startCoords = []; + for(let a = 0; a < gvar.axisCount; a++)startCoords.push(stream.readInt16BE() / 16384); + var endCoords = []; + for(let a = 0; a < gvar.axisCount; a++)endCoords.push(stream.readInt16BE() / 16384); + } + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + var here = stream.pos; + stream.pos = offsetToData; + if (tupleIndex & $0bb840cac04e911b$var$PRIVATE_POINT_NUMBERS) var points = this.decodePoints(); + else var points = sharedPoints; + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + if (points.length === 0) for(let i = 0; i < glyphPoints.length; i++){ + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + else { + let outPoints = origPoints.map((pt)=>pt.copy()); + let hasDelta = glyphPoints.map(()=>false); + for(let i = 0; i < points.length; i++){ + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + point.x += xDeltas[i] * factor; + point.y += yDeltas[i] * factor; + } + } + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + for(let i = 0; i < glyphPoints.length; i++){ + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX); + glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY); + } + } + offsetToData += tupleDataSize; + stream.pos = here; + } + } + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + if (count & $0bb840cac04e911b$var$POINTS_ARE_WORDS) count = (count & $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK) + 1; + let fn = run & $0bb840cac04e911b$var$POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + for(let j = 0; j < runCount && i < count; j++){ + point += fn.call(stream); + points[i++] = point; + } + } + return points; + } + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $0bb840cac04e911b$var$DELTA_RUN_COUNT_MASK) + 1; + if (run & $0bb840cac04e911b$var$DELTAS_ARE_ZERO) i += runCount; + else { + let fn = run & $0bb840cac04e911b$var$DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for(let j = 0; j < runCount && i < count; j++)deltas[i++] = fn.call(stream); + } + } + return deltas; + } + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar: gvar } = this.font; + let factor = 1; + for(let i = 0; i < gvar.axisCount; i++){ + if (tupleCoords[i] === 0) continue; + if (normalized[i] === 0) return 0; + if ((tupleIndex & $0bb840cac04e911b$var$INTERMEDIATE_TUPLE) === 0) { + if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) return 0; + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) return 0; + else if (normalized[i] < tupleCoords[i]) factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + else factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + return factor; + } + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) return; + let point = 0; + while(point < points.length){ + let firstPoint = point; + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while(!pt.endContour)pt = points[++endPoint]; + // find the first point that has a delta + while(point <= endPoint && !hasDelta[point])point++; + if (point > endPoint) continue; + let firstDelta = point; + let curDelta = point; + point++; + while(point <= endPoint){ + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + point++; + } + // shift contour if we only have a single delta + if (curDelta === firstDelta) this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + if (firstDelta > 0) this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + point = endPoint + 1; + } + } + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) return; + let iterable = [ + 'x', + 'y' + ]; + for(let i = 0; i < iterable.length; i++){ + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + for(let p = p1; p <= p2; p++){ + let out = inPoints[p][k]; + if (out <= in1) out += out1 - in1; + else if (out >= in2) out += out2 - in2; + else out = out1 + (out - in1) * scale; + outPoints[p][k] = out; + } + } + } + } + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + if (deltaX === 0 && deltaY === 0) return; + for(let p = p1; p <= p2; p++)if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) idx = table.advanceWidthMapping.mapCount - 1; + let entryFormat = table.advanceWidthMapping.entryFormat; + ({ outerIndex: outerIndex, innerIndex: innerIndex } = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + return this.getDelta(table.itemVariationStore, outerIndex, innerIndex); + } + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getDelta(itemStore, outerIndex, innerIndex) { + if (outerIndex >= itemStore.itemVariationData.length) return 0; + let varData = itemStore.itemVariationData[outerIndex]; + if (innerIndex >= varData.deltaSets.length) return 0; + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + for(let master = 0; master < varData.regionIndexCount; master++)netAdjustment += deltaSet.deltas[master] * blendVector[master]; + return netAdjustment; + } + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) return this.blendVectors.get(varData); + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + // outer loop steps through master designs to be blended + for(let master = 0; master < varData.regionIndexCount; master++){ + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + // inner loop steps through axes in this region + for(let j = 0; j < axes.length; j++){ + let axis = axes[j]; + let axisScalar; + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) axisScalar = 1; + else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) axisScalar = 1; + else if (axis.peakCoord === 0) axisScalar = 1; + else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) axisScalar = 0; + else { + if (normalizedCoords[j] === axis.peakCoord) axisScalar = 1; + else if (normalizedCoords[j] < axis.peakCoord) axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.startCoord + Number.EPSILON); + else axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + // take product of all the axis scalars + scalar *= axisScalar; + } + blendVector[master] = scalar; + } + this.blendVectors.set(varData, blendVector); + return blendVector; + } + constructor(font, coords){ + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } +} + + + + +const $5cc7476da92df375$var$resolved = Promise.resolve(); +class $5cc7476da92df375$export$2e2bcd8739ae039 { + includeGlyph(glyph) { + if (typeof glyph === 'object') glyph = glyph.id; + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + return this.mapping[glyph]; + } + constructor(font){ + this.font = font; + this.glyphs = []; + this.mapping = {}; + // always include the missing glyph + this.includeGlyph(0); + } +} + + + + + +// Flags for simple glyphs +const $807e58506be70005$var$ON_CURVE = 1; +const $807e58506be70005$var$X_SHORT_VECTOR = 2; +const $807e58506be70005$var$Y_SHORT_VECTOR = 4; +const $807e58506be70005$var$REPEAT = 8; +const $807e58506be70005$var$SAME_X = 16; +const $807e58506be70005$var$SAME_Y = 32; +class $807e58506be70005$var$Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + static encode(stream, value) { + if (value >= 0 && value <= 255) stream.writeUInt8(value); + else stream.writeInt16BE(value); + } +} +let $807e58506be70005$var$Glyf = new $6uUbQ$Struct({ + numberOfContours: $6uUbQ$int16, + xMin: $6uUbQ$int16, + yMin: $6uUbQ$int16, + xMax: $6uUbQ$int16, + yMax: $6uUbQ$int16, + endPtsOfContours: new $6uUbQ$Array($6uUbQ$uint16, 'numberOfContours'), + instructions: new $6uUbQ$Array($6uUbQ$uint8, $6uUbQ$uint16), + flags: new $6uUbQ$Array($6uUbQ$uint8, 0), + xPoints: new $6uUbQ$Array($807e58506be70005$var$Point, 0), + yPoints: new $6uUbQ$Array($807e58506be70005$var$Point, 0) +}); +class $807e58506be70005$export$2e2bcd8739ae039 { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + for(let i = 0; i < path.commands.length; i++){ + let c = path.commands[i]; + for(let j = 0; j < c.args.length; j += 2){ + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + if (x === midX && y === midY) continue; + } + } + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) flag |= $807e58506be70005$var$ON_CURVE; + flag = this._encodePoint(x, lastX, xPoints, flag, $807e58506be70005$var$X_SHORT_VECTOR, $807e58506be70005$var$SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, $807e58506be70005$var$Y_SHORT_VECTOR, $807e58506be70005$var$SAME_Y); + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= $807e58506be70005$var$REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + flags.push(flag); + lastFlag = flag; + } + lastX = x; + lastY = y; + pointCount++; + } + if (c.command === 'closePath') endPtsOfContours.push(pointCount - 1); + } + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') endPtsOfContours.push(pointCount - 1); + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + let size = $807e58506be70005$var$Glyf.size(glyf); + let tail = 4 - size % 4; + let stream = new $6uUbQ$EncodeStream(size + tail); + $807e58506be70005$var$Glyf.encode(stream, glyf); + // Align to 4-byte length + if (tail !== 0) stream.fill(0, tail); + return stream.buffer; + } + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + if (value === last) flag |= sameFlag; + else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) diff = -diff; + else flag |= sameFlag; + } + points.push(diff); + } + return flag; + } +} + + +class $4abbb6a5dbdc441a$export$2e2bcd8739ae039 extends (0, $5cc7476da92df375$export$2e2bcd8739ae039) { + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + let buffer = stream.readBuffer(nextOffset - curOffset); + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Uint8Array(buffer); + let view = new DataView(buffer.buffer); + for (let component of glyf.components){ + gid = this.includeGlyph(component.glyphID); + view.setUint16(component.pos, gid); + } + } else if (glyf && this.font._variationProcessor) // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + this.offset += buffer.length; + return this.glyf.length - 1; + } + encode() { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [], + version: this.font.loca.version + }; + this.hmtx = { + metrics: [], + bearings: [] + }; + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while(i < this.glyphs.length)this._addGlyph(this.glyphs[i++]); + let maxp = (0, $6uUbQ$clone)(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + this.loca.offsets.push(this.offset); + let head = (0, $6uUbQ$clone)(this.font.head); + head.indexToLocFormat = this.loca.version; + let hhea = (0, $6uUbQ$clone)(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + // TODO: subset prep, cvt, fpgm? + return (0, $816c07a04b6dba87$export$2e2bcd8739ae039).toBuffer({ + tables: { + head: head, + hhea: hhea, + loca: this.loca, + maxp: maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + } + }); + } + constructor(font){ + super(font); + this.glyphEncoder = new (0, $807e58506be70005$export$2e2bcd8739ae039); + } +} + + + + + + +class $001d739428a71d5a$export$2e2bcd8739ae039 extends (0, $5cc7476da92df375$export$2e2bcd8739ae039) { + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + for (let gid of this.glyphs){ + this.charstrings.push(this.cff.getCharString(gid)); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedGsubrs)gsubrs[subr] = true; + } + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + subsetSubrs(subrs, used) { + let res = []; + for(let i = 0; i < subrs.length; i++){ + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else res.push(new Uint8Array([ + 11 + ])); // return + } + return res; + } + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + let used_fds = {}; + let used_subrs = []; + let fd_select = {}; + for (let gid of this.glyphs){ + let fd = this.cff.fdForGlyph(gid); + if (fd == null) continue; + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + fd_select[fd] = topDict.FDArray.length - 1; + } + used_fds[fd] = true; + topDict.FDSelect.fds.push(fd_select[fd]); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[fd_select[fd]][subr] = true; + } + for(let i = 0; i < topDict.FDArray.length; i++){ + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + return; + } + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs){ + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[subr] = true; + } + let privateDict = Object.assign({}, this.cff.topDict.Private); + if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + topDict.FDArray = [ + { + Private: privateDict + } + ]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [ + { + first: 0, + fd: 0 + } + ], + sentinel: this.charstrings.length + }; + } + addString(string) { + if (!string) return null; + if (!this.strings) this.strings = []; + this.strings.push(string); + return (0, $229224aec43783c5$export$2e2bcd8739ae039).length + this.strings.length - 1; + } + encode() { + this.subsetCharstrings(); + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [ + { + first: 1, + nLeft: this.charstrings.length - 2 + } + ] + }; + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + for (let key of [ + 'version', + 'Notice', + 'Copyright', + 'FullName', + 'FamilyName', + 'Weight', + 'PostScript', + 'BaseFontName', + 'FontName' + ])topDict[key] = this.addString(this.cff.string(topDict[key])); + topDict.ROS = [ + this.addString('Adobe'), + this.addString('Identity'), + 0 + ]; + topDict.CIDCount = this.charstrings.length; + if (this.cff.isCIDFont) this.subsetFontdict(topDict); + else this.createCIDFontdict(topDict); + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: 4, + header: this.cff.header, + nameIndex: [ + this.cff.postscriptName + ], + topDictIndex: [ + topDict + ], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + return (0, $b84fd3dd9d8eddb2$export$2e2bcd8739ae039).toBuffer(top); + } + constructor(font){ + super(font); + this.cff = this.font['CFF ']; + if (!this.cff) throw new Error('Not a CFF Font'); + } +} + + + + +class $4c1709dee528ea76$export$2e2bcd8739ae039 { + static probe(buffer) { + let format = (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + setDefaultLanguage(lang = null) { + this.defaultLanguage = lang; + } + _getTable(table) { + if (!(table.tag in this._tables)) try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if ($d636bc798e7178db$export$bd5c5d8b8dcafd78) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + return this._tables[table.tag]; + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + return null; + } + _decodeDirectory() { + return this.directory = (0, $816c07a04b6dba87$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _decodeTable(table) { + let pos = this.stream.pos; + let stream = this._getTableStream(table.tag); + let result = (0, $c3395722bea751e2$export$2e2bcd8739ae039)[table.tag].decode(stream, this, table.length); + this.stream.pos = pos; + return result; + } + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ getName(key, lang = this.defaultLanguage || $d636bc798e7178db$export$42940898df819940) { + let record = this.name && this.name.records[key]; + if (record) // Attempt to retrieve the entry, depending on which translation is available: + return record[lang] || record[this.defaultLanguage] || record[$d636bc798e7178db$export$42940898df819940] || record['en'] || record[Object.keys(record)[0]] // Seriously, ANY language would be fine + || null; + return null; + } + /** + * The unique PostScript name for this font, e.g. "Helvetica-Bold" + * @type {string} + */ get postscriptName() { + return this.getName('postscriptName'); + } + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ get fullName() { + return this.getName('fullName'); + } + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ get familyName() { + return this.getName('fontFamily'); + } + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ get subfamilyName() { + return this.getName('fontSubfamily'); + } + /** + * The font's copyright information + * @type {string} + */ get copyright() { + return this.getName('copyright'); + } + /** + * The font's version number + * @type {string} + */ get version() { + return this.getName('version'); + } + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ get ascent() { + return this.hhea.ascent; + } + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ get descent() { + return this.hhea.descent; + } + /** + * The amount of space that should be included between lines + * @type {number} + */ get lineGap() { + return this.hhea.lineGap; + } + /** + * The offset from the normal underline position that should be used + * @type {number} + */ get underlinePosition() { + return this.post.underlinePosition; + } + /** + * The weight of the underline that should be used + * @type {number} + */ get underlineThickness() { + return this.post.underlineThickness; + } + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ get italicAngle() { + return this.post.italicAngle; + } + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + /** + * The number of glyphs in the font. + * @type {number} + */ get numGlyphs() { + return this.maxp.numGlyphs; + } + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ get unitsPerEm() { + return this.head.unitsPerEm; + } + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ get bbox() { + return Object.freeze(new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + get _cmapProcessor() { + return new (0, $f08dd41ef10b694c$export$2e2bcd8739ae039)(this.cmap); + } + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [ + codePoint + ]); + } + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + while(idx <= len){ + let code = 0; + let nextState = 0; + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0; + } else idx++; + if (state === 0 && nextState === 1) // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [ + last, + code + ])); + else if (state === 0 && nextState === 0) // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + last = code; + state = nextState; + } + return glyphs; + } + get _layoutEngine() { + return new (0, $4c0a7fa5df7a9ab1$export$2e2bcd8739ae039)(this); + } + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @param {string} [direction] + * @return {GlyphRun} + */ layout(string, userFeatures, script, language, direction) { + return this._layoutEngine.layout(string, userFeatures, script, language, direction); + } + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + getAvailableFeatures(script, language) { + return this._layoutEngine.getAvailableFeatures(script, language); + } + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) this._glyphs[glyph] = new (0, $69aac16029968692$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) this._glyphs[glyph] = new (0, $62cc5109c6101893$export$2e2bcd8739ae039)(glyph, characters, this); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) this._glyphs[glyph] = new (0, $25d8f049c222084c$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables.COLR && this.directory.tables.CPAL) this._glyphs[glyph] = new (0, $0d411f0165859681$export$2e2bcd8739ae039)(glyph, characters, this); + else this._getBaseGlyph(glyph, characters); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a Subset for this font. + * @return {Subset} + */ createSubset() { + if (this.directory.tables['CFF ']) return new (0, $001d739428a71d5a$export$2e2bcd8739ae039)(this); + return new (0, $4abbb6a5dbdc441a$export$2e2bcd8739ae039)(this); + } + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ get variationAxes() { + let res = {}; + if (!this.fvar) return res; + for (let axis of this.fvar.axis)res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + return res; + } + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ get namedVariations() { + let res = {}; + if (!this.fvar) return res; + for (let instance of this.fvar.instance){ + let settings = {}; + for(let i = 0; i < this.fvar.axis.length; i++){ + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + res[instance.name.en] = settings; + } + return res; + } + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ getVariation(settings) { + if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + if (typeof settings === 'string') settings = this.namedVariations[settings]; + if (typeof settings !== 'object') throw new Error('Variation settings must be either a variation name or settings object.'); + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i)=>{ + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + else return axis.defaultValue; + }); + let stream = new $6uUbQ$DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + let font = new $4c1709dee528ea76$export$2e2bcd8739ae039(stream, coords); + font._tables = this._tables; + return font; + } + get _variationProcessor() { + if (!this.fvar) return null; + let variationCoords = this.variationCoords; + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) return null; + if (!variationCoords) variationCoords = this.fvar.axis.map((axis)=>axis.defaultValue); + return new (0, $0bb840cac04e911b$export$2e2bcd8739ae039)(this, variationCoords); + } + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } + constructor(stream, variationCoords = null){ + (0, $6uUbQ$_)(this, "type", 'TTF'); + this.defaultLanguage = null; + this.stream = stream; + this.variationCoords = variationCoords; + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + // define properties for each table to lazily parse + for(let tag in this.directory.tables){ + let table = this.directory.tables[tag]; + if ((0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag] && table.length > 0) Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } +} +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_cmapProcessor", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "characterSet", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_layoutEngine", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "variationAxes", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "namedVariations", null); +(0, $6uUbQ$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_variationProcessor", null); + + + + + + +let $c1726355ecc5b889$var$WOFFDirectoryEntry = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + offset: new $6uUbQ$Pointer($6uUbQ$uint32, 'void', { + type: 'global' + }), + compLength: $6uUbQ$uint32, + length: $6uUbQ$uint32, + origChecksum: $6uUbQ$uint32 +}); +let $c1726355ecc5b889$var$WOFFDirectory = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + flavor: $6uUbQ$uint32, + length: $6uUbQ$uint32, + numTables: $6uUbQ$uint16, + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + totalSfntSize: $6uUbQ$uint32, + majorVersion: $6uUbQ$uint16, + minorVersion: $6uUbQ$uint16, + metaOffset: $6uUbQ$uint32, + metaLength: $6uUbQ$uint32, + metaOrigLength: $6uUbQ$uint32, + privOffset: $6uUbQ$uint32, + privLength: $6uUbQ$uint32, + tables: new $6uUbQ$Array($c1726355ecc5b889$var$WOFFDirectoryEntry, 'numTables') +}); +$c1726355ecc5b889$var$WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +var $c1726355ecc5b889$export$2e2bcd8739ae039 = $c1726355ecc5b889$var$WOFFDirectory; + + + + + + +class $760785214b9fc52c$export$2e2bcd8739ae039 extends (0, $4c1709dee528ea76$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOFF'; + } + _decodeDirectory() { + this.directory = (0, $c1726355ecc5b889$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Uint8Array(table.length); + let buf = (0, $6uUbQ$tinyinflate)(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new $6uUbQ$DecodeStream(buf); + } else return this.stream; + } + return null; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'WOFF'); + } +} + + + + + + + + + +class $8046190c9f1ad19e$export$2e2bcd8739ae039 extends (0, $69aac16029968692$export$2e2bcd8739ae039) { + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + _getCBox() { + return this.path.bbox; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'WOFF2'); + } +} + + + +const $c28ec7bbb3b8de3a$var$Base128 = { + decode (stream) { + let result = 0; + let iterable = [ + 0, + 1, + 2, + 3, + 4 + ]; + for(let j = 0; j < iterable.length; j++){ + let i = iterable[j]; + let code = stream.readUInt8(); + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) throw new Error('Overflow'); + result = result << 7 | code & 0x7f; + if ((code & 0x80) === 0) return result; + } + throw new Error('Bad base 128 number'); + } +}; +let $c28ec7bbb3b8de3a$var$knownTags = [ + 'cmap', + 'head', + 'hhea', + 'hmtx', + 'maxp', + 'name', + 'OS/2', + 'post', + 'cvt ', + 'fpgm', + 'glyf', + 'loca', + 'prep', + 'CFF ', + 'VORG', + 'EBDT', + 'EBLC', + 'gasp', + 'hdmx', + 'kern', + 'LTSH', + 'PCLT', + 'VDMX', + 'vhea', + 'vmtx', + 'BASE', + 'GDEF', + 'GPOS', + 'GSUB', + 'EBSC', + 'JSTF', + 'MATH', + 'CBDT', + 'CBLC', + 'COLR', + 'CPAL', + 'SVG ', + 'sbix', + 'acnt', + 'avar', + 'bdat', + 'bloc', + 'bsln', + 'cvar', + 'fdsc', + 'feat', + 'fmtx', + 'fvar', + 'gvar', + 'hsty', + 'just', + 'lcar', + 'mort', + 'morx', + 'opbd', + 'prop', + 'trak', + 'Zapf', + 'Silf', + 'Glat', + 'Gloc', + 'Feat', + 'Sill' +]; +let $c28ec7bbb3b8de3a$var$WOFF2DirectoryEntry = new $6uUbQ$Struct({ + flags: $6uUbQ$uint8, + customTag: new $6uUbQ$Optional(new $6uUbQ$String(4), (t)=>(t.flags & 0x3f) === 0x3f), + tag: (t)=>t.customTag || $c28ec7bbb3b8de3a$var$knownTags[t.flags & 0x3f], + length: $c28ec7bbb3b8de3a$var$Base128, + transformVersion: (t)=>t.flags >>> 6 & 0x03, + transformed: (t)=>t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new $6uUbQ$Optional($c28ec7bbb3b8de3a$var$Base128, (t)=>t.transformed) +}); +let $c28ec7bbb3b8de3a$var$WOFF2Directory = new $6uUbQ$Struct({ + tag: new $6uUbQ$String(4), + flavor: $6uUbQ$uint32, + length: $6uUbQ$uint32, + numTables: $6uUbQ$uint16, + reserved: new $6uUbQ$Reserved($6uUbQ$uint16), + totalSfntSize: $6uUbQ$uint32, + totalCompressedSize: $6uUbQ$uint32, + majorVersion: $6uUbQ$uint16, + minorVersion: $6uUbQ$uint16, + metaOffset: $6uUbQ$uint32, + metaLength: $6uUbQ$uint32, + metaOrigLength: $6uUbQ$uint32, + privOffset: $6uUbQ$uint32, + privLength: $6uUbQ$uint32, + tables: new $6uUbQ$Array($c28ec7bbb3b8de3a$var$WOFF2DirectoryEntry, 'numTables') +}); +$c28ec7bbb3b8de3a$var$WOFF2Directory.process = function() { + let tables = {}; + for(let i = 0; i < this.tables.length; i++){ + let table = this.tables[i]; + tables[table.tag] = table; + } + return this.tables = tables; +}; +var $c28ec7bbb3b8de3a$export$2e2bcd8739ae039 = $c28ec7bbb3b8de3a$var$WOFF2Directory; + + + +class $21ee218f84ac7f32$export$2e2bcd8739ae039 extends (0, $4c1709dee528ea76$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOF2'; + } + _decodeDirectory() { + this.directory = (0, $c28ec7bbb3b8de3a$export$2e2bcd8739ae039).decode(this.stream); + this._dataPos = this.stream.pos; + } + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + let decompressedSize = 0; + for(let tag in this.directory.tables){ + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length; + } + let decompressed = (0, $6uUbQ$brotlidecompressjs)(buffer, decompressedSize); + if (!decompressed) throw new Error('Error decoding compressed data in WOFF2'); + this.stream = new $6uUbQ$DecodeStream(decompressed); + this._decompressed = true; + } + } + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) this._transformGlyfTable(); + return this._glyphs[glyph] = new (0, $8046190c9f1ad19e$export$2e2bcd8739ae039)(glyph, characters, this); + } else return super._getBaseGlyph(glyph, characters); + } + } + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = $21ee218f84ac7f32$var$GlyfTable.decode(this.stream); + let glyphs = []; + for(let index = 0; index < table.numGlyphs; index++){ + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + if (nContours > 0) { + let nPoints = []; + let totalPoints = 0; + for(let i = 0; i < nContours; i++){ + let r = $21ee218f84ac7f32$var$read255UInt16(table.nPoints); + totalPoints += r; + nPoints.push(totalPoints); + } + glyph.points = $21ee218f84ac7f32$var$decodeTriplet(table.flags, table.glyphs, totalPoints); + for(let i = 0; i < nContours; i++)glyph.points[nPoints[i] - 1].endContour = true; + var instructionSize = $21ee218f84ac7f32$var$read255UInt16(table.glyphs); + } else if (nContours < 0) { + let haveInstructions = (0, $69aac16029968692$export$2e2bcd8739ae039).prototype._decodeComposite.call({ + _font: this + }, glyph, table.composites); + if (haveInstructions) var instructionSize = $21ee218f84ac7f32$var$read255UInt16(table.glyphs); + } + glyphs.push(glyph); + } + this._transformedGlyphs = glyphs; + } + constructor(...args){ + super(...args); + (0, $6uUbQ$_)(this, "type", 'WOFF2'); + } +} +// Special class that accepts a length and returns a sub-stream for that data +class $21ee218f84ac7f32$var$Substream { + decode(stream, parent) { + return new $6uUbQ$DecodeStream(this._buf.decode(stream, parent)); + } + constructor(length){ + this.length = length; + this._buf = new $6uUbQ$Buffer(length); + } +} +// This struct represents the entire glyf table +let $21ee218f84ac7f32$var$GlyfTable = new $6uUbQ$Struct({ + version: $6uUbQ$uint32, + numGlyphs: $6uUbQ$uint16, + indexFormat: $6uUbQ$uint16, + nContourStreamSize: $6uUbQ$uint32, + nPointsStreamSize: $6uUbQ$uint32, + flagStreamSize: $6uUbQ$uint32, + glyphStreamSize: $6uUbQ$uint32, + compositeStreamSize: $6uUbQ$uint32, + bboxStreamSize: $6uUbQ$uint32, + instructionStreamSize: $6uUbQ$uint32, + nContours: new $21ee218f84ac7f32$var$Substream('nContourStreamSize'), + nPoints: new $21ee218f84ac7f32$var$Substream('nPointsStreamSize'), + flags: new $21ee218f84ac7f32$var$Substream('flagStreamSize'), + glyphs: new $21ee218f84ac7f32$var$Substream('glyphStreamSize'), + composites: new $21ee218f84ac7f32$var$Substream('compositeStreamSize'), + bboxes: new $21ee218f84ac7f32$var$Substream('bboxStreamSize'), + instructions: new $21ee218f84ac7f32$var$Substream('instructionStreamSize') +}); +const $21ee218f84ac7f32$var$WORD_CODE = 253; +const $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE2 = 254; +const $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE1 = 255; +const $21ee218f84ac7f32$var$LOWEST_U_CODE = 253; +function $21ee218f84ac7f32$var$read255UInt16(stream) { + let code = stream.readUInt8(); + if (code === $21ee218f84ac7f32$var$WORD_CODE) return stream.readUInt16BE(); + if (code === $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE1) return stream.readUInt8() + $21ee218f84ac7f32$var$LOWEST_U_CODE; + if (code === $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE2) return stream.readUInt8() + $21ee218f84ac7f32$var$LOWEST_U_CODE * 2; + return code; +} +function $21ee218f84ac7f32$var$withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} +function $21ee218f84ac7f32$var$decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + for(let i = 0; i < nPoints; i++){ + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + if (flag < 10) { + dx = 0; + dy = $21ee218f84ac7f32$var$withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + } else if (flag < 20) { + dx = $21ee218f84ac7f32$var$withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8()); + dy = 0; + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = $21ee218f84ac7f32$var$withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + } else if (flag < 120) { + var b0 = flag - 84; + dx = $21ee218f84ac7f32$var$withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8()); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8()); + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = $21ee218f84ac7f32$var$withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + } else { + dx = $21ee218f84ac7f32$var$withSign(flag, glyphs.readUInt16BE()); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, glyphs.readUInt16BE()); + } + x += dx; + y += dy; + res.push(new (0, $69aac16029968692$export$baf26146a414f24a)(onCurve, false, x, y)); + } + return res; +} + + + + + + + + +let $cd5853a56c68fec7$var$TTCHeader = new $6uUbQ$VersionedStruct($6uUbQ$uint32, { + 0x00010000: { + numFonts: $6uUbQ$uint32, + offsets: new $6uUbQ$Array($6uUbQ$uint32, 'numFonts') + }, + 0x00020000: { + numFonts: $6uUbQ$uint32, + offsets: new $6uUbQ$Array($6uUbQ$uint32, 'numFonts'), + dsigTag: $6uUbQ$uint32, + dsigLength: $6uUbQ$uint32, + dsigOffset: $6uUbQ$uint32 + } +}); +class $cd5853a56c68fec7$export$2e2bcd8739ae039 { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'ttcf'; + } + getFont(name) { + for (let offset of this.header.offsets){ + let stream = new $6uUbQ$DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let offset of this.header.offsets){ + let stream = new $6uUbQ$DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $6uUbQ$_)(this, "type", 'TTC'); + this.stream = stream; + if (stream.readString(4) !== 'ttcf') throw new Error('Not a TrueType collection'); + this.header = $cd5853a56c68fec7$var$TTCHeader.decode(stream); + } +} + + + + + +let $05f49f930186144e$var$DFontName = new $6uUbQ$String($6uUbQ$uint8); +let $05f49f930186144e$var$DFontData = new $6uUbQ$Struct({ + len: $6uUbQ$uint32, + buf: new $6uUbQ$Buffer('len') +}); +let $05f49f930186144e$var$Ref = new $6uUbQ$Struct({ + id: $6uUbQ$uint16, + nameOffset: $6uUbQ$int16, + attr: $6uUbQ$uint8, + dataOffset: $6uUbQ$uint24, + handle: $6uUbQ$uint32 +}); +let $05f49f930186144e$var$Type = new $6uUbQ$Struct({ + name: new $6uUbQ$String(4), + maxTypeIndex: $6uUbQ$uint16, + refList: new $6uUbQ$Pointer($6uUbQ$uint16, new $6uUbQ$Array($05f49f930186144e$var$Ref, (t)=>t.maxTypeIndex + 1), { + type: 'parent' + }) +}); +let $05f49f930186144e$var$TypeList = new $6uUbQ$Struct({ + length: $6uUbQ$uint16, + types: new $6uUbQ$Array($05f49f930186144e$var$Type, (t)=>t.length + 1) +}); +let $05f49f930186144e$var$DFontMap = new $6uUbQ$Struct({ + reserved: new $6uUbQ$Reserved($6uUbQ$uint8, 24), + typeList: new $6uUbQ$Pointer($6uUbQ$uint16, $05f49f930186144e$var$TypeList), + nameListOffset: new $6uUbQ$Pointer($6uUbQ$uint16, 'void') +}); +let $05f49f930186144e$var$DFontHeader = new $6uUbQ$Struct({ + dataOffset: $6uUbQ$uint32, + map: new $6uUbQ$Pointer($6uUbQ$uint32, $05f49f930186144e$var$DFontMap), + dataLength: $6uUbQ$uint32, + mapLength: $6uUbQ$uint32 +}); +class $05f49f930186144e$export$2e2bcd8739ae039 { + static probe(buffer) { + let stream = new $6uUbQ$DecodeStream(buffer); + try { + var header = $05f49f930186144e$var$DFontHeader.decode(stream); + } catch (e) { + return false; + } + for (let type of header.map.typeList.types){ + if (type.name === 'sfnt') return true; + } + return false; + } + getFont(name) { + if (!this.sfnt) return null; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $6uUbQ$DecodeStream(this.stream.buffer.slice(pos)); + let font = new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $6uUbQ$DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $6uUbQ$_)(this, "type", 'DFont'); + this.stream = stream; + this.header = $05f49f930186144e$var$DFontHeader.decode(this.stream); + for (let type of this.header.map.typeList.types){ + for (let ref of type.refList)if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = $05f49f930186144e$var$DFontName.decode(this.stream); + } else ref.name = null; + if (type.name === 'sfnt') this.sfnt = type; + } + } +} + + +// Register font formats +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $4c1709dee528ea76$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $760785214b9fc52c$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $21ee218f84ac7f32$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $cd5853a56c68fec7$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $05f49f930186144e$export$2e2bcd8739ae039)); + + +export {$d636bc798e7178db$export$bd5c5d8b8dcafd78 as logErrors, $d636bc798e7178db$export$36b2f24e97d43be as registerFormat, $d636bc798e7178db$export$185802fd694ee1f5 as create, $d636bc798e7178db$export$42940898df819940 as defaultLanguage, $d636bc798e7178db$export$5157e7780d44cc36 as setDefaultLanguage}; +//# sourceMappingURL=browser-module.mjs.map diff --git a/node_modules/fontkit/dist/browser-module.mjs.map b/node_modules/fontkit/dist/browser-module.mjs.map new file mode 100644 index 0000000..c18d11f --- /dev/null +++ b/node_modules/fontkit/dist/browser-module.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;ACEO,IAAI,4CAAY;AAEvB,IAAI,gCAAU,EAAE;AACT,SAAS,yCAAe,MAAM;IACnC,8BAAQ,IAAI,CAAC;AACf;AAEO,SAAS,0CAAO,MAAM,EAAE,cAAc;IAC3C,IAAK,IAAI,IAAI,GAAG,IAAI,8BAAQ,MAAM,EAAE,IAAK;QACvC,IAAI,SAAS,6BAAO,CAAC,EAAE;QACvB,IAAI,OAAO,KAAK,CAAC,SAAS;YACxB,IAAI,OAAO,IAAI,OAAO,IAAI,CAAA,GAAA,mBAAW,EAAE;YACvC,IAAI,gBACF,OAAO,KAAK,OAAO,CAAC;YAGtB,OAAO;QACT;IACF;IAEA,MAAM,IAAI,MAAM;AAClB;AAEO,IAAI,4CAAkB;AACtB,SAAS,0CAAmB,OAAO,IAAI;IAC5C,4CAAkB;AACpB;;;;;;AE5BA;;;;CAIC,GACM,SAAS,0CAAM,MAAM,EAAE,GAAG,EAAE,UAAU;IAC3C,IAAI,WAAW,GAAG,EAAE;QAClB,IAAI,MAAM,WAAW,GAAG;QACxB,WAAW,GAAG,GAAG;YACf,IAAI,QAAQ,IAAI,IAAI,CAAC,IAAI;YACzB,OAAO,cAAc,CAAC,IAAI,EAAE,KAAK;uBAAE;YAAM;YACzC,OAAO;QACT;IACF,OAAO,IAAI,OAAO,WAAW,KAAK,KAAK,YAAY;QACjD,IAAI,KAAK,WAAW,KAAK;QAEzB,OAAO;YACL;gBACE,IAAI,QAAQ,IAAI;gBAChB,SAAS,SAAS,GAAG,IAAI;oBACvB,IAAI,MAAM,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,GAAG;oBACtC,IAAI,MAAM,GAAG,CAAC,MACZ,OAAO,MAAM,GAAG,CAAC;oBAGnB,IAAI,SAA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jE,IAAI,IAAI,GAAG,gCAAU,MAAM,CAAC,IAAI,CAAC,MAAM;YACzC,OACE,IAAI,IAAI,GAAG;YAIf,IAAI,KAAK,IAAI,KAAK,QAChB,IAAI,CAAC,IAAI,GAAG;QAEhB;IACF;AAoCF;;;A9G7GA,wBAAwB;AACxB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAM;AACrB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAO;AACtB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAQ;AACvB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAiB;AAChC,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAI","sources":["src/index.js","src/base.js","src/TTFFont.js","src/decorators.js","src/tables/directory.js","src/tables/index.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/tables/name.js","src/encodings.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFFont.js","src/cff/CFFIndex.js","src/cff/CFFTop.js","src/cff/CFFDict.js","src/cff/CFFOperand.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/variations.js","src/tables/opentype.js","src/tables/VORG.js","src/tables/EBLC.js","src/tables/EBDT.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/bsln.js","src/tables/aat.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/CmapProcessor.js","src/utils.js","src/layout/LayoutEngine.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/layout/GlyphRun.js","src/glyph/BBox.js","src/layout/Script.js","src/layout/GlyphPosition.js","src/aat/AATLayoutEngine.js","src/aat/AATFeatureMap.js","src/aat/AATMorxProcessor.js","src/aat/AATStateMachine.js","src/aat/AATLookupTable.js","src/opentype/OTLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/index.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/shapers/HangulShaper.js","src/opentype/GlyphInfo.js","src/opentype/OTProcessor.js","src/opentype/GlyphIterator.js","src/opentype/shapers/IndicShaper.js","src/opentype/shapers/indic.json","src/opentype/shapers/use.json","src/opentype/shapers/indic-data.js","src/opentype/shapers/UniversalShaper.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/glyph/TTFGlyph.js","src/glyph/Glyph.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/TTFSubset.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/CFFSubset.js","src/WOFFFont.js","src/tables/WOFFDirectory.js","src/WOFF2Font.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/TrueTypeCollection.js","src/DFont.js"],"sourcesContent":["import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nregisterFormat(TTFFont);\nregisterFormat(WOFFFont);\nregisterFormat(WOFF2Font);\nregisterFormat(TrueTypeCollection);\nregisterFormat(DFont);\n\nexport * from './base';\n","import {DecodeStream} from 'restructure';\n\nexport let logErrors = false;\n\nlet formats = [];\nexport function registerFormat(format) {\n formats.push(format);\n};\n\nexport function create(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n\nexport let defaultLanguage = 'en';\nexport function setDefaultLanguage(lang = 'en') {\n defaultLanguage = lang;\n};\n","import * as r from 'restructure';\nimport { cache } from './decorators';\nimport * as fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\nimport { asciiDecoder } from './utils';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n type = 'TTF';\n\n static probe(buffer) {\n let format = asciiDecoder.decode(buffer.slice(0, 4));\n return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n }\n\n constructor(stream, variationCoords = null) {\n this.defaultLanguage = null;\n this.stream = stream;\n this.variationCoords = variationCoords;\n\n this._directoryPos = this.stream.pos;\n this._tables = {};\n this._glyphs = {};\n this._decodeDirectory();\n\n // define properties for each table to lazily parse\n for (let tag in this.directory.tables) {\n let table = this.directory.tables[tag];\n if (tables[tag] && table.length > 0) {\n Object.defineProperty(this, tag, {\n get: this._getTable.bind(this, table)\n });\n }\n }\n }\n\n setDefaultLanguage(lang = null) {\n this.defaultLanguage = lang;\n }\n\n _getTable(table) {\n if (!(table.tag in this._tables)) {\n try {\n this._tables[table.tag] = this._decodeTable(table);\n } catch (e) {\n if (fontkit.logErrors) {\n console.error(`Error decoding table ${table.tag}`);\n console.error(e.stack);\n }\n }\n }\n\n return this._tables[table.tag];\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n return this.stream;\n }\n\n return null;\n }\n\n _decodeDirectory() {\n return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n }\n\n _decodeTable(table) {\n let pos = this.stream.pos;\n\n let stream = this._getTableStream(table.tag);\n let result = tables[table.tag].decode(stream, this, table.length);\n\n this.stream.pos = pos;\n return result;\n }\n\n /**\n * Gets a string from the font's `name` table\n * `lang` is a BCP-47 language code.\n * @return {string}\n */\n getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) {\n let record = this.name && this.name.records[key];\n if (record) {\n // Attempt to retrieve the entry, depending on which translation is available:\n return (\n record[lang]\n || record[this.defaultLanguage]\n || record[fontkit.defaultLanguage]\n || record['en']\n || record[Object.keys(record)[0]] // Seriously, ANY language would be fine\n || null\n );\n }\n\n return null;\n }\n\n /**\n * The unique PostScript name for this font, e.g. \"Helvetica-Bold\"\n * @type {string}\n */\n get postscriptName() {\n return this.getName('postscriptName');\n }\n\n /**\n * The font's full name, e.g. \"Helvetica Bold\"\n * @type {string}\n */\n get fullName() {\n return this.getName('fullName');\n }\n\n /**\n * The font's family name, e.g. \"Helvetica\"\n * @type {string}\n */\n get familyName() {\n return this.getName('fontFamily');\n }\n\n /**\n * The font's sub-family, e.g. \"Bold\".\n * @type {string}\n */\n get subfamilyName() {\n return this.getName('fontSubfamily');\n }\n\n /**\n * The font's copyright information\n * @type {string}\n */\n get copyright() {\n return this.getName('copyright');\n }\n\n /**\n * The font's version number\n * @type {string}\n */\n get version() {\n return this.getName('version');\n }\n\n /**\n * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n * @type {number}\n */\n get ascent() {\n return this.hhea.ascent;\n }\n\n /**\n * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n * @type {number}\n */\n get descent() {\n return this.hhea.descent;\n }\n\n /**\n * The amount of space that should be included between lines\n * @type {number}\n */\n get lineGap() {\n return this.hhea.lineGap;\n }\n\n /**\n * The offset from the normal underline position that should be used\n * @type {number}\n */\n get underlinePosition() {\n return this.post.underlinePosition;\n }\n\n /**\n * The weight of the underline that should be used\n * @type {number}\n */\n get underlineThickness() {\n return this.post.underlineThickness;\n }\n\n /**\n * If this is an italic font, the angle the cursor should be drawn at to match the font design\n * @type {number}\n */\n get italicAngle() {\n return this.post.italicAngle;\n }\n\n /**\n * The height of capital letters above the baseline.\n * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n * @type {number}\n */\n get capHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.capHeight : this.ascent;\n }\n\n /**\n * The height of lower case letters in the font.\n * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n * @type {number}\n */\n get xHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.xHeight : 0;\n }\n\n /**\n * The number of glyphs in the font.\n * @type {number}\n */\n get numGlyphs() {\n return this.maxp.numGlyphs;\n }\n\n /**\n * The size of the font’s internal coordinate grid\n * @type {number}\n */\n get unitsPerEm() {\n return this.head.unitsPerEm;\n }\n\n /**\n * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n }\n\n @cache\n get _cmapProcessor() {\n return new CmapProcessor(this.cmap);\n }\n\n /**\n * An array of all of the unicode code points supported by the font.\n * @type {number[]}\n */\n @cache\n get characterSet() {\n return this._cmapProcessor.getCharacterSet();\n }\n\n /**\n * Returns whether there is glyph in the font for the given unicode code point.\n *\n * @param {number} codePoint\n * @return {boolean}\n */\n hasGlyphForCodePoint(codePoint) {\n return !!this._cmapProcessor.lookup(codePoint);\n }\n\n /**\n * Maps a single unicode code point to a Glyph object.\n * Does not perform any advanced substitutions (there is no context to do so).\n *\n * @param {number} codePoint\n * @return {Glyph}\n */\n glyphForCodePoint(codePoint) {\n return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n }\n\n /**\n * Returns an array of Glyph objects for the given string.\n * This is only a one-to-one mapping from characters to glyphs.\n * For most uses, you should use font.layout (described below), which\n * provides a much more advanced mapping supporting AAT and OpenType shaping.\n *\n * @param {string} string\n * @return {Glyph[]}\n */\n glyphsForString(string) {\n let glyphs = [];\n let len = string.length;\n let idx = 0;\n let last = -1;\n let state = -1;\n\n while (idx <= len) {\n let code = 0;\n let nextState = 0;\n\n if (idx < len) {\n // Decode the next codepoint from UTF 16\n code = string.charCodeAt(idx++);\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n }\n }\n\n // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n } else {\n idx++;\n }\n\n if (state === 0 && nextState === 1) {\n // Variation selector following normal codepoint.\n glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n } else if (state === 0 && nextState === 0) {\n // Normal codepoint following normal codepoint.\n glyphs.push(this.glyphForCodePoint(last));\n }\n\n last = code;\n state = nextState;\n }\n\n return glyphs;\n }\n\n @cache\n get _layoutEngine() {\n return new LayoutEngine(this);\n }\n\n /**\n * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n *\n * @param {string} string\n * @param {string[]} [userFeatures]\n * @param {string} [script]\n * @param {string} [language]\n * @param {string} [direction]\n * @return {GlyphRun}\n */\n layout(string, userFeatures, script, language, direction) {\n return this._layoutEngine.layout(string, userFeatures, script, language, direction);\n }\n\n /**\n * Returns an array of strings that map to the given glyph id.\n * @param {number} gid - glyph id\n */\n stringsForGlyph(gid) {\n return this._layoutEngine.stringsForGlyph(gid);\n }\n\n /**\n * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n * (or mapped AAT tags) supported by the font.\n * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n *\n * @type {string[]}\n */\n get availableFeatures() {\n return this._layoutEngine.getAvailableFeatures();\n }\n\n getAvailableFeatures(script, language) {\n return this._layoutEngine.getAvailableFeatures(script, language);\n }\n\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf) {\n this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a glyph object for the given glyph id.\n * You can pass the array of code points this glyph represents for\n * your use later, and it will be stored in the glyph object.\n *\n * @param {number} glyph\n * @param {number[]} characters\n * @return {Glyph}\n */\n getGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.sbix) {\n this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n } else {\n this._getBaseGlyph(glyph, characters);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a Subset for this font.\n * @return {Subset}\n */\n createSubset() {\n if (this.directory.tables['CFF ']) {\n return new CFFSubset(this);\n }\n\n return new TTFSubset(this);\n }\n\n /**\n * Returns an object describing the available variation axes\n * that this font supports. Keys are setting tags, and values\n * contain the axis name, range, and default value.\n *\n * @type {object}\n */\n @cache\n get variationAxes() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let axis of this.fvar.axis) {\n res[axis.axisTag.trim()] = {\n name: axis.name.en,\n min: axis.minValue,\n default: axis.defaultValue,\n max: axis.maxValue\n };\n }\n\n return res;\n }\n\n /**\n * Returns an object describing the named variation instances\n * that the font designer has specified. Keys are variation names\n * and values are the variation settings for this instance.\n *\n * @type {object}\n */\n @cache\n get namedVariations() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let instance of this.fvar.instance) {\n let settings = {};\n for (let i = 0; i < this.fvar.axis.length; i++) {\n let axis = this.fvar.axis[i];\n settings[axis.axisTag.trim()] = instance.coord[i];\n }\n\n res[instance.name.en] = settings;\n }\n\n return res;\n }\n\n /**\n * Returns a new font with the given variation settings applied.\n * Settings can either be an instance name, or an object containing\n * variation tags as specified by the `variationAxes` property.\n *\n * @param {object} settings\n * @return {TTFFont}\n */\n getVariation(settings) {\n if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n }\n\n if (typeof settings === 'string') {\n settings = this.namedVariations[settings];\n }\n\n if (typeof settings !== 'object') {\n throw new Error('Variation settings must be either a variation name or settings object.');\n }\n\n // normalize the coordinates\n let coords = this.fvar.axis.map((axis, i) => {\n let axisTag = axis.axisTag.trim();\n if (axisTag in settings) {\n return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n } else {\n return axis.defaultValue;\n }\n });\n\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = this._directoryPos;\n\n let font = new TTFFont(stream, coords);\n font._tables = this._tables;\n\n return font;\n }\n\n @cache\n get _variationProcessor() {\n if (!this.fvar) {\n return null;\n }\n\n let variationCoords = this.variationCoords;\n\n // Ignore if no variation coords and not CFF2\n if (!variationCoords && !this.CFF2) {\n return null;\n }\n\n if (!variationCoords) {\n variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n }\n\n return new GlyphVariationProcessor(this, variationCoords);\n }\n\n // Standardized format plugin API\n getFont(name) {\n return this.getVariation(name);\n }\n}\n","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n if (descriptor.get) {\n let get = descriptor.get;\n descriptor.get = function() {\n let value = get.call(this);\n Object.defineProperty(this, key, { value });\n return value;\n };\n } else if (typeof descriptor.value === 'function') {\n let fn = descriptor.value;\n\n return {\n get() {\n let cache = new Map;\n function memoized(...args) {\n let key = args.length > 0 ? args[0] : 'value';\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n let result = fn.apply(this, args);\n cache.set(key, result);\n return result;\n };\n\n Object.defineProperty(this, key, {value: memoized});\n return memoized;\n }\n };\n }\n}\n","import * as r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n tag: new r.String(4),\n checkSum: r.uint32,\n offset: new r.Pointer(r.uint32, 'void', { type: 'global' }),\n length: r.uint32\n});\n\nlet Directory = new r.Struct({\n tag: new r.String(4),\n numTables: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n tables: new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nDirectory.preEncode = function() {\n if (!Array.isArray(this.tables)) {\n let tables = [];\n for (let tag in this.tables) {\n let table = this.tables[tag];\n if (table) {\n tables.push({\n tag: tag,\n checkSum: 0,\n offset: new r.VoidPointer(Tables[tag], table),\n length: Tables[tag].size(table)\n });\n }\n }\n \n this.tables = tables;\n }\n\n this.tag = 'true';\n this.numTables = this.tables.length;\n\n let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2));\n let maxPowerOf2 = Math.pow(2, maxExponentFor2);\n\n this.searchRange = maxPowerOf2 * 16;\n this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;\n this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import * as r from 'restructure';\n\nlet SubHeader = new r.Struct({\n firstCode: r.uint16,\n entryCount: r.uint16,\n idDelta: r.int16,\n idRangeOffset: r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n startCharCode: r.uint32,\n endCharCode: r.uint32,\n glyphID: r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n startUnicodeValue: r.uint24,\n additionalCount: r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n unicodeValue: r.uint24,\n glyphID: r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n varSelector: r.uint24,\n defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n 0: { // Byte encoding\n length: r.uint16, // Total table length in bytes (set to 262 for format 0)\n language: r.uint16, // Language code for this encoding subtable, or zero if language-independent\n codeMap: new r.LazyArray(r.uint8, 256)\n },\n\n 2: { // High-byte mapping (CJK)\n length: r.uint16,\n language: r.uint16,\n subHeaderKeys: new r.Array(r.uint16, 256),\n subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys),\n subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')\n },\n\n 4: { // Segment mapping to delta values\n length: r.uint16, // Total table length in bytes\n language: r.uint16, // Language code\n segCountX2: r.uint16,\n segCount: t => t.segCountX2 >> 1,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n endCode: new r.LazyArray(r.uint16, 'segCount'),\n reservedPad: new r.Reserved(r.uint16), // This value should be zero\n startCode: new r.LazyArray(r.uint16, 'segCount'),\n idDelta: new r.LazyArray(r.int16, 'segCount'),\n idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n },\n\n 6: { // Trimmed table\n length: r.uint16,\n language: r.uint16,\n firstCode: r.uint16,\n entryCount: r.uint16,\n glyphIndices: new r.LazyArray(r.uint16, 'entryCount')\n },\n\n 8: { // mixed 16-bit and 32-bit coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint16,\n is32: new r.LazyArray(r.uint8, 8192),\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 10: { // Trimmed Array\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n firstCode: r.uint32,\n entryCount: r.uint32,\n glyphIndices: new r.LazyArray(r.uint16, 'numChars')\n },\n\n 12: { // Segmented coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 14: { // Unicode Variation Sequences\n length: r.uint32,\n numRecords: r.uint32,\n varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n }\n});\n\nlet CmapEntry = new r.Struct({\n platformID: r.uint16, // Platform identifier\n encodingID: r.uint16, // Platform-specific encoding identifier\n table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n version: r.uint16,\n numSubtables: r.uint16,\n tables: new r.Array(CmapEntry, 'numSubtables')\n});\n","import * as r from 'restructure';\n\n// font header\nexport default new r.Struct({\n version: r.int32, // 0x00010000 (version 1.0)\n revision: r.int32, // set by font manufacturer\n checkSumAdjustment: r.uint32,\n magicNumber: r.uint32, // set to 0x5F0F3CF5\n flags: r.uint16,\n unitsPerEm: r.uint16, // range from 64 to 16384\n created: new r.Array(r.int32, 2),\n modified: new r.Array(r.int32, 2),\n xMin: r.int16, // for all glyph bounding boxes\n yMin: r.int16, // for all glyph bounding boxes\n xMax: r.int16, // for all glyph bounding boxes\n yMax: r.int16, // for all glyph bounding boxes\n macStyle: new r.Bitfield(r.uint16, [\n 'bold', 'italic', 'underline', 'outline',\n 'shadow', 'condensed', 'extended'\n ]),\n lowestRecPPEM: r.uint16, // smallest readable size in pixels\n fontDirectionHint: r.int16,\n indexToLocFormat: r.int16, // 0 for short offsets, 1 for long\n glyphDataFormat: r.int16 // 0 for current format\n});\n","import * as r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n version: r.int32,\n ascent: r.int16, // Distance from baseline of highest ascender\n descent: r.int16, // Distance from baseline of lowest descender\n lineGap: r.int16, // Typographic line gap\n advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table\n minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table\n minRightSideBearing: r.int16, // Minimum right sidebearing value\n xMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n caretSlopeRun: r.int16, // 0 for vertical\n caretOffset: r.int16, // Set to 0 for non-slanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // 0 for current format\n numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table\n});\n","import * as r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n advance: r.uint16,\n bearing: r.int16\n});\n\nexport default new r.Struct({\n metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n version: r.int32,\n numGlyphs: r.uint16, // The number of glyphs in the font\n maxPoints: r.uint16, // Maximum points in a non-composite glyph\n maxContours: r.uint16, // Maximum contours in a non-composite glyph\n maxComponentPoints: r.uint16, // Maximum points in a composite glyph\n maxComponentContours: r.uint16, // Maximum contours in a composite glyph\n maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise\n maxTwilightPoints: r.uint16, // Maximum points used in Z0\n maxStorage: r.uint16, // Number of Storage Area locations\n maxFunctionDefs: r.uint16, // Number of FDEFs\n maxInstructionDefs: r.uint16, // Number of IDEFs\n maxStackElements: r.uint16, // Maximum stack depth\n maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions\n maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph\n maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components\n});\n","import * as r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n platformID: r.uint16,\n encodingID: r.uint16,\n languageID: r.uint16,\n nameID: r.uint16,\n length: r.uint16,\n string: new r.Pointer(r.uint16,\n new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n { type: 'parent', relativeTo: ctx => ctx.parent.stringOffset, allowNull: false }\n )\n});\n\nlet LangTagRecord = new r.Struct({\n length: r.uint16,\n tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: ctx => ctx.stringOffset})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n 0: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count')\n },\n 1: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count'),\n langTagCount: r.uint16,\n langTags: new r.Array(LangTagRecord, 'langTagCount')\n }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n 'copyright',\n 'fontFamily',\n 'fontSubfamily',\n 'uniqueSubfamily',\n 'fullName',\n 'version',\n 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n 'trademark',\n 'manufacturer',\n 'designer',\n 'description',\n 'vendorURL',\n 'designerURL',\n 'license',\n 'licenseURL',\n null, // reserved\n 'preferredFamily',\n 'preferredSubfamily',\n 'compatibleFull',\n 'sampleText',\n 'postscriptCIDFontName',\n 'wwsFamilyName',\n 'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n var records = {};\n for (let record of this.records) {\n // find out what language this is for\n let language = LANGUAGES[record.platformID][record.languageID];\n\n if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n language = this.langTags[record.languageID - 0x8000].tag;\n }\n\n if (language == null) {\n language = record.platformID + '-' + record.languageID;\n }\n\n // if the nameID is >= 256, it is a font feature record (AAT)\n let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n if (records[key] == null) {\n records[key] = {};\n }\n\n let obj = records[key];\n if (record.nameID >= 256) {\n obj = obj[record.nameID] || (obj[record.nameID] = {});\n }\n\n if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n obj[language] = record.string;\n }\n }\n\n this.records = records;\n};\n\nNameTable.preEncode = function() {\n if (Array.isArray(this.records)) return;\n this.version = 0;\n\n let records = [];\n for (let key in this.records) {\n let val = this.records[key];\n if (key === 'fontFeatures') continue;\n\n records.push({\n platformID: 3,\n encodingID: 1,\n languageID: 0x409,\n nameID: NAMES.indexOf(key),\n length: val.en.length * 2,\n string: val.en\n });\n\n if (key === 'postscriptName') {\n records.push({\n platformID: 1,\n encodingID: 0,\n languageID: 0,\n nameID: NAMES.indexOf(key),\n length: val.en.length,\n string: val.en\n });\n }\n }\n\n this.records = records;\n this.count = records.length;\n this.stringOffset = NameTable.size(this, null, false);\n};\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n return MAC_LANGUAGE_ENCODINGS[languageID];\n }\n \n return ENCODINGS[platformID][encodingID];\n}\n\nconst SINGLE_BYTE_ENCODINGS = new Set(['x-mac-roman', 'x-mac-cyrillic', 'iso-8859-6', 'iso-8859-8']);\nconst MAC_ENCODINGS = {\n 'x-mac-croatian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',\n 'x-mac-gaelic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',\n 'x-mac-greek': 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\\u00AD',\n 'x-mac-icelandic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-inuit': 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',\n 'x-mac-ce': 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',\n 'x-mac-romanian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-turkish': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'\n};\n\nconst encodingCache = new Map();\n\nexport function getEncodingMapping(encoding) {\n let cached = encodingCache.get(encoding);\n if (cached) {\n return cached;\n }\n\n // These encodings aren't supported by TextDecoder.\n let mapping = MAC_ENCODINGS[encoding];\n if (mapping) {\n let res = new Map();\n for (let i = 0; i < mapping.length; i++) {\n res.set(mapping.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n\n // Only single byte encodings can be mapped 1:1.\n if (SINGLE_BYTE_ENCODINGS.has(encoding)) {\n // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings.\n // Use this to create a mapping of code points.\n let decoder = new TextDecoder(encoding);\n let mapping = new Uint8Array(0x80);\n for (let i = 0; i < 0x80; i++) {\n mapping[i] = 0x80 + i;\n }\n\n let res = new Map();\n let s = decoder.decode(mapping);\n for (let i = 0; i < 0x80; i++) {\n res.set(s.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n // unicode\n ['utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be'],\n \n // macintosh\n // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n // 0\tRoman 17\tMalayalam\n // 1\tJapanese\t 18\tSinhalese\n // 2\tTraditional Chinese\t 19\tBurmese\n // 3\tKorean\t 20\tKhmer\n // 4\tArabic\t 21\tThai\n // 5\tHebrew\t 22\tLaotian\n // 6\tGreek\t 23\tGeorgian\n // 7\tRussian\t 24\tArmenian\n // 8\tRSymbol\t 25\tSimplified Chinese\n // 9\tDevanagari\t 26\tTibetan\n // 10\tGurmukhi\t 27\tMongolian\n // 11\tGujarati\t 28\tGeez\n // 12\tOriya\t 29\tSlavic\n // 13\tBengali\t 30\tVietnamese\n // 14\tTamil\t 31\tSindhi\n // 15\tTelugu\t 32\t(Uninterpreted)\n // 16\tKannada\n ['x-mac-roman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n 'x-mac-greek', 'x-mac-cyrillic', 'x-mac-symbol', 'x-mac-devanagari', 'x-mac-gurmukhi', 'x-mac-gujarati',\n 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n 'Burmese', 'Khmer', 'iso-8859-11', 'Laotian', 'Georgian', 'Armenian', 'gbk', \n 'Tibetan', 'Mongolian', 'Geez', 'x-mac-ce', 'Vietnamese', 'Sindhi'],\n \n // ISO (deprecated)\n ['ascii', null, 'iso-8859-1'],\n \n // windows\n // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n ['symbol', 'utf-16be', 'shift-jis', 'gb18030', 'big5', 'euc-kr', 'johab', null, null, null, 'utf-16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n 15: 'x-mac-icelandic',\n 17: 'x-mac-turkish',\n 18: 'x-mac-croatian',\n 24: 'x-mac-ce',\n 25: 'x-mac-ce',\n 26: 'x-mac-ce',\n 27: 'x-mac-ce',\n 28: 'x-mac-ce',\n 30: 'x-mac-icelandic',\n 37: 'x-mac-romanian',\n 38: 'x-mac-ce',\n 39: 'x-mac-ce',\n 40: 'x-mac-ce',\n 143: 'x-mac-inuit',\n 146: 'x-mac-gaelic'\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n // unicode\n [],\n \n { // macintosh\n 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw',\n 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn',\n 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny',\n 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg',\n 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo',\n 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy',\n 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu',\n 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca',\n 8: 'pt', 38: 'cz', 68: 'as', 131: 'la',\n 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu',\n 10: 'he', 40: 'si', 70: 'pa', 133: 'gn',\n 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay',\n 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt',\n 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug',\n 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz',\n 15: 'is', 45: 'uk', 75: 'te', 138: 'jv',\n 16: 'mt', 46: 'be', 76: 'si', 139: 'su',\n 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl',\n 18: 'hr', 48: 'kk', 78: 'km', 141: 'af',\n 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br',\n 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu',\n 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd',\n 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv',\n 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga',\n 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to',\n 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton',\n 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl',\n 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az',\n 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn',\n 29: 'se', 59: 'ps', 89: 'sw',\n },\n \n // ISO (deprecated)\n [],\n \n { // windows \n 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', \n 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', \n 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', \n 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', \n 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', \n 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', \n 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', \n 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', \n 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', \n 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', \n 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', \n 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', \n 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', \n 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', \n 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', \n 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', \n 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', \n 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', \n 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', \n 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', \n 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', \n 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', \n 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', \n 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', \n 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', \n 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', \n 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', \n 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', \n 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', \n 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', \n 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', \n 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', \n 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', \n 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', \n 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', \n 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', \n 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', \n 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', \n 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', \n 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', \n 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', \n 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', \n 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', \n 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', \n 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', \n 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', \n 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', \n 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', \n 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', \n 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', \n 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', \n 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', \n }\n];\n","import * as r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n header: {\n xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space\n usWeightClass: r.uint16, // visual weight of stroke in glyphs\n usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio)\n fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n null, 'noEmbedding', 'viewOnly', 'editable', null,\n null, null, null, 'noSubsetting', 'bitmapOnly'\n ]),\n ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts\n ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts\n ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts\n ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts\n ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts\n ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts\n ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts\n ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts\n yStrikeoutSize: r.int16, // width of the strikeout stroke\n yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline\n sFamilyClass: r.int16, // classification of font-family design\n panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface\n ulCharRange: new r.Array(r.uint32, 4),\n vendorID: new r.String(4), // four character identifier for the font vendor\n fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font\n 'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n ]),\n usFirstCharIndex: r.uint16, // The minimum Unicode index in this font\n usLastCharIndex: r.uint16 // The maximum Unicode index in this font\n },\n\n // The Apple version of this table ends here, but the Microsoft one continues on...\n 0: {},\n\n 1: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2)\n },\n\n 2: {\n // these should be common with version 1 somehow\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16\n },\n\n 5: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16,\n\n usLowerOpticalPointSize: r.uint16,\n usUpperOpticalPointSize: r.uint16\n }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import * as r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n header: { // these fields exist at the top of all versions\n italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline\n underlineThickness: r.int16, // Suggested values for the underline thickness\n isFixedPitch: r.uint32, // Whether the font is monospaced\n minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n },\n\n 1: {}, // version 1 has no additional fields\n\n 2: {\n numberOfGlyphs: r.uint16,\n glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n names: new r.Array(new r.String(r.uint8))\n },\n\n 2.5: {\n numberOfGlyphs: r.uint16,\n offsets: new r.Array(r.uint8, 'numberOfGlyphs')\n },\n\n 3: {}, // version 3 has no additional fields\n\n 4: {\n map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n }\n});\n","import * as r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n controlValues: new r.Array(r.int16)\n});\n","import * as r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n instructions: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n 0: {\n offsets: new r.Array(r.uint16)\n },\n 1: {\n offsets: new r.Array(r.uint32)\n }\n});\n\nloca.process = function() {\n if (this.version === 0 && !this._processed) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] <<= 1;\n }\n this._processed = true;\n }\n};\n\nloca.preEncode = function() {\n if (this.version === 0 && this._processed !== false) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] >>>= 1;\n }\n this._processed = false;\n }\n};\n\nexport default loca;\n","import * as r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n controlValueProgram: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import * as r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n constructor(stream) {\n this.stream = stream;\n this.decode();\n }\n\n static decode(stream) {\n return new CFFFont(stream);\n }\n\n decode() {\n let start = this.stream.pos;\n let top = CFFTop.decode(this.stream);\n for (let key in top) {\n let val = top[key];\n this[key] = val;\n }\n\n if (this.version < 2) {\n if (this.topDictIndex.length !== 1) {\n throw new Error(\"Only a single font is allowed in CFF\");\n }\n\n this.topDict = this.topDictIndex[0];\n }\n\n this.isCIDFont = this.topDict.ROS != null;\n return this;\n }\n\n string(sid) {\n if (this.version >= 2) {\n return null;\n }\n\n if (sid < standardStrings.length) {\n return standardStrings[sid];\n }\n\n return this.stringIndex[sid - standardStrings.length];\n }\n\n get postscriptName() {\n if (this.version < 2) {\n return this.nameIndex[0];\n }\n\n return null;\n }\n\n get fullName() {\n return this.string(this.topDict.FullName);\n }\n\n get familyName() {\n return this.string(this.topDict.FamilyName);\n }\n\n getCharString(glyph) {\n this.stream.pos = this.topDict.CharStrings[glyph].offset;\n return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n }\n\n getGlyphName(gid) {\n // CFF2 glyph names are in the post table.\n if (this.version >= 2) {\n return null;\n }\n\n // CID-keyed fonts don't have glyph names\n if (this.isCIDFont) {\n return null;\n }\n\n let { charset } = this.topDict;\n if (Array.isArray(charset)) {\n return charset[gid];\n }\n\n if (gid === 0) {\n return '.notdef';\n }\n\n gid -= 1;\n\n switch (charset.version) {\n case 0:\n return this.string(charset.glyphs[gid]);\n\n case 1:\n case 2:\n for (let i = 0; i < charset.ranges.length; i++) {\n let range = charset.ranges[i];\n if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n return this.string(range.first + (gid - range.offset));\n }\n }\n break;\n }\n\n return null;\n }\n\n fdForGlyph(gid) {\n if (!this.topDict.FDSelect) {\n return null;\n }\n\n switch (this.topDict.FDSelect.version) {\n case 0:\n return this.topDict.FDSelect.fds[gid];\n\n case 3:\n case 4:\n let { ranges } = this.topDict.FDSelect;\n let low = 0;\n let high = ranges.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n\n if (gid < ranges[mid].first) {\n high = mid - 1;\n } else if (mid < high && gid >= ranges[mid + 1].first) {\n low = mid + 1;\n } else {\n return ranges[mid].fd;\n }\n }\n default:\n throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n }\n }\n\n privateDictForGlyph(gid) {\n if (this.topDict.FDSelect) {\n let fd = this.fdForGlyph(gid);\n if (this.topDict.FDArray[fd]) {\n return this.topDict.FDArray[fd].Private;\n }\n\n return null;\n }\n\n if (this.version < 2) {\n return this.topDict.Private;\n }\n\n return this.topDict.FDArray[0].Private;\n }\n}\n\nexport default CFFFont;\n","import * as r from 'restructure';\n\nexport default class CFFIndex {\n constructor(type) {\n this.type = type;\n }\n\n getCFFVersion(ctx) {\n while (ctx && !ctx.hdrSize) {\n ctx = ctx.parent;\n }\n\n return ctx ? ctx.version : -1;\n }\n\n decode(stream, parent) {\n let version = this.getCFFVersion(parent);\n let count = version >= 2\n ? stream.readUInt32BE()\n : stream.readUInt16BE();\n\n if (count === 0) {\n return [];\n }\n\n let offSize = stream.readUInt8();\n let offsetType;\n if (offSize === 1) {\n offsetType = r.uint8;\n } else if (offSize === 2) {\n offsetType = r.uint16;\n } else if (offSize === 3) {\n offsetType = r.uint24;\n } else if (offSize === 4) {\n offsetType = r.uint32;\n } else {\n throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n }\n\n let ret = [];\n let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n let start = offsetType.decode(stream);\n for (let i = 0; i < count; i++) {\n let end = offsetType.decode(stream);\n\n if (this.type != null) {\n let pos = stream.pos;\n stream.pos = startPos + start;\n\n parent.length = end - start;\n ret.push(this.type.decode(stream, parent));\n stream.pos = pos;\n } else {\n ret.push({\n offset: startPos + start,\n length: end - start\n });\n }\n\n start = end;\n }\n\n stream.pos = startPos + start;\n return ret;\n }\n\n size(arr, parent) {\n let size = 2;\n if (arr.length === 0) {\n return size;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let offset = 1;\n for (let i = 0; i < arr.length; i++) {\n let item = arr[i];\n offset += type.size(item, parent);\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n size += 1 + offsetType.size() * (arr.length + 1);\n size += offset - 1;\n\n return size;\n }\n\n encode(stream, arr, parent) {\n stream.writeUInt16BE(arr.length);\n if (arr.length === 0) {\n return;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let sizes = [];\n let offset = 1;\n for (let item of arr) {\n let s = type.size(item, parent);\n sizes.push(s);\n offset += s;\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n // write offset size\n stream.writeUInt8(offsetType.size());\n\n // write elements\n offset = 1;\n offsetType.encode(stream, offset);\n\n for (let size of sizes) {\n offset += size;\n offsetType.encode(stream, offset);\n }\n\n for (let item of arr) {\n type.encode(stream, item, parent);\n }\n\n return;\n }\n}\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n constructor(predefinedOps, type) {\n this.predefinedOps = predefinedOps;\n this.type = type;\n }\n\n decode(stream, parent, operands) {\n if (this.predefinedOps[operands[0]]) {\n return this.predefinedOps[operands[0]];\n }\n\n return this.type.decode(stream, parent, operands);\n }\n\n size(value, ctx) {\n return this.type.size(value, ctx);\n }\n\n encode(stream, value, ctx) {\n let index = this.predefinedOps.indexOf(value);\n if (index !== -1) {\n return index;\n }\n\n return this.type.encode(stream, value, ctx);\n }\n}\n\nclass CFFEncodingVersion extends r.Number {\n constructor() {\n super('UInt8');\n }\n\n decode(stream) {\n return r.uint8.decode(stream) & 0x7f;\n }\n}\n\nlet Range1 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n 0: {\n nCodes: r.uint8,\n codes: new r.Array(r.uint8, 'nCodes')\n },\n\n 1: {\n nRanges: r.uint8,\n ranges: new r.Array(Range1, 'nRanges')\n }\n\n // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n decode(stream, parent) {\n let length = resolveLength(this.length, stream, parent);\n let count = 0;\n let res = [];\n while (count < length) {\n let range = this.type.decode(stream, parent);\n range.offset = count;\n count += range.nLeft + 1;\n res.push(range);\n }\n\n return res;\n }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n 0: {\n glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n },\n\n 1: {\n ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n },\n\n 2: {\n ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n first: r.uint16,\n fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n first: r.uint32,\n fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n 0: {\n fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n },\n\n 3: {\n nRanges: r.uint16,\n ranges: new r.Array(FDRange3, 'nRanges'),\n sentinel: r.uint16\n },\n\n 4: {\n nRanges: r.uint32,\n ranges: new r.Array(FDRange4, 'nRanges'),\n sentinel: r.uint32\n }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n decode(stream, parent, operands) {\n parent.length = operands[0];\n return ptr.decode(stream, parent, [operands[1]]);\n }\n\n size(dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n }\n\n encode(stream, dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n }\n}\n\nlet FontDict = new CFFDict([\n // key name type(s) default\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 38], 'FontName', 'sid', null],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [[12, 5], 'PaintType', 'number', 0],\n]);\n\nlet CFFTopDict = new CFFDict([\n // key name type(s) default\n [[12, 30], 'ROS', ['sid', 'sid', 'number'], null],\n\n [0, 'version', 'sid', null],\n [1, 'Notice', 'sid', null],\n [[12, 0], 'Copyright', 'sid', null],\n [2, 'FullName', 'sid', null],\n [3, 'FamilyName', 'sid', null],\n [4, 'Weight', 'sid', null],\n [[12, 1], 'isFixedPitch', 'boolean', false],\n [[12, 2], 'ItalicAngle', 'number', 0],\n [[12, 3], 'UnderlinePosition', 'number', -100],\n [[12, 4], 'UnderlineThickness', 'number', 50],\n [[12, 5], 'PaintType', 'number', 0],\n [[12, 6], 'CharstringType', 'number', 2],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [13, 'UniqueID', 'number', null],\n [5, 'FontBBox', 'array', [0, 0, 0, 0]],\n [[12, 8], 'StrokeWidth', 'number', 0],\n [14, 'XUID', 'array', null],\n [15, 'charset', CFFCharset, ISOAdobeCharset],\n [16, 'Encoding', CFFEncoding, StandardEncoding],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 20], 'SyntheticBase', 'number', null],\n [[12, 21], 'PostScript', 'sid', null],\n [[12, 22], 'BaseFontName', 'sid', null],\n [[12, 23], 'BaseFontBlend', 'delta', null],\n\n // CID font specific\n [[12, 31], 'CIDFontVersion', 'number', 0],\n [[12, 32], 'CIDFontRevision', 'number', 0],\n [[12, 33], 'CIDFontType', 'number', 0],\n [[12, 34], 'CIDCount', 'number', 8720],\n [[12, 35], 'UIDBase', 'number', null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet VariationStore = new r.Struct({\n length: r.uint16,\n itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [24, 'vstore', new CFFPointer(VariationStore), null],\n [25, 'maxstack', 'number', 193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n 1: {\n hdrSize: r.uint8,\n offSize: r.uint8,\n nameIndex: new CFFIndex(new r.String('length')),\n topDictIndex: new CFFIndex(CFFTopDict),\n stringIndex: new CFFIndex(new r.String('length')),\n globalSubrIndex: new CFFIndex\n },\n\n 2: {\n hdrSize: r.uint8,\n length: r.uint16,\n topDict: CFF2TopDict,\n globalSubrIndex: new CFFIndex\n }\n});\n\nexport default CFFTop;\n","import isEqual from 'fast-deep-equal';\nimport * as r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure';\n\nexport default class CFFDict {\n constructor(ops = []) {\n this.ops = ops;\n this.fields = {};\n for (let field of ops) {\n let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n this.fields[key] = field;\n }\n }\n\n decodeOperands(type, stream, ret, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n } else if (type.decode != null) {\n return type.decode(stream, ret, operands);\n } else {\n switch (type) {\n case 'number':\n case 'offset':\n case 'sid':\n return operands[0];\n case 'boolean':\n return !!operands[0];\n default:\n return operands;\n }\n }\n }\n\n encodeOperands(type, stream, ctx, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n } else if (type.encode != null) {\n return type.encode(stream, operands, ctx);\n } else if (typeof operands === 'number') {\n return [operands];\n } else if (typeof operands === 'boolean') {\n return [+operands];\n } else if (Array.isArray(operands)) {\n return operands;\n } else {\n return [operands];\n }\n }\n\n decode(stream, parent) {\n let end = stream.pos + parent.length;\n let ret = {};\n let operands = [];\n\n // define hidden properties\n Object.defineProperties(ret, {\n parent: { value: parent },\n _startOffset: { value: stream.pos }\n });\n\n // fill in defaults\n for (let key in this.fields) {\n let field = this.fields[key];\n ret[field[1]] = field[3];\n }\n\n while (stream.pos < end) {\n let b = stream.readUInt8();\n if (b < 28) {\n if (b === 12) {\n b = (b << 8) | stream.readUInt8();\n }\n\n let field = this.fields[b];\n if (!field) {\n throw new Error(`Unknown operator ${b}`);\n }\n\n let val = this.decodeOperands(field[2], stream, ret, operands);\n if (val != null) {\n if (val instanceof PropertyDescriptor) {\n Object.defineProperty(ret, field[1], val);\n } else {\n ret[field[1]] = val;\n }\n }\n\n operands = [];\n } else {\n operands.push(CFFOperand.decode(stream, b));\n }\n }\n\n return ret;\n }\n\n size(dict, parent, includePointers = true) {\n let ctx = {\n parent,\n val: dict,\n pointerSize: 0,\n startOffset: parent.startOffset || 0\n };\n\n let len = 0;\n\n for (let k in this.fields) {\n let field = this.fields[k];\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], null, ctx, val);\n for (let op of operands) {\n len += CFFOperand.size(op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n len += key.length;\n }\n\n if (includePointers) {\n len += ctx.pointerSize;\n }\n\n return len;\n }\n\n encode(stream, dict, parent) {\n let ctx = {\n pointers: [],\n startOffset: stream.pos,\n parent,\n val: dict,\n pointerSize: 0\n };\n\n ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n for (let field of this.ops) {\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], stream, ctx, val);\n for (let op of operands) {\n CFFOperand.encode(stream, op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n for (let op of key) {\n stream.writeUInt8(op);\n }\n }\n\n let i = 0;\n while (i < ctx.pointers.length) {\n let ptr = ctx.pointers[i++];\n ptr.type.encode(stream, ptr.val, ptr.parent);\n }\n\n return;\n }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n '.': 10,\n 'E': 11,\n 'E-': 12,\n '-': 14\n};\n\nexport default class CFFOperand {\n static decode(stream, value) {\n if (32 <= value && value <= 246) {\n return value - 139;\n }\n\n if (247 <= value && value <= 250) {\n return (value - 247) * 256 + stream.readUInt8() + 108;\n }\n\n if (251 <= value && value <= 254) {\n return -(value - 251) * 256 - stream.readUInt8() - 108;\n }\n\n if (value === 28) {\n return stream.readInt16BE();\n }\n\n if (value === 29) {\n return stream.readInt32BE();\n }\n\n if (value === 30) {\n let str = '';\n while (true) {\n let b = stream.readUInt8();\n\n let n1 = b >> 4;\n if (n1 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n1];\n\n let n2 = b & 15;\n if (n2 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n2];\n }\n\n return parseFloat(str);\n }\n\n return null;\n }\n\n static size(value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, set to 32768\n if (value.forceLarge) {\n value = 32768;\n }\n\n if ((value | 0) !== value) { // floating point\n let str = '' + value;\n return 1 + Math.ceil((str.length + 1) / 2);\n\n } else if (-107 <= value && value <= 107) {\n return 1;\n\n } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n return 2;\n\n } else if (-32768 <= value && value <= 32767) {\n return 3;\n\n } else {\n return 5;\n }\n }\n\n static encode(stream, value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, save the old value and set to 32768\n let val = Number(value);\n\n if (value.forceLarge) {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n\n } else if ((val | 0) !== val) { // floating point\n stream.writeUInt8(30);\n\n let str = '' + val;\n for (let i = 0; i < str.length; i += 2) {\n let c1 = str[i];\n let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n if (i === str.length - 1) {\n var n2 = FLOAT_EOF;\n } else {\n let c2 = str[i + 1];\n var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n }\n\n stream.writeUInt8((n1 << 4) | (n2 & 15));\n }\n\n if (n2 !== FLOAT_EOF) {\n return stream.writeUInt8((FLOAT_EOF << 4));\n }\n\n } else if (-107 <= val && val <= 107) {\n return stream.writeUInt8(val + 139);\n\n } else if (108 <= val && val <= 1131) {\n val -= 108;\n stream.writeUInt8((val >> 8) + 247);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-1131 <= val && val <= -108) {\n val = -val - 108;\n stream.writeUInt8((val >> 8) + 251);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-32768 <= val && val <= 32767) {\n stream.writeUInt8(28);\n return stream.writeInt16BE(val);\n\n } else {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n }\n }\n}\n","import * as r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n constructor(type, options = {}) {\n if (options.type == null) {\n options.type = 'global';\n }\n\n super(null, type, options);\n }\n\n decode(stream, parent, operands) {\n this.offsetType = {\n decode: () => operands[0]\n };\n\n return super.decode(stream, parent, operands);\n }\n\n encode(stream, value, ctx) {\n if (!stream) {\n // compute the size (so ctx.pointerSize is correct)\n this.offsetType = {\n size: () => 0\n };\n\n this.size(value, ctx);\n return [new Ptr(0)];\n }\n\n let ptr = null;\n this.offsetType = {\n encode: (stream, val) => ptr = val\n };\n\n super.encode(stream, value, ctx);\n return [new Ptr(ptr)];\n }\n}\n\nclass Ptr {\n constructor(val) {\n this.val = val;\n this.forceLarge = true;\n }\n\n valueOf() {\n return this.val;\n }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n static decode(stream, parent, operands) {\n let numBlends = operands.pop();\n\n // TODO: actually blend. For now just consume the deltas\n // since we don't use any of the values anyway.\n while (operands.length > numBlends) {\n operands.pop();\n }\n }\n}\n\nexport default new CFFDict([\n // key name type default\n [6, 'BlueValues', 'delta', null],\n [7, 'OtherBlues', 'delta', null],\n [8, 'FamilyBlues', 'delta', null],\n [9, 'FamilyOtherBlues', 'delta', null],\n [[12, 9], 'BlueScale', 'number', 0.039625],\n [[12, 10], 'BlueShift', 'number', 7],\n [[12, 11], 'BlueFuzz', 'number', 1],\n [10, 'StdHW', 'number', null],\n [11, 'StdVW', 'number', null],\n [[12, 12], 'StemSnapH', 'delta', null],\n [[12, 13], 'StemSnapV', 'delta', null],\n [[12, 14], 'ForceBold', 'boolean', false],\n [[12, 17], 'LanguageGroup', 'number', 0],\n [[12, 18], 'ExpansionFactor', 'number', 0.06],\n [[12, 19], 'initialRandomSeed', 'number', 0],\n [20, 'defaultWidthX', 'number', 0],\n [21, 'nominalWidthX', 'number', 0],\n [22, 'vsindex', 'number', 0],\n [23, 'blend', CFFBlendOp, null],\n [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n 'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n 'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n 'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior'\n];\n","import {Feature} from './opentype';\nimport * as r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n startCoord: F2DOT14,\n peakCoord: F2DOT14,\n endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n axisCount: r.uint16,\n regionCount: r.uint16,\n variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n itemCount: r.uint16,\n shortDeltaCount: r.uint16,\n regionIndexCount: r.uint16,\n regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n format: r.uint16,\n variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n variationDataCount: r.uint16,\n itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n 1: {\n axisIndex: r.uint16,\n axisIndex: r.uint16,\n filterRangeMinValue: F2DOT14,\n filterRangeMaxValue: F2DOT14\n }\n});\n\nlet ConditionSet = new r.Struct({\n conditionCount: r.uint16,\n conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n featureIndex: r.uint16,\n alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n version: r.fixed32,\n substitutionCount: r.uint16,\n substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n featureVariationRecordCount: r.uint32,\n featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import * as r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n reserved: new r.Reserved(r.uint16),\n reqFeatureIndex: r.uint16,\n featureCount: r.uint16,\n featureIndexes: new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n tag: new r.String(4),\n langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n count: r.uint16,\n langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nlet FeatureParams = new r.Struct({\n version: r.uint16, // should be set to 0 according OT spec\n nameID: r.uint16, //OT spec: UI Name ID or uiLabelNameId\n});\n\nexport let Feature = new r.Struct({\n featureParams: new r.Pointer(r.uint16, FeatureParams),\n lookupCount: r.uint16,\n lookupListIndexes: new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n tag: new r.String(4),\n feature: new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Struct({\n markAttachmentType: r.uint8,\n flags: new r.Bitfield(r.uint8, [\n 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n 'ignoreMarks', 'useMarkFilteringSet'\n ])\n});\n\nexport function LookupList(SubTable) {\n let Lookup = new r.Struct({\n lookupType: r.uint16,\n flags: LookupFlags,\n subTableCount: r.uint16,\n subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n markFilteringSet: new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet)\n });\n\n return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n 1: {\n glyphCount: r.uint16,\n glyphs: new r.Array(r.uint16, 'glyphCount')\n },\n 2: {\n rangeCount: r.uint16,\n rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n class: r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n 1: { // Class array\n startGlyph: r.uint16,\n glyphCount: r.uint16,\n classValueArray: new r.Array(r.uint16, 'glyphCount')\n },\n 2: { // Class ranges\n classRangeCount: r.uint16,\n classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex\n b: r.uint16, // endSize for Device, innerIndex for VariationIndex\n deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n sequenceIndex: r.uint16,\n lookupListIndex: r.uint16\n});\n\nlet Rule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n input: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n classes: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context\n coverage: new r.Pointer(r.uint16, Coverage),\n ruleSetCount: r.uint16,\n ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n },\n 2: { // Class-based context\n coverage: new r.Pointer(r.uint16, Coverage),\n classDef: new r.Pointer(r.uint16, ClassDef),\n classSetCnt: r.uint16,\n classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n },\n 3: {\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n backtrackGlyphCount: r.uint16,\n backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n input: new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n lookaheadGlyphCount: r.uint16,\n lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context glyph substitution\n coverage: new r.Pointer(r.uint16, Coverage),\n chainCount: r.uint16,\n chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 2: { // Class-based chaining context\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackClassDef: new r.Pointer(r.uint16, ClassDef),\n inputClassDef: new r.Pointer(r.uint16, ClassDef),\n lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),\n chainCount: r.uint16,\n chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 3: { // Coverage-based chaining context\n backtrackGlyphCount: r.uint16,\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n","import * as r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n glyphIndex: r.uint16,\n vertOriginY: r.int16\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n defaultVertOriginY: r.int16,\n numVertOriginYMetrics: r.uint16,\n metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import * as r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n ascender: r.int8,\n descender: r.int8,\n widthMax: r.uint8,\n caretSlopeNumerator: r.int8,\n caretSlopeDenominator: r.int8,\n caretOffset: r.int8,\n minOriginSB: r.int8,\n minAdvanceSB: r.int8,\n maxBeforeBL: r.int8,\n minAfterBL: r.int8,\n pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n glyphCode: r.uint16,\n offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n header: {\n imageFormat: r.uint16,\n imageDataOffset: r.uint32\n },\n\n 1: {\n offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 2: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics\n },\n\n 3: {\n offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 4: {\n numGlyphs: r.uint32,\n glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n },\n\n 5: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics,\n numGlyphs: r.uint32,\n glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n }\n});\n\nlet IndexSubtableArray = new r.Struct({\n firstGlyphIndex: r.uint16,\n lastGlyphIndex: r.uint16,\n subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n indexTablesSize: r.uint32,\n numberOfIndexSubTables: r.uint32,\n colorRef: r.uint32,\n hori: SBitLineMetrics,\n vert: SBitLineMetrics,\n startGlyphIndex: r.uint16,\n endGlyphIndex: r.uint16,\n ppemX: r.uint8,\n ppemY: r.uint8,\n bitDepth: r.uint8,\n flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n version: r.uint32, // 0x00020000\n numSizes: r.uint32,\n sizes: new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import * as r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n horiBearingX: r.int8,\n horiBearingY: r.int8,\n horiAdvance: r.uint8,\n vertBearingX: r.int8,\n vertBearingY: r.int8,\n vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n bearingX: r.int8,\n bearingY: r.int8,\n advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n glyph: r.uint16,\n xOffset: r.int8,\n yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n 1: {\n metrics: SmallMetrics,\n data: ByteAligned\n },\n\n 2: {\n metrics: SmallMetrics,\n data: BitAligned\n },\n\n // format 3 is deprecated\n // format 4 is not supported by Microsoft\n\n 5: {\n data: BitAligned\n },\n\n 6: {\n metrics: BigMetrics,\n data: ByteAligned\n },\n\n 7: {\n metrics: BigMetrics,\n data: BitAligned\n },\n\n 8: {\n metrics: SmallMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 9: {\n metrics: BigMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 17: {\n metrics: SmallMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 18: {\n metrics: BigMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 19: {\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n }\n});\n\n","import * as r from 'restructure';\n\nlet ImageTable = new r.Struct({\n ppem: r.uint16,\n resolution: r.uint16,\n imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n version: r.uint16,\n flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n numImgTables: r.uint32,\n imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import * as r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).\n paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must\n}); // be less than numPaletteEntries in the CPAL table, except for\n // the special case noted below. Each palette entry is 16 bits.\n // A palette index of 0xFFFF is a special case indicating that\n // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only\n // and is not rendered for color.\n firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n // There will be numLayers consecutive entries for this base glyph.\n numLayers: r.uint16\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numBaseGlyphRecords: r.uint16,\n baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n numLayerRecords: r.uint16\n});\n","import * as r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n blue: r.uint8,\n green: r.uint8,\n red: r.uint8,\n alpha: r.uint8\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n header: {\n numPaletteEntries: r.uint16,\n numPalettes: r.uint16,\n numColorRecords: r.uint16,\n colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n colorRecordIndices: new r.Array(r.uint16, 'numPalettes'),\n },\n 0: {},\n 1: {\n offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),\n offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),\n offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16 // X or Y value, in design units\n },\n\n 2: { // Design units plus contour point\n coordinate: r.int16, // X or Y value, in design units\n referenceGlyph: r.uint16, // GlyphID of control glyph\n baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16, // X or Y value, in design units\n deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value\n }\n});\n\nlet BaseValues = new r.Struct({\n defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList\n baseCoordCount: r.uint16,\n baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList\n minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL\n});\n\nlet MinMax = new r.Struct({\n minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n featMinMaxCount: r.uint16, // May be 0\n featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n tag: new r.String(4), // 4-byte language system identification tag\n minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL\n defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL\n baseLangSysCount: r.uint16, // May be 0\n baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n tag: new r.String(4), // 4-byte script identification tag\n script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL\n baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL\n vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL\n },\n\n 0x00010000: {},\n 0x00010001: {\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16\n },\n\n 2: { // Contour point\n caretValuePoint: r.uint16\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16,\n deviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n ligGlyphCount: r.uint16,\n ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n markSetTableFormat: r.uint16,\n markSetCount: r.uint16,\n coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n glyphClassDef: new r.Pointer(r.uint16, ClassDef),\n attachList: new r.Pointer(r.uint16, AttachList),\n ligCaretList: new r.Pointer(r.uint16, LigCaretList),\n markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n },\n\n 0x00010000: {},\n 0x00010002: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)\n },\n 0x00010003: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n 'xPlacement', 'yPlacement',\n 'xAdvance', 'yAdvance',\n 'xPlaDevice', 'yPlaDevice',\n 'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n xPlacement: r.int16,\n yPlacement: r.int16,\n xAdvance: r.int16,\n yAdvance: r.int16,\n xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel })\n};\n\nclass ValueRecord {\n constructor(key = 'valueFormat') {\n this.key = key;\n }\n\n buildStruct(parent) {\n let struct = parent;\n while (!struct[this.key] && struct.parent) {\n struct = struct.parent;\n }\n\n if (!struct[this.key]) return;\n\n let fields = {};\n fields.rel = () => struct._startOffset;\n\n let format = struct[this.key];\n for (let key in format) {\n if (format[key]) {\n fields[key] = types[key];\n }\n }\n\n return new r.Struct(fields);\n }\n\n size(val, ctx) {\n return this.buildStruct(ctx).size(val, ctx);\n }\n\n decode(stream, parent) {\n let res = this.buildStruct(parent).decode(stream, parent);\n delete res.rel;\n return res;\n }\n}\n\nlet PairValueRecord = new r.Struct({\n secondGlyph: r.uint16,\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n xCoordinate: r.int16,\n yCoordinate: r.int16\n },\n\n 2: { // Design units plus contour point\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n anchorPoint: r.uint16\n },\n\n 3: { // Design units plus Device tables\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n xDeviceTable: new r.Pointer(r.uint16, Device),\n yDeviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet EntryExitRecord = new r.Struct({\n entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n class: r.uint16,\n markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n 1: { // Single positioning value\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n value: new ValueRecord()\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n valueCount: r.uint16,\n values: new r.LazyArray(new ValueRecord(), 'valueCount')\n }\n }),\n\n 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n 1: { // Adjustments for glyph pairs\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n pairSetCount: r.uint16,\n pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n },\n\n 2: { // Class pair adjustment\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n classDef1: new r.Pointer(r.uint16, ClassDef),\n classDef2: new r.Pointer(r.uint16, ClassDef),\n class1Count: r.uint16,\n class2Count: r.uint16,\n classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n }\n }),\n\n 3: { // Cursive Attachment Positioning\n format: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n entryExitCount: r.uint16,\n entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')\n },\n\n 4: { // MarkToBase Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n baseCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n baseArray: new r.Pointer(r.uint16, BaseArray)\n },\n\n 5: { // MarkToLigature Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n ligatureCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n ligatureArray: new r.Pointer(r.uint16, LigatureArray)\n },\n\n 6: { // MarkToMark Attachment Positioning\n format: r.uint16,\n mark1Coverage: new r.Pointer(r.uint16, Coverage),\n mark2Coverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n mark1Array: new r.Pointer(r.uint16, MarkArray),\n mark2Array: new r.Pointer(r.uint16, BaseArray)\n },\n\n 7: Context, // Contextual positioning\n 8: ChainingContext, // Chaining contextual positioning\n\n 9: { // Extension Positioning\n posFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 9\n extension: new r.Pointer(r.uint32, null)\n }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n glyph: r.uint16,\n compCount: r.uint16,\n components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, {// Single Substitution\n 1: {\n coverage: new r.Pointer(r.uint16, Coverage),\n deltaGlyphID: r.int16\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n substitute: new r.LazyArray(r.uint16, 'glyphCount')\n }\n }),\n\n 2: { // Multiple Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n },\n\n 3: { // Alternate Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n },\n\n 4: { // Ligature Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n },\n\n 5: Context, // Contextual Substitution\n 6: ChainingContext, // Chaining Contextual Substitution\n\n 7: { // Extension Substitution\n substFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 7\n extension: new r.Pointer(r.uint32, null)\n },\n\n 8: { // Reverse Chaining Contextual Single Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n glyphCount: r.uint16,\n substitutes: new r.Array(r.uint16, 'glyphCount')\n }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n","import * as r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n tag: new r.String(4),\n jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n langSysCount: r.uint16,\n langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n version: r.uint32, // should be 0x00010000\n scriptCount: r.uint16,\n scriptList: new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport { ItemVariationStore } from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n constructor(size) {\n this._size = size;\n }\n\n decode(stream, parent) {\n switch (this.size(0, parent)) {\n case 1: return stream.readUInt8();\n case 2: return stream.readUInt16BE();\n case 3: return stream.readUInt24BE();\n case 4: return stream.readUInt32BE();\n }\n }\n\n size(val, parent) {\n return resolveLength(this._size, null, parent);\n }\n}\n\nlet MapDataEntry = new r.Struct({\n entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n entryFormat: r.uint16,\n mapCount: r.uint16,\n mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import * as r from 'restructure';\n\nlet Signature = new r.Struct({\n format: r.uint32,\n length: r.uint32,\n offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n reserved: new r.Reserved(r.uint16, 2),\n cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature\n signature: new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n ulVersion: r.uint32, // Version number of the DSIG table (0x00000001)\n usNumSigs: r.uint16, // Number of signatures in the table\n usFlag: r.uint16, // Permission flags\n signatures: new r.Array(Signature, 'usNumSigs'),\n signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import * as r from 'restructure';\n\nlet GaspRange = new r.Struct({\n rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem\n rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n 'grayscale', 'gridfit',\n 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType\n ])\n});\n\nexport default new r.Struct({\n version: r.uint16, // set to 0\n numRanges: r.uint16,\n gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import * as r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n pixelSize: r.uint8,\n maximumWidth: r.uint8,\n widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n version: r.uint16,\n numRecords: r.int16,\n sizeDeviceRecord: r.int32,\n records: new r.Array(DeviceRecord, 'numRecords')\n});\n","import * as r from 'restructure';\n\nlet KernPair = new r.Struct({\n left: r.uint16,\n right: r.uint16,\n value: r.int16\n});\n\nlet ClassTable = new r.Struct({\n firstGlyph: r.uint16,\n nGlyphs: r.uint16,\n offsets: new r.Array(r.uint16, 'nGlyphs'),\n max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n off: t => t._startOffset - t.parent.parent._startOffset,\n len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n 0: {\n nPairs: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n pairs: new r.Array(KernPair, 'nPairs')\n },\n\n 2: {\n rowWidth: r.uint16,\n leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n },\n\n 3: {\n glyphCount: r.uint16,\n kernValueCount: r.uint8,\n leftClassCount: r.uint8,\n rightClassCount: r.uint8,\n flags: r.uint8,\n kernValue: new r.Array(r.int16, 'kernValueCount'),\n leftClass: new r.Array(r.uint8, 'glyphCount'),\n rightClass: new r.Array(r.uint8, 'glyphCount'),\n kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n 0: { // Microsoft uses this format\n subVersion: r.uint16, // Microsoft has an extra sub-table version number\n length: r.uint16, // Length of the subtable, in bytes\n format: r.uint8, // Format of subtable\n coverage: new r.Bitfield(r.uint8, [\n 'horizontal', // 1 if table has horizontal data, 0 if vertical\n 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text\n 'override' // If set to 1 the value in this table replaces the accumulated value\n ]),\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n },\n 1: { // Apple uses this format\n length: r.uint32,\n coverage: new r.Bitfield(r.uint8, [\n null, null, null, null, null,\n 'variation', // Set if table has variation kerning values\n 'crossStream', // Set if table has cross-stream kerning values\n 'vertical' // Set if table has vertical kerning values\n ]),\n format: r.uint8,\n tupleIndex: r.uint16,\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n 0: { // Microsoft Version\n nTables: r.uint16,\n tables: new r.Array(KernTable, 'nTables')\n },\n\n 1: { // Apple Version\n reserved: new r.Reserved(r.uint16), // the other half of the version number\n nTables: r.uint32,\n tables: new r.Array(KernTable, 'nTables')\n }\n});\n","import * as r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n version: r.uint16,\n numGlyphs: r.uint16,\n yPels: new r.Array(r.uint8, 'numGlyphs')\n});\n","import * as r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n version: r.uint16,\n fontNumber: r.uint32,\n pitch: r.uint16,\n xHeight: r.uint16,\n style: r.uint16,\n typeFamily: r.uint16,\n capHeight: r.uint16,\n symbolSet: r.uint16,\n typeface: new r.String(16),\n characterComplement: new r.String(8),\n fileName: new r.String(6),\n strokeWeight: new r.String(1),\n widthType: new r.String(1),\n serifStyle: r.uint8,\n reserved: new r.Reserved(r.uint8)\n});\n","import * as r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n bCharSet: r.uint8, // Character set\n xRatio: r.uint8, // Value to use for x-Ratio\n yStartRatio: r.uint8, // Starting y-Ratio value\n yEndRatio: r.uint8 // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n yPelHeight: r.uint16, // yPelHeight to which values apply\n yMax: r.int16, // Maximum value (in pels) for this yPelHeight\n yMin: r.int16 // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n recs: r.uint16, // Number of height records in this group\n startsz: r.uint8, // Starting yPelHeight\n endsz: r.uint8, // Ending yPelHeight\n entries: new r.Array(vTable, 'recs') // The VDMX records\n});\n\nexport default new r.Struct({\n version: r.uint16, // Version number (0 or 1)\n numRecs: r.uint16, // Number of VDMX groups present\n numRatios: r.uint16, // Number of aspect ratio groupings\n ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges\n offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range\n groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings\n});\n","import * as r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n version: r.uint16, // Version number of the Vertical Header Table\n ascent: r.int16, // The vertical typographic ascender for this font\n descent: r.int16, // The vertical typographic descender for this font\n lineGap: r.int16, // The vertical typographic line gap for this font\n advanceHeightMax: r.int16, // The maximum advance height measurement found in the font\n minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font\n minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font\n yMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Caret slope (rise/run)\n caretSlopeRun: r.int16,\n caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // Set to 0\n numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table\n});\n","import * as r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n advance: r.uint16, // The advance height of the glyph\n bearing: r.int16 // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n fromCoord: shortFrac,\n toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n pairCount: r.uint16,\n correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n axisCount: r.uint32,\n segment: new r.Array(Segment, 'axisCount')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n 0: { // Distance-based, no mapping\n deltas: new r.Array(r.int16, 32)\n },\n\n 1: { // Distance-based, with mapping\n deltas: new r.Array(r.int16, 32),\n mappingData: new LookupTable(r.uint16)\n },\n\n 2: { // Control point-based, no mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32)\n },\n\n 3: { // Control point-based, with mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32),\n mappingData: new LookupTable(r.uint16)\n }\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n defaultBaseline: r.uint16,\n subtable: BslnSubtable\n});\n","import * as r from 'restructure';\n\nclass UnboundedArrayAccessor {\n constructor(type, stream, parent) {\n this.type = type;\n this.stream = stream;\n this.parent = parent;\n this.base = this.stream.pos;\n this._items = [];\n }\n\n getItem(index) {\n if (this._items[index] == null) {\n let pos = this.stream.pos;\n this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n this._items[index] = this.type.decode(this.stream, this.parent);\n this.stream.pos = pos;\n }\n\n return this._items[index];\n }\n\n inspect() {\n return `[UnboundedArray ${this.type.constructor.name}]`;\n }\n}\n\nexport class UnboundedArray extends r.Array {\n constructor(type) {\n super(type, 0);\n }\n\n decode(stream, parent) {\n return new UnboundedArrayAccessor(this.type, stream, parent);\n }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n // Helper class that makes internal structures invisible to pointers\n class Shadow {\n constructor(type) {\n this.type = type;\n }\n\n decode(stream, ctx) {\n ctx = ctx.parent.parent;\n return this.type.decode(stream, ctx);\n }\n\n size(val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.size(val, ctx);\n }\n\n encode(stream, val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.encode(stream, val, ctx);\n }\n }\n\n ValueType = new Shadow(ValueType);\n\n let BinarySearchHeader = new r.Struct({\n unitSize: r.uint16,\n nUnits: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16\n });\n\n let LookupSegmentSingle = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n value: ValueType\n });\n\n let LookupSegmentArray = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n });\n\n let LookupSingle = new r.Struct({\n glyph: r.uint16,\n value: ValueType\n });\n\n return new r.VersionedStruct(r.uint16, {\n 0: {\n values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n },\n 2: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n },\n 4: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n },\n 6: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n },\n 8: {\n firstGlyph: r.uint16,\n count: r.uint16,\n values: new r.Array(ValueType, 'count')\n }\n });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n let entry = Object.assign({\n newState: r.uint16,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n let StateHeader = new r.Struct({\n nClasses: r.uint32,\n classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n stateArray: new r.Pointer(r.uint32, StateArray),\n entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n });\n\n return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n let ClassLookupTable = new r.Struct({\n version() { return 8; }, // simulate LookupTable\n firstGlyph: r.uint16,\n values: new r.Array(r.uint8, r.uint16)\n });\n\n let entry = Object.assign({\n newStateOffset: r.uint16,\n // convert offset to stateArray index\n newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n let StateHeader1 = new r.Struct({\n nClasses: r.uint16,\n classTable: new r.Pointer(r.uint16, ClassLookupTable),\n stateArray: new r.Pointer(r.uint16, StateArray),\n entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n });\n\n return StateHeader1;\n}\n","import * as r from 'restructure';\n\nlet Setting = new r.Struct({\n setting: r.uint16,\n nameIndex: r.int16,\n name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n feature: r.uint16,\n nSettings: r.uint16,\n settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n featureFlags: new r.Bitfield(r.uint8, [\n null, null, null, null, null, null,\n 'hasDefault', 'exclusive'\n ]),\n defaultSetting: r.uint8,\n nameIndex: r.int16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n featureNameCount: r.uint16,\n reserved1: new r.Reserved(r.uint16),\n reserved2: new r.Reserved(r.uint32),\n featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import * as r from 'restructure';\n\nlet Axis = new r.Struct({\n axisTag: new r.String(4),\n minValue: r.fixed32,\n defaultValue: r.fixed32,\n maxValue: r.fixed32,\n flags: r.uint16,\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n flags: r.uint16,\n coord: new r.Array(r.fixed32, t => t.parent.axisCount),\n postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0)\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n offsetToData: r.uint16,\n countSizePairs: r.uint16,\n axisCount: r.uint16,\n axisSize: r.uint16,\n instanceCount: r.uint16,\n instanceSize: r.uint16,\n axis: new r.Array(Axis, 'axisCount'),\n instance: new r.Array(Instance, 'instanceCount')\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n static decode(stream, parent) {\n // In short format, offsets are multiplied by 2.\n // This doesn't seem to be documented by Apple, but it\n // is implemented this way in Freetype.\n return parent.flags\n ? stream.readUInt32BE()\n : stream.readUInt16BE() * 2;\n }\n}\n\nlet gvar = new r.Struct({\n version: r.uint16,\n reserved: new r.Reserved(r.uint16),\n axisCount: r.uint16,\n globalCoordCount: r.uint16,\n globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n glyphCount: r.uint16,\n flags: r.uint16,\n offsetToData: r.uint32,\n offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: ctx => ctx.offsetToData, allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import * as r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n length: r.uint16,\n coverage: r.uint16,\n subFeatureFlags: r.uint32,\n stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n justClass: r.uint32,\n beforeGrowLimit: r.fixed32,\n beforeShrinkLimit: r.fixed32,\n afterGrowLimit: r.fixed32,\n afterShrinkLimit: r.fixed32,\n growFlags: r.uint16,\n shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n 0: { // Decomposition action\n lowerLimit: r.fixed32,\n upperLimit: r.fixed32,\n order: r.uint16,\n glyphs: new r.Array(r.uint16, r.uint16)\n },\n\n 1: { // Unconditional add glyph action\n addGlyph: r.uint16\n },\n\n 2: { // Conditional add glyph action\n substThreshold: r.fixed32,\n addGlyph: r.uint16,\n substGlyph: r.uint16\n },\n\n 3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n 4: { // Ductile glyph action (not supported by CoreText)\n variationAxis: r.uint32,\n minimumLimit: r.fixed32,\n noStretchValue: r.fixed32,\n maximumLimit: r.fixed32\n },\n\n 5: { // Repeated add glyph action\n flags: r.uint16,\n glyph: r.uint16\n }\n});\n\nlet Action = new r.Struct({\n actionClass: r.uint16,\n actionType: r.uint16,\n actionLength: r.uint32,\n actionData: ActionData,\n padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n wdcOffset: r.uint16,\n postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: ctx => ctx.wdcOffset }))\n});\n\nexport default new r.Struct({\n version: r.uint32,\n format: r.uint16,\n horizontal: new r.Pointer(r.uint16, JustificationTable),\n vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import * as r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n action: r.uint16\n};\n\nlet ContextualData = {\n markIndex: r.uint16,\n currentIndex: r.uint16\n};\n\nlet InsertionData = {\n currentInsertIndex: r.uint16,\n markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n 0: { // Indic Rearrangement Subtable\n stateTable: new StateTable\n },\n\n 1: { // Contextual Glyph Substitution Subtable\n stateTable: new StateTable(ContextualData),\n substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n },\n\n 2: { // Ligature subtable\n stateTable: new StateTable(LigatureData),\n ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n },\n\n 4: { // Non-contextual Glyph Substitution Subtable\n lookupTable: new LookupTable\n },\n\n 5: { // Glyph Insertion Subtable\n stateTable: new StateTable(InsertionData),\n insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n }\n});\n\nlet Subtable = new r.Struct({\n length: r.uint32,\n coverage: r.uint24,\n type: r.uint8,\n subFeatureFlags: r.uint32,\n table: SubtableData,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n featureType: r.uint16,\n featureSetting: r.uint16,\n enableFlags: r.uint32,\n disableFlags: r.uint32\n});\n\nlet MorxChain = new r.Struct({\n defaultFlags: r.uint32,\n chainLength: r.uint32,\n nFeatureEntries: r.uint32,\n nSubtables: r.uint32,\n features: new r.Array(FeatureEntry, 'nFeatureEntries'),\n subtables: new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n version: r.uint16,\n unused: new r.Reserved(r.uint16),\n nChains: r.uint32,\n chains: new r.Array(MorxChain, 'nChains')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n left: r.int16,\n top: r.int16,\n right: r.int16,\n bottom: r.int16\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n lookupTable: new LookupTable(OpticalBounds)\n});\n","import { binarySearch } from './utils';\nimport { encodingExists, getEncoding, getEncodingMapping } from './encodings';\nimport { cache } from './decorators';\nimport { range } from './utils';\n\nexport default class CmapProcessor {\n constructor(cmapTable) {\n // Attempt to find a Unicode cmap first\n this.encoding = null;\n this.cmap = this.findSubtable(cmapTable, [\n // 32-bit subtables\n [3, 10],\n [0, 6],\n [0, 4],\n\n // 16-bit subtables\n [3, 1],\n [0, 3],\n [0, 2],\n [0, 1],\n [0, 0]\n ]);\n\n // If not unicode cmap was found, take the first table with a supported encoding.\n if (!this.cmap) {\n for (let cmap of cmapTable.tables) {\n let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n let mapping = getEncodingMapping(encoding);\n if (mapping) {\n this.cmap = cmap.table;\n this.encoding = mapping;\n }\n }\n }\n\n if (!this.cmap) {\n throw new Error(\"Could not find a supported cmap table\");\n }\n\n this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n if (this.uvs && this.uvs.version !== 14) {\n this.uvs = null;\n }\n }\n\n findSubtable(cmapTable, pairs) {\n for (let [platformID, encodingID] of pairs) {\n for (let cmap of cmapTable.tables) {\n if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n return cmap.table;\n }\n }\n }\n\n return null;\n }\n\n lookup(codepoint, variationSelector) {\n // If there is no Unicode cmap in this font, we need to re-encode\n // the codepoint in the encoding that the cmap supports.\n if (this.encoding) {\n codepoint = this.encoding.get(codepoint) || codepoint;\n\n // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n } else if (variationSelector) {\n let gid = this.getVariationSelector(codepoint, variationSelector);\n if (gid) {\n return gid;\n }\n }\n\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return cmap.codeMap.get(codepoint) || 0;\n\n case 4: {\n let min = 0;\n let max = cmap.segCount - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n\n if (codepoint < cmap.startCode.get(mid)) {\n max = mid - 1;\n } else if (codepoint > cmap.endCode.get(mid)) {\n min = mid + 1;\n } else {\n let rangeOffset = cmap.idRangeOffset.get(mid);\n let gid;\n\n if (rangeOffset === 0) {\n gid = codepoint + cmap.idDelta.get(mid);\n } else {\n let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n gid = cmap.glyphIndexArray.get(index) || 0;\n if (gid !== 0) {\n gid += cmap.idDelta.get(mid);\n }\n }\n\n return gid & 0xffff;\n }\n }\n\n return 0;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n case 12:\n case 13: {\n let min = 0;\n let max = cmap.nGroups - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let group = cmap.groups.get(mid);\n\n if (codepoint < group.startCharCode) {\n max = mid - 1;\n } else if (codepoint > group.endCharCode) {\n min = mid + 1;\n } else {\n if (cmap.version === 12) {\n return group.glyphID + (codepoint - group.startCharCode);\n } else {\n return group.glyphID;\n }\n }\n }\n\n return 0;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n getVariationSelector(codepoint, variationSelector) {\n if (!this.uvs) {\n return 0;\n }\n\n let selectors = this.uvs.varSelectors.toArray();\n let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n let sel = selectors[i];\n\n if (i !== -1 && sel.defaultUVS) {\n i = binarySearch(sel.defaultUVS, x =>\n codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n );\n }\n\n if (i !== -1 && sel.nonDefaultUVS) {\n i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n if (i !== -1) {\n return sel.nonDefaultUVS[i].glyphID;\n }\n }\n\n return 0;\n }\n\n @cache\n getCharacterSet() {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return range(0, cmap.codeMap.length);\n\n case 4: {\n let res = [];\n let endCodes = cmap.endCode.toArray();\n for (let i = 0; i < endCodes.length; i++) {\n let tail = endCodes[i] + 1;\n let start = cmap.startCode.get(i);\n res.push(...range(start, tail));\n }\n\n return res;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n case 12:\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n\n return res;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n @cache\n codePointsForGlyph(gid) {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0: {\n let res = [];\n for (let i = 0; i < 256; i++) {\n if (cmap.codeMap.get(i) === gid) {\n res.push(i);\n }\n }\n\n return res;\n }\n\n case 4: {\n let res = [];\n for (let i = 0; i < cmap.segCount; i++) {\n let end = cmap.endCode.get(i);\n let start = cmap.startCode.get(i);\n let rangeOffset = cmap.idRangeOffset.get(i);\n let delta = cmap.idDelta.get(i);\n\n for (var c = start; c <= end; c++) {\n let g = 0;\n if (rangeOffset === 0) {\n g = c + delta;\n } else {\n let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n g = cmap.glyphIndexArray.get(index) || 0;\n if (g !== 0) {\n g += delta;\n }\n }\n\n if (g === gid) {\n res.push(c);\n }\n }\n }\n\n return res;\n }\n\n case 12: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n res.push(group.startCharCode + (gid - group.glyphID));\n }\n }\n\n return res;\n }\n\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid === group.glyphID) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n }\n\n return res;\n }\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n}\n","export function binarySearch(arr, cmp) {\n let min = 0;\n let max = arr.length - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let res = cmp(arr[mid]);\n\n if (res < 0) {\n max = mid - 1;\n } else if (res > 0) {\n min = mid + 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n}\n\nexport function range(index, end) {\n let range = [];\n while (index < end) {\n range.push(index++);\n }\n return range;\n}\n\nexport const asciiDecoder = new TextDecoder('ascii');\n\n// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license.\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst LOOKUP = new Uint8Array(256);\nfor (let i = 0; i < CHARS.length; i++) {\n LOOKUP[CHARS.charCodeAt(i)] = i;\n}\n\nexport function decodeBase64(base64) {\n let bufferLength = base64.length * 0.75;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n let bytes = new Uint8Array(bufferLength);\n let p = 0;\n\n for (let i = 0, len = base64.length; i < len; i += 4) {\n let encoded1 = LOOKUP[base64.charCodeAt(i)];\n let encoded2 = LOOKUP[base64.charCodeAt(i + 1)];\n let encoded3 = LOOKUP[base64.charCodeAt(i + 2)];\n let 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 bytes;\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n constructor(font) {\n this.font = font;\n this.unicodeLayoutEngine = null;\n this.kernProcessor = null;\n\n // Choose an advanced layout engine. We try the AAT morx table first since more\n // scripts are currently supported because the shaping logic is built into the font.\n if (this.font.morx) {\n this.engine = new AATLayoutEngine(this.font);\n\n } else if (this.font.GSUB || this.font.GPOS) {\n this.engine = new OTLayoutEngine(this.font);\n }\n }\n\n layout(string, features, script, language, direction) {\n // Make the features parameter optional\n if (typeof features === 'string') {\n direction = language;\n language = script;\n script = features;\n features = [];\n }\n\n // Map string to glyphs if needed\n if (typeof string === 'string') {\n // Attempt to detect the script from the string if not provided.\n if (script == null) {\n script = Script.forString(string);\n }\n\n var glyphs = this.font.glyphsForString(string);\n } else {\n // Attempt to detect the script from the glyph code points if not provided.\n if (script == null) {\n let codePoints = [];\n for (let glyph of string) {\n codePoints.push(...glyph.codePoints);\n }\n\n script = Script.forCodePoints(codePoints);\n }\n\n var glyphs = string;\n }\n\n let glyphRun = new GlyphRun(glyphs, features, script, language, direction);\n\n // Return early if there are no glyphs\n if (glyphs.length === 0) {\n glyphRun.positions = [];\n return glyphRun;\n }\n\n // Setup the advanced layout engine\n if (this.engine && this.engine.setup) {\n this.engine.setup(glyphRun);\n }\n\n // Substitute and position the glyphs\n this.substitute(glyphRun);\n this.position(glyphRun);\n\n this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions);\n\n // Let the layout engine clean up any state it might have\n if (this.engine && this.engine.cleanup) {\n this.engine.cleanup();\n }\n\n return glyphRun;\n }\n\n substitute(glyphRun) {\n // Call the advanced layout engine to make substitutions\n if (this.engine && this.engine.substitute) {\n this.engine.substitute(glyphRun);\n }\n }\n\n position(glyphRun) {\n // Get initial glyph positions\n glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n let positioned = null;\n\n // Call the advanced layout engine. Returns the features applied.\n if (this.engine && this.engine.position) {\n positioned = this.engine.position(glyphRun);\n }\n\n // if there is no GPOS table, use unicode properties to position marks.\n if (!positioned && (!this.engine || this.engine.fallbackPosition)) {\n if (!this.unicodeLayoutEngine) {\n this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n }\n\n this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);\n }\n\n // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {\n if (!this.kernProcessor) {\n this.kernProcessor = new KernProcessor(this.font);\n }\n\n this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);\n glyphRun.features.kern = true;\n }\n }\n\n hideDefaultIgnorables(glyphs, positions) {\n let space = this.font.glyphForCodePoint(0x20);\n for (let i = 0; i < glyphs.length; i++) {\n if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {\n glyphs[i] = space;\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n isDefaultIgnorable(ch) {\n // From DerivedCoreProperties.txt in the Unicode database,\n // minus U+115F, U+1160, U+3164 and U+FFA0, which is what\n // Harfbuzz and Uniscribe do.\n let plane = ch >> 16;\n if (plane === 0) {\n // BMP\n switch (ch >> 8) {\n \tcase 0x00: return ch === 0x00AD;\n \tcase 0x03: return ch === 0x034F;\n \tcase 0x06: return ch === 0x061C;\n \tcase 0x17: return 0x17B4 <= ch && ch <= 0x17B5;\n \tcase 0x18: return 0x180B <= ch && ch <= 0x180E;\n \tcase 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F);\n \tcase 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF;\n \tcase 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8;\n \tdefault: return false;\n }\n } else {\n // Other planes\n switch (plane) {\n \tcase 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A);\n \tcase 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF;\n \tdefault: return false;\n }\n }\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.engine) {\n features.push(...this.engine.getAvailableFeatures(script, language));\n }\n\n if (this.font.kern && features.indexOf('kern') === -1) {\n features.push('kern');\n }\n\n return features;\n }\n\n stringsForGlyph(gid) {\n let result = new Set;\n\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n for (let codePoint of codePoints) {\n result.add(String.fromCodePoint(codePoint));\n }\n\n if (this.engine && this.engine.stringsForGlyph) {\n for (let string of this.engine.stringsForGlyph(gid)) {\n result.add(string);\n }\n }\n\n return Array.from(result);\n }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n constructor(font) {\n this.kern = font.kern;\n }\n\n process(glyphs, positions) {\n for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n let left = glyphs[glyphIndex].id;\n let right = glyphs[glyphIndex + 1].id;\n positions[glyphIndex].xAdvance += this.getKerning(left, right);\n }\n }\n\n getKerning(left, right) {\n let res = 0;\n\n for (let table of this.kern.tables) {\n if (table.coverage.crossStream) {\n continue;\n }\n\n switch (table.version) {\n case 0:\n if (!table.coverage.horizontal) {\n continue;\n }\n\n break;\n case 1:\n if (table.coverage.vertical || table.coverage.variation) {\n continue;\n }\n\n break;\n default:\n throw new Error(`Unsupported kerning table version ${table.version}`);\n }\n\n let val = 0;\n let s = table.subtable;\n switch (table.format) {\n case 0:\n let pairIdx = binarySearch(s.pairs, function (pair) {\n return (left - pair.left) || (right - pair.right);\n });\n\n if (pairIdx >= 0) {\n val = s.pairs[pairIdx].value;\n }\n\n break;\n\n case 2:\n let leftOffset = 0, rightOffset = 0;\n if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n } else {\n leftOffset = s.array.off;\n }\n\n if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n }\n\n let index = (leftOffset + rightOffset - s.array.off) / 2;\n val = s.array.values.get(index);\n break;\n\n case 3:\n if (left >= s.glyphCount || right >= s.glyphCount) {\n return 0;\n }\n\n val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n break;\n\n default:\n throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n }\n\n // Microsoft supports the override flag, which resets the result\n // Otherwise, the sum of the results from all subtables is returned\n if (table.coverage.override) {\n res = val;\n } else {\n res += val;\n }\n }\n\n return res;\n }\n}\n","import {getCombiningClass} from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n constructor(font) {\n this.font = font;\n }\n\n positionGlyphs(glyphs, positions) {\n // find each base + mark cluster, and position the marks relative to the base\n let clusterStart = 0;\n let clusterEnd = 0;\n for (let index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.isMark) { // TODO: handle ligatures\n clusterEnd = index;\n } else {\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n clusterStart = clusterEnd = index;\n }\n }\n\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n return positions;\n }\n\n positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n let base = glyphs[clusterStart];\n let baseBox = base.cbox.copy();\n\n // adjust bounding box for ligature glyphs\n if (base.codePoints.length > 1) {\n // LTR. TODO: RTL support.\n baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n }\n\n let xOffset = -positions[clusterStart].xAdvance;\n let yOffset = 0;\n let yGap = this.font.unitsPerEm / 16;\n\n // position each of the mark glyphs relative to the base glyph\n for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n let mark = glyphs[index];\n let markBox = mark.cbox;\n let position = positions[index];\n\n let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n if (combiningClass !== 'Not_Reordered') {\n position.xOffset = position.yOffset = 0;\n\n // x positioning\n switch (combiningClass) {\n case 'Double_Above':\n case 'Double_Below':\n // LTR. TODO: RTL support.\n position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n break;\n\n case 'Attached_Below_Left':\n case 'Below_Left':\n case 'Above_Left':\n // left align\n position.xOffset += baseBox.minX - markBox.minX;\n break;\n\n case 'Attached_Above_Right':\n case 'Below_Right':\n case 'Above_Right':\n // right align\n position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n break;\n\n default: // Attached_Below, Attached_Above, Below, Above, other\n // center align\n position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n }\n\n // y positioning\n switch (combiningClass) {\n case 'Double_Below':\n case 'Below_Left':\n case 'Below':\n case 'Below_Right':\n case 'Attached_Below_Left':\n case 'Attached_Below':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n baseBox.minY += yGap;\n }\n\n position.yOffset = -baseBox.minY - markBox.maxY;\n baseBox.minY += markBox.height;\n break;\n\n case 'Double_Above':\n case 'Above_Left':\n case 'Above':\n case 'Above_Right':\n case 'Attached_Above':\n case 'Attached_Above_Right':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n baseBox.maxY += yGap;\n }\n\n position.yOffset = baseBox.maxY - markBox.minY;\n baseBox.maxY += markBox.height;\n break;\n }\n\n position.xAdvance = position.yAdvance = 0;\n position.xOffset += xOffset;\n position.yOffset += yOffset;\n\n } else {\n xOffset -= position.xAdvance;\n yOffset -= position.yAdvance;\n }\n }\n\n return;\n }\n\n getCombiningClass(codePoint) {\n let combiningClass = getCombiningClass(codePoint);\n\n // Thai / Lao need some per-character work\n if ((codePoint & ~0xff) === 0x0e00) {\n if (combiningClass === 'Not_Reordered') {\n switch (codePoint) {\n case 0x0e31:\n case 0x0e34:\n case 0x0e35:\n case 0x0e36:\n case 0x0e37:\n case 0x0e47:\n case 0x0e4c:\n case 0x0e3d:\n case 0x0e4e:\n return 'Above_Right';\n\n case 0x0eb1:\n case 0x0eb4:\n case 0x0eb5:\n case 0x0eb6:\n case 0x0eb7:\n case 0x0ebb:\n case 0x0ecc:\n case 0x0ecd:\n return 'Above';\n\n case 0x0ebc:\n return 'Below';\n }\n } else if (codePoint === 0x0e3a) { // virama\n return 'Below_Right';\n }\n }\n\n switch (combiningClass) {\n // Hebrew\n\n case 'CCC10': // sheva\n case 'CCC11': // hataf segol\n case 'CCC12': // hataf patah\n case 'CCC13': // hataf qamats\n case 'CCC14': // hiriq\n case 'CCC15': // tsere\n case 'CCC16': // segol\n case 'CCC17': // patah\n case 'CCC18': // qamats\n case 'CCC20': // qubuts\n case 'CCC22': // meteg\n return 'Below';\n\n case 'CCC23': // rafe\n return 'Attached_Above';\n\n case 'CCC24': // shin dot\n return 'Above_Right';\n\n case 'CCC25': // sin dot\n case 'CCC19': // holam\n return 'Above_Left';\n\n case 'CCC26': // point varika\n return 'Above';\n\n case 'CCC21': // dagesh\n break;\n\n // Arabic and Syriac\n\n case 'CCC27': // fathatan\n case 'CCC28': // dammatan\n case 'CCC30': // fatha\n case 'CCC31': // damma\n case 'CCC33': // shadda\n case 'CCC34': // sukun\n case 'CCC35': // superscript alef\n case 'CCC36': // superscript alaph\n return 'Above';\n\n case 'CCC29': // kasratan\n case 'CCC32': // kasra\n return 'Below';\n\n // Thai\n\n case 'CCC103': // sara u / sara uu\n return 'Below_Right';\n\n case 'CCC107': // mai\n return 'Above_Right';\n\n // Lao\n\n case 'CCC118': // sign u / sign uu\n return 'Below';\n\n case 'CCC122': // mai\n return 'Above';\n\n // Tibetan\n\n case 'CCC129': // sign aa\n case 'CCC132': // sign u\n return 'Below';\n\n case 'CCC130': // sign i\n return 'Above';\n }\n\n return combiningClass;\n }\n}\n","import BBox from '../glyph/BBox';\nimport * as Script from '../layout/Script';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n constructor(glyphs, features, script, language, direction) {\n /**\n * An array of Glyph objects in the run\n * @type {Glyph[]}\n */\n this.glyphs = glyphs;\n\n /**\n * An array of GlyphPosition objects for each glyph in the run\n * @type {GlyphPosition[]}\n */\n this.positions = null;\n\n /**\n * The script that was requested for shaping. This was either passed in or detected automatically.\n * @type {string}\n */\n this.script = script;\n\n /**\n * The language requested for shaping, as passed in. If `null`, the default language for the\n * script was used.\n * @type {string}\n */\n this.language = language || null;\n\n /**\n * The direction requested for shaping, as passed in (either ltr or rtl).\n * If `null`, the default direction of the script is used.\n * @type {string}\n */\n this.direction = direction || Script.direction(script);\n\n /**\n * The features requested during shaping. This is a combination of user\n * specified features and features chosen by the shaper.\n * @type {object}\n */\n this.features = {};\n\n // Convert features to an object\n if (Array.isArray(features)) {\n for (let tag of features) {\n this.features[tag] = true;\n }\n } else if (typeof features === 'object') {\n this.features = features;\n }\n }\n\n /**\n * The total advance width of the run.\n * @type {number}\n */\n get advanceWidth() {\n let width = 0;\n for (let position of this.positions) {\n width += position.xAdvance;\n }\n\n return width;\n }\n\n /**\n * The total advance height of the run.\n * @type {number}\n */\n get advanceHeight() {\n let height = 0;\n for (let position of this.positions) {\n height += position.yAdvance;\n }\n\n return height;\n }\n\n /**\n * The bounding box containing all glyphs in the run.\n * @type {BBox}\n */\n get bbox() {\n let bbox = new BBox;\n\n let x = 0;\n let y = 0;\n for (let index = 0; index < this.glyphs.length; index++) {\n let glyph = this.glyphs[index];\n let p = this.positions[index];\n let b = glyph.bbox;\n\n bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n x += p.xAdvance;\n y += p.yAdvance;\n }\n\n return bbox;\n }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n /**\n * The minimum X position in the bounding box\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * The minimum Y position in the bounding box\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * The maxmimum X position in the bounding box\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * The maxmimum Y position in the bounding box\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * The width of the bounding box\n * @type {number}\n */\n get width() {\n return this.maxX - this.minX;\n }\n\n /**\n * The height of the bounding box\n * @type {number}\n */\n get height() {\n return this.maxY - this.minY;\n }\n\n addPoint(x, y) {\n if (Math.abs(x) !== Infinity) {\n if (x < this.minX) {\n this.minX = x;\n }\n\n if (x > this.maxX) {\n this.maxX = x;\n }\n }\n\n if (Math.abs(y) !== Infinity) {\n if (y < this.minY) {\n this.minY = y;\n }\n\n if (y > this.maxY) {\n this.maxY = y;\n }\n }\n }\n\n copy() {\n return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n }\n}\n","import {getScript} from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n Caucasian_Albanian: 'aghb',\n Arabic: 'arab',\n Imperial_Aramaic: 'armi',\n Armenian: 'armn',\n Avestan: 'avst',\n Balinese: 'bali',\n Bamum: 'bamu',\n Bassa_Vah: 'bass',\n Batak: 'batk',\n Bengali: ['bng2', 'beng'],\n Bopomofo: 'bopo',\n Brahmi: 'brah',\n Braille: 'brai',\n Buginese: 'bugi',\n Buhid: 'buhd',\n Chakma: 'cakm',\n Canadian_Aboriginal: 'cans',\n Carian: 'cari',\n Cham: 'cham',\n Cherokee: 'cher',\n Coptic: 'copt',\n Cypriot: 'cprt',\n Cyrillic: 'cyrl',\n Devanagari: ['dev2', 'deva'],\n Deseret: 'dsrt',\n Duployan: 'dupl',\n Egyptian_Hieroglyphs: 'egyp',\n Elbasan: 'elba',\n Ethiopic: 'ethi',\n Georgian: 'geor',\n Glagolitic: 'glag',\n Gothic: 'goth',\n Grantha: 'gran',\n Greek: 'grek',\n Gujarati: ['gjr2', 'gujr'],\n Gurmukhi: ['gur2', 'guru'],\n Hangul: 'hang',\n Han: 'hani',\n Hanunoo: 'hano',\n Hebrew: 'hebr',\n Hiragana: 'hira',\n Pahawh_Hmong: 'hmng',\n Katakana_Or_Hiragana: 'hrkt',\n Old_Italic: 'ital',\n Javanese: 'java',\n Kayah_Li: 'kali',\n Katakana: 'kana',\n Kharoshthi: 'khar',\n Khmer: 'khmr',\n Khojki: 'khoj',\n Kannada: ['knd2', 'knda'],\n Kaithi: 'kthi',\n Tai_Tham: 'lana',\n Lao: 'lao ',\n Latin: 'latn',\n Lepcha: 'lepc',\n Limbu: 'limb',\n Linear_A: 'lina',\n Linear_B: 'linb',\n Lisu: 'lisu',\n Lycian: 'lyci',\n Lydian: 'lydi',\n Mahajani: 'mahj',\n Mandaic: 'mand',\n Manichaean: 'mani',\n Mende_Kikakui: 'mend',\n Meroitic_Cursive: 'merc',\n Meroitic_Hieroglyphs: 'mero',\n Malayalam: ['mlm2', 'mlym'],\n Modi: 'modi',\n Mongolian: 'mong',\n Mro: 'mroo',\n Meetei_Mayek: 'mtei',\n Myanmar: ['mym2', 'mymr'],\n Old_North_Arabian: 'narb',\n Nabataean: 'nbat',\n Nko: 'nko ',\n Ogham: 'ogam',\n Ol_Chiki: 'olck',\n Old_Turkic: 'orkh',\n Oriya: ['ory2', 'orya'],\n Osmanya: 'osma',\n Palmyrene: 'palm',\n Pau_Cin_Hau: 'pauc',\n Old_Permic: 'perm',\n Phags_Pa: 'phag',\n Inscriptional_Pahlavi: 'phli',\n Psalter_Pahlavi: 'phlp',\n Phoenician: 'phnx',\n Miao: 'plrd',\n Inscriptional_Parthian: 'prti',\n Rejang: 'rjng',\n Runic: 'runr',\n Samaritan: 'samr',\n Old_South_Arabian: 'sarb',\n Saurashtra: 'saur',\n Shavian: 'shaw',\n Sharada: 'shrd',\n Siddham: 'sidd',\n Khudawadi: 'sind',\n Sinhala: 'sinh',\n Sora_Sompeng: 'sora',\n Sundanese: 'sund',\n Syloti_Nagri: 'sylo',\n Syriac: 'syrc',\n Tagbanwa: 'tagb',\n Takri: 'takr',\n Tai_Le: 'tale',\n New_Tai_Lue: 'talu',\n Tamil: ['tml2', 'taml'],\n Tai_Viet: 'tavt',\n Telugu: ['tel2', 'telu'],\n Tifinagh: 'tfng',\n Tagalog: 'tglg',\n Thaana: 'thaa',\n Thai: 'thai',\n Tibetan: 'tibt',\n Tirhuta: 'tirh',\n Ugaritic: 'ugar',\n Vai: 'vai ',\n Warang_Citi: 'wara',\n Old_Persian: 'xpeo',\n Cuneiform: 'xsux',\n Yi: 'yi ',\n Inherited: 'zinh',\n Common: 'zyyy',\n Unknown: 'zzzz'\n};\n\nconst OPENTYPE_SCRIPTS = {};\nfor (let script in UNICODE_SCRIPTS) {\n let tag = UNICODE_SCRIPTS[script];\n if (Array.isArray(tag)) {\n for (let t of tag) {\n OPENTYPE_SCRIPTS[t] = script;\n }\n } else {\n OPENTYPE_SCRIPTS[tag] = script;\n }\n}\n\nexport function fromUnicode(script) {\n return UNICODE_SCRIPTS[script];\n}\n\nexport function fromOpenType(tag) {\n return OPENTYPE_SCRIPTS[tag];\n}\n\nexport function forString(string) {\n let len = string.length;\n let idx = 0;\n while (idx < len) {\n let code = string.charCodeAt(idx++);\n\n // Check if this is a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n\n // Check if this is a low surrogate\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n }\n }\n\n let script = getScript(code);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n let codePoint = codePoints[i];\n let script = getScript(codePoint);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n arab: true, // Arabic\n hebr: true, // Hebrew\n syrc: true, // Syriac\n thaa: true, // Thaana\n cprt: true, // Cypriot Syllabary\n khar: true, // Kharosthi\n phnx: true, // Phoenician\n 'nko ': true, // N'Ko\n lydi: true, // Lydian\n avst: true, // Avestan\n armi: true, // Imperial Aramaic\n phli: true, // Inscriptional Pahlavi\n prti: true, // Inscriptional Parthian\n sarb: true, // Old South Arabian\n orkh: true, // Old Turkic, Orkhon Runic\n samr: true, // Samaritan\n mand: true, // Mandaic, Mandaean\n merc: true, // Meroitic Cursive\n mero: true, // Meroitic Hieroglyphs\n\n // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n mani: true, // Manichaean\n mend: true, // Mende Kikakui\n nbat: true, // Nabataean\n narb: true, // Old North Arabian\n palm: true, // Palmyrene\n phlp: true // Psalter Pahlavi\n};\n\nexport function direction(script) {\n if (RTL[script]) {\n return 'rtl';\n }\n\n return 'ltr';\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n /**\n * The amount to move the virtual pen in the X direction after rendering this glyph.\n * @type {number}\n */\n this.xAdvance = xAdvance;\n\n /**\n * The amount to move the virtual pen in the Y direction after rendering this glyph.\n * @type {number}\n */\n this.yAdvance = yAdvance;\n\n /**\n * The offset from the pen position in the X direction at which to render this glyph.\n * @type {number}\n */\n this.xOffset = xOffset;\n\n /**\n * The offset from the pen position in the Y direction at which to render this glyph.\n * @type {number}\n */\n this.yOffset = yOffset;\n }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n constructor(font) {\n this.font = font;\n this.morxProcessor = new AATMorxProcessor(font);\n this.fallbackPosition = false;\n }\n\n substitute(glyphRun) {\n // AAT expects the glyphs to be in visual order prior to morx processing,\n // so reverse the glyphs if the script is right-to-left.\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n }\n\n this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features));\n }\n\n getAvailableFeatures(script, language) {\n return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n }\n\n stringsForGlyph(gid) {\n let glyphStrings = this.morxProcessor.generateInputs(gid);\n let result = new Set;\n\n for (let glyphs of glyphStrings) {\n this._addStrings(glyphs, 0, result, '');\n }\n\n return result;\n }\n\n _addStrings(glyphs, index, strings, string) {\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n for (let codePoint of codePoints) {\n let s = string + String.fromCodePoint(codePoint);\n if (index < glyphs.length - 1) {\n this._addStrings(glyphs, index + 1, strings, s);\n } else {\n strings.add(s);\n }\n }\n }\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n allTypographicFeatures: {\n code: 0,\n exclusive: false,\n allTypeFeatures: 0\n },\n ligatures: {\n code: 1,\n exclusive: false,\n requiredLigatures: 0,\n commonLigatures: 2,\n rareLigatures: 4,\n // logos: 6\n rebusPictures: 8,\n diphthongLigatures: 10,\n squaredLigatures: 12,\n abbrevSquaredLigatures: 14,\n symbolLigatures: 16,\n contextualLigatures: 18,\n historicalLigatures: 20\n },\n cursiveConnection: {\n code: 2,\n exclusive: true,\n unconnected: 0,\n partiallyConnected: 1,\n cursive: 2\n },\n letterCase: {\n code: 3,\n exclusive: true\n },\n // upperAndLowerCase: 0 # deprecated\n // allCaps: 1 # deprecated\n // allLowerCase: 2 # deprecated\n // smallCaps: 3 # deprecated\n // initialCaps: 4 # deprecated\n // initialCapsAndSmallCaps: 5 # deprecated\n verticalSubstitution: {\n code: 4,\n exclusive: false,\n substituteVerticalForms: 0\n },\n linguisticRearrangement: {\n code: 5,\n exclusive: false,\n linguisticRearrangement: 0\n },\n numberSpacing: {\n code: 6,\n exclusive: true,\n monospacedNumbers: 0,\n proportionalNumbers: 1,\n thirdWidthNumbers: 2,\n quarterWidthNumbers: 3\n },\n smartSwash: {\n code: 8,\n exclusive: false,\n wordInitialSwashes: 0,\n wordFinalSwashes: 2,\n // lineInitialSwashes: 4\n // lineFinalSwashes: 6\n nonFinalSwashes: 8\n },\n diacritics: {\n code: 9,\n exclusive: true,\n showDiacritics: 0,\n hideDiacritics: 1,\n decomposeDiacritics: 2\n },\n verticalPosition: {\n code: 10,\n exclusive: true,\n normalPosition: 0,\n superiors: 1,\n inferiors: 2,\n ordinals: 3,\n scientificInferiors: 4\n },\n fractions: {\n code: 11,\n exclusive: true,\n noFractions: 0,\n verticalFractions: 1,\n diagonalFractions: 2\n },\n overlappingCharacters: {\n code: 13,\n exclusive: false,\n preventOverlap: 0\n },\n typographicExtras: {\n code: 14,\n exclusive: false,\n // hyphensToEmDash: 0\n // hyphenToEnDash: 2\n slashedZero: 4\n },\n // formInterrobang: 6\n // smartQuotes: 8\n // periodsToEllipsis: 10\n mathematicalExtras: {\n code: 15,\n exclusive: false,\n // hyphenToMinus: 0\n // asteristoMultiply: 2\n // slashToDivide: 4\n // inequalityLigatures: 6\n // exponents: 8\n mathematicalGreek: 10\n },\n ornamentSets: {\n code: 16,\n exclusive: true,\n noOrnaments: 0,\n dingbats: 1,\n piCharacters: 2,\n fleurons: 3,\n decorativeBorders: 4,\n internationalSymbols: 5,\n mathSymbols: 6\n },\n characterAlternatives: {\n code: 17,\n exclusive: true,\n noAlternates: 0\n },\n // user defined options\n designComplexity: {\n code: 18,\n exclusive: true,\n designLevel1: 0,\n designLevel2: 1,\n designLevel3: 2,\n designLevel4: 3,\n designLevel5: 4\n },\n styleOptions: {\n code: 19,\n exclusive: true,\n noStyleOptions: 0,\n displayText: 1,\n engravedText: 2,\n illuminatedCaps: 3,\n titlingCaps: 4,\n tallCaps: 5\n },\n characterShape: {\n code: 20,\n exclusive: true,\n traditionalCharacters: 0,\n simplifiedCharacters: 1,\n JIS1978Characters: 2,\n JIS1983Characters: 3,\n JIS1990Characters: 4,\n traditionalAltOne: 5,\n traditionalAltTwo: 6,\n traditionalAltThree: 7,\n traditionalAltFour: 8,\n traditionalAltFive: 9,\n expertCharacters: 10,\n JIS2004Characters: 11,\n hojoCharacters: 12,\n NLCCharacters: 13,\n traditionalNamesCharacters: 14\n },\n numberCase: {\n code: 21,\n exclusive: true,\n lowerCaseNumbers: 0,\n upperCaseNumbers: 1\n },\n textSpacing: {\n code: 22,\n exclusive: true,\n proportionalText: 0,\n monospacedText: 1,\n halfWidthText: 2,\n thirdWidthText: 3,\n quarterWidthText: 4,\n altProportionalText: 5,\n altHalfWidthText: 6\n },\n transliteration: {\n code: 23,\n exclusive: true,\n noTransliteration: 0\n },\n // hanjaToHangul: 1\n // hiraganaToKatakana: 2\n // katakanaToHiragana: 3\n // kanaToRomanization: 4\n // romanizationToHiragana: 5\n // romanizationToKatakana: 6\n // hanjaToHangulAltOne: 7\n // hanjaToHangulAltTwo: 8\n // hanjaToHangulAltThree: 9\n annotation: {\n code: 24,\n exclusive: true,\n noAnnotation: 0,\n boxAnnotation: 1,\n roundedBoxAnnotation: 2,\n circleAnnotation: 3,\n invertedCircleAnnotation: 4,\n parenthesisAnnotation: 5,\n periodAnnotation: 6,\n romanNumeralAnnotation: 7,\n diamondAnnotation: 8,\n invertedBoxAnnotation: 9,\n invertedRoundedBoxAnnotation: 10\n },\n kanaSpacing: {\n code: 25,\n exclusive: true,\n fullWidthKana: 0,\n proportionalKana: 1\n },\n ideographicSpacing: {\n code: 26,\n exclusive: true,\n fullWidthIdeographs: 0,\n proportionalIdeographs: 1,\n halfWidthIdeographs: 2\n },\n unicodeDecomposition: {\n code: 27,\n exclusive: false,\n canonicalComposition: 0,\n compatibilityComposition: 2,\n transcodingComposition: 4\n },\n rubyKana: {\n code: 28,\n exclusive: false,\n // noRubyKana: 0 # deprecated - use rubyKanaOff instead\n // rubyKana: 1 # deprecated - use rubyKanaOn instead\n rubyKana: 2\n },\n CJKSymbolAlternatives: {\n code: 29,\n exclusive: true,\n noCJKSymbolAlternatives: 0,\n CJKSymbolAltOne: 1,\n CJKSymbolAltTwo: 2,\n CJKSymbolAltThree: 3,\n CJKSymbolAltFour: 4,\n CJKSymbolAltFive: 5\n },\n ideographicAlternatives: {\n code: 30,\n exclusive: true,\n noIdeographicAlternatives: 0,\n ideographicAltOne: 1,\n ideographicAltTwo: 2,\n ideographicAltThree: 3,\n ideographicAltFour: 4,\n ideographicAltFive: 5\n },\n CJKVerticalRomanPlacement: {\n code: 31,\n exclusive: true,\n CJKVerticalRomanCentered: 0,\n CJKVerticalRomanHBaseline: 1\n },\n italicCJKRoman: {\n code: 32,\n exclusive: false,\n // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead\n // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead\n CJKItalicRoman: 2\n },\n caseSensitiveLayout: {\n code: 33,\n exclusive: false,\n caseSensitiveLayout: 0,\n caseSensitiveSpacing: 2\n },\n alternateKana: {\n code: 34,\n exclusive: false,\n alternateHorizKana: 0,\n alternateVertKana: 2\n },\n stylisticAlternatives: {\n code: 35,\n exclusive: false,\n noStylisticAlternates: 0,\n stylisticAltOne: 2,\n stylisticAltTwo: 4,\n stylisticAltThree: 6,\n stylisticAltFour: 8,\n stylisticAltFive: 10,\n stylisticAltSix: 12,\n stylisticAltSeven: 14,\n stylisticAltEight: 16,\n stylisticAltNine: 18,\n stylisticAltTen: 20,\n stylisticAltEleven: 22,\n stylisticAltTwelve: 24,\n stylisticAltThirteen: 26,\n stylisticAltFourteen: 28,\n stylisticAltFifteen: 30,\n stylisticAltSixteen: 32,\n stylisticAltSeventeen: 34,\n stylisticAltEighteen: 36,\n stylisticAltNineteen: 38,\n stylisticAltTwenty: 40\n },\n contextualAlternates: {\n code: 36,\n exclusive: false,\n contextualAlternates: 0,\n swashAlternates: 2,\n contextualSwashAlternates: 4\n },\n lowerCase: {\n code: 37,\n exclusive: true,\n defaultLowerCase: 0,\n lowerCaseSmallCaps: 1,\n lowerCasePetiteCaps: 2\n },\n upperCase: {\n code: 38,\n exclusive: true,\n defaultUpperCase: 0,\n upperCaseSmallCaps: 1,\n upperCasePetiteCaps: 2\n },\n languageTag: { // indices into ltag table\n code: 39,\n exclusive: true\n },\n CJKRomanSpacing: {\n code: 103,\n exclusive: true,\n halfWidthCJKRoman: 0,\n proportionalCJKRoman: 1,\n defaultCJKRoman: 2,\n fullWidthCJKRoman: 3\n }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n rlig: feature('ligatures', 'requiredLigatures'),\n clig: feature('ligatures', 'contextualLigatures'),\n dlig: feature('ligatures', 'rareLigatures'),\n hlig: feature('ligatures', 'historicalLigatures'),\n liga: feature('ligatures', 'commonLigatures'),\n hist: feature('ligatures', 'historicalLigatures'), // ??\n\n smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n frac: feature('fractions', 'diagonalFractions'),\n dnom: feature('fractions', 'diagonalFractions'), // ??\n numr: feature('fractions', 'diagonalFractions'), // ??\n afrc: feature('fractions', 'verticalFractions'),\n // aalt\n // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n // unic, vatu, vhal, vjmo, vpal, vrt2\n // dist -> trak table?\n // kern, vkrn -> kern table\n // lfbd + opbd + rtbd -> opbd table?\n // mark, mkmk -> acnt table?\n // locl -> languageTag + ltag table\n\n case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n swsh: feature('contextualAlternates', 'swashAlternates'),\n cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n curs: feature('cursiveConnection', 'cursive'), // ??\n c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n init: feature('smartSwash', 'wordInitialSwashes'), // ??\n fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n pkna: feature('kanaSpacing', 'proportionalKana'),\n half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n halt: feature('textSpacing', 'altHalfWidthText'),\n\n hkna: feature('alternateKana', 'alternateHorizKana'),\n vkna: feature('alternateKana', 'alternateVertKana'),\n // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n lnum: feature('numberCase', 'upperCaseNumbers'),\n onum: feature('numberCase', 'lowerCaseNumbers'),\n mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n // nalt: not enough info. what type of annotation?\n // ornm: ditto, which ornament style?\n\n calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n tnum: feature('numberSpacing', 'monospacedNumbers'),\n pnum: feature('numberSpacing', 'proportionalNumbers'),\n sups: feature('verticalPosition', 'superiors'),\n subs: feature('verticalPosition', 'inferiors'),\n ordn: feature('verticalPosition', 'ordinals'),\n pwid: feature('textSpacing', 'proportionalText'),\n hwid: feature('textSpacing', 'halfWidthText'),\n qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n fwid: feature('textSpacing', 'proportionalText'), //??\n palt: feature('textSpacing', 'altProportionalText'),\n trad: feature('characterShape', 'traditionalCharacters'),\n smpl: feature('characterShape', 'simplifiedCharacters'),\n jp78: feature('characterShape', 'JIS1978Characters'),\n jp83: feature('characterShape', 'JIS1983Characters'),\n jp90: feature('characterShape', 'JIS1990Characters'),\n jp04: feature('characterShape', 'JIS2004Characters'),\n expt: feature('characterShape', 'expertCharacters'),\n hojo: feature('characterShape', 'hojoCharacters'),\n nlck: feature('characterShape', 'NLCCharacters'),\n tnam: feature('characterShape', 'traditionalNamesCharacters'),\n ruby: feature('rubyKana', 'rubyKana'),\n titl: feature('styleOptions', 'titlingCaps'),\n zero: feature('typographicExtras', 'slashedZero'),\n\n ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n let aat = OTMapping[ot];\n if (AATMapping[aat[0]] == null) {\n AATMapping[aat[0]] = {};\n }\n\n AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n let res = {};\n for (let k in features) {\n let r;\n if (r = OTMapping[k]) {\n if (res[r[0]] == null) {\n res[r[0]] = {};\n }\n\n res[r[0]][r[1]] = features[k];\n }\n }\n\n return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n let [type, setting] = f;\n if (isNaN(type)) {\n var typeCode = features[type] && features[type].code;\n } else {\n var typeCode = type;\n }\n\n if (isNaN(setting)) {\n var settingCode = features[type] && features[type][setting];\n } else {\n var settingCode = setting;\n }\n\n return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n let res = {};\n if (Array.isArray(features)) {\n for (let k = 0; k < features.length; k++) {\n let r;\n let f = mapFeatureStrings(features[k]);\n if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n res[r] = true;\n }\n }\n\n } else if (typeof features === 'object') {\n for (let type in features) {\n let feature = features[type];\n for (let setting in feature) {\n let r;\n let f = mapFeatureStrings([type, setting]);\n if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n res[r] = true;\n }\n }\n }\n }\n\n return Object.keys(res);\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST = 0x2000;\nconst VERB = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK = 0x80000000;\nconst STORE_MASK = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY = 0x800000;\nconst REVERSE_DIRECTION = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE = 0x1000;\nconst CURRENT_INSERT_BEFORE = 0x0800;\nconst MARKED_INSERT_BEFORE = 0x0400;\nconst CURRENT_INSERT_COUNT = 0x03E0;\nconst MARKED_INSERT_COUNT = 0x001F;\n\nexport default class AATMorxProcessor {\n constructor(font) {\n this.processIndicRearragement = this.processIndicRearragement.bind(this);\n this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n this.processLigature = this.processLigature.bind(this);\n this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n this.font = font;\n this.morx = font.morx;\n this.inputCache = null;\n }\n\n // Processes an array of glyphs and applies the specified features\n // Features should be in the form of {featureType:{featureSetting:boolean}}\n process(glyphs, features = {}) {\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n // enable/disable the requested features\n for (let feature of chain.features) {\n let f;\n if (f = features[feature.featureType]) {\n if (f[feature.featureSetting]) {\n flags &= feature.disableFlags;\n flags |= feature.enableFlags;\n } else if (f[feature.featureSetting] === false) {\n flags |= ~feature.disableFlags;\n flags &= ~feature.enableFlags;\n }\n }\n }\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.processSubtable(subtable, glyphs);\n }\n }\n }\n\n // remove deleted glyphs\n let index = glyphs.length - 1;\n while (index >= 0) {\n if (glyphs[index].id === 0xffff) {\n glyphs.splice(index, 1);\n }\n\n index--;\n }\n\n return glyphs;\n }\n\n processSubtable(subtable, glyphs) {\n this.subtable = subtable;\n this.glyphs = glyphs;\n if (this.subtable.type === 4) {\n this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n return;\n }\n\n this.ligatureStack = [];\n this.markedGlyph = null;\n this.firstGlyph = null;\n this.lastGlyph = null;\n this.markedIndex = null;\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n return stateMachine.process(this.glyphs, reverse, process);\n }\n\n @cache\n getStateMachine(subtable) {\n return new AATStateMachine(subtable.table.stateTable);\n }\n\n getProcessor() {\n switch (this.subtable.type) {\n case 0:\n return this.processIndicRearragement;\n case 1:\n return this.processContextualSubstitution;\n case 2:\n return this.processLigature;\n case 4:\n return this.processNoncontextualSubstitutions;\n case 5:\n return this.processGlyphInsertion;\n default:\n throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n }\n }\n\n processIndicRearragement(glyph, entry, index) {\n if (entry.flags & MARK_FIRST) {\n this.firstGlyph = index;\n }\n\n if (entry.flags & MARK_LAST) {\n this.lastGlyph = index;\n }\n\n reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n }\n\n processContextualSubstitution(glyph, entry, index) {\n let subsitutions = this.subtable.table.substitutionTable.items;\n if (entry.markIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.markIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[this.markedGlyph];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.currentIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.currentIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[index];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.flags & SET_MARK) {\n this.markedGlyph = index;\n }\n }\n\n processLigature(glyph, entry, index) {\n if (entry.flags & SET_COMPONENT) {\n this.ligatureStack.push(index);\n }\n\n if (entry.flags & PERFORM_ACTION) {\n let actions = this.subtable.table.ligatureActions;\n let components = this.subtable.table.components;\n let ligatureList = this.subtable.table.ligatureList;\n\n let actionIndex = entry.action;\n let last = false;\n let ligatureIndex = 0;\n let codePoints = [];\n let ligatureGlyphs = [];\n\n while (!last) {\n let componentGlyph = this.ligatureStack.pop();\n codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n let action = actions.getItem(actionIndex++);\n last = !!(action & LAST_MASK);\n let store = !!(action & STORE_MASK);\n let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n offset += this.glyphs[componentGlyph].id;\n\n let component = components.getItem(offset);\n ligatureIndex += component;\n\n if (last || store) {\n let ligatureEntry = ligatureList.getItem(ligatureIndex);\n this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n ligatureGlyphs.push(componentGlyph);\n ligatureIndex = 0;\n codePoints = [];\n } else {\n this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n }\n }\n\n // Put ligature glyph indexes back on the stack\n this.ligatureStack.push(...ligatureGlyphs);\n }\n }\n\n processNoncontextualSubstitutions(subtable, glyphs, index) {\n let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n for (index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.id !== 0xffff) {\n let gid = lookupTable.lookup(glyph.id);\n if (gid) { // 0 means do nothing\n glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n }\n }\n\n _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n let insertions = [];\n while (count--) {\n let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n insertions.push(this.font.getGlyph(gid));\n }\n\n if (!isBefore) {\n glyphIndex++;\n }\n\n this.glyphs.splice(glyphIndex, 0, ...insertions);\n }\n\n processGlyphInsertion(glyph, entry, index) {\n if (entry.flags & SET_MARK) {\n this.markedIndex = index;\n }\n\n if (entry.markedInsertIndex !== 0xffff) {\n let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n }\n\n if (entry.currentInsertIndex !== 0xffff) {\n let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n }\n }\n\n getSupportedFeatures() {\n let features = [];\n for (let chain of this.morx.chains) {\n for (let feature of chain.features) {\n features.push([feature.featureType, feature.featureSetting]);\n }\n }\n\n return features;\n }\n\n generateInputs(gid) {\n if (!this.inputCache) {\n this.generateInputCache();\n }\n\n return this.inputCache[gid] || [];\n }\n\n generateInputCache() {\n this.inputCache = {};\n\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.generateInputsForSubtable(subtable);\n }\n }\n }\n }\n\n generateInputsForSubtable(subtable) {\n // Currently, only supporting ligature subtables.\n if (subtable.type !== 2) {\n return;\n }\n\n let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n if (reverse) {\n throw new Error('Reverse subtable, not supported.');\n }\n\n this.subtable = subtable;\n this.ligatureStack = [];\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let input = [];\n let stack = [];\n this.glyphs = [];\n\n stateMachine.traverse({\n enter: (glyph, entry) => {\n let glyphs = this.glyphs;\n stack.push({\n glyphs: glyphs.slice(),\n ligatureStack: this.ligatureStack.slice()\n });\n\n // Add glyph to input and glyphs to process.\n let g = this.font.getGlyph(glyph);\n input.push(g);\n glyphs.push(input[input.length - 1]);\n\n // Process ligature substitution\n process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n // Add input to result if only one matching (non-deleted) glyph remains.\n let count = 0;\n let found = 0;\n for (let i = 0; i < glyphs.length && count <= 1; i++) {\n if (glyphs[i].id !== 0xffff) {\n count++;\n found = glyphs[i].id;\n }\n }\n\n if (count === 1) {\n let result = input.map(g => g.id);\n let cache = this.inputCache[found];\n if (cache) {\n cache.push(result);\n } else {\n this.inputCache[found] = [result];\n }\n }\n },\n\n exit: () => {\n ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n input.pop();\n }\n });\n }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n if (reverseB) {\n end.reverse();\n }\n\n let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n if (reverseA) {\n start.reverse();\n }\n\n glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n let length = lastGlyph - firstGlyph + 1;\n switch (verb) {\n case 0: // no change\n return glyphs;\n\n case 1: // Ax => xA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n case 2: // xD => Dx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n case 3: // AxD => DxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n case 4: // ABx => xAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n case 5: // ABx => xBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n case 6: // xCD => CDx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n case 7: // xCD => DCx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n case 8: // AxCD => CDxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n case 9: // AxCD => DCxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n case 10: // ABxD => DxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n case 11: // ABxD => DxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n case 12: // ABxCD => CDxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n case 13: // ABxCD => CDxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n case 14: // ABxCD => DCxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n case 15: // ABxCD => DCxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n default:\n throw new Error(`Unknown verb: ${verb}`);\n }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n constructor(stateTable) {\n this.stateTable = stateTable;\n this.lookupTable = new AATLookupTable(stateTable.classTable);\n }\n\n process(glyphs, reverse, processEntry) {\n let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n let index = reverse ? glyphs.length - 1 : 0;\n let dir = reverse ? -1 : 1;\n\n while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n let glyph = null;\n let classCode = OUT_OF_BOUNDS_CLASS;\n let shouldAdvance = true;\n\n if (index === glyphs.length || index === -1) {\n classCode = END_OF_TEXT_CLASS;\n } else {\n glyph = glyphs[index];\n if (glyph.id === 0xffff) { // deleted glyph\n classCode = DELETED_GLYPH_CLASS;\n } else {\n classCode = this.lookupTable.lookup(glyph.id);\n if (classCode == null) {\n classCode = OUT_OF_BOUNDS_CLASS;\n }\n }\n }\n\n let row = this.stateTable.stateArray.getItem(currentState);\n let entryIndex = row[classCode];\n let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {\n processEntry(glyph, entry, index);\n shouldAdvance = !(entry.flags & DONT_ADVANCE);\n }\n\n currentState = entry.newState;\n if (shouldAdvance) {\n index += dir;\n }\n }\n\n return glyphs;\n }\n\n /**\n * Performs a depth-first traversal of the glyph strings\n * represented by the state machine.\n */\n traverse(opts, state = 0, visited = new Set) {\n if (visited.has(state)) {\n return;\n }\n\n visited.add(state);\n\n let {nClasses, stateArray, entryTable} = this.stateTable;\n let row = stateArray.getItem(state);\n\n // Skip predefined classes\n for (let classCode = 4; classCode < nClasses; classCode++) {\n let entryIndex = row[classCode];\n let entry = entryTable.getItem(entryIndex);\n\n // Try all glyphs in the class\n for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n if (opts.enter) {\n opts.enter(glyph, entry);\n }\n\n if (entry.newState !== 0) {\n this.traverse(opts, entry.newState, visited);\n }\n\n if (opts.exit) {\n opts.exit(glyph, entry);\n }\n }\n }\n }\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n constructor(table) {\n this.table = table;\n }\n\n lookup(glyph) {\n switch (this.table.version) {\n case 0: // simple array format\n return this.table.values.getItem(glyph);\n\n case 2: // segment format\n case 4: {\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.firstGlyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.firstGlyph) {\n max = mid - 1;\n } else if (glyph > seg.lastGlyph) {\n min = mid + 1;\n } else {\n if (this.table.version === 2) {\n return seg.value;\n } else {\n return seg.values[glyph - seg.firstGlyph];\n }\n }\n }\n\n return null;\n }\n\n case 6: { // lookup single\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.glyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.glyph) {\n max = mid - 1;\n } else if (glyph > seg.glyph) {\n min = mid + 1;\n } else {\n return seg.value;\n }\n }\n\n return null;\n }\n\n case 8: // lookup trimmed\n return this.table.values[glyph - this.table.firstGlyph];\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n }\n\n @cache\n glyphsForValue(classValue) {\n let res = [];\n\n switch (this.table.version) {\n case 2: // segment format\n case 4: {\n for (let segment of this.table.segments) {\n if ((this.table.version === 2 && segment.value === classValue)) {\n res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n } else {\n for (let index = 0; index < segment.values.length; index++) {\n if (segment.values[index] === classValue) {\n res.push(segment.firstGlyph + index);\n }\n }\n }\n }\n\n break;\n }\n\n case 6: { // lookup single\n for (let segment of this.table.segments) {\n if (segment.value === classValue) {\n res.push(segment.glyph);\n }\n }\n\n break;\n }\n\n case 8: { // lookup trimmed\n for (let i = 0; i < this.table.values.length; i++) {\n if (this.table.values[i] === classValue) {\n res.push(this.table.firstGlyph + i);\n }\n }\n\n break;\n }\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n\n return res;\n }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n constructor(font) {\n this.font = font;\n this.glyphInfos = null;\n this.plan = null;\n this.GSUBProcessor = null;\n this.GPOSProcessor = null;\n this.fallbackPosition = true;\n\n if (font.GSUB) {\n this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n }\n\n if (font.GPOS) {\n this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n }\n }\n\n setup(glyphRun) {\n // Map glyphs to GlyphInfo objects so data can be passed between\n // GSUB and GPOS without mutating the real (shared) Glyph objects.\n this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n // Select a script based on what is available in GSUB/GPOS.\n let script = null;\n if (this.GPOSProcessor) {\n script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n if (this.GSUBProcessor) {\n script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n // Choose a shaper based on the script, and setup a shaping plan.\n // This determines which features to apply to which glyphs.\n this.shaper = Shapers.choose(script);\n this.plan = new ShapingPlan(this.font, script, glyphRun.direction);\n this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features);\n\n // Assign chosen features to output glyph run\n for (let key in this.plan.allFeatures) {\n glyphRun.features[key] = true;\n }\n }\n\n substitute(glyphRun) {\n if (this.GSUBProcessor) {\n this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n // Map glyph infos back to normal Glyph objects\n glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n }\n }\n\n position(glyphRun) {\n if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n if (this.GPOSProcessor) {\n this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);\n }\n\n if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n // Reverse the glyphs and positions if the script is right-to-left\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n glyphRun.positions.reverse();\n }\n\n return this.GPOSProcessor && this.GPOSProcessor.features;\n }\n\n zeroMarkAdvances(positions) {\n for (let i = 0; i < this.glyphInfos.length; i++) {\n if (this.glyphInfos[i].isMark) {\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n cleanup() {\n this.glyphInfos = null;\n this.plan = null;\n this.shaper = null;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.GSUBProcessor) {\n this.GSUBProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GSUBProcessor.features));\n }\n\n if (this.GPOSProcessor) {\n this.GPOSProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GPOSProcessor.features));\n }\n\n return features;\n }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n constructor(font, script, direction) {\n this.font = font;\n this.script = script;\n this.direction = direction;\n this.stages = [];\n this.globalFeatures = {};\n this.allFeatures = {};\n }\n\n /**\n * Adds the given features to the last stage.\n * Ignores features that have already been applied.\n */\n _addFeatures(features, global) {\n let stageIndex = this.stages.length - 1;\n let stage = this.stages[stageIndex];\n for (let feature of features) {\n if (this.allFeatures[feature] == null) {\n stage.push(feature);\n this.allFeatures[feature] = stageIndex;\n\n if (global) {\n this.globalFeatures[feature] = true;\n }\n }\n }\n }\n\n /**\n * Add features to the last stage\n */\n add(arg, global = true) {\n if (this.stages.length === 0) {\n this.stages.push([]);\n }\n\n if (typeof arg === 'string') {\n arg = [arg];\n }\n\n if (Array.isArray(arg)) {\n this._addFeatures(arg, global);\n } else if (typeof arg === 'object') {\n this._addFeatures(arg.global || [], true);\n this._addFeatures(arg.local || [], false);\n } else {\n throw new Error(\"Unsupported argument to ShapingPlan#add\");\n }\n }\n\n /**\n * Add a new stage\n */\n addStage(arg, global) {\n if (typeof arg === 'function') {\n this.stages.push(arg, []);\n } else {\n this.stages.push([]);\n this.add(arg, global);\n }\n }\n\n setFeatureOverrides(features) {\n if (Array.isArray(features)) {\n this.add(features);\n } else if (typeof features === 'object') {\n for (let tag in features) {\n if (features[tag]) {\n this.add(tag);\n } else if (this.allFeatures[tag] != null) {\n let stage = this.stages[this.allFeatures[tag]];\n stage.splice(stage.indexOf(tag), 1);\n delete this.allFeatures[tag];\n delete this.globalFeatures[tag];\n }\n }\n }\n }\n\n /**\n * Assigns the global features to the given glyphs\n */\n assignGlobalFeatures(glyphs) {\n for (let glyph of glyphs) {\n for (let feature in this.globalFeatures) {\n glyph.features[feature] = true;\n }\n }\n }\n\n /**\n * Executes the planned stages using the given OTProcessor\n */\n process(processor, glyphs, positions) {\n for (let stage of this.stages) {\n if (typeof stage === 'function') {\n if (!positions) {\n stage(this.font, glyphs, this);\n }\n\n } else if (stage.length > 0) {\n processor.applyFeatures(stage, glyphs, positions);\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport IndicShaper from './IndicShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n arab: ArabicShaper, // Arabic\n mong: ArabicShaper, // Mongolian\n syrc: ArabicShaper, // Syriac\n 'nko ': ArabicShaper, // N'Ko\n phag: ArabicShaper, // Phags Pa\n mand: ArabicShaper, // Mandaic\n mani: ArabicShaper, // Manichaean\n phlp: ArabicShaper, // Psalter Pahlavi\n\n hang: HangulShaper, // Hangul\n\n bng2: IndicShaper, // Bengali\n beng: IndicShaper, // Bengali\n dev2: IndicShaper, // Devanagari\n deva: IndicShaper, // Devanagari\n gjr2: IndicShaper, // Gujarati\n gujr: IndicShaper, // Gujarati\n guru: IndicShaper, // Gurmukhi\n gur2: IndicShaper, // Gurmukhi\n knda: IndicShaper, // Kannada\n knd2: IndicShaper, // Kannada\n mlm2: IndicShaper, // Malayalam\n mlym: IndicShaper, // Malayalam\n ory2: IndicShaper, // Oriya\n orya: IndicShaper, // Oriya\n taml: IndicShaper, // Tamil\n tml2: IndicShaper, // Tamil\n telu: IndicShaper, // Telugu\n tel2: IndicShaper, // Telugu\n khmr: IndicShaper, // Khmer\n\n bali: UniversalShaper, // Balinese\n batk: UniversalShaper, // Batak\n brah: UniversalShaper, // Brahmi\n bugi: UniversalShaper, // Buginese\n buhd: UniversalShaper, // Buhid\n cakm: UniversalShaper, // Chakma\n cham: UniversalShaper, // Cham\n dupl: UniversalShaper, // Duployan\n egyp: UniversalShaper, // Egyptian Hieroglyphs\n gran: UniversalShaper, // Grantha\n hano: UniversalShaper, // Hanunoo\n java: UniversalShaper, // Javanese\n kthi: UniversalShaper, // Kaithi\n kali: UniversalShaper, // Kayah Li\n khar: UniversalShaper, // Kharoshthi\n khoj: UniversalShaper, // Khojki\n sind: UniversalShaper, // Khudawadi\n lepc: UniversalShaper, // Lepcha\n limb: UniversalShaper, // Limbu\n mahj: UniversalShaper, // Mahajani\n // mand: UniversalShaper, // Mandaic\n // mani: UniversalShaper, // Manichaean\n mtei: UniversalShaper, // Meitei Mayek\n modi: UniversalShaper, // Modi\n // mong: UniversalShaper, // Mongolian\n // 'nko ': UniversalShaper, // N’Ko\n hmng: UniversalShaper, // Pahawh Hmong\n // phag: UniversalShaper, // Phags-pa\n // phlp: UniversalShaper, // Psalter Pahlavi\n rjng: UniversalShaper, // Rejang\n saur: UniversalShaper, // Saurashtra\n shrd: UniversalShaper, // Sharada\n sidd: UniversalShaper, // Siddham\n sinh: IndicShaper, // Sinhala\n sund: UniversalShaper, // Sundanese\n sylo: UniversalShaper, // Syloti Nagri\n tglg: UniversalShaper, // Tagalog\n tagb: UniversalShaper, // Tagbanwa\n tale: UniversalShaper, // Tai Le\n lana: UniversalShaper, // Tai Tham\n tavt: UniversalShaper, // Tai Viet\n takr: UniversalShaper, // Takri\n tibt: UniversalShaper, // Tibetan\n tfng: UniversalShaper, // Tifinagh\n tirh: UniversalShaper, // Tirhuta\n\n latn: DefaultShaper, // Latin\n DFLT: DefaultShaper // Default\n};\n\nexport function choose(script) {\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n let shaper = SHAPERS[s];\n if (shaper) {\n return shaper;\n }\n }\n\n return DefaultShaper;\n}\n","import {isDigit} from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n ltr: ['ltra', 'ltrm'],\n rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n static zeroMarkWidths = 'AFTER_GPOS';\n static plan(plan, glyphs, features) {\n // Plan the features we want to apply\n this.planPreprocessing(plan);\n this.planFeatures(plan);\n this.planPostprocessing(plan, features);\n\n // Assign the global features to all the glyphs\n plan.assignGlobalFeatures(glyphs);\n\n // Assign local features to glyphs\n this.assignFeatures(plan, glyphs);\n }\n\n static planPreprocessing(plan) {\n plan.add({\n global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n local: FRACTIONAL_FEATURES\n });\n }\n\n static planFeatures(plan) {\n // Do nothing by default. Let subclasses override this.\n }\n\n static planPostprocessing(plan, userFeatures) {\n plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]);\n plan.setFeatureOverrides(userFeatures);\n }\n\n static assignFeatures(plan, glyphs) {\n // Enable contextual fractions\n for (let i = 0; i < glyphs.length; i++) {\n let glyph = glyphs[i];\n if (glyph.codePoints[0] === 0x2044) { // fraction slash\n let start = i;\n let end = i + 1;\n\n // Apply numerator\n while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) {\n glyphs[start - 1].features.numr = true;\n glyphs[start - 1].features.frac = true;\n start--;\n }\n\n // Apply denominator\n while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) {\n glyphs[end].features.dnom = true;\n glyphs[end].features.frac = true;\n end++;\n }\n\n // Apply fraction slash\n glyph.features.frac = true;\n i = end - 1;\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport {getCategory} from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\nimport { decodeBase64 } from '../../utils';\n\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/data.trie', 'base64')));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n Non_Joining: 0,\n Left_Joining: 1,\n Right_Joining: 2,\n Dual_Joining: 3,\n Join_Causing: 3,\n ALAPH: 4,\n 'DALATH RISH': 5,\n Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH\n // State 0: prev was U, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ],\n\n // State 1: prev was R or ISOL/ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ],\n\n // State 2: prev was D/L in ISOL form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ],\n\n // State 3: prev was D in FINA form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ],\n\n // State 4: prev was FINA ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ],\n\n // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ],\n\n // State 6: prev was DALATH/RISH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n static planFeatures(plan) {\n plan.add(['ccmp', 'locl']);\n for (let i = 0; i < FEATURES.length; i++) {\n let feature = FEATURES[i];\n plan.addStage(feature, false);\n }\n\n plan.addStage('mset');\n }\n\n static assignFeatures(plan, glyphs) {\n super.assignFeatures(plan, glyphs);\n\n let prev = -1;\n let state = 0;\n let actions = [];\n\n // Apply the state machine to map glyphs to features\n for (let i = 0; i < glyphs.length; i++) {\n let curAction, prevAction;\n var glyph = glyphs[i];\n let type = getShapingClass(glyph.codePoints[0]);\n if (type === ShapingClasses.Transparent) {\n actions[i] = NONE;\n continue;\n }\n\n [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n if (prevAction !== NONE && prev !== -1) {\n actions[prev] = prevAction;\n }\n\n actions[i] = curAction;\n prev = i;\n }\n\n // Apply the chosen features to their respective glyphs\n for (let index = 0; index < glyphs.length; index++) {\n let feature;\n var glyph = glyphs[index];\n if (feature = actions[index]) {\n glyph.features[feature] = true;\n }\n }\n }\n}\n\nfunction getShapingClass(codePoint) {\n let res = trie.get(codePoint);\n if (res) {\n return res - 1;\n }\n\n let category = getCategory(codePoint);\n if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n return ShapingClasses.Transparent;\n }\n\n return ShapingClasses.Non_Joining;\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n * - decompose if unsupported by the font:\n * -> \n * -> \n * -> \n *\n * - compose if supported by the font:\n * -> \n * -> \n * -> \n *\n * - reorder tone marks (S is any valid syllable):\n * -> \n *\n * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n }\n\n static assignFeatures(plan, glyphs) {\n let state = 0;\n let i = 0;\n while (i < glyphs.length) {\n let action;\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n let type = getType(code);\n\n [ action, state ] = STATE_TABLE[state][type];\n\n switch (action) {\n case DECOMPOSE:\n // Decompose the composed syllable if it is not supported by the font.\n if (!plan.font.hasGlyphForCodePoint(code)) {\n i = decompose(glyphs, i, plan.font);\n }\n break;\n\n case COMPOSE:\n // Found a decomposed syllable. Try to compose if supported by the font.\n i = compose(glyphs, i, plan.font);\n break;\n\n case TONE_MARK:\n // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n reorderToneMark(glyphs, i, plan.font);\n break;\n\n case INVALID:\n // Tone mark has no valid syllable to attach to, so insert a dotted circle\n i = insertDottedCircle(glyphs, i, plan.font);\n break;\n }\n\n i++;\n }\n }\n}\n\nconst HANGUL_BASE = 0xac00;\nconst HANGUL_END = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE = 0x1100; // lead\nconst V_BASE = 0x1161; // vowel\nconst T_BASE = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END = L_BASE + L_COUNT - 1;\nconst V_END = V_BASE + V_COUNT - 1;\nconst T_END = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X = 0; // Other character\nconst L = 1; // Leading consonant\nconst V = 2; // Medial vowel\nconst T = 3; // Trailing consonant\nconst LV = 4; // Composed syllable\nconst LVT = 5; // Composed syllable\nconst M = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n if (isL(code)) { return L; }\n if (isV(code)) { return V; }\n if (isT(code)) { return T; }\n if (isLV(code)) { return LV; }\n if (isLVT(code)) { return LVT; }\n if (isTone(code)) { return M; }\n return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE = 2;\nconst TONE_MARK = 4;\nconst INVALID = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n // X L V T LV LVT M\n // State 0: start state\n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 1: \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 2: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n // State 3: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n\n let s = code - HANGUL_BASE;\n let t = T_BASE + s % T_COUNT;\n s = s / T_COUNT | 0;\n let l = L_BASE + s / V_COUNT | 0;\n let v = V_BASE + s % V_COUNT;\n\n // Don't decompose if all of the components are not available\n if (!font.hasGlyphForCodePoint(l) ||\n !font.hasGlyphForCodePoint(v) ||\n (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n return i;\n }\n\n // Replace the current glyph with decomposed L, V, and T glyphs,\n // and apply the proper OpenType features to each component.\n let ljmo = getGlyph(font, l, glyph.features);\n ljmo.features.ljmo = true;\n\n let vjmo = getGlyph(font, v, glyph.features);\n vjmo.features.vjmo = true;\n\n let insert = [ ljmo, vjmo ];\n\n if (t > T_BASE) {\n let tjmo = getGlyph(font, t, glyph.features);\n tjmo.features.tjmo = true;\n insert.push(tjmo);\n }\n\n glyphs.splice(i, 1, ...insert);\n return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n let type = getType(code);\n\n let prev = glyphs[i - 1].codePoints[0];\n let prevType = getType(prev);\n\n // Figure out what type of syllable we're dealing with\n let lv, ljmo, vjmo, tjmo;\n if (prevType === LV && type === T) {\n // \n lv = prev;\n tjmo = glyph;\n } else {\n if (type === V) {\n // \n ljmo = glyphs[i - 1];\n vjmo = glyph;\n } else {\n // \n ljmo = glyphs[i - 2];\n vjmo = glyphs[i - 1];\n tjmo = glyph;\n }\n\n let l = ljmo.codePoints[0];\n let v = vjmo.codePoints[0];\n\n // Make sure L and V are combining characters\n if (isCombiningL(l) && isCombiningV(v)) {\n lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n }\n }\n\n let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n let s = lv + (t - T_BASE);\n\n // Replace with a composed glyph if supported by the font,\n // otherwise apply the proper OpenType features to each component.\n if (font.hasGlyphForCodePoint(s)) {\n let del = prevType === V ? 3 : 2;\n glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n return i - del + 1;\n }\n }\n\n // Didn't compose (either a non-combining component or unsupported by font).\n if (ljmo) { ljmo.features.ljmo = true; }\n if (vjmo) { vjmo.features.vjmo = true; }\n if (tjmo) { tjmo.features.tjmo = true; }\n\n if (prevType === LV) {\n // Sequence was originally , which got combined earlier.\n // Either the T was non-combining, or the LVT glyph wasn't supported.\n // Decompose the glyph again and apply OT features.\n decompose(glyphs, i - 1, font);\n return i + 1;\n }\n\n return i;\n}\n\nfunction getLength(code) {\n switch (getType(code)) {\n case LV:\n case LVT:\n return 1;\n case V:\n return 2;\n case T:\n return 3;\n }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n // Move tone mark to the beginning of the previous syllable, unless it is zero width\n if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n let prev = glyphs[i - 1].codePoints[0];\n let len = getLength(prev);\n\n glyphs.splice(i, 1);\n return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n // If the tone mark is zero width, insert the dotted circle before, otherwise after\n let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n glyphs.splice(idx, 0, dottedCircle);\n i++;\n }\n\n return i;\n}\n","import {isMark} from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n constructor(font, id, codePoints = [], features) {\n this._font = font;\n this.codePoints = codePoints;\n this.id = id;\n\n this.features = {};\n if (Array.isArray(features)) {\n for (let i = 0; i < features.length; i++) {\n let feature = features[i];\n this.features[feature] = true;\n }\n } else if (typeof features === 'object') {\n Object.assign(this.features, features);\n }\n\n this.ligatureID = null;\n this.ligatureComponent = null;\n this.isLigated = false;\n this.cursiveAttachment = null;\n this.markAttachment = null;\n this.shaperInfo = null;\n this.substituted = false;\n this.isMultiplied = false;\n }\n\n get id() {\n return this._id;\n }\n\n set id(id) {\n this._id = id;\n this.substituted = true;\n\n let GDEF = this._font.GDEF;\n if (GDEF && GDEF.glyphClassDef) {\n // TODO: clean this up\n let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);\n this.isBase = classID === 1;\n this.isLigature = classID === 2;\n this.isMark = classID === 3;\n this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;\n } else {\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isBase = !this.isMark;\n this.isLigature = this.codePoints.length > 1;\n this.markAttachmentType = 0;\n }\n }\n\n copy() {\n return new GlyphInfo(this._font, this.id, this.codePoints, this.features);\n }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n constructor(font, table) {\n this.font = font;\n this.table = table;\n\n this.script = null;\n this.scriptTag = null;\n\n this.language = null;\n this.languageTag = null;\n\n this.features = {};\n this.lookups = {};\n\n // Setup variation substitutions\n this.variationsIndex = font._variationProcessor\n ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n : -1;\n\n // initialize to default script + language\n this.selectScript();\n\n // current context (set by applyFeatures)\n this.glyphs = [];\n this.positions = []; // only used by GPOS\n this.ligatureID = 1;\n this.currentFeature = null;\n }\n\n findScript(script) {\n if (this.table.scriptList == null) {\n return null;\n }\n\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n for (let entry of this.table.scriptList) {\n if (entry.tag === s) {\n return entry;\n }\n }\n }\n\n return null;\n }\n\n selectScript(script, language, direction) {\n let changed = false;\n let entry;\n if (!this.script || script !== this.scriptTag) {\n entry = this.findScript(script);\n if (!entry) {\n entry = this.findScript(DEFAULT_SCRIPTS);\n }\n\n if (!entry) {\n return this.scriptTag;\n }\n\n this.scriptTag = entry.tag;\n this.script = entry.script;\n this.language = null;\n this.languageTag = null;\n changed = true;\n }\n\n if (!direction || direction !== this.direction) {\n this.direction = direction || Script.direction(script);\n }\n\n if (language && language.length < 4) {\n language += ' '.repeat(4 - language.length);\n }\n\n if (!language || language !== this.languageTag) {\n this.language = null;\n\n for (let lang of this.script.langSysRecords) {\n if (lang.tag === language) {\n this.language = lang.langSys;\n this.languageTag = lang.tag;\n break;\n }\n }\n\n if (!this.language) {\n this.language = this.script.defaultLangSys;\n this.languageTag = null;\n }\n\n changed = true;\n }\n\n // Build a feature lookup table\n if (changed) {\n this.features = {};\n if (this.language) {\n for (let featureIndex of this.language.featureIndexes) {\n let record = this.table.featureList[featureIndex];\n let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n this.features[record.tag] = substituteFeature || record.feature;\n }\n }\n }\n\n return this.scriptTag;\n }\n\n lookupsForFeatures(userFeatures = [], exclude) {\n let lookups = [];\n for (let tag of userFeatures) {\n let feature = this.features[tag];\n if (!feature) {\n continue;\n }\n\n for (let lookupIndex of feature.lookupListIndexes) {\n if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n continue;\n }\n\n lookups.push({\n feature: tag,\n index: lookupIndex,\n lookup: this.table.lookupList.get(lookupIndex)\n });\n }\n }\n\n lookups.sort((a, b) => a.index - b.index);\n return lookups;\n }\n\n substituteFeatureForVariations(featureIndex) {\n if (this.variationsIndex === -1) {\n return null;\n }\n\n let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n let substitutions = record.featureTableSubstitution.substitutions;\n for (let substitution of substitutions) {\n if (substitution.featureIndex === featureIndex) {\n return substitution.alternateFeatureTable;\n }\n }\n\n return null;\n }\n\n findVariationsIndex(coords) {\n let variations = this.table.featureVariations;\n if (!variations) {\n return -1;\n }\n\n let records = variations.featureVariationRecords;\n for (let i = 0; i < records.length; i++) {\n let conditions = records[i].conditionSet.conditionTable;\n if (this.variationConditionsMatch(conditions, coords)) {\n return i;\n }\n }\n\n return -1;\n }\n\n variationConditionsMatch(conditions, coords) {\n return conditions.every(condition => {\n let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n });\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n let lookups = this.lookupsForFeatures(userFeatures);\n this.applyLookups(lookups, glyphs, advances);\n }\n\n applyLookups(lookups, glyphs, positions) {\n this.glyphs = glyphs;\n this.positions = positions;\n this.glyphIterator = new GlyphIterator(glyphs);\n\n for (let { feature, lookup } of lookups) {\n this.currentFeature = feature;\n this.glyphIterator.reset(lookup.flags);\n\n while (this.glyphIterator.index < glyphs.length) {\n if (!(feature in this.glyphIterator.cur.features)) {\n this.glyphIterator.next();\n continue;\n }\n\n for (let table of lookup.subTables) {\n let res = this.applyLookup(lookup.lookupType, table);\n if (res) {\n break;\n }\n }\n\n this.glyphIterator.next();\n }\n }\n }\n\n applyLookup(lookup, table) {\n throw new Error(\"applyLookup must be implemented by subclasses\");\n }\n\n applyLookupList(lookupRecords) {\n let options = this.glyphIterator.options;\n let glyphIndex = this.glyphIterator.index;\n\n for (let lookupRecord of lookupRecords) {\n // Reset flags and find glyph index for this lookup record\n this.glyphIterator.reset(options, glyphIndex);\n this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n // Get the lookup and setup flags for subtables\n let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n this.glyphIterator.reset(lookup.flags, this.glyphIterator.index);\n\n // Apply lookup subtables until one matches\n for (let table of lookup.subTables) {\n if (this.applyLookup(lookup.lookupType, table)) {\n break;\n }\n }\n }\n\n this.glyphIterator.reset(options, glyphIndex);\n return true;\n }\n\n coverageIndex(coverage, glyph) {\n if (glyph == null) {\n glyph = this.glyphIterator.cur.id;\n }\n\n switch (coverage.version) {\n case 1:\n return coverage.glyphs.indexOf(glyph);\n\n case 2:\n for (let range of coverage.rangeRecords) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.startCoverageIndex + glyph - range.start;\n }\n }\n\n break;\n }\n\n return -1;\n }\n\n match(sequenceIndex, sequence, fn, matched) {\n let pos = this.glyphIterator.index;\n let glyph = this.glyphIterator.increment(sequenceIndex);\n let idx = 0;\n\n while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {\n if (matched) {\n matched.push(this.glyphIterator.index);\n }\n\n idx++;\n glyph = this.glyphIterator.next();\n }\n\n this.glyphIterator.index = pos;\n if (idx < sequence.length) {\n return false;\n }\n\n return matched || true;\n }\n\n sequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id);\n }\n\n sequenceMatchIndices(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => {\n // If the current feature doesn't apply to this glyph,\n if (!(this.currentFeature in glyph.features)) {\n return false;\n }\n\n return component === glyph.id;\n }, []);\n }\n\n coverageSequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n this.coverageIndex(coverage, glyph.id) >= 0\n );\n }\n\n getClassID(glyph, classDef) {\n switch (classDef.version) {\n case 1: // Class array\n let i = glyph - classDef.startGlyph;\n if (i >= 0 && i < classDef.classValueArray.length) {\n return classDef.classValueArray[i];\n }\n\n break;\n\n case 2:\n for (let range of classDef.classRangeRecord) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.class;\n }\n }\n\n break;\n }\n\n return 0;\n }\n\n classSequenceMatches(sequenceIndex, sequence, classDef) {\n return this.match(sequenceIndex, sequence, (classID, glyph) =>\n classID === this.getClassID(glyph.id, classDef)\n );\n }\n\n applyContext(table) {\n let index, set;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n set = table.ruleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(1, rule.input)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n if (index === -1) {\n return false;\n }\n\n set = table.classSet[index];\n for (let rule of set) {\n if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(0, table.coverages)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n\n applyChainingContext(table) {\n let index;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.chainRuleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n && this.sequenceMatches(1, rule.input)\n && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n let rules = table.chainClassSet[index];\n if (!rules) {\n return false;\n }\n\n for (let rule of rules) {\n if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n this.coverageSequenceMatches(0, table.inputCoverage) &&\n this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n}\n","export default class GlyphIterator {\n constructor(glyphs, options) {\n this.glyphs = glyphs;\n this.reset(options);\n }\n\n reset(options = {}, index = 0) {\n this.options = options;\n this.flags = options.flags || {};\n this.markAttachmentType = options.markAttachmentType || 0;\n this.index = index;\n }\n\n get cur() {\n return this.glyphs[this.index] || null;\n }\n\n shouldIgnore(glyph) {\n return (this.flags.ignoreMarks && glyph.isMark) ||\n (this.flags.ignoreBaseGlyphs && glyph.isBase) ||\n (this.flags.ignoreLigatures && glyph.isLigature) ||\n (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType);\n }\n\n move(dir) {\n this.index += dir;\n while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {\n this.index += dir;\n }\n\n if (0 > this.index || this.index >= this.glyphs.length) {\n return null;\n }\n\n return this.glyphs[this.index];\n }\n\n next() {\n return this.move(+1);\n }\n\n prev() {\n return this.move(-1);\n }\n\n peek(count = 1) {\n let idx = this.index;\n let res = this.increment(count);\n this.index = idx;\n return res;\n }\n\n peekIndex(count = 1) {\n let idx = this.index;\n this.increment(count);\n let res = this.index;\n this.index = idx;\n return res;\n }\n\n increment(count = 1) {\n let dir = count < 0 ? -1 : 1;\n count = Math.abs(count);\n while (count--) {\n this.move(dir);\n }\n\n return this.glyphs[this.index];\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport {getCategory} from 'unicode-properties';\nimport * as Script from '../../layout/Script';\nimport GlyphInfo from '../GlyphInfo';\nimport indicMachine from './indic.json';\nimport useData from './use.json';\nimport {\n CATEGORIES,\n POSITIONS,\n CONSONANT_FLAGS,\n JOINER_FLAGS,\n HALANT_OR_COENG_FLAGS, INDIC_CONFIGS,\n INDIC_DECOMPOSITIONS\n} from './indic-data';\nimport { decodeBase64 } from '../../utils';\n\nconst {decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/indic.trie', 'base64')));\nconst stateMachine = new StateMachine(indicMachine);\n\n/**\n * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.\n * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc\n */\nexport default class IndicShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n plan.addStage(['locl', 'ccmp']);\n\n plan.addStage(initialReordering);\n\n plan.addStage('nukt');\n plan.addStage('akhn');\n plan.addStage('rphf', false);\n plan.addStage('rkrf');\n plan.addStage('pref', false);\n plan.addStage('blwf', false);\n plan.addStage('abvf', false);\n plan.addStage('half', false);\n plan.addStage('pstf', false);\n plan.addStage('vatu');\n plan.addStage('cjct');\n plan.addStage('cfar', false);\n\n plan.addStage(finalReordering);\n\n plan.addStage({\n local: ['init'],\n global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']\n });\n\n // Setup the indic config for the selected script\n plan.unicodeScript = Script.fromOpenType(plan.script);\n plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;\n plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';\n\n // TODO: turn off kern (Khmer) and liga features.\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split matras\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];\n if (d) {\n let decomposed = d.map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction indicCategory(glyph) {\n return trie.get(glyph.codePoints[0]) >> 8;\n}\n\nfunction indicPosition(glyph) {\n return 1 << (trie.get(glyph.codePoints[0]) & 0xff);\n}\n\nclass IndicInfo {\n constructor(category, position, syllableType, syllable) {\n this.category = category;\n this.position = position;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n let last = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) {\n if (start > last) {\n ++syllable;\n for (let i = last; i < start; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new IndicInfo(\n 1 << indicCategory(glyphs[i]),\n indicPosition(glyphs[i]),\n tags[0],\n syllable\n );\n }\n\n last = end + 1;\n }\n\n if (last < glyphs.length) {\n ++syllable;\n for (let i = last; i < glyphs.length; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n}\n\nfunction isConsonant(glyph) {\n return glyph.shaperInfo.category & CONSONANT_FLAGS;\n}\n\nfunction isJoiner(glyph) {\n return glyph.shaperInfo.category & JOINER_FLAGS;\n}\n\nfunction isHalantOrCoeng(glyph) {\n return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;\n}\n\nfunction wouldSubstitute(glyphs, feature) {\n for (let glyph of glyphs) {\n glyph.features = {[feature]: true};\n }\n\n let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;\n GSUB.applyFeatures([feature], glyphs);\n\n return glyphs.length === 1;\n}\n\nfunction consonantPosition(font, consonant, virama) {\n let glyphs = [virama, consonant, virama];\n if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {\n return POSITIONS.Below_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {\n return POSITIONS.Post_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {\n return POSITIONS.Post_C;\n }\n\n return POSITIONS.Base_C;\n}\n\nfunction initialReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n let virama = font.glyphForCodePoint(indicConfig.virama).id;\n if (virama) {\n let info = new GlyphInfo(font, virama, [indicConfig.virama]);\n for (let i = 0; i < glyphs.length; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);\n }\n }\n }\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let {category, syllableType} = glyphs[start].shaperInfo;\n\n if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {\n continue;\n }\n\n if (syllableType === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = new IndicInfo(\n 1 << indicCategory(g),\n indicPosition(g),\n glyphs[start].shaperInfo.syllableType,\n glyphs[start].shaperInfo.syllable\n );\n\n // Insert after possible Repha.\n let i = start;\n while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) {\n i++;\n }\n\n glyphs.splice(i++, 0, g);\n end++;\n }\n\n // 1. Find base consonant:\n //\n // The shaping engine finds the base consonant of the syllable, using the\n // following algorithm: starting from the end of the syllable, move backwards\n // until a consonant is found that does not have a below-base or post-base\n // form (post-base forms have to follow below-base forms), or that is not a\n // pre-base reordering Ra, or arrive at the first consonant. The consonant\n // stopped at will be the base.\n\n let base = end;\n let limit = start;\n let hasReph = false;\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph &&\n features.rphf &&\n start + 3 <= end && (\n (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) ||\n (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)\n )\n ) {\n // See if it matches the 'rphf' feature.\n let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];\n if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) {\n limit += 2;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {\n limit++;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n\n switch (indicConfig.basePos) {\n case 'Last': {\n // starting from the end of the syllable, move backwards\n let i = end;\n let seenBelow = false;\n\n do {\n let info = glyphs[--i].shaperInfo;\n\n // until a consonant is found\n if (isConsonant(glyphs[i])) {\n // that does not have a below-base or post-base form\n // (post-base forms have to follow below-base forms),\n if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) {\n base = i;\n break;\n }\n\n // or that is not a pre-base reordering Ra,\n //\n // IMPLEMENTATION NOTES:\n //\n // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped\n // by the logic above already.\n //\n\n // or arrive at the first consonant. The consonant stopped at will\n // be the base.\n if (info.position === POSITIONS.Below_C) {\n seenBelow = true;\n }\n\n base = i;\n } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) {\n // A ZWJ after a Halant stops the base search, and requests an explicit\n // half form.\n // A ZWJ before a Halant, requests a subjoined form instead, and hence\n // search continues. This is particularly important for Bengali\n // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.\n break;\n }\n } while (i > limit);\n break;\n }\n\n case 'First': {\n // The first consonant is always the base.\n base = start;\n\n // Mark all subsequent consonants as below.\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n glyphs[i].shaperInfo.position = POSITIONS.Below_C;\n }\n }\n }\n }\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n //\n // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)\n if (hasReph && base === start && limit - base <= 2) {\n hasReph = false;\n }\n\n // 2. Decompose and reorder Matras:\n //\n // Each matra and any syllable modifier sign in the cluster are moved to the\n // appropriate position relative to the consonant(s) in the cluster. The\n // shaping engine decomposes two- or three-part matras into their constituent\n // parts before any repositioning. Matra characters are classified by which\n // consonant in a conjunct they have affinity for and are reordered to the\n // following positions:\n //\n // o Before first half form in the syllable\n // o After subjoined consonants\n // o After post-form consonant\n // o After main consonant (for above marks)\n //\n // IMPLEMENTATION NOTES:\n //\n // The normalize() routine has already decomposed matras for us, so we don't\n // need to worry about that.\n\n // 3. Reorder marks to canonical order:\n //\n // Adjacent nukta and halant or nukta and vedic sign are always repositioned\n // if necessary, so that the nukta is first.\n //\n // IMPLEMENTATION NOTES:\n //\n // We don't need to do this: the normalize() routine already did this for us.\n\n // Reorder characters\n\n for (let i = start; i < base; i++) {\n let info = glyphs[i].shaperInfo;\n info.position = Math.min(POSITIONS.Pre_C, info.position);\n }\n\n if (base < end) {\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n\n // Mark final consonants. A final consonant is one appearing after a matra,\n // like in Khmer.\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n for (let j = i + 1; j < end; j++) {\n if (isConsonant(glyphs[j])) {\n glyphs[j].shaperInfo.position = POSITIONS.Final_C;\n break;\n }\n }\n break;\n }\n }\n\n // Handle beginning Ra\n if (hasReph) {\n glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;\n }\n\n // For old-style Indic script tags, move the first post-base Halant after\n // last consonant.\n //\n // Reports suggest that in some scripts Uniscribe does this only if there\n // is *not* a Halant after last consonant already (eg. Kannada), while it\n // does it unconditionally in other scripts (eg. Malayalam). We don't\n // currently know about other scripts, so we single out Malayalam for now.\n //\n // Kannada test case:\n // U+0C9A,U+0CCD,U+0C9A,U+0CCD\n // With some versions of Lohit Kannada.\n // https://bugs.freedesktop.org/show_bug.cgi?id=59118\n //\n // Malayalam test case:\n // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D\n // With lohit-ttf-20121122/Lohit-Malayalam.ttf\n if (plan.isOldSpec) {\n let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.H) {\n let j;\n for (j = end - 1; j > i; j--) {\n if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) {\n break;\n }\n }\n\n if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) {\n // Move Halant to after last consonant.\n let t = glyphs[i];\n glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i));\n glyphs[j] = t;\n }\n\n break;\n }\n }\n }\n\n // Attach misc marks to previous char to move with them.\n let lastPos = POSITIONS.Start;\n for (let i = start; i < end; i++) {\n let info = glyphs[i].shaperInfo;\n if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) {\n info.position = lastPos;\n if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) {\n // Uniscribe doesn't move the Halant with Left Matra.\n // TEST: U+092B,U+093F,U+094DE\n // We follow. This is important for the Sinhala\n // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA\n // where U+0DD9 is a left matra and U+0DCA is the virama.\n // We don't want to move the virama with the left matra.\n // TEST: U+0D9A,U+0DDA\n for (let j = i; j > start; j--) {\n if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) {\n info.position = glyphs[j - 1].shaperInfo.position;\n break;\n }\n }\n }\n } else if (info.position !== POSITIONS.SMVD) {\n lastPos = info.position;\n }\n }\n\n // For post-base consonants let them own anything before them\n // since the last consonant or matra.\n let last = base;\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n for (let j = last + 1; j < i; j++) {\n if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) {\n glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position;\n }\n }\n last = i;\n } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n last = i;\n }\n }\n\n let arr = glyphs.slice(start, end);\n arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position);\n glyphs.splice(start, arr.length, ...arr);\n\n // Find base again\n for (let i = start; i < end; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n base = i;\n break;\n }\n }\n\n // Setup features now\n\n // Reph\n for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) {\n glyphs[i].features.rphf = true;\n }\n\n // Pre-base\n let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';\n for (let i = start; i < base; i++) {\n glyphs[i].features.half = true;\n if (blwf) {\n glyphs[i].features.blwf = true;\n }\n }\n\n // Post-base\n for (let i = base + 1; i < end; i++) {\n glyphs[i].features.abvf = true;\n glyphs[i].features.pstf = true;\n glyphs[i].features.blwf = true;\n }\n\n if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {\n // Old-spec eye-lash Ra needs special handling. From the\n // spec:\n //\n // \"The feature 'below-base form' is applied to consonants\n // having below-base forms and following the base consonant.\n // The exception is vattu, which may appear below half forms\n // as well as below the base glyph. The feature 'below-base\n // form' will be applied to all such occurrences of Ra as well.\"\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+0915\n // with Sanskrit 2003 font.\n //\n // However, note that Ra,Halant,ZWJ is the correct way to\n // request eyelash form of Ra, so we wouldbn't inhibit it\n // in that sequence.\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915\n for (let i = start; i + 1 < base; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.Ra &&\n glyphs[i + 1].shaperInfo.category === CATEGORIES.H &&\n (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ)\n ) {\n glyphs[i].features.blwf = true;\n glyphs[i + 1].features.blwf = true;\n }\n }\n }\n\n let prefLen = 2;\n if (features.pref && base + prefLen < end) {\n // Find a Halant,Ra sequence and mark it for pre-base reordering processing.\n for (let i = base + 1; i + prefLen - 1 < end; i++) {\n let g = [glyphs[i].copy(), glyphs[i + 1].copy()];\n if (wouldSubstitute(g, 'pref')) {\n for (let j = 0; j < prefLen; j++) {\n glyphs[i++].features.pref = true;\n }\n\n // Mark the subsequent stuff with 'cfar'. Used in Khmer.\n // Read the feature spec.\n // This allows distinguishing the following cases with MS Khmer fonts:\n // U+1784,U+17D2,U+179A,U+17D2,U+1782\n // U+1784,U+17D2,U+1782,U+17D2,U+179A\n if (features.cfar) {\n for (; i < end; i++) {\n glyphs[i].features.cfar = true;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply ZWJ/ZWNJ effects\n for (let i = start + 1; i < end; i++) {\n if (isJoiner(glyphs[i])) {\n let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ;\n let j = i;\n\n do {\n j--;\n\n // ZWJ/ZWNJ should disable CJCT. They do that by simply\n // being there, since we don't skip them for the CJCT\n // feature (ie. F_MANUAL_ZWJ)\n\n // A ZWNJ disables HALF.\n if (nonJoiner) {\n delete glyphs[j].features.half;\n }\n } while (j > start && !isConsonant(glyphs[j]));\n }\n }\n }\n}\n\nfunction finalReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n // 4. Final reordering:\n //\n // After the localized forms and basic shaping forms GSUB features have been\n // applied (see below), the shaping engine performs some final glyph\n // reordering before applying all the remaining font features to the entire\n // cluster.\n\n let tryPref = !!features.pref;\n\n // Find base again\n let base = start;\n for (; base < end; base++) {\n if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {\n // Ok, this was a 'pref' candidate but didn't form any.\n // Base is around here...\n base = i;\n while (base < end && isHalantOrCoeng(glyphs[base])) {\n base++;\n }\n glyphs[base].shaperInfo.position = POSITIONS.BASE_C;\n tryPref = false;\n }\n break;\n }\n }\n }\n\n // For Malayalam, skip over unformed below- (but NOT post-) forms.\n if (plan.unicodeScript === 'Malayalam') {\n for (let i = base + 1; i < end; i++) {\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i === end || !isHalantOrCoeng(glyphs[i])) {\n break;\n }\n\n i++; // Skip halant.\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) {\n base = i;\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n }\n }\n\n if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {\n base--;\n }\n break;\n }\n }\n\n if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {\n base--;\n }\n\n if (base < end) {\n while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {\n base--;\n }\n }\n\n // o Reorder matras:\n //\n // If a pre-base matra character had been reordered before applying basic\n // features, the glyph can be moved closer to the main consonant based on\n // whether half-forms had been formed. Actual position for the matra is\n // defined as “after last standalone halant glyph, after initial matra\n // position and before the main consonant”. If ZWJ or ZWNJ follow this\n // halant, position is moved after it.\n //\n\n if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters.\n // If we lost track of base, alas, position before last thingy.\n let newPos = base === end ? base - 2 : base - 1;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // If we found no Halant we are done.\n // Otherwise only proceed if the Halant does\n // not belong to the Matra itself!\n if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {\n newPos++;\n }\n } else {\n newPos = start; // No move.\n }\n }\n\n if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // Now go see if there's actually any matras...\n for (let i = newPos; i > start; i--) {\n if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) {\n let oldPos = i - 1;\n if (oldPos < base && base <= newPos) { // Shouldn't actually happen.\n base--;\n }\n\n let tmp = glyphs[oldPos];\n glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos));\n glyphs[newPos] = tmp;\n\n newPos--;\n }\n }\n }\n }\n\n // o Reorder reph:\n //\n // Reph’s original position is always at the beginning of the syllable,\n // (i.e. it is not reordered at the character reordering stage). However,\n // it will be reordered according to the basic-forms shaping results.\n // Possible positions for reph, depending on the script, are; after main,\n // before post-base consonant forms, and after post-base consonant forms.\n\n // Two cases:\n //\n // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then\n // we should only move it if the sequence ligated to the repha form.\n //\n // - If repha is encoded separately and in the logical position, we should only\n // move it if it did NOT ligate. If it ligated, it's probably the font trying\n // to make it work without the reordering.\n if (start + 1 < end &&\n glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph &&\n (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)\n ) {\n let newRephPos;\n let rephPos = indicConfig.rephPos;\n let found = false;\n\n // 1. If reph should be positioned after post-base consonant forms,\n // proceed to step 5.\n if (rephPos !== POSITIONS.After_Post) {\n // 2. If the reph repositioning class is not after post-base: target\n // position is after the first explicit halant glyph between the\n // first post-reph consonant and last main consonant. If ZWJ or ZWNJ\n // are following this halant, position is moved after it. If such\n // position is found, this is the target position. Otherwise,\n // proceed to the next step.\n //\n // Note: in old-implementation fonts, where classifications were\n // fixed in shaping engine, there was no case where reph position\n // will be found on this step.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n\n // 3. If reph should be repositioned after the main consonant: find the\n // first consonant not ligated with main, or find the first\n // consonant that is not a potential pre-base reordering Ra.\n if (!found && rephPos === POSITIONS.After_Main) {\n newRephPos = base;\n while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n\n // 4. If reph should be positioned before post-base consonant, find\n // first post-base classified consonant not ligated with main. If no\n // consonant is found, the target position should be before the\n // first matra, syllable modifier sign or vedic sign.\n //\n // This is our take on what step 4 is trying to say (and failing, BADLY).\n if (!found && rephPos === POSITIONS.After_Sub) {\n newRephPos = base;\n while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n }\n\n // 5. If no consonant is found in steps 3 or 4, move reph to a position\n // immediately before the first post-base matra, syllable modifier\n // sign or vedic sign that has a reordering class after the intended\n // reph position. For example, if the reordering position for reph\n // is post-main, it will skip above-base matras that also have a\n // post-main position.\n if (!found) {\n // Copied from step 2.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n }\n\n // 6. Otherwise, reorder reph to the end of the syllable.\n if (!found) {\n newRephPos = end - 1;\n while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {\n newRephPos--;\n }\n\n // If the Reph is to be ending up after a Matra,Halant sequence,\n // position it before that Halant so it can interact with the Matra.\n // However, if it's a plain Consonant,Halant we shouldn't do that.\n // Uniscribe doesn't do this.\n // TEST: U+0930,U+094D,U+0915,U+094B,U+094D\n if (isHalantOrCoeng(glyphs[newRephPos])) {\n for (let i = base + 1; i < newRephPos; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n newRephPos--;\n }\n }\n }\n }\n\n let reph = glyphs[start];\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start));\n glyphs[newRephPos] = reph;\n\n if (start < base && base <= newRephPos) {\n base--;\n }\n }\n\n // o Reorder pre-base reordering consonants:\n //\n // If a pre-base reordering consonant is found, reorder it according to\n // the following rules:\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n // 1. Only reorder a glyph produced by substitution during application\n // of the feature. (Note that a font may shape a Ra consonant with\n // the feature generally but block it in certain contexts.)\n\n // Note: We just check that something got substituted. We don't check that\n // the feature actually did it...\n //\n // Reorder pref only if it ligated.\n if (glyphs[i].isLigated && !glyphs[i].isMultiplied) {\n // 2. Try to find a target position the same way as for pre-base matra.\n // If it is found, reorder pre-base consonant glyph.\n //\n // 3. If position is not found, reorder immediately before main\n // consonant.\n let newPos = base;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a\n // split matra, it should be reordered to *before* the left part of such matra.\n if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) {\n let oldPos = i;\n for (let j = base + 1; j < oldPos; j++) {\n if (glyphs[j].shaperInfo.category === CATEGORIES.M) {\n newPos--;\n break;\n }\n }\n }\n }\n\n if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) {\n // -> If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos < end && isJoiner(glyphs[newPos])) {\n newPos++;\n }\n }\n\n let oldPos = i;\n let tmp = glyphs[oldPos];\n glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos));\n glyphs[newPos] = tmp;\n\n if (newPos <= base && base < oldPos) {\n base++;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply 'init' to the Left Matra if it's a word start.\n if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) {\n glyphs[start].features.init = true;\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n","{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}","{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,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,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}","// Cateories used in the OpenType spec:\n// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx\nexport const CATEGORIES = {\n X: 1 << 0,\n C: 1 << 1,\n V: 1 << 2,\n N: 1 << 3,\n H: 1 << 4,\n ZWNJ: 1 << 5,\n ZWJ: 1 << 6,\n M: 1 << 7,\n SM: 1 << 8,\n VD: 1 << 9,\n A: 1 << 10,\n Placeholder: 1 << 11,\n Dotted_Circle: 1 << 12,\n RS: 1 << 13, // Register Shifter, used in Khmer OT spec.\n Coeng: 1 << 14, // Khmer-style Virama.\n Repha: 1 << 15, // Atomically-encoded logical or visual repha.\n Ra: 1 << 16,\n CM: 1 << 17, // Consonant-Medial.\n Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).\n};\n\n// Visual positions in a syllable from left to right.\nexport const POSITIONS = {\n Start: 1 << 0,\n\n Ra_To_Become_Reph: 1 << 1,\n Pre_M: 1 << 2,\n Pre_C: 1 << 3,\n\n Base_C: 1 << 4,\n After_Main: 1 << 5,\n\n Above_C: 1 << 6,\n\n Before_Sub: 1 << 7,\n Below_C: 1 << 8,\n After_Sub: 1 << 9,\n\n Before_Post: 1 << 10,\n Post_C: 1 << 11,\n After_Post: 1 << 12,\n\n Final_C: 1 << 13,\n SMVD: 1 << 14,\n\n End: 1 << 15\n};\n\nexport const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;\nexport const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;\nexport const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;\n\nexport const INDIC_CONFIGS = {\n Default: {\n hasOldSpec: false,\n virama: 0,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Devanagari: {\n hasOldSpec: true,\n virama: 0x094D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Bengali: {\n hasOldSpec: true,\n virama: 0x09CD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gurmukhi: {\n hasOldSpec: true,\n virama: 0x0A4D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gujarati: {\n hasOldSpec: true,\n virama: 0x0ACD,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Oriya: {\n hasOldSpec: true,\n virama: 0x0B4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Tamil: {\n hasOldSpec: true,\n virama: 0x0BCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Telugu: {\n hasOldSpec: true,\n virama: 0x0C4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Explicit',\n blwfMode: 'Post_Only'\n },\n\n Kannada: {\n hasOldSpec: true,\n virama: 0x0CCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Post_Only'\n },\n\n Malayalam: {\n hasOldSpec: true,\n virama: 0x0D4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Log_Repha',\n blwfMode: 'Pre_And_Post'\n },\n\n // Handled by UniversalShaper\n // Sinhala: {\n // hasOldSpec: false,\n // virama: 0x0DCA,\n // basePos: 'Last_Sinhala',\n // rephPos: POSITIONS.After_Main,\n // rephMode: 'Explicit',\n // blwfMode: 'Pre_And_Post'\n // },\n\n Khmer: {\n hasOldSpec: false,\n virama: 0x17D2,\n basePos: 'First',\n rephPos: POSITIONS.Ra_To_Become_Reph,\n rephMode: 'Vis_Repha',\n blwfMode: 'Pre_And_Post'\n }\n};\n\n// Additional decompositions that aren't in Unicode\nexport const INDIC_DECOMPOSITIONS = {\n // Khmer\n 0x17BE: [0x17C1, 0x17BE],\n 0x17BF: [0x17C1, 0x17BF],\n 0x17C0: [0x17C1, 0x17C0],\n 0x17C4: [0x17C1, 0x17C4],\n 0x17C5: [0x17C1, 0x17C5]\n};\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\nimport { decodeBase64 } from '../../utils';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/use.trie', 'base64')));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n static zeroMarkWidths = 'BEFORE_GPOS';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n // Default glyph pre-processing group\n plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n // Reordering group\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['rphf'], false);\n plan.addStage(recordRphf);\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['pref']);\n plan.addStage(recordPref);\n\n // Orthographic unit shaping group\n plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n plan.addStage(reorder);\n\n // Topographical features\n // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n // Standard topographic presentation and positional feature application\n plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split vowels\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n if (decompositions[codepoint]) {\n let decomposed = decompositions[codepoint].map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction useCategory(glyph) {\n return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n constructor(category, syllableType, syllable) {\n this.category = category;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n }\n\n // Assign rphf feature\n let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n for (let i = start; i < start + limit; i++) {\n glyphs[i].features.rphf = true;\n }\n }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n for (let glyph of glyphs) {\n glyph.substituted = false;\n }\n}\n\nfunction recordRphf(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted && glyph.features.rphf) {\n // Mark a substituted repha.\n glyph.shaperInfo.category = 'R';\n }\n }\n}\n\nfunction recordPref(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted) {\n // Mark a substituted pref as VPre, as they behave the same way.\n glyph.shaperInfo.category = 'VPre';\n }\n }\n}\n\nfunction reorder(font, glyphs) {\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let i, j;\n let info = glyphs[start].shaperInfo;\n let type = info.syllableType;\n\n // Only a few syllable types need reordering.\n if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n continue;\n }\n\n // Insert a dotted circle glyph in broken clusters.\n if (type === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = info;\n\n // Insert after possible Repha.\n for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n glyphs.splice(++i, 0, g);\n end++;\n }\n\n // Move things forward.\n if (info.category === 'R' && end - start > 1) {\n // Got a repha. Reorder it to after first base, before first halant.\n for (i = start + 1; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move before it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n if (isHalant(glyphs[i])) {\n i--;\n }\n\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n break;\n }\n }\n }\n\n // Move things back.\n for (i = start, j = end; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move after it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n j = isHalant(glyphs[i]) ? i + 1 : i;\n } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n }\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n\nfunction isHalant(glyph) {\n return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n return info.category === 'B' || info.category === 'GB';\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let glyph = this.glyphIterator.cur;\n switch (table.version) {\n case 1:\n glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n break;\n\n case 2:\n glyph.id = table.substitute.get(index);\n break;\n }\n\n return true;\n }\n\n case 2: { // Multiple Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let sequence = table.sequences.get(index);\n\n if (sequence.length === 0) {\n // If the sequence length is zero, delete the glyph.\n // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.\n this.glyphs.splice(this.glyphIterator.index, 1);\n return true;\n }\n\n this.glyphIterator.cur.id = sequence[0];\n this.glyphIterator.cur.ligatureComponent = 0;\n\n let features = this.glyphIterator.cur.features;\n let curGlyph = this.glyphIterator.cur;\n let replacement = sequence.slice(1).map((gid, i) => {\n let glyph = new GlyphInfo(this.font, gid, undefined, features);\n glyph.shaperInfo = curGlyph.shaperInfo;\n glyph.isLigated = curGlyph.isLigated;\n glyph.ligatureComponent = i + 1;\n glyph.substituted = true;\n glyph.isMultiplied = true;\n return glyph;\n });\n\n this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n return true;\n }\n\n return false;\n }\n\n case 3: { // Alternate Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let USER_INDEX = 0; // TODO\n this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n return true;\n }\n\n return false;\n }\n\n case 4: { // Ligature Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n for (let ligature of table.ligatureSets.get(index)) {\n let matched = this.sequenceMatchIndices(1, ligature.components);\n if (!matched) {\n continue;\n }\n\n let curGlyph = this.glyphIterator.cur;\n\n // Concatenate all of the characters the new ligature will represent\n let characters = curGlyph.codePoints.slice();\n for (let index of matched) {\n characters.push(...this.glyphs[index].codePoints);\n }\n\n // Create the replacement ligature glyph\n let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n ligatureGlyph.isLigated = true;\n ligatureGlyph.substituted = true;\n\n // From Harfbuzz:\n // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n // the ligature to keep its old ligature id. This will allow it to attach to\n // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature\n // later, we don't want them to lose their ligature id/component, otherwise\n // GPOS will fail to correctly position the mark ligature on top of the\n // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n //\n // - If a ligature is formed of components that some of which are also ligatures\n // themselves, and those ligature components had marks attached to *their*\n // components, we have to attach the marks to the new ligature component\n // positions! Now *that*'s tricky! And these marks may be following the\n // last component of the whole sequence, so we should loop forward looking\n // for them and update them.\n //\n // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature\n // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to\n // the new ligature with a component value of 2.\n //\n // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n let isMarkLigature = curGlyph.isMark;\n for (let i = 0; i < matched.length && isMarkLigature; i++) {\n isMarkLigature = this.glyphs[matched[i]].isMark;\n }\n\n ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n let lastLigID = curGlyph.ligatureID;\n let lastNumComps = curGlyph.codePoints.length;\n let curComps = lastNumComps;\n let idx = this.glyphIterator.index + 1;\n\n // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n // This allows GPOS to attach marks to the correct ligature components.\n for (let matchIndex of matched) {\n // Don't assign new ligature components for mark ligatures (see above)\n if (isMarkLigature) {\n idx = matchIndex;\n } else {\n while (idx < matchIndex) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n this.glyphs[idx].ligatureComponent = ligatureComponent;\n idx++;\n }\n }\n\n lastLigID = this.glyphs[idx].ligatureID;\n lastNumComps = this.glyphs[idx].codePoints.length;\n curComps += lastNumComps;\n idx++; // skip base glyph\n }\n\n // Adjust ligature components for any marks following\n if (lastLigID && !isMarkLigature) {\n for (let i = idx; i < this.glyphs.length; i++) {\n if (this.glyphs[i].ligatureID === lastLigID) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n this.glyphs[i].ligatureComponent = ligatureComponent;\n } else {\n break;\n }\n }\n }\n\n // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n for (let i = matched.length - 1; i >= 0; i--) {\n this.glyphs.splice(matched[i], 1);\n }\n\n this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n return true;\n }\n\n return false;\n }\n\n case 5: // Contextual Substitution\n return this.applyContext(table);\n\n case 6: // Chaining Contextual Substitution\n return this.applyChainingContext(table);\n\n case 7: // Extension Substitution\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n }\n }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n applyPositionValue(sequenceIndex, value) {\n let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n if (value.xAdvance != null) {\n position.xAdvance += value.xAdvance;\n }\n\n if (value.yAdvance != null) {\n position.yAdvance += value.yAdvance;\n }\n\n if (value.xPlacement != null) {\n position.xOffset += value.xPlacement;\n }\n\n if (value.yPlacement != null) {\n position.yOffset += value.yPlacement;\n }\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (value.xPlaDevice) {\n position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);\n }\n\n if (value.yPlaDevice) {\n position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);\n }\n\n if (value.xAdvDevice) {\n position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);\n }\n\n if (value.yAdvDevice) {\n position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);\n }\n }\n\n // TODO: device tables\n }\n\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single positioning value\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1:\n this.applyPositionValue(0, table.value);\n break;\n\n case 2:\n this.applyPositionValue(0, table.values.get(index));\n break;\n }\n\n return true;\n }\n\n case 2: { // Pair Adjustment Positioning\n let nextGlyph = this.glyphIterator.peek();\n if (!nextGlyph) {\n return false;\n }\n\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1: // Adjustments for glyph pairs\n let set = table.pairSets.get(index);\n\n for (let pair of set) {\n if (pair.secondGlyph === nextGlyph.id) {\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n return false;\n\n case 2: // Class pair adjustment\n let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n if (class1 === -1 || class2 === -1) {\n return false;\n }\n\n var pair = table.classRecords.get(class1).get(class2);\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n case 3: { // Cursive Attachment Positioning\n let nextIndex = this.glyphIterator.peekIndex();\n let nextGlyph = this.glyphs[nextIndex];\n if (!nextGlyph) {\n return false;\n }\n\n let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n if (!curRecord || !curRecord.exitAnchor) {\n return false;\n }\n\n let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n if (!nextRecord || !nextRecord.entryAnchor) {\n return false;\n }\n\n let entry = this.getAnchor(nextRecord.entryAnchor);\n let exit = this.getAnchor(curRecord.exitAnchor);\n\n let cur = this.positions[this.glyphIterator.index];\n let next = this.positions[nextIndex];\n let d;\n\n switch (this.direction) {\n case 'ltr':\n cur.xAdvance = exit.x + cur.xOffset;\n\n d = entry.x + next.xOffset;\n next.xAdvance -= d;\n next.xOffset -= d;\n break;\n\n case 'rtl':\n d = exit.x + cur.xOffset;\n cur.xAdvance -= d;\n cur.xOffset -= d;\n next.xAdvance = entry.x + next.xOffset;\n break;\n }\n\n if (this.glyphIterator.flags.rightToLeft) {\n this.glyphIterator.cur.cursiveAttachment = nextIndex;\n cur.yOffset = entry.y - exit.y;\n } else {\n nextGlyph.cursiveAttachment = this.glyphIterator.index;\n cur.yOffset = exit.y - entry.y;\n }\n\n return true;\n }\n\n case 4: { // Mark to base positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0));\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n if (baseIndex === -1) {\n return false;\n }\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 5: { // Mark to ligature positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n if (ligIndex === -1) {\n return false;\n }\n\n let ligAttach = table.ligatureArray[ligIndex];\n let markGlyph = this.glyphIterator.cur;\n let ligGlyph = this.glyphs[baseGlyphIndex];\n let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0)\n ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n : ligGlyph.codePoints.length - 1;\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = ligAttach[compIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 6: { // Mark to mark positioning\n let mark1Index = this.coverageIndex(table.mark1Coverage);\n if (mark1Index === -1) {\n return false;\n }\n\n // get the previous mark to attach to\n let prevIndex = this.glyphIterator.peekIndex(-1);\n let prev = this.glyphs[prevIndex];\n if (!prev || !prev.isMark) {\n return false;\n }\n\n let cur = this.glyphIterator.cur;\n\n // The following logic was borrowed from Harfbuzz\n let good = false;\n if (cur.ligatureID === prev.ligatureID) {\n if (!cur.ligatureID) { // Marks belonging to the same base\n good = true;\n } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n good = true;\n }\n } else {\n // If ligature ids don't match, it may be the case that one of the marks\n // itself is a ligature, in which case match.\n if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n good = true;\n }\n }\n\n if (!good) {\n return false;\n }\n\n let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n if (mark2Index === -1) {\n return false;\n }\n\n let markRecord = table.mark1Array[mark1Index];\n let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, prevIndex);\n return true;\n }\n\n case 7: // Contextual positioning\n return this.applyContext(table);\n\n case 8: // Chaining contextual positioning\n return this.applyChainingContext(table);\n\n case 9: // Extension positioning\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`Unsupported GPOS table: ${lookupType}`);\n }\n }\n\n applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n let baseCoords = this.getAnchor(baseAnchor);\n let markCoords = this.getAnchor(markRecord.markAnchor);\n\n let basePos = this.positions[baseGlyphIndex];\n let markPos = this.positions[this.glyphIterator.index];\n\n markPos.xOffset = baseCoords.x - markCoords.x;\n markPos.yOffset = baseCoords.y - markCoords.y;\n this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n }\n\n getAnchor(anchor) {\n // TODO: contour point, device tables\n let x = anchor.xCoordinate;\n let y = anchor.yCoordinate;\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (anchor.xDeviceTable) {\n x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);\n }\n\n if (anchor.yDeviceTable) {\n y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);\n }\n }\n\n return { x, y };\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n super.applyFeatures(userFeatures, glyphs, advances);\n\n for (var i = 0; i < this.glyphs.length; i++) {\n this.fixCursiveAttachment(i);\n }\n\n this.fixMarkAttachment();\n }\n\n fixCursiveAttachment(i) {\n let glyph = this.glyphs[i];\n if (glyph.cursiveAttachment != null) {\n let j = glyph.cursiveAttachment;\n\n glyph.cursiveAttachment = null;\n this.fixCursiveAttachment(j);\n\n this.positions[i].yOffset += this.positions[j].yOffset;\n }\n }\n\n fixMarkAttachment() {\n for (let i = 0; i < this.glyphs.length; i++) {\n let glyph = this.glyphs[i];\n if (glyph.markAttachment != null) {\n let j = glyph.markAttachment;\n\n this.positions[i].xOffset += this.positions[j].xOffset;\n this.positions[i].yOffset += this.positions[j].yOffset;\n\n if (this.direction === 'ltr') {\n for (let k = j; k < i; k++) {\n this.positions[i].xOffset -= this.positions[k].xAdvance;\n this.positions[i].yOffset -= this.positions[k].yAdvance;\n }\n } else {\n for (let k = j + 1; k < i + 1; k++) {\n this.positions[i].xOffset += this.positions[k].xAdvance;\n this.positions[i].yOffset += this.positions[k].yAdvance;\n }\n }\n }\n }\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport * as r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS = 1 << 0;\nconst ARGS_ARE_XY_VALUES = 1 << 1;\nconst ROUND_XY_TO_GRID = 1 << 2;\nconst WE_HAVE_A_SCALE = 1 << 3;\nconst MORE_COMPONENTS = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS = 1 << 8;\nconst USE_MY_METRICS = 1 << 9;\nconst OVERLAP_COMPOUND = 1 << 10;\nconst SCALED_COMPONENT_OFFSET = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n constructor(onCurve, endContour, x = 0, y = 0) {\n this.onCurve = onCurve;\n this.endContour = endContour;\n this.x = x;\n this.y = y;\n }\n\n copy() {\n return new Point(this.onCurve, this.endContour, this.x, this.y);\n }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n constructor(glyphID, dx, dy) {\n this.glyphID = glyphID;\n this.dx = dx;\n this.dy = dy;\n this.pos = 0;\n this.scaleX = this.scaleY = 1;\n this.scale01 = this.scale10 = 0;\n }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n type = 'TTF';\n\n // Parses just the glyph header and returns the bounding box\n _getCBox(internal) {\n // We need to decode the glyph if variation processing is requested,\n // so it's easier just to recompute the path's cbox after decoding.\n if (this._font._variationProcessor && !internal) {\n return this.path.cbox;\n }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += this._font.loca.offsets[this.id];\n let glyph = GlyfHeader.decode(stream);\n\n let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n return Object.freeze(cbox);\n }\n\n // Parses a single glyph coordinate\n _parseGlyphCoord(stream, prev, short, same) {\n if (short) {\n var val = stream.readUInt8();\n if (!same) {\n val = -val;\n }\n\n val += prev;\n } else {\n if (same) {\n var val = prev;\n } else {\n var val = prev + stream.readInt16BE();\n }\n }\n\n return val;\n }\n\n // Decodes the glyph data into points for simple glyphs,\n // or components for composite glyphs\n _decode() {\n let glyfPos = this._font.loca.offsets[this.id];\n let nextPos = this._font.loca.offsets[this.id + 1];\n\n // Nothing to do if there is no data for this glyph\n if (glyfPos === nextPos) { return null; }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += glyfPos;\n let startPos = stream.pos;\n\n let glyph = GlyfHeader.decode(stream);\n\n if (glyph.numberOfContours > 0) {\n this._decodeSimple(glyph, stream);\n\n } else if (glyph.numberOfContours < 0) {\n this._decodeComposite(glyph, stream, startPos);\n }\n\n return glyph;\n }\n\n _decodeSimple(glyph, stream) {\n // this is a simple glyph\n glyph.points = [];\n\n let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n let flags = [];\n let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n while (flags.length < numCoords) {\n var flag = stream.readUInt8();\n flags.push(flag);\n\n // check for repeat flag\n if (flag & REPEAT) {\n let count = stream.readUInt8();\n for (let j = 0; j < count; j++) {\n flags.push(flag);\n }\n }\n }\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n glyph.points.push(point);\n }\n\n let px = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n }\n\n let py = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n }\n\n if (this._font._variationProcessor) {\n let points = glyph.points.slice();\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.slice(-4);\n }\n\n return;\n }\n\n _decodeComposite(glyph, stream, offset = 0) {\n // this is a composite glyph\n glyph.components = [];\n let haveInstructions = false;\n let flags = MORE_COMPONENTS;\n\n while (flags & MORE_COMPONENTS) {\n flags = stream.readUInt16BE();\n let gPos = stream.pos - offset;\n let glyphID = stream.readUInt16BE();\n if (!haveInstructions) {\n haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n }\n\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n var dx = stream.readInt16BE();\n var dy = stream.readInt16BE();\n } else {\n var dx = stream.readInt8();\n var dy = stream.readInt8();\n }\n\n var component = new Component(glyphID, dx, dy);\n component.pos = gPos;\n\n if (flags & WE_HAVE_A_SCALE) {\n // fixed number with 14 bits of fraction\n component.scaleX =\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n }\n\n glyph.components.push(component);\n }\n\n if (this._font._variationProcessor) {\n let points = [];\n for (let j = 0; j < glyph.components.length; j++) {\n var component = glyph.components[j];\n points.push(new Point(true, true, component.dx, component.dy));\n }\n\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.splice(-4, 4);\n\n for (let i = 0; i < points.length; i++) {\n let point = points[i];\n glyph.components[i].dx = point.x;\n glyph.components[i].dy = point.y;\n }\n }\n\n return haveInstructions;\n }\n\n _getPhantomPoints(glyph) {\n let cbox = this._getCBox(true);\n if (this._metrics == null) {\n this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n }\n\n let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n return [\n new Point(false, true, glyph.xMin - leftBearing, 0),\n new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n new Point(false, true, 0, glyph.yMax + topBearing),\n new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n ];\n }\n\n // Decodes font data, resolves composite glyphs, and returns an array of contours\n _getContours() {\n let glyph = this._decode();\n if (!glyph) {\n return [];\n }\n\n let points = [];\n\n if (glyph.numberOfContours < 0) {\n // resolve composite glyphs\n for (let component of glyph.components) {\n let contours = this._font.getGlyph(component.glyphID)._getContours();\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n for (let j = 0; j < contour.length; j++) {\n let point = contour[j];\n let x = point.x * component.scaleX + point.y * component.scale01 + component.dx;\n let y = point.y * component.scaleY + point.x * component.scale10 + component.dy;\n points.push(new Point(point.onCurve, point.endContour, x, y));\n }\n }\n }\n } else {\n points = glyph.points || [];\n }\n\n // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;\n this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;\n }\n\n let contours = [];\n let cur = [];\n for (let k = 0; k < points.length; k++) {\n var point = points[k];\n cur.push(point);\n if (point.endContour) {\n contours.push(cur);\n cur = [];\n }\n }\n\n return contours;\n }\n\n _getMetrics() {\n if (this._metrics) {\n return this._metrics;\n }\n\n let cbox = this._getCBox(true);\n super._getMetrics(cbox);\n\n if (this._font._variationProcessor && !this._font.HVAR) {\n // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n this.path;\n }\n\n return this._metrics;\n }\n\n // Converts contours to a Path object that can be rendered\n _getPath() {\n let contours = this._getContours();\n let path = new Path;\n\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n let firstPt = contour[0];\n let lastPt = contour[contour.length - 1];\n let start = 0;\n\n if (firstPt.onCurve) {\n // The first point will be consumed by the moveTo command, so skip in the loop\n var curvePt = null;\n start = 1;\n } else {\n if (lastPt.onCurve) {\n // Start at the last point if the first point is off curve and the last point is on curve\n firstPt = lastPt;\n } else {\n // Start at the middle if both the first and last points are off curve\n firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n }\n\n var curvePt = firstPt;\n }\n\n path.moveTo(firstPt.x, firstPt.y);\n\n for (let j = start; j < contour.length; j++) {\n let pt = contour[j];\n let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n if (prevPt.onCurve && pt.onCurve) {\n path.lineTo(pt.x, pt.y);\n\n } else if (prevPt.onCurve && !pt.onCurve) {\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && !pt.onCurve) {\n let midX = (prevPt.x + pt.x) / 2;\n let midY = (prevPt.y + pt.y) / 2;\n path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && pt.onCurve) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n var curvePt = null;\n\n } else {\n throw new Error(\"Unknown TTF path state\");\n }\n }\n\n // Connect the first and last points\n if (curvePt) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n }\n\n path.closePath();\n }\n\n return path;\n }\n}\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport {isMark} from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n constructor(id, codePoints, font) {\n /**\n * The glyph id in the font\n * @type {number}\n */\n this.id = id;\n\n /**\n * An array of unicode code points that are represented by this glyph.\n * There can be multiple code points in the case of ligatures and other glyphs\n * that represent multiple visual characters.\n * @type {number[]}\n */\n this.codePoints = codePoints;\n this._font = font;\n\n // TODO: get this info from GDEF if available\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n\n _getPath() {\n return new Path();\n }\n\n _getCBox() {\n return this.path.cbox;\n }\n\n _getBBox() {\n return this.path.bbox;\n }\n\n _getTableMetrics(table) {\n if (this.id < table.metrics.length) {\n return table.metrics.get(this.id);\n }\n\n let metric = table.metrics.get(table.metrics.length - 1);\n let res = {\n advance: metric ? metric.advance : 0,\n bearing: table.bearings.get(this.id - table.metrics.length) || 0\n };\n\n return res;\n }\n\n _getMetrics(cbox) {\n if (this._metrics) { return this._metrics; }\n\n let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n if (this._font.vmtx) {\n var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n } else {\n let os2;\n if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n if ((os2 = this._font['OS/2']) && os2.version > 0) {\n var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n var topBearing = os2.typoAscender - cbox.maxY;\n\n } else {\n let { hhea } = this._font;\n var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n var topBearing = hhea.ascent - cbox.maxY;\n }\n }\n\n if (this._font._variationProcessor && this._font.HVAR) {\n advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n }\n\n return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n }\n\n /**\n * The glyph’s control box.\n * This is often the same as the bounding box, but is faster to compute.\n * Because of the way bezier curves are defined, some of the control points\n * can be outside of the bounding box. Where `bbox` takes this into account,\n * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n * for a more detailed description.\n *\n * @type {BBox}\n */\n @cache\n get cbox() {\n return this._getCBox();\n }\n\n /**\n * The glyph’s bounding box, i.e. the rectangle that encloses the\n * glyph outline as tightly as possible.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return this._getBBox();\n }\n\n /**\n * A vector Path object representing the glyph outline.\n * @type {Path}\n */\n @cache\n get path() {\n // Cache the path so we only decode it once\n // Decoding is actually performed by subclasses\n return this._getPath();\n }\n\n /**\n * Returns a path scaled to the given font size.\n * @param {number} size\n * @return {Path}\n */\n getScaledPath(size) {\n let scale = 1 / this._font.unitsPerEm * size;\n return this.path.scale(scale);\n }\n\n /**\n * The glyph's advance width.\n * @type {number}\n */\n @cache\n get advanceWidth() {\n return this._getMetrics().advanceWidth;\n }\n\n /**\n * The glyph's advance height.\n * @type {number}\n */\n @cache\n get advanceHeight() {\n return this._getMetrics().advanceHeight;\n }\n\n get ligatureCaretPositions() {}\n\n _getName() {\n let { post } = this._font;\n if (!post) {\n return null;\n }\n\n switch (post.version) {\n case 1:\n return StandardNames[this.id];\n\n case 2:\n let id = post.glyphNameIndex[this.id];\n if (id < StandardNames.length) {\n return StandardNames[id];\n }\n\n return post.names[id - StandardNames.length];\n\n case 2.5:\n return StandardNames[this.id + post.offsets[this.id]];\n\n case 4:\n return String.fromCharCode(post.map[this.id]);\n }\n }\n\n /**\n * The glyph's name\n * @type {string}\n */\n @cache\n get name() {\n return this._getName();\n }\n\n /**\n * Renders the glyph to the given graphics context, at the specified font size.\n * @param {CanvasRenderingContext2d} ctx\n * @param {number} size\n */\n render(ctx, size) {\n ctx.save();\n\n let scale = 1 / this._font.head.unitsPerEm * size;\n ctx.scale(scale, scale);\n\n let fn = this.path.toFunction();\n fn(ctx);\n ctx.fill();\n\n ctx.restore();\n }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n moveTo: 'M',\n lineTo: 'L',\n quadraticCurveTo: 'Q',\n bezierCurveTo: 'C',\n closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n constructor() {\n this.commands = [];\n this._bbox = null;\n this._cbox = null;\n }\n\n /**\n * Compiles the path to a JavaScript function that can be applied with\n * a graphics context in order to render the path.\n * @return {string}\n */\n toFunction() {\n return ctx => {\n this.commands.forEach(c => {\n return ctx[c.command].apply(ctx, c.args)\n })\n };\n }\n\n /**\n * Converts the path to an SVG path data string\n * @return {string}\n */\n toSVG() {\n let cmds = this.commands.map(c => {\n let args = c.args.map(arg => Math.round(arg * 100) / 100);\n return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n });\n\n return cmds.join('');\n }\n\n /**\n * Gets the \"control box\" of a path.\n * This is like the bounding box, but it includes all points including\n * control points of bezier segments and is much faster to compute than\n * the real bounding box.\n * @type {BBox}\n */\n get cbox() {\n if (!this._cbox) {\n let cbox = new BBox;\n for (let command of this.commands) {\n for (let i = 0; i < command.args.length; i += 2) {\n cbox.addPoint(command.args[i], command.args[i + 1]);\n }\n }\n\n this._cbox = Object.freeze(cbox);\n }\n\n return this._cbox;\n }\n\n /**\n * Gets the exact bounding box of the path by evaluating curve segments.\n * Slower to compute than the control box, but more accurate.\n * @type {BBox}\n */\n get bbox() {\n if (this._bbox) {\n return this._bbox;\n }\n\n let bbox = new BBox;\n let cx = 0, cy = 0;\n\n let f = t => (\n Math.pow(1 - t, 3) * p0[i]\n + 3 * Math.pow(1 - t, 2) * t * p1[i]\n + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n + Math.pow(t, 3) * p3[i]\n );\n\n for (let c of this.commands) {\n switch (c.command) {\n case 'moveTo':\n case 'lineTo':\n let [x, y] = c.args;\n bbox.addPoint(x, y);\n cx = x;\n cy = y;\n break;\n\n case 'quadraticCurveTo':\n case 'bezierCurveTo':\n if (c.command === 'quadraticCurveTo') {\n // http://fontforge.org/bezier.html\n var [qp1x, qp1y, p3x, p3y] = c.args;\n var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)\n var cp1y = cy + 2 / 3 * (qp1y - cy);\n var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)\n var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n } else {\n var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n }\n\n // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n bbox.addPoint(p3x, p3y);\n\n var p0 = [cx, cy];\n var p1 = [cp1x, cp1y];\n var p2 = [cp2x, cp2y];\n var p3 = [p3x, p3y];\n\n for (var i = 0; i <= 1; i++) {\n let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n\n if (a === 0) {\n if (b === 0) {\n continue;\n }\n\n let t = -c / b;\n if (0 < t && t < 1) {\n if (i === 0) {\n bbox.addPoint(f(t), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t));\n }\n }\n\n continue;\n }\n\n let b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n continue;\n }\n\n let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t1), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t1));\n }\n }\n\n let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t2), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t2));\n }\n }\n }\n\n cx = p3x;\n cy = p3y;\n break;\n }\n }\n\n return this._bbox = Object.freeze(bbox);\n }\n\n /**\n * Applies a mapping function to each point in the path.\n * @param {function} fn\n * @return {Path}\n */\n mapPoints(fn) {\n let path = new Path;\n\n for (let c of this.commands) {\n let args = [];\n for (let i = 0; i < c.args.length; i += 2) {\n let [x, y] = fn(c.args[i], c.args[i + 1]);\n args.push(x, y);\n }\n\n path[c.command](...args);\n }\n\n return path;\n }\n\n /**\n * Transforms the path by the given matrix.\n */\n transform(m0, m1, m2, m3, m4, m5) {\n return this.mapPoints((x, y) => {\n const tx = m0 * x + m2 * y + m4;\n const ty = m1 * x + m3 * y + m5;\n return [tx, ty];\n });\n }\n\n /**\n * Translates the path by the given offset.\n */\n translate(x, y) {\n return this.transform(1, 0, 0, 1, x, y);\n }\n\n /**\n * Rotates the path by the given angle (in radians).\n */\n rotate(angle) {\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n return this.transform(cos, sin, -sin, cos, 0, 0);\n }\n\n /**\n * Scales the path.\n */\n scale(scaleX, scaleY = scaleX) {\n return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n Path.prototype[command] = function(...args) {\n this._bbox = this._cbox = null;\n this.commands.push({\n command,\n args\n });\n\n return this;\n };\n}\n","export default [\n '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n type = 'CFF';\n\n _getName() {\n if (this._font.CFF2) {\n return super._getName();\n }\n\n return this._font['CFF '].getGlyphName(this.id);\n }\n\n bias(s) {\n if (s.length < 1240) {\n return 107;\n } else if (s.length < 33900) {\n return 1131;\n } else {\n return 32768;\n }\n }\n\n _getPath() {\n let cff = this._font.CFF2 || this._font['CFF '];\n let { stream } = cff;\n let str = cff.topDict.CharStrings[this.id];\n let end = str.offset + str.length;\n stream.pos = str.offset;\n\n let path = new Path;\n let stack = [];\n let trans = [];\n\n let width = null;\n let nStems = 0;\n let x = 0, y = 0;\n let usedGsubrs;\n let usedSubrs;\n let open = false;\n\n this._usedGsubrs = usedGsubrs = {};\n this._usedSubrs = usedSubrs = {};\n\n let gsubrs = cff.globalSubrIndex || [];\n let gsubrsBias = this.bias(gsubrs);\n\n let privateDict = cff.privateDictForGlyph(this.id) || {};\n let subrs = privateDict.Subrs || [];\n let subrsBias = this.bias(subrs);\n\n let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n let vsindex = privateDict.vsindex;\n let variationProcessor = this._font._variationProcessor;\n\n function checkWidth() {\n if (width == null) {\n width = stack.shift() + privateDict.nominalWidthX;\n }\n }\n\n function parseStems() {\n if (stack.length % 2 !== 0) {\n checkWidth();\n }\n\n nStems += stack.length >> 1;\n return stack.length = 0;\n }\n\n function moveTo(x, y) {\n if (open) {\n path.closePath();\n }\n\n path.moveTo(x, y);\n open = true;\n }\n\n let parse = function () {\n while (stream.pos < end) {\n let op = stream.readUInt8();\n if (op < 32) {\n let index, subr, phase;\n let c1x, c1y, c2x, c2y, c3x, c3y;\n let c4x, c4y, c5x, c5y, c6x, c6y;\n let pts;\n\n switch (op) {\n case 1: // hstem\n case 3: // vstem\n case 18: // hstemhm\n case 23: // vstemhm\n parseStems();\n break;\n\n case 4: // vmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 5: // rlineto\n while (stack.length >= 2) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n break;\n\n case 6: // hlineto\n case 7: // vlineto\n phase = op === 6;\n while (stack.length >= 1) {\n if (phase) {\n x += stack.shift();\n } else {\n y += stack.shift();\n }\n\n path.lineTo(x, y);\n phase = !phase;\n }\n break;\n\n case 8: // rrcurveto\n while (stack.length > 0) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 10: // callsubr\n index = stack.pop() + subrsBias;\n subr = subrs[index];\n if (subr) {\n usedSubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 11: // return\n if (cff.version >= 2) {\n break;\n }\n return;\n\n case 14: // endchar\n if (cff.version >= 2) {\n break;\n }\n\n if (stack.length > 0) {\n checkWidth();\n }\n\n if (open) {\n path.closePath();\n open = false;\n }\n break;\n\n case 15: { // vsindex\n if (cff.version < 2) {\n throw new Error('vsindex operator not supported in CFF v1');\n }\n\n vsindex = stack.pop();\n break;\n }\n\n case 16: { // blend\n if (cff.version < 2) {\n throw new Error('blend operator not supported in CFF v1');\n }\n\n if (!variationProcessor) {\n throw new Error('blend operator in non-variation font');\n }\n\n let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n let numBlends = stack.pop();\n let numOperands = numBlends * blendVector.length;\n let delta = stack.length - numOperands;\n let base = delta - numBlends;\n\n for (let i = 0; i < numBlends; i++) {\n let sum = stack[base + i];\n for (let j = 0; j < blendVector.length; j++) {\n sum += blendVector[j] * stack[delta++];\n }\n\n stack[base + i] = sum;\n }\n\n while (numOperands--) {\n stack.pop();\n }\n\n break;\n }\n\n case 19: // hintmask\n case 20: // cntrmask\n parseStems();\n stream.pos += (nStems + 7) >> 3;\n break;\n\n case 21: // rmoveto\n if (stack.length > 2) {\n checkWidth();\n }\n\n x += stack.shift();\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 22: // hmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n x += stack.shift();\n moveTo(x, y);\n break;\n\n case 24: // rcurveline\n while (stack.length >= 8) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n break;\n\n case 25: // rlinecurve\n while (stack.length >= 8) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n break;\n\n case 26: // vvcurveto\n if (stack.length % 2) {\n x += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x;\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 27: // hhcurveto\n if (stack.length % 2) {\n y += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y;\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 28: // shortint\n stack.push(stream.readInt16BE());\n break;\n\n case 29: // callgsubr\n index = stack.pop() + gsubrsBias;\n subr = gsubrs[index];\n if (subr) {\n usedGsubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 30: // vhcurveto\n case 31: // hvcurveto\n phase = op === 31;\n while (stack.length >= 4) {\n if (phase) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n y = c2y + stack.shift();\n x = c2x + (stack.length === 1 ? stack.shift() : 0);\n } else {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + (stack.length === 1 ? stack.shift() : 0);\n }\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n phase = !phase;\n }\n break;\n\n case 12:\n op = stream.readUInt8();\n switch (op) {\n case 3: // and\n let a = stack.pop();\n let b = stack.pop();\n stack.push(a && b ? 1 : 0);\n break;\n\n case 4: // or\n a = stack.pop();\n b = stack.pop();\n stack.push(a || b ? 1 : 0);\n break;\n\n case 5: // not\n a = stack.pop();\n stack.push(a ? 0 : 1);\n break;\n\n case 9: // abs\n a = stack.pop();\n stack.push(Math.abs(a));\n break;\n\n case 10: // add\n a = stack.pop();\n b = stack.pop();\n stack.push(a + b);\n break;\n\n case 11: // sub\n a = stack.pop();\n b = stack.pop();\n stack.push(a - b);\n break;\n\n case 12: // div\n a = stack.pop();\n b = stack.pop();\n stack.push(a / b);\n break;\n\n case 14: // neg\n a = stack.pop();\n stack.push(-a);\n break;\n\n case 15: // eq\n a = stack.pop();\n b = stack.pop();\n stack.push(a === b ? 1 : 0);\n break;\n\n case 18: // drop\n stack.pop();\n break;\n\n case 20: // put\n let val = stack.pop();\n let idx = stack.pop();\n trans[idx] = val;\n break;\n\n case 21: // get\n idx = stack.pop();\n stack.push(trans[idx] || 0);\n break;\n\n case 22: // ifelse\n let s1 = stack.pop();\n let s2 = stack.pop();\n let v1 = stack.pop();\n let v2 = stack.pop();\n stack.push(v1 <= v2 ? s1 : s2);\n break;\n\n case 23: // random\n stack.push(Math.random());\n break;\n\n case 24: // mul\n a = stack.pop();\n b = stack.pop();\n stack.push(a * b);\n break;\n\n case 26: // sqrt\n a = stack.pop();\n stack.push(Math.sqrt(a));\n break;\n\n case 27: // dup\n a = stack.pop();\n stack.push(a, a);\n break;\n\n case 28: // exch\n a = stack.pop();\n b = stack.pop();\n stack.push(b, a);\n break;\n\n case 29: // index\n idx = stack.pop();\n if (idx < 0) {\n idx = 0;\n } else if (idx > stack.length - 1) {\n idx = stack.length - 1;\n }\n\n stack.push(stack[idx]);\n break;\n\n case 30: // roll\n let n = stack.pop();\n let j = stack.pop();\n\n if (j >= 0) {\n while (j > 0) {\n var t = stack[n - 1];\n for (let i = n - 2; i >= 0; i--) {\n stack[i + 1] = stack[i];\n }\n\n stack[0] = t;\n j--;\n }\n } else {\n while (j < 0) {\n var t = stack[0];\n for (let i = 0; i <= n; i++) {\n stack[i] = stack[i + 1];\n }\n\n stack[n - 1] = t;\n j++;\n }\n }\n break;\n\n case 34: // hflex\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y;\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 35: // flex\n pts = [];\n\n for (let i = 0; i <= 5; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n stack.shift(); // fd\n break;\n\n case 36: // hflex1\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y + stack.shift();\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 37: // flex1\n let startx = x;\n let starty = y;\n\n pts = [];\n for (let i = 0; i <= 4; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n x += stack.shift();\n y = starty;\n } else {\n x = startx;\n y += stack.shift();\n }\n\n pts.push(x, y);\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n break;\n\n default:\n throw new Error(`Unknown op: 12 ${op}`);\n }\n break;\n\n default:\n throw new Error(`Unknown op: ${op}`);\n }\n\n } else if (op < 247) {\n stack.push(op - 139);\n } else if (op < 251) {\n var b1 = stream.readUInt8();\n stack.push((op - 247) * 256 + b1 + 108);\n } else if (op < 255) {\n var b1 = stream.readUInt8();\n stack.push(-(op - 251) * 256 - b1 - 108);\n } else {\n stack.push(stream.readInt32BE() / 65536);\n }\n }\n };\n\n parse();\n\n if (open) {\n path.closePath();\n }\n\n return path;\n }\n}\n","import TTFGlyph from './TTFGlyph';\nimport * as r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n originX: r.uint16,\n originY: r.uint16,\n type: new r.String(4),\n data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n type = 'SBIX';\n\n /**\n * Returns an object representing a glyph image at the given point size.\n * The object has a data property with a Buffer containing the actual image data,\n * along with the image type, and origin.\n *\n * @param {number} size\n * @return {object}\n */\n getImageForSize(size) {\n for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n var table = this._font.sbix.imageTables[i];\n if (table.ppem >= size) { break; }\n }\n\n let offsets = table.imageOffsets;\n let start = offsets[this.id];\n let end = offsets[this.id + 1];\n\n if (start === end) {\n return null;\n }\n\n this._font.stream.pos = start;\n return SBIXImage.decode(this._font.stream, {buflen: end - start});\n }\n\n render(ctx, size) {\n let img = this.getImageForSize(size);\n if (img != null) {\n let scale = size / this._font.unitsPerEm;\n ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n }\n\n if (this._font.sbix.flags.renderOutlines) {\n super.render(ctx, size);\n }\n }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n constructor(glyph, color) {\n this.glyph = glyph;\n this.color = color;\n }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n type = 'COLR';\n\n _getBBox() {\n let bbox = new BBox;\n for (let i = 0; i < this.layers.length; i++) {\n let layer = this.layers[i];\n let b = layer.glyph.bbox;\n bbox.addPoint(b.minX, b.minY);\n bbox.addPoint(b.maxX, b.maxY);\n }\n\n return bbox;\n }\n\n /**\n * Returns an array of objects containing the glyph and color for\n * each layer in the composite color glyph.\n * @type {object[]}\n */\n get layers() {\n let cpal = this._font.CPAL;\n let colr = this._font.COLR;\n let low = 0;\n let high = colr.baseGlyphRecord.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n var rec = colr.baseGlyphRecord[mid];\n\n if (this.id < rec.gid) {\n high = mid - 1;\n } else if (this.id > rec.gid) {\n low = mid + 1;\n } else {\n var baseLayer = rec;\n break;\n }\n }\n\n // if base glyph not found in COLR table,\n // default to normal glyph from glyf or CFF\n if (baseLayer == null) {\n var g = this._font._getBaseGlyph(this.id);\n var color = {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 255\n };\n\n return [new COLRLayer(g, color)];\n }\n\n // otherwise, return an array of all the layers\n let layers = [];\n for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n var rec = colr.layerRecords[i];\n var color = cpal.colorRecords[rec.paletteIndex];\n var g = this._font._getBaseGlyph(rec.gid);\n layers.push(new COLRLayer(g, color));\n }\n\n return layers;\n }\n\n render(ctx, size) {\n for (let {glyph, color} of this.layers) {\n ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n glyph.render(ctx, size);\n }\n\n return;\n }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK = 0x0fff;\nconst EMBEDDED_TUPLE_COORD = 0x8000;\nconst INTERMEDIATE_TUPLE = 0x4000;\nconst PRIVATE_POINT_NUMBERS = 0x2000;\nconst TUPLE_INDEX_MASK = 0x0fff;\nconst POINTS_ARE_WORDS = 0x80;\nconst POINT_RUN_COUNT_MASK = 0x7f;\nconst DELTAS_ARE_ZERO = 0x80;\nconst DELTAS_ARE_WORDS = 0x40;\nconst DELTA_RUN_COUNT_MASK = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n constructor(font, coords) {\n this.font = font;\n this.normalizedCoords = this.normalizeCoords(coords);\n this.blendVectors = new Map;\n }\n\n normalizeCoords(coords) {\n // the default mapping is linear along each axis, in two segments:\n // from the minValue to defaultValue, and from defaultValue to maxValue.\n let normalized = [];\n for (var i = 0; i < this.font.fvar.axis.length; i++) {\n let axis = this.font.fvar.axis[i];\n if (coords[i] < axis.defaultValue) {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n } else {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n }\n }\n\n // if there is an avar table, the normalized value is calculated\n // by interpolating between the two nearest mapped values.\n if (this.font.avar) {\n for (var i = 0; i < this.font.avar.segment.length; i++) {\n let segment = this.font.avar.segment[i];\n for (let j = 0; j < segment.correspondence.length; j++) {\n let pair = segment.correspondence[j];\n if (j >= 1 && normalized[i] < pair.fromCoord) {\n let prev = segment.correspondence[j - 1];\n normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n prev.toCoord;\n\n break;\n }\n }\n }\n }\n\n return normalized;\n }\n\n transformPoints(gid, glyphPoints) {\n if (!this.font.fvar || !this.font.gvar) { return; }\n\n let { gvar } = this.font;\n if (gid >= gvar.glyphCount) { return; }\n\n let offset = gvar.offsets[gid];\n if (offset === gvar.offsets[gid + 1]) { return; }\n\n // Read the gvar data for this glyph\n let { stream } = this.font;\n stream.pos = offset;\n if (stream.pos >= stream.length) {\n return;\n }\n\n let tupleCount = stream.readUInt16BE();\n let offsetToData = offset + stream.readUInt16BE();\n\n if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n var here = stream.pos;\n stream.pos = offsetToData;\n var sharedPoints = this.decodePoints();\n offsetToData = stream.pos;\n stream.pos = here;\n }\n\n let origPoints = glyphPoints.map(pt => pt.copy());\n\n tupleCount &= TUPLE_COUNT_MASK;\n for (let i = 0; i < tupleCount; i++) {\n let tupleDataSize = stream.readUInt16BE();\n let tupleIndex = stream.readUInt16BE();\n\n if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n var tupleCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n tupleCoords.push(stream.readInt16BE() / 16384);\n }\n\n } else {\n if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n throw new Error('Invalid gvar table');\n }\n\n var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n }\n\n if (tupleIndex & INTERMEDIATE_TUPLE) {\n var startCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n startCoords.push(stream.readInt16BE() / 16384);\n }\n\n var endCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n endCoords.push(stream.readInt16BE() / 16384);\n }\n }\n\n // Get the factor at which to apply this tuple\n let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n if (factor === 0) {\n offsetToData += tupleDataSize;\n continue;\n }\n\n var here = stream.pos;\n stream.pos = offsetToData;\n\n if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n var points = this.decodePoints();\n } else {\n var points = sharedPoints;\n }\n\n // points.length = 0 means there are deltas for all points\n let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n let xDeltas = this.decodeDeltas(nPoints);\n let yDeltas = this.decodeDeltas(nPoints);\n\n if (points.length === 0) { // all points\n for (let i = 0; i < glyphPoints.length; i++) {\n var point = glyphPoints[i];\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n } else {\n let outPoints = origPoints.map(pt => pt.copy());\n let hasDelta = glyphPoints.map(() => false);\n\n for (let i = 0; i < points.length; i++) {\n let idx = points[i];\n if (idx < glyphPoints.length) {\n let point = outPoints[idx];\n hasDelta[idx] = true;\n\n point.x += xDeltas[i] * factor;\n point.y += yDeltas[i] * factor;\n }\n }\n\n this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n for (let i = 0; i < glyphPoints.length; i++) {\n let deltaX = outPoints[i].x - origPoints[i].x;\n let deltaY = outPoints[i].y - origPoints[i].y;\n\n glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX);\n glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY);\n }\n }\n\n offsetToData += tupleDataSize;\n stream.pos = here;\n }\n }\n\n decodePoints() {\n let stream = this.font.stream;\n let count = stream.readUInt8();\n\n if (count & POINTS_ARE_WORDS) {\n count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n }\n\n let points = new Uint16Array(count);\n let i = 0;\n let point = 0;\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n for (let j = 0; j < runCount && i < count; j++) {\n point += fn.call(stream);\n points[i++] = point;\n }\n }\n\n return points;\n }\n\n decodeDeltas(count) {\n let stream = this.font.stream;\n let i = 0;\n let deltas = new Int16Array(count);\n\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n if (run & DELTAS_ARE_ZERO) {\n i += runCount;\n\n } else {\n let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n for (let j = 0; j < runCount && i < count; j++) {\n deltas[i++] = fn.call(stream);\n }\n }\n }\n\n return deltas;\n }\n\n tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n let normalized = this.normalizedCoords;\n let { gvar } = this.font;\n let factor = 1;\n\n for (let i = 0; i < gvar.axisCount; i++) {\n if (tupleCoords[i] === 0) {\n continue;\n }\n\n if (normalized[i] === 0) {\n return 0;\n }\n\n if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n (normalized[i] > Math.max(0, tupleCoords[i]))) {\n return 0;\n }\n\n factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n } else {\n if ((normalized[i] < startCoords[i]) ||\n (normalized[i] > endCoords[i])) {\n return 0;\n\n } else if (normalized[i] < tupleCoords[i]) {\n factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n } else {\n factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n }\n }\n }\n\n return factor;\n }\n\n // Interpolates points without delta values.\n // Needed for the Ø and Q glyphs in Skia.\n // Algorithm from Freetype.\n interpolateMissingDeltas(points, inPoints, hasDelta) {\n if (points.length === 0) {\n return;\n }\n\n let point = 0;\n while (point < points.length) {\n let firstPoint = point;\n\n // find the end point of the contour\n let endPoint = point;\n let pt = points[endPoint];\n while (!pt.endContour) {\n pt = points[++endPoint];\n }\n\n // find the first point that has a delta\n while (point <= endPoint && !hasDelta[point]) {\n point++;\n }\n\n if (point > endPoint) {\n continue;\n }\n\n let firstDelta = point;\n let curDelta = point;\n point++;\n\n while (point <= endPoint) {\n // find the next point with a delta, and interpolate intermediate points\n if (hasDelta[point]) {\n this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n curDelta = point;\n }\n\n point++;\n }\n\n // shift contour if we only have a single delta\n if (curDelta === firstDelta) {\n this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n } else {\n // otherwise, handle the remaining points at the end and beginning of the contour\n this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n if (firstDelta > 0) {\n this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n }\n }\n\n point = endPoint + 1;\n }\n }\n\n deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n if (p1 > p2) {\n return;\n }\n\n let iterable = ['x', 'y'];\n for (let i = 0; i < iterable.length; i++) {\n let k = iterable[i];\n if (inPoints[ref1][k] > inPoints[ref2][k]) {\n var p = ref1;\n ref1 = ref2;\n ref2 = p;\n }\n\n let in1 = inPoints[ref1][k];\n let in2 = inPoints[ref2][k];\n let out1 = outPoints[ref1][k];\n let out2 = outPoints[ref2][k];\n\n // If the reference points have the same coordinate but different\n // delta, inferred delta is zero. Otherwise interpolate.\n if (in1 !== in2 || out1 === out2) {\n let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n for (let p = p1; p <= p2; p++) {\n let out = inPoints[p][k];\n\n if (out <= in1) {\n out += out1 - in1;\n } else if (out >= in2) {\n out += out2 - in2;\n } else {\n out = out1 + (out - in1) * scale;\n }\n\n outPoints[p][k] = out;\n }\n }\n }\n }\n\n deltaShift(p1, p2, ref, inPoints, outPoints) {\n let deltaX = outPoints[ref].x - inPoints[ref].x;\n let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n for (let p = p1; p <= p2; p++) {\n if (p !== ref) {\n outPoints[p].x += deltaX;\n outPoints[p].y += deltaY;\n }\n }\n }\n\n getAdvanceAdjustment(gid, table) {\n let outerIndex, innerIndex;\n\n if (table.advanceWidthMapping) {\n let idx = gid;\n if (idx >= table.advanceWidthMapping.mapCount) {\n idx = table.advanceWidthMapping.mapCount - 1;\n }\n\n let entryFormat = table.advanceWidthMapping.entryFormat;\n ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n } else {\n outerIndex = 0;\n innerIndex = gid;\n }\n\n return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);\n }\n\n // See pseudo code from `Font Variations Overview'\n // in the OpenType specification.\n getDelta(itemStore, outerIndex, innerIndex) {\n if (outerIndex >= itemStore.itemVariationData.length) {\n return 0;\n }\n\n let varData = itemStore.itemVariationData[outerIndex];\n if (innerIndex >= varData.deltaSets.length) {\n return 0;\n }\n\n let deltaSet = varData.deltaSets[innerIndex];\n let blendVector = this.getBlendVector(itemStore, outerIndex);\n let netAdjustment = 0;\n\n for (let master = 0; master < varData.regionIndexCount; master++) {\n netAdjustment += deltaSet.deltas[master] * blendVector[master];\n }\n\n return netAdjustment;\n }\n\n getBlendVector(itemStore, outerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n if (this.blendVectors.has(varData)) {\n return this.blendVectors.get(varData);\n }\n\n let normalizedCoords = this.normalizedCoords;\n let blendVector = [];\n\n // outer loop steps through master designs to be blended\n for (let master = 0; master < varData.regionIndexCount; master++) {\n let scalar = 1;\n let regionIndex = varData.regionIndexes[master];\n let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n // inner loop steps through axes in this region\n for (let j = 0; j < axes.length; j++) {\n let axis = axes[j];\n let axisScalar;\n\n // compute the scalar contribution of this axis\n // ignore invalid ranges\n if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n axisScalar = 1;\n\n } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n axisScalar = 1;\n\n // peak of 0 means ignore this axis\n } else if (axis.peakCoord === 0) {\n axisScalar = 1;\n\n // ignore this region if coords are out of range\n } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n axisScalar = 0;\n\n // calculate a proportional factor\n } else {\n if (normalizedCoords[j] === axis.peakCoord) {\n axisScalar = 1;\n } else if (normalizedCoords[j] < axis.peakCoord) {\n axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n (axis.peakCoord - axis.startCoord + Number.EPSILON);\n } else {\n axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n (axis.endCoord - axis.peakCoord + Number.EPSILON);\n }\n }\n\n // take product of all the axis scalars\n scalar *= axisScalar;\n }\n\n blendVector[master] = scalar;\n }\n\n this.blendVectors.set(varData, blendVector);\n return blendVector;\n }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n constructor(font) {\n super(font);\n this.glyphEncoder = new TTFGlyphEncoder;\n }\n\n _addGlyph(gid) {\n let glyph = this.font.getGlyph(gid);\n let glyf = glyph._decode();\n\n // get the offset to the glyph from the loca table\n let curOffset = this.font.loca.offsets[gid];\n let nextOffset = this.font.loca.offsets[gid + 1];\n\n let stream = this.font._getTableStream('glyf');\n stream.pos += curOffset;\n\n let buffer = stream.readBuffer(nextOffset - curOffset);\n\n // if it is a compound glyph, include its components\n if (glyf && glyf.numberOfContours < 0) {\n buffer = new Uint8Array(buffer);\n let view = new DataView(buffer.buffer);\n for (let component of glyf.components) {\n gid = this.includeGlyph(component.glyphID);\n view.setUint16(component.pos, gid);\n }\n } else if (glyf && this.font._variationProcessor) {\n // If this is a TrueType variation glyph, re-encode the path\n buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n }\n\n this.glyf.push(buffer);\n this.loca.offsets.push(this.offset);\n\n this.hmtx.metrics.push({\n advance: glyph.advanceWidth,\n bearing: glyph._getMetrics().leftBearing\n });\n\n this.offset += buffer.length;\n return this.glyf.length - 1;\n }\n\n encode() {\n // tables required by PDF spec:\n // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n //\n // additional tables required for standalone fonts:\n // name, cmap, OS/2, post\n\n this.glyf = [];\n this.offset = 0;\n this.loca = {\n offsets: [],\n version: this.font.loca.version\n };\n\n this.hmtx = {\n metrics: [],\n bearings: []\n };\n\n // include all the glyphs\n // not using a for loop because we need to support adding more\n // glyphs to the array as we go, and CoffeeScript caches the length.\n let i = 0;\n while (i < this.glyphs.length) {\n this._addGlyph(this.glyphs[i++]);\n }\n\n let maxp = cloneDeep(this.font.maxp);\n maxp.numGlyphs = this.glyf.length;\n\n this.loca.offsets.push(this.offset);\n\n let head = cloneDeep(this.font.head);\n head.indexToLocFormat = this.loca.version;\n\n let hhea = cloneDeep(this.font.hhea);\n hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n // map = []\n // for index in [0...256]\n // if index < @numGlyphs\n // map[index] = index\n // else\n // map[index] = 0\n //\n // cmapTable =\n // version: 0\n // length: 262\n // language: 0\n // codeMap: map\n //\n // cmap =\n // version: 0\n // numSubtables: 1\n // tables: [\n // platformID: 1\n // encodingID: 0\n // table: cmapTable\n // ]\n\n // TODO: subset prep, cvt, fpgm?\n return Directory.toBuffer({\n tables: {\n head,\n hhea,\n loca: this.loca,\n maxp,\n 'cvt ': this.font['cvt '],\n prep: this.font.prep,\n glyf: this.glyf,\n hmtx: this.hmtx,\n fpgm: this.font.fpgm\n\n // name: clone @font.name\n // 'OS/2': clone @font['OS/2']\n // post: clone @font.post\n // cmap: cmap\n }\n });\n }\n}\n","import * as r from 'restructure';\n\nconst resolved = Promise.resolve();\n\nexport default class Subset {\n constructor(font) {\n this.font = font;\n this.glyphs = [];\n this.mapping = {};\n\n // always include the missing glyph\n this.includeGlyph(0);\n }\n\n includeGlyph(glyph) {\n if (typeof glyph === 'object') {\n glyph = glyph.id;\n }\n\n if (this.mapping[glyph] == null) {\n this.glyphs.push(glyph);\n this.mapping[glyph] = this.glyphs.length - 1;\n }\n\n return this.mapping[glyph];\n }\n}\n","import * as r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\nclass Point {\n static size(val) {\n return val >= 0 && val <= 255 ? 1 : 2;\n }\n \n static encode(stream, value) {\n if (value >= 0 && value <= 255) {\n stream.writeUInt8(value);\n } else {\n stream.writeInt16BE(value);\n }\n }\n}\n\nlet Glyf = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16,\n endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n instructions: new r.Array(r.uint8, r.uint16),\n flags: new r.Array(r.uint8, 0),\n xPoints: new r.Array(Point, 0),\n yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n encodeSimple(path, instructions = []) {\n let endPtsOfContours = [];\n let xPoints = [];\n let yPoints = [];\n let flags = [];\n let same = 0;\n let lastX = 0, lastY = 0, lastFlag = 0;\n let pointCount = 0;\n \n for (let i = 0; i < path.commands.length; i++) {\n let c = path.commands[i];\n \n for (let j = 0; j < c.args.length; j += 2) {\n let x = c.args[j];\n let y = c.args[j + 1];\n let flag = 0;\n \n // If the ending point of a quadratic curve is the midpoint\n // between the control point and the control point of the next\n // quadratic curve, we can omit the ending point.\n if (c.command === 'quadraticCurveTo' && j === 2) {\n let next = path.commands[i + 1];\n if (next && next.command === 'quadraticCurveTo') {\n let midX = (lastX + next.args[0]) / 2;\n let midY = (lastY + next.args[1]) / 2;\n \n if (x === midX && y === midY) {\n continue;\n }\n }\n }\n \n // All points except control points are on curve.\n if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n flag |= ON_CURVE;\n }\n \n flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n \n if (flag === lastFlag && same < 255) {\n flags[flags.length - 1] |= REPEAT;\n same++;\n } else {\n if (same > 0) {\n flags.push(same);\n same = 0;\n }\n \n flags.push(flag);\n lastFlag = flag;\n }\n \n lastX = x;\n lastY = y;\n pointCount++;\n }\n \n if (c.command === 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n }\n\n // Close the path if the last command didn't already\n if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n \n let bbox = path.bbox;\n let glyf = {\n numberOfContours: endPtsOfContours.length,\n xMin: bbox.minX,\n yMin: bbox.minY,\n xMax: bbox.maxX,\n yMax: bbox.maxY,\n endPtsOfContours: endPtsOfContours,\n instructions: instructions,\n flags: flags,\n xPoints: xPoints,\n yPoints: yPoints\n };\n \n let size = Glyf.size(glyf);\n let tail = 4 - (size % 4);\n \n let stream = new r.EncodeStream(size + tail);\n Glyf.encode(stream, glyf);\n \n // Align to 4-byte length\n if (tail !== 0) {\n stream.fill(0, tail);\n }\n \n return stream.buffer;\n }\n \n _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n let diff = value - last;\n \n if (value === last) {\n flag |= sameFlag;\n } else {\n if (-255 <= diff && diff <= 255) {\n flag |= shortFlag;\n if (diff < 0) {\n diff = -diff;\n } else {\n flag |= sameFlag;\n }\n }\n \n points.push(diff);\n }\n \n return flag;\n }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n constructor(font) {\n super(font);\n\n this.cff = this.font['CFF '];\n if (!this.cff) {\n throw new Error('Not a CFF Font');\n }\n }\n\n subsetCharstrings() {\n this.charstrings = [];\n let gsubrs = {};\n\n for (let gid of this.glyphs) {\n this.charstrings.push(this.cff.getCharString(gid));\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedGsubrs) {\n gsubrs[subr] = true;\n }\n }\n\n this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n }\n\n subsetSubrs(subrs, used) {\n let res = [];\n for (let i = 0; i < subrs.length; i++) {\n let subr = subrs[i];\n if (used[i]) {\n this.cff.stream.pos = subr.offset;\n res.push(this.cff.stream.readBuffer(subr.length));\n } else {\n res.push(new Uint8Array([11])); // return\n }\n }\n\n return res;\n }\n\n subsetFontdict(topDict) {\n topDict.FDArray = [];\n topDict.FDSelect = {\n version: 0,\n fds: []\n };\n\n let used_fds = {};\n let used_subrs = [];\n let fd_select = {};\n for (let gid of this.glyphs) {\n let fd = this.cff.fdForGlyph(gid);\n if (fd == null) {\n continue;\n }\n\n if (!used_fds[fd]) {\n topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n used_subrs.push({});\n fd_select[fd] = topDict.FDArray.length - 1;\n }\n\n used_fds[fd] = true;\n topDict.FDSelect.fds.push(fd_select[fd]);\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n for (let subr in glyph._usedSubrs) {\n used_subrs[fd_select[fd]][subr] = true;\n }\n }\n\n for (let i = 0; i < topDict.FDArray.length; i++) {\n let dict = topDict.FDArray[i];\n delete dict.FontName;\n if (dict.Private && dict.Private.Subrs) {\n dict.Private = Object.assign({}, dict.Private);\n dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n }\n }\n\n return;\n }\n\n createCIDFontdict(topDict) {\n let used_subrs = {};\n for (let gid of this.glyphs) {\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedSubrs) {\n used_subrs[subr] = true;\n }\n }\n\n let privateDict = Object.assign({}, this.cff.topDict.Private);\n if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {\n privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n }\n\n topDict.FDArray = [{ Private: privateDict }];\n return topDict.FDSelect = {\n version: 3,\n nRanges: 1,\n ranges: [{ first: 0, fd: 0 }],\n sentinel: this.charstrings.length\n };\n }\n\n addString(string) {\n if (!string) {\n return null;\n }\n\n if (!this.strings) {\n this.strings = [];\n }\n\n this.strings.push(string);\n return standardStrings.length + this.strings.length - 1;\n }\n\n encode() {\n this.subsetCharstrings();\n\n let charset = {\n version: this.charstrings.length > 255 ? 2 : 1,\n ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n };\n\n let topDict = Object.assign({}, this.cff.topDict);\n topDict.Private = null;\n topDict.charset = charset;\n topDict.Encoding = null;\n topDict.CharStrings = this.charstrings;\n\n for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n topDict[key] = this.addString(this.cff.string(topDict[key]));\n }\n\n topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n topDict.CIDCount = this.charstrings.length;\n\n if (this.cff.isCIDFont) {\n this.subsetFontdict(topDict);\n } else {\n this.createCIDFontdict(topDict);\n }\n\n let top = {\n version: 1,\n hdrSize: this.cff.hdrSize,\n offSize: 4,\n header: this.cff.header,\n nameIndex: [this.cff.postscriptName],\n topDictIndex: [topDict],\n stringIndex: this.strings,\n globalSubrIndex: this.gsubrs\n };\n\n return CFFTop.toBuffer(top);\n }\n}\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport * as r from 'restructure';\nimport { asciiDecoder } from './utils';\n\nexport default class WOFFFont extends TTFFont {\n type = 'WOFF';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOFF';\n }\n\n _decodeDirectory() {\n this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n\n if (table.compLength < table.length) {\n this.stream.pos += 2; // skip deflate header\n let outBuffer = new Uint8Array(table.length);\n let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n return new r.DecodeStream(buf);\n } else {\n return this.stream;\n }\n }\n\n return null;\n }\n}\n","import * as r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n tag: new r.String(4),\n offset: new r.Pointer(r.uint32, 'void', {type: 'global'}),\n compLength: r.uint32,\n length: r.uint32,\n origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n tag: new r.String(4), // should be 'wOFF'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import * as r from 'restructure';\nimport brotli from 'brotli/decompress.js';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\nimport { asciiDecoder } from './utils';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n type = 'WOFF2';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOF2';\n }\n\n _decodeDirectory() {\n this.directory = WOFF2Directory.decode(this.stream);\n this._dataPos = this.stream.pos;\n }\n\n _decompress() {\n // decompress data and setup table offsets if we haven't already\n if (!this._decompressed) {\n this.stream.pos = this._dataPos;\n let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n let decompressedSize = 0;\n for (let tag in this.directory.tables) {\n let entry = this.directory.tables[tag];\n entry.offset = decompressedSize;\n decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n }\n\n let decompressed = brotli(buffer, decompressedSize);\n if (!decompressed) {\n throw new Error('Error decoding compressed data in WOFF2');\n }\n\n this.stream = new r.DecodeStream(decompressed);\n this._decompressed = true;\n }\n }\n\n _decodeTable(table) {\n this._decompress();\n return super._decodeTable(table);\n }\n\n // Override this method to get a glyph and return our\n // custom subclass if there is a glyf table.\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n } else {\n return super._getBaseGlyph(glyph, characters);\n }\n }\n }\n\n _transformGlyfTable() {\n this._decompress();\n this.stream.pos = this.directory.tables.glyf.offset;\n let table = GlyfTable.decode(this.stream);\n let glyphs = [];\n\n for (let index = 0; index < table.numGlyphs; index++) {\n let glyph = {};\n let nContours = table.nContours.readInt16BE();\n glyph.numberOfContours = nContours;\n\n if (nContours > 0) { // simple glyph\n let nPoints = [];\n let totalPoints = 0;\n\n for (let i = 0; i < nContours; i++) {\n let r = read255UInt16(table.nPoints);\n totalPoints += r;\n nPoints.push(totalPoints);\n }\n\n glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n for (let i = 0; i < nContours; i++) {\n glyph.points[nPoints[i] - 1].endContour = true;\n }\n\n var instructionSize = read255UInt16(table.glyphs);\n\n } else if (nContours < 0) { // composite glyph\n let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n if (haveInstructions) {\n var instructionSize = read255UInt16(table.glyphs);\n }\n }\n\n glyphs.push(glyph);\n }\n\n this._transformedGlyphs = glyphs;\n }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n constructor(length) {\n this.length = length;\n this._buf = new r.Buffer(length);\n }\n\n decode(stream, parent) {\n return new r.DecodeStream(this._buf.decode(stream, parent));\n }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n version: r.uint32,\n numGlyphs: r.uint16,\n indexFormat: r.uint16,\n nContourStreamSize: r.uint32,\n nPointsStreamSize: r.uint32,\n flagStreamSize: r.uint32,\n glyphStreamSize: r.uint32,\n compositeStreamSize: r.uint32,\n bboxStreamSize: r.uint32,\n instructionStreamSize: r.uint32,\n nContours: new Substream('nContourStreamSize'),\n nPoints: new Substream('nPointsStreamSize'),\n flags: new Substream('flagStreamSize'),\n glyphs: new Substream('glyphStreamSize'),\n composites: new Substream('compositeStreamSize'),\n bboxes: new Substream('bboxStreamSize'),\n instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n let code = stream.readUInt8();\n\n if (code === WORD_CODE) {\n return stream.readUInt16BE();\n }\n\n if (code === ONE_MORE_BYTE_CODE1) {\n return stream.readUInt8() + LOWEST_U_CODE;\n }\n\n if (code === ONE_MORE_BYTE_CODE2) {\n return stream.readUInt8() + LOWEST_U_CODE * 2;\n }\n\n return code;\n}\n\nfunction withSign(flag, baseval) {\n return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n let y;\n let x = y = 0;\n let res = [];\n\n for (let i = 0; i < nPoints; i++) {\n let dx = 0, dy = 0;\n let flag = flags.readUInt8();\n let onCurve = !(flag >> 7);\n flag &= 0x7f;\n\n if (flag < 10) {\n dx = 0;\n dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n } else if (flag < 20) {\n dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n dy = 0;\n\n } else if (flag < 84) {\n var b0 = flag - 20;\n var b1 = glyphs.readUInt8();\n dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n } else if (flag < 120) {\n var b0 = flag - 84;\n dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n } else if (flag < 124) {\n var b1 = glyphs.readUInt8();\n let b2 = glyphs.readUInt8();\n dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n } else {\n dx = withSign(flag, glyphs.readUInt16BE());\n dy = withSign(flag >> 1, glyphs.readUInt16BE());\n }\n\n x += dx;\n y += dy;\n res.push(new Point(onCurve, false, x, y));\n }\n\n return res;\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n type = 'WOFF2';\n\n _decode() {\n // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n return this._font._transformedGlyphs[this.id];\n }\n\n _getCBox() {\n return this.path.bbox;\n }\n}\n","import * as r from 'restructure';\n\nconst Base128 = {\n decode(stream) {\n let result = 0;\n let iterable = [0, 1, 2, 3, 4];\n for (let j = 0; j < iterable.length; j++) {\n let i = iterable[j];\n let code = stream.readUInt8();\n\n // If any of the top seven bits are set then we're about to overflow.\n if (result & 0xe0000000) {\n throw new Error('Overflow');\n }\n\n result = (result << 7) | (code & 0x7f);\n if ((code & 0x80) === 0) {\n return result;\n }\n }\n\n throw new Error('Bad base 128 number');\n }\n};\n\nlet knownTags = [\n 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n flags: r.uint8,\n customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n length: Base128,\n transformVersion: t => (t.flags >>> 6) & 0x03,\n transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n tag: new r.String(4), // should be 'wOF2'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n totalCompressedSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n let tables = {};\n for (let i = 0; i < this.tables.length; i++) {\n let table = this.tables[i];\n tables[table.tag] = table;\n }\n\n return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport { asciiDecoder } from './utils';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n 0x00010000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts')\n },\n 0x00020000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts'),\n dsigTag: r.uint32,\n dsigLength: r.uint32,\n dsigOffset: r.uint32\n }\n});\n\nexport default class TrueTypeCollection {\n type = 'TTC';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'ttcf';\n }\n\n constructor(stream) {\n this.stream = stream;\n if (stream.readString(4) !== 'ttcf') {\n throw new Error('Not a TrueType collection');\n }\n\n this.header = TTCHeader.decode(stream);\n }\n\n getFont(name) {\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n len: r.uint32,\n buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n id: r.uint16,\n nameOffset: r.int16,\n attr: r.uint8,\n dataOffset: r.uint24,\n handle: r.uint32\n});\n\nlet Type = new r.Struct({\n name: new r.String(4),\n maxTypeIndex: r.uint16,\n refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n length: r.uint16,\n types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n reserved: new r.Reserved(r.uint8, 24),\n typeList: new r.Pointer(r.uint16, TypeList),\n nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n dataOffset: r.uint32,\n map: new r.Pointer(r.uint32, DFontMap),\n dataLength: r.uint32,\n mapLength: r.uint32\n});\n\nexport default class DFont {\n type = 'DFont';\n\n static probe(buffer) {\n let stream = new r.DecodeStream(buffer);\n\n try {\n var header = DFontHeader.decode(stream);\n } catch (e) {\n return false;\n }\n\n for (let type of header.map.typeList.types) {\n if (type.name === 'sfnt') {\n return true;\n }\n }\n\n return false;\n }\n\n constructor(stream) {\n this.stream = stream;\n this.header = DFontHeader.decode(this.stream);\n\n for (let type of this.header.map.typeList.types) {\n for (let ref of type.refList) {\n if (ref.nameOffset >= 0) {\n this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n ref.name = DFontName.decode(this.stream);\n } else {\n ref.name = null;\n }\n }\n\n if (type.name === 'sfnt') {\n this.sfnt = type;\n }\n }\n }\n\n getFont(name) {\n if (!this.sfnt) {\n return null;\n }\n\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n"],"names":[],"version":3,"file":"browser-module.mjs.map"} \ No newline at end of file diff --git a/node_modules/fontkit/dist/browser.cjs b/node_modules/fontkit/dist/browser.cjs new file mode 100644 index 0000000..a5fa901 --- /dev/null +++ b/node_modules/fontkit/dist/browser.cjs @@ -0,0 +1,13333 @@ +var $gfJaN$restructure = require("restructure"); +var $gfJaN$swchelperscjs_define_propertycjs = require("@swc/helpers/cjs/_define_property.cjs"); +var $gfJaN$swchelperscjs_ts_decoratecjs = require("@swc/helpers/cjs/_ts_decorate.cjs"); +var $gfJaN$fastdeepequal = require("fast-deep-equal"); +var $gfJaN$unicodeproperties = require("unicode-properties"); +var $gfJaN$unicodetrie = require("unicode-trie"); +var $gfJaN$dfa = require("dfa"); +var $gfJaN$clone = require("clone"); +var $gfJaN$tinyinflate = require("tiny-inflate"); +var $gfJaN$brotlidecompressjs = require("brotli/decompress.js"); + + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} +var $59aa4ed98453e1d4$exports = {}; + +$parcel$export($59aa4ed98453e1d4$exports, "logErrors", () => $59aa4ed98453e1d4$export$bd5c5d8b8dcafd78); +$parcel$export($59aa4ed98453e1d4$exports, "registerFormat", () => $59aa4ed98453e1d4$export$36b2f24e97d43be); +$parcel$export($59aa4ed98453e1d4$exports, "create", () => $59aa4ed98453e1d4$export$185802fd694ee1f5); +$parcel$export($59aa4ed98453e1d4$exports, "defaultLanguage", () => $59aa4ed98453e1d4$export$42940898df819940); +$parcel$export($59aa4ed98453e1d4$exports, "setDefaultLanguage", () => $59aa4ed98453e1d4$export$5157e7780d44cc36); + +let $59aa4ed98453e1d4$export$bd5c5d8b8dcafd78 = false; +let $59aa4ed98453e1d4$var$formats = []; +function $59aa4ed98453e1d4$export$36b2f24e97d43be(format) { + $59aa4ed98453e1d4$var$formats.push(format); +} +function $59aa4ed98453e1d4$export$185802fd694ee1f5(buffer, postscriptName) { + for(let i = 0; i < $59aa4ed98453e1d4$var$formats.length; i++){ + let format = $59aa4ed98453e1d4$var$formats[i]; + if (format.probe(buffer)) { + let font = new format(new (0, $gfJaN$restructure.DecodeStream)(buffer)); + if (postscriptName) return font.getFont(postscriptName); + return font; + } + } + throw new Error('Unknown font format'); +} +let $59aa4ed98453e1d4$export$42940898df819940 = 'en'; +function $59aa4ed98453e1d4$export$5157e7780d44cc36(lang = 'en') { + $59aa4ed98453e1d4$export$42940898df819940 = lang; +} + + + + + +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ function $3bda6911913b43f0$export$69a3209f1a06c04d(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { + value: value + }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + return { + get () { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) return cache.get(key); + let result = fn.apply(this, args); + cache.set(key, result); + return result; + } + Object.defineProperty(this, key, { + value: memoized + }); + return memoized; + } + }; + } +} + + + + + +let $e4ae0436c91af89f$var$SubHeader = new $gfJaN$restructure.Struct({ + firstCode: $gfJaN$restructure.uint16, + entryCount: $gfJaN$restructure.uint16, + idDelta: $gfJaN$restructure.int16, + idRangeOffset: $gfJaN$restructure.uint16 +}); +let $e4ae0436c91af89f$var$CmapGroup = new $gfJaN$restructure.Struct({ + startCharCode: $gfJaN$restructure.uint32, + endCharCode: $gfJaN$restructure.uint32, + glyphID: $gfJaN$restructure.uint32 +}); +let $e4ae0436c91af89f$var$UnicodeValueRange = new $gfJaN$restructure.Struct({ + startUnicodeValue: $gfJaN$restructure.uint24, + additionalCount: $gfJaN$restructure.uint8 +}); +let $e4ae0436c91af89f$var$UVSMapping = new $gfJaN$restructure.Struct({ + unicodeValue: $gfJaN$restructure.uint24, + glyphID: $gfJaN$restructure.uint16 +}); +let $e4ae0436c91af89f$var$DefaultUVS = new $gfJaN$restructure.Array($e4ae0436c91af89f$var$UnicodeValueRange, $gfJaN$restructure.uint32); +let $e4ae0436c91af89f$var$NonDefaultUVS = new $gfJaN$restructure.Array($e4ae0436c91af89f$var$UVSMapping, $gfJaN$restructure.uint32); +let $e4ae0436c91af89f$var$VarSelectorRecord = new $gfJaN$restructure.Struct({ + varSelector: $gfJaN$restructure.uint24, + defaultUVS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $e4ae0436c91af89f$var$DefaultUVS, { + type: 'parent' + }), + nonDefaultUVS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $e4ae0436c91af89f$var$NonDefaultUVS, { + type: 'parent' + }) +}); +let $e4ae0436c91af89f$var$CmapSubtable = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 0: { + length: $gfJaN$restructure.uint16, + language: $gfJaN$restructure.uint16, + codeMap: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint8, 256) + }, + 2: { + length: $gfJaN$restructure.uint16, + language: $gfJaN$restructure.uint16, + subHeaderKeys: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 256), + subHeaderCount: (t)=>Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new $gfJaN$restructure.LazyArray($e4ae0436c91af89f$var$SubHeader, 'subHeaderCount'), + glyphIndexArray: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'subHeaderCount') + }, + 4: { + length: $gfJaN$restructure.uint16, + language: $gfJaN$restructure.uint16, + segCountX2: $gfJaN$restructure.uint16, + segCount: (t)=>t.segCountX2 >> 1, + searchRange: $gfJaN$restructure.uint16, + entrySelector: $gfJaN$restructure.uint16, + rangeShift: $gfJaN$restructure.uint16, + endCode: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'segCount'), + reservedPad: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + startCode: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'segCount'), + idDelta: new $gfJaN$restructure.LazyArray($gfJaN$restructure.int16, 'segCount'), + idRangeOffset: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'segCount'), + glyphIndexArray: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, (t)=>(t.length - t._currentOffset) / 2) + }, + 6: { + length: $gfJaN$restructure.uint16, + language: $gfJaN$restructure.uint16, + firstCode: $gfJaN$restructure.uint16, + entryCount: $gfJaN$restructure.uint16, + glyphIndices: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'entryCount') + }, + 8: { + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + length: $gfJaN$restructure.uint32, + language: $gfJaN$restructure.uint16, + is32: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint8, 8192), + nGroups: $gfJaN$restructure.uint32, + groups: new $gfJaN$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 10: { + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + length: $gfJaN$restructure.uint32, + language: $gfJaN$restructure.uint32, + firstCode: $gfJaN$restructure.uint32, + entryCount: $gfJaN$restructure.uint32, + glyphIndices: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'numChars') + }, + 12: { + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + length: $gfJaN$restructure.uint32, + language: $gfJaN$restructure.uint32, + nGroups: $gfJaN$restructure.uint32, + groups: new $gfJaN$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 13: { + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + length: $gfJaN$restructure.uint32, + language: $gfJaN$restructure.uint32, + nGroups: $gfJaN$restructure.uint32, + groups: new $gfJaN$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 14: { + length: $gfJaN$restructure.uint32, + numRecords: $gfJaN$restructure.uint32, + varSelectors: new $gfJaN$restructure.LazyArray($e4ae0436c91af89f$var$VarSelectorRecord, 'numRecords') + } +}); +let $e4ae0436c91af89f$var$CmapEntry = new $gfJaN$restructure.Struct({ + platformID: $gfJaN$restructure.uint16, + encodingID: $gfJaN$restructure.uint16, + table: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $e4ae0436c91af89f$var$CmapSubtable, { + type: 'parent', + lazy: true + }) +}); +var // character to glyph mapping +$e4ae0436c91af89f$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numSubtables: $gfJaN$restructure.uint16, + tables: new $gfJaN$restructure.Array($e4ae0436c91af89f$var$CmapEntry, 'numSubtables') +}); + + + +var // font header +$55a60976afb7c261$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.int32, + revision: $gfJaN$restructure.int32, + checkSumAdjustment: $gfJaN$restructure.uint32, + magicNumber: $gfJaN$restructure.uint32, + flags: $gfJaN$restructure.uint16, + unitsPerEm: $gfJaN$restructure.uint16, + created: new $gfJaN$restructure.Array($gfJaN$restructure.int32, 2), + modified: new $gfJaN$restructure.Array($gfJaN$restructure.int32, 2), + xMin: $gfJaN$restructure.int16, + yMin: $gfJaN$restructure.int16, + xMax: $gfJaN$restructure.int16, + yMax: $gfJaN$restructure.int16, + macStyle: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + 'bold', + 'italic', + 'underline', + 'outline', + 'shadow', + 'condensed', + 'extended' + ]), + lowestRecPPEM: $gfJaN$restructure.uint16, + fontDirectionHint: $gfJaN$restructure.int16, + indexToLocFormat: $gfJaN$restructure.int16, + glyphDataFormat: $gfJaN$restructure.int16 // 0 for current format +}); + + + +var // horizontal header +$dde72b7b5b650596$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.int32, + ascent: $gfJaN$restructure.int16, + descent: $gfJaN$restructure.int16, + lineGap: $gfJaN$restructure.int16, + advanceWidthMax: $gfJaN$restructure.uint16, + minLeftSideBearing: $gfJaN$restructure.int16, + minRightSideBearing: $gfJaN$restructure.int16, + xMaxExtent: $gfJaN$restructure.int16, + caretSlopeRise: $gfJaN$restructure.int16, + caretSlopeRun: $gfJaN$restructure.int16, + caretOffset: $gfJaN$restructure.int16, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.int16, 4), + metricDataFormat: $gfJaN$restructure.int16, + numberOfMetrics: $gfJaN$restructure.uint16 // Number of advance widths in 'hmtx' table +}); + + + +let $a7c40184072c9a5b$var$HmtxEntry = new $gfJaN$restructure.Struct({ + advance: $gfJaN$restructure.uint16, + bearing: $gfJaN$restructure.int16 +}); +var $a7c40184072c9a5b$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + metrics: new $gfJaN$restructure.LazyArray($a7c40184072c9a5b$var$HmtxEntry, (t)=>t.parent.hhea.numberOfMetrics), + bearings: new $gfJaN$restructure.LazyArray($gfJaN$restructure.int16, (t)=>t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); + + + +var // maxiumum profile +$521197722369f691$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.int32, + numGlyphs: $gfJaN$restructure.uint16, + maxPoints: $gfJaN$restructure.uint16, + maxContours: $gfJaN$restructure.uint16, + maxComponentPoints: $gfJaN$restructure.uint16, + maxComponentContours: $gfJaN$restructure.uint16, + maxZones: $gfJaN$restructure.uint16, + maxTwilightPoints: $gfJaN$restructure.uint16, + maxStorage: $gfJaN$restructure.uint16, + maxFunctionDefs: $gfJaN$restructure.uint16, + maxInstructionDefs: $gfJaN$restructure.uint16, + maxStackElements: $gfJaN$restructure.uint16, + maxSizeOfInstructions: $gfJaN$restructure.uint16, + maxComponentElements: $gfJaN$restructure.uint16, + maxComponentDepth: $gfJaN$restructure.uint16 // Maximum levels of recursion; 1 for simple components +}); + + + +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ function $e2613b812f052cbe$export$badc544e0651b6b1(platformID, encodingID, languageID = 0) { + if (platformID === 1 && $e2613b812f052cbe$export$479e671907f486d1[languageID]) return $e2613b812f052cbe$export$479e671907f486d1[languageID]; + return $e2613b812f052cbe$export$6fef87b7618bdf0b[platformID][encodingID]; +} +const $e2613b812f052cbe$var$SINGLE_BYTE_ENCODINGS = new Set([ + 'x-mac-roman', + 'x-mac-cyrillic', + 'iso-8859-6', + 'iso-8859-8' +]); +const $e2613b812f052cbe$var$MAC_ENCODINGS = { + 'x-mac-croatian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017D\xd8\u221E\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220F\u0161\u222B\xaa\xba\u03A9\u017E\xf8\xbf\xa1\xac\u221A\u0192\u2248\u0106\xab\u010C\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\uF8FF\xa9\u2044\u20AC\u2039\u203A\xc6\xbb\u2013\xb7\u201A\u201E\u2030\xc2\u0107\xc1\u010D\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u03C0\xcb\u02DA\xb8\xca\xe6\u02C7", + 'x-mac-gaelic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1E02\xb1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xe6\xf8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xff\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xb7\u1EF2\u1EF3\u204A\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83", + 'x-mac-greek': "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20AC\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xdf\xae\xa9\u03A3\u03AA\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xac\u039F\u03A1\u2248\u03A4\xab\xbb\u2026 \u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xf7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xad", + 'x-mac-icelandic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\xd0\xf0\xde\xfe\xfd\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-inuit': "\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xb0\u14A1\u14A5\u14A6\u2022\xb6\u14A7\xae\xa9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026 \u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142", + 'x-mac-ce': "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010C\xe4\u010D\u0106\u0107\xe9\u0179\u017A\u010E\xed\u010F\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011A\u011B\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xac\u221A\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xc1\u0164\u0165\xcd\u017D\u017E\u016A\xd3\xd4\u016B\u016E\xda\u016F\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017B\u0141\u017C\u0122\u02C7", + 'x-mac-romanian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\u0103\u0219\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-turkish': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\uF8A0\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7" +}; +const $e2613b812f052cbe$var$encodingCache = new Map(); +function $e2613b812f052cbe$export$1dceb3c14ed68bee(encoding) { + let cached = $e2613b812f052cbe$var$encodingCache.get(encoding); + if (cached) return cached; + // These encodings aren't supported by TextDecoder. + let mapping = $e2613b812f052cbe$var$MAC_ENCODINGS[encoding]; + if (mapping) { + let res = new Map(); + for(let i = 0; i < mapping.length; i++)res.set(mapping.charCodeAt(i), 0x80 + i); + $e2613b812f052cbe$var$encodingCache.set(encoding, res); + return res; + } + // Only single byte encodings can be mapped 1:1. + if ($e2613b812f052cbe$var$SINGLE_BYTE_ENCODINGS.has(encoding)) { + // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings. + // Use this to create a mapping of code points. + let decoder = new TextDecoder(encoding); + let mapping = new Uint8Array(0x80); + for(let i = 0; i < 0x80; i++)mapping[i] = 0x80 + i; + let res = new Map(); + let s = decoder.decode(mapping); + for(let i = 0; i < 0x80; i++)res.set(s.charCodeAt(i), 0x80 + i); + $e2613b812f052cbe$var$encodingCache.set(encoding, res); + return res; + } +} +const $e2613b812f052cbe$export$6fef87b7618bdf0b = [ + // unicode + [ + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be' + ], + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + [ + 'x-mac-roman', + 'shift-jis', + 'big5', + 'euc-kr', + 'iso-8859-6', + 'iso-8859-8', + 'x-mac-greek', + 'x-mac-cyrillic', + 'x-mac-symbol', + 'x-mac-devanagari', + 'x-mac-gurmukhi', + 'x-mac-gujarati', + 'Oriya', + 'Bengali', + 'Tamil', + 'Telugu', + 'Kannada', + 'Malayalam', + 'Sinhalese', + 'Burmese', + 'Khmer', + 'iso-8859-11', + 'Laotian', + 'Georgian', + 'Armenian', + 'gbk', + 'Tibetan', + 'Mongolian', + 'Geez', + 'x-mac-ce', + 'Vietnamese', + 'Sindhi' + ], + // ISO (deprecated) + [ + 'ascii', + null, + 'iso-8859-1' + ], + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + [ + 'symbol', + 'utf-16be', + 'shift-jis', + 'gb18030', + 'big5', + 'euc-kr', + 'johab', + null, + null, + null, + 'utf-16be' + ] +]; +const $e2613b812f052cbe$export$479e671907f486d1 = { + 15: 'x-mac-icelandic', + 17: 'x-mac-turkish', + 18: 'x-mac-croatian', + 24: 'x-mac-ce', + 25: 'x-mac-ce', + 26: 'x-mac-ce', + 27: 'x-mac-ce', + 28: 'x-mac-ce', + 30: 'x-mac-icelandic', + 37: 'x-mac-romanian', + 38: 'x-mac-ce', + 39: 'x-mac-ce', + 40: 'x-mac-ce', + 143: 'x-mac-inuit', + 146: 'x-mac-gaelic' +}; +const $e2613b812f052cbe$export$2092376fd002e13 = [ + // unicode + [], + { + 0: 'en', + 30: 'fo', + 60: 'ks', + 90: 'rw', + 1: 'fr', + 31: 'fa', + 61: 'ku', + 91: 'rn', + 2: 'de', + 32: 'ru', + 62: 'sd', + 92: 'ny', + 3: 'it', + 33: 'zh', + 63: 'bo', + 93: 'mg', + 4: 'nl', + 34: 'nl-BE', + 64: 'ne', + 94: 'eo', + 5: 'sv', + 35: 'ga', + 65: 'sa', + 128: 'cy', + 6: 'es', + 36: 'sq', + 66: 'mr', + 129: 'eu', + 7: 'da', + 37: 'ro', + 67: 'bn', + 130: 'ca', + 8: 'pt', + 38: 'cz', + 68: 'as', + 131: 'la', + 9: 'no', + 39: 'sk', + 69: 'gu', + 132: 'qu', + 10: 'he', + 40: 'si', + 70: 'pa', + 133: 'gn', + 11: 'ja', + 41: 'yi', + 71: 'or', + 134: 'ay', + 12: 'ar', + 42: 'sr', + 72: 'ml', + 135: 'tt', + 13: 'fi', + 43: 'mk', + 73: 'kn', + 136: 'ug', + 14: 'el', + 44: 'bg', + 74: 'ta', + 137: 'dz', + 15: 'is', + 45: 'uk', + 75: 'te', + 138: 'jv', + 16: 'mt', + 46: 'be', + 76: 'si', + 139: 'su', + 17: 'tr', + 47: 'uz', + 77: 'my', + 140: 'gl', + 18: 'hr', + 48: 'kk', + 78: 'km', + 141: 'af', + 19: 'zh-Hant', + 49: 'az-Cyrl', + 79: 'lo', + 142: 'br', + 20: 'ur', + 50: 'az-Arab', + 80: 'vi', + 143: 'iu', + 21: 'hi', + 51: 'hy', + 81: 'id', + 144: 'gd', + 22: 'th', + 52: 'ka', + 82: 'tl', + 145: 'gv', + 23: 'ko', + 53: 'mo', + 83: 'ms', + 146: 'ga', + 24: 'lt', + 54: 'ky', + 84: 'ms-Arab', + 147: 'to', + 25: 'pl', + 55: 'tg', + 85: 'am', + 148: 'el-polyton', + 26: 'hu', + 56: 'tk', + 86: 'ti', + 149: 'kl', + 27: 'es', + 57: 'mn-CN', + 87: 'om', + 150: 'az', + 28: 'lv', + 58: 'mn', + 88: 'so', + 151: 'nn', + 29: 'se', + 59: 'ps', + 89: 'sw' + }, + // ISO (deprecated) + [], + { + 0x0436: 'af', + 0x4009: 'en-IN', + 0x0487: 'rw', + 0x0432: 'tn', + 0x041C: 'sq', + 0x1809: 'en-IE', + 0x0441: 'sw', + 0x045B: 'si', + 0x0484: 'gsw', + 0x2009: 'en-JM', + 0x0457: 'kok', + 0x041B: 'sk', + 0x045E: 'am', + 0x4409: 'en-MY', + 0x0412: 'ko', + 0x0424: 'sl', + 0x1401: 'ar-DZ', + 0x1409: 'en-NZ', + 0x0440: 'ky', + 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', + 0x3409: 'en-PH', + 0x0454: 'lo', + 0x400A: 'es-BO', + 0x0C01: 'ar', + 0x4809: 'en-SG', + 0x0426: 'lv', + 0x340A: 'es-CL', + 0x0801: 'ar-IQ', + 0x1C09: 'en-ZA', + 0x0427: 'lt', + 0x240A: 'es-CO', + 0x2C01: 'ar-JO', + 0x2C09: 'en-TT', + 0x082E: 'dsb', + 0x140A: 'es-CR', + 0x3401: 'ar-KW', + 0x0809: 'en-GB', + 0x046E: 'lb', + 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', + 0x0409: 'en', + 0x042F: 'mk', + 0x300A: 'es-EC', + 0x1001: 'ar-LY', + 0x3009: 'en-ZW', + 0x083E: 'ms-BN', + 0x440A: 'es-SV', + 0x1801: 'ary', + 0x0425: 'et', + 0x043E: 'ms', + 0x100A: 'es-GT', + 0x2001: 'ar-OM', + 0x0438: 'fo', + 0x044C: 'ml', + 0x480A: 'es-HN', + 0x4001: 'ar-QA', + 0x0464: 'fil', + 0x043A: 'mt', + 0x080A: 'es-MX', + 0x0401: 'ar-SA', + 0x040B: 'fi', + 0x0481: 'mi', + 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', + 0x080C: 'fr-BE', + 0x047A: 'arn', + 0x180A: 'es-PA', + 0x1C01: 'aeb', + 0x0C0C: 'fr-CA', + 0x044E: 'mr', + 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', + 0x040C: 'fr', + 0x047C: 'moh', + 0x280A: 'es-PE', + 0x2401: 'ar-YE', + 0x140C: 'fr-LU', + 0x0450: 'mn', + 0x500A: 'es-PR', + 0x042B: 'hy', + 0x180C: 'fr-MC', + 0x0850: 'mn-CN', + 0x0C0A: 'es', + 0x044D: 'as', + 0x100C: 'fr-CH', + 0x0461: 'ne', + 0x040A: 'es', + 0x082C: 'az-Cyrl', + 0x0462: 'fy', + 0x0414: 'nb', + 0x540A: 'es-US', + 0x042C: 'az', + 0x0456: 'gl', + 0x0814: 'nn', + 0x380A: 'es-UY', + 0x046D: 'ba', + 0x0437: 'ka', + 0x0482: 'oc', + 0x200A: 'es-VE', + 0x042D: 'eu', + 0x0C07: 'de-AT', + 0x0448: 'or', + 0x081D: 'sv-FI', + 0x0423: 'be', + 0x0407: 'de', + 0x0463: 'ps', + 0x041D: 'sv', + 0x0845: 'bn', + 0x1407: 'de-LI', + 0x0415: 'pl', + 0x045A: 'syr', + 0x0445: 'bn-IN', + 0x1007: 'de-LU', + 0x0416: 'pt', + 0x0428: 'tg', + 0x201A: 'bs-Cyrl', + 0x0807: 'de-CH', + 0x0816: 'pt-PT', + 0x085F: 'tzm', + 0x141A: 'bs', + 0x0408: 'el', + 0x0446: 'pa', + 0x0449: 'ta', + 0x047E: 'br', + 0x046F: 'kl', + 0x046B: 'qu-BO', + 0x0444: 'tt', + 0x0402: 'bg', + 0x0447: 'gu', + 0x086B: 'qu-EC', + 0x044A: 'te', + 0x0403: 'ca', + 0x0468: 'ha', + 0x0C6B: 'qu', + 0x041E: 'th', + 0x0C04: 'zh-HK', + 0x040D: 'he', + 0x0418: 'ro', + 0x0451: 'bo', + 0x1404: 'zh-MO', + 0x0439: 'hi', + 0x0417: 'rm', + 0x041F: 'tr', + 0x0804: 'zh', + 0x040E: 'hu', + 0x0419: 'ru', + 0x0442: 'tk', + 0x1004: 'zh-SG', + 0x040F: 'is', + 0x243B: 'smn', + 0x0480: 'ug', + 0x0404: 'zh-TW', + 0x0470: 'ig', + 0x103B: 'smj-NO', + 0x0422: 'uk', + 0x0483: 'co', + 0x0421: 'id', + 0x143B: 'smj', + 0x042E: 'hsb', + 0x041A: 'hr', + 0x045D: 'iu', + 0x0C3B: 'se-FI', + 0x0420: 'ur', + 0x101A: 'hr-BA', + 0x085D: 'iu-Latn', + 0x043B: 'se', + 0x0843: 'uz-Cyrl', + 0x0405: 'cs', + 0x083C: 'ga', + 0x083B: 'se-SE', + 0x0443: 'uz', + 0x0406: 'da', + 0x0434: 'xh', + 0x203B: 'sms', + 0x042A: 'vi', + 0x048C: 'prs', + 0x0435: 'zu', + 0x183B: 'sma-NO', + 0x0452: 'cy', + 0x0465: 'dv', + 0x0410: 'it', + 0x1C3B: 'sms', + 0x0488: 'wo', + 0x0813: 'nl-BE', + 0x0810: 'it-CH', + 0x044F: 'sa', + 0x0485: 'sah', + 0x0413: 'nl', + 0x0411: 'ja', + 0x1C1A: 'sr-Cyrl-BA', + 0x0478: 'ii', + 0x0C09: 'en-AU', + 0x044B: 'kn', + 0x0C1A: 'sr', + 0x046A: 'yo', + 0x2809: 'en-BZ', + 0x043F: 'kk', + 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', + 0x0453: 'km', + 0x081A: 'sr-Latn', + 0x2409: 'en-029', + 0x0486: 'quc', + 0x046C: 'nso' + } +]; + + +let $51a9f4feb3a3b2b1$var$NameRecord = new $gfJaN$restructure.Struct({ + platformID: $gfJaN$restructure.uint16, + encodingID: $gfJaN$restructure.uint16, + languageID: $gfJaN$restructure.uint16, + nameID: $gfJaN$restructure.uint16, + length: $gfJaN$restructure.uint16, + string: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $gfJaN$restructure.String('length', (t)=>(0, $e2613b812f052cbe$export$badc544e0651b6b1)(t.platformID, t.encodingID, t.languageID)), { + type: 'parent', + relativeTo: (ctx)=>ctx.parent.stringOffset, + allowNull: false + }) +}); +let $51a9f4feb3a3b2b1$var$LangTagRecord = new $gfJaN$restructure.Struct({ + length: $gfJaN$restructure.uint16, + tag: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $gfJaN$restructure.String('length', 'utf16be'), { + type: 'parent', + relativeTo: (ctx)=>ctx.stringOffset + }) +}); +var $51a9f4feb3a3b2b1$var$NameTable = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 0: { + count: $gfJaN$restructure.uint16, + stringOffset: $gfJaN$restructure.uint16, + records: new $gfJaN$restructure.Array($51a9f4feb3a3b2b1$var$NameRecord, 'count') + }, + 1: { + count: $gfJaN$restructure.uint16, + stringOffset: $gfJaN$restructure.uint16, + records: new $gfJaN$restructure.Array($51a9f4feb3a3b2b1$var$NameRecord, 'count'), + langTagCount: $gfJaN$restructure.uint16, + langTags: new $gfJaN$restructure.Array($51a9f4feb3a3b2b1$var$LangTagRecord, 'langTagCount') + } +}); +var $51a9f4feb3a3b2b1$export$2e2bcd8739ae039 = $51a9f4feb3a3b2b1$var$NameTable; +const $51a9f4feb3a3b2b1$var$NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; +$51a9f4feb3a3b2b1$var$NameTable.process = function(stream) { + var records = {}; + for (let record of this.records){ + // find out what language this is for + let language = (0, $e2613b812f052cbe$export$2092376fd002e13)[record.platformID][record.languageID]; + if (language == null && this.langTags != null && record.languageID >= 0x8000) language = this.langTags[record.languageID - 0x8000].tag; + if (language == null) language = record.platformID + '-' + record.languageID; + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : $51a9f4feb3a3b2b1$var$NAMES[record.nameID] || record.nameID; + if (records[key] == null) records[key] = {}; + let obj = records[key]; + if (record.nameID >= 256) obj = obj[record.nameID] || (obj[record.nameID] = {}); + if (typeof record.string === 'string' || typeof obj[language] !== 'string') obj[language] = record.string; + } + this.records = records; +}; +$51a9f4feb3a3b2b1$var$NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + let records = []; + for(let key in this.records){ + let val = this.records[key]; + if (key === 'fontFeatures') continue; + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: $51a9f4feb3a3b2b1$var$NAMES.indexOf(key), + length: val.en.length * 2, + string: val.en + }); + if (key === 'postscriptName') records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: $51a9f4feb3a3b2b1$var$NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + this.records = records; + this.count = records.length; + this.stringOffset = $51a9f4feb3a3b2b1$var$NameTable.size(this, null, false); +}; + + + +var $114ea85db469b435$var$OS2 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + header: { + xAvgCharWidth: $gfJaN$restructure.int16, + usWeightClass: $gfJaN$restructure.uint16, + usWidthClass: $gfJaN$restructure.uint16, + fsType: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + null, + 'noEmbedding', + 'viewOnly', + 'editable', + null, + null, + null, + null, + 'noSubsetting', + 'bitmapOnly' + ]), + ySubscriptXSize: $gfJaN$restructure.int16, + ySubscriptYSize: $gfJaN$restructure.int16, + ySubscriptXOffset: $gfJaN$restructure.int16, + ySubscriptYOffset: $gfJaN$restructure.int16, + ySuperscriptXSize: $gfJaN$restructure.int16, + ySuperscriptYSize: $gfJaN$restructure.int16, + ySuperscriptXOffset: $gfJaN$restructure.int16, + ySuperscriptYOffset: $gfJaN$restructure.int16, + yStrikeoutSize: $gfJaN$restructure.int16, + yStrikeoutPosition: $gfJaN$restructure.int16, + sFamilyClass: $gfJaN$restructure.int16, + panose: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 10), + ulCharRange: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 4), + vendorID: new $gfJaN$restructure.String(4), + fsSelection: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + 'italic', + 'underscore', + 'negative', + 'outlined', + 'strikeout', + 'bold', + 'regular', + 'useTypoMetrics', + 'wws', + 'oblique' + ]), + usFirstCharIndex: $gfJaN$restructure.uint16, + usLastCharIndex: $gfJaN$restructure.uint16 // The maximum Unicode index in this font + }, + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + 1: { + typoAscender: $gfJaN$restructure.int16, + typoDescender: $gfJaN$restructure.int16, + typoLineGap: $gfJaN$restructure.int16, + winAscent: $gfJaN$restructure.uint16, + winDescent: $gfJaN$restructure.uint16, + codePageRange: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 2) + }, + 2: { + // these should be common with version 1 somehow + typoAscender: $gfJaN$restructure.int16, + typoDescender: $gfJaN$restructure.int16, + typoLineGap: $gfJaN$restructure.int16, + winAscent: $gfJaN$restructure.uint16, + winDescent: $gfJaN$restructure.uint16, + codePageRange: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 2), + xHeight: $gfJaN$restructure.int16, + capHeight: $gfJaN$restructure.int16, + defaultChar: $gfJaN$restructure.uint16, + breakChar: $gfJaN$restructure.uint16, + maxContent: $gfJaN$restructure.uint16 + }, + 5: { + typoAscender: $gfJaN$restructure.int16, + typoDescender: $gfJaN$restructure.int16, + typoLineGap: $gfJaN$restructure.int16, + winAscent: $gfJaN$restructure.uint16, + winDescent: $gfJaN$restructure.uint16, + codePageRange: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 2), + xHeight: $gfJaN$restructure.int16, + capHeight: $gfJaN$restructure.int16, + defaultChar: $gfJaN$restructure.uint16, + breakChar: $gfJaN$restructure.uint16, + maxContent: $gfJaN$restructure.uint16, + usLowerOpticalPointSize: $gfJaN$restructure.uint16, + usUpperOpticalPointSize: $gfJaN$restructure.uint16 + } +}); +let $114ea85db469b435$var$versions = $114ea85db469b435$var$OS2.versions; +$114ea85db469b435$var$versions[3] = $114ea85db469b435$var$versions[4] = $114ea85db469b435$var$versions[2]; +var $114ea85db469b435$export$2e2bcd8739ae039 = $114ea85db469b435$var$OS2; + + + +var // PostScript information +$f93b30299e1ea0f5$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.fixed32, { + header: { + italicAngle: $gfJaN$restructure.fixed32, + underlinePosition: $gfJaN$restructure.int16, + underlineThickness: $gfJaN$restructure.int16, + isFixedPitch: $gfJaN$restructure.uint32, + minMemType42: $gfJaN$restructure.uint32, + maxMemType42: $gfJaN$restructure.uint32, + minMemType1: $gfJaN$restructure.uint32, + maxMemType1: $gfJaN$restructure.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + 1: {}, + 2: { + numberOfGlyphs: $gfJaN$restructure.uint16, + glyphNameIndex: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numberOfGlyphs'), + names: new $gfJaN$restructure.Array(new $gfJaN$restructure.String($gfJaN$restructure.uint8)) + }, + 2.5: { + numberOfGlyphs: $gfJaN$restructure.uint16, + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 'numberOfGlyphs') + }, + 3: {}, + 4: { + map: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, (t)=>t.parent.maxp.numGlyphs) + } +}); + + + +var // An array of predefined values accessible by instructions +$8fb09b0f473d61a0$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + controlValues: new $gfJaN$restructure.Array($gfJaN$restructure.int16) +}); + + + +var // A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +$873d79fea57d3161$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + instructions: new $gfJaN$restructure.Array($gfJaN$restructure.uint8) +}); + + + +let $83c4155666d50c37$var$loca = new $gfJaN$restructure.VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint16) + }, + 1: { + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint32) + } +}); +$83c4155666d50c37$var$loca.process = function() { + if (this.version === 0 && !this._processed) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] <<= 1; + this._processed = true; + } +}; +$83c4155666d50c37$var$loca.preEncode = function() { + if (this.version === 0 && this._processed !== false) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] >>>= 1; + this._processed = false; + } +}; +var $83c4155666d50c37$export$2e2bcd8739ae039 = $83c4155666d50c37$var$loca; + + + +var // Set of instructions executed whenever the point size or font transformation change +$b12598db7cdf7042$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + controlValueProgram: new $gfJaN$restructure.Array($gfJaN$restructure.uint8) +}); + + + +var // only used for encoding +$7707bdf21a3d89cc$export$2e2bcd8739ae039 = new $gfJaN$restructure.Array(new $gfJaN$restructure.Buffer); + + + + +class $9eaea3754914a290$export$2e2bcd8739ae039 { + getCFFVersion(ctx) { + while(ctx && !ctx.hdrSize)ctx = ctx.parent; + return ctx ? ctx.version : -1; + } + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE(); + if (count === 0) return []; + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) offsetType = $gfJaN$restructure.uint8; + else if (offSize === 2) offsetType = $gfJaN$restructure.uint16; + else if (offSize === 3) offsetType = $gfJaN$restructure.uint24; + else if (offSize === 4) offsetType = $gfJaN$restructure.uint32; + else throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + let ret = []; + let startPos = stream.pos + (count + 1) * offSize - 1; + let start = offsetType.decode(stream); + for(let i = 0; i < count; i++){ + let end = offsetType.decode(stream); + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else ret.push({ + offset: startPos + start, + length: end - start + }); + start = end; + } + stream.pos = startPos + start; + return ret; + } + size(arr, parent) { + let size = 2; + if (arr.length === 0) return size; + let type = this.type || new $gfJaN$restructure.Buffer; + // find maximum offset to detminine offset type + let offset = 1; + for(let i = 0; i < arr.length; i++){ + let item = arr[i]; + offset += type.size(item, parent); + } + let offsetType; + if (offset <= 0xff) offsetType = $gfJaN$restructure.uint8; + else if (offset <= 0xffff) offsetType = $gfJaN$restructure.uint16; + else if (offset <= 0xffffff) offsetType = $gfJaN$restructure.uint24; + else if (offset <= 0xffffffff) offsetType = $gfJaN$restructure.uint32; + else throw new Error("Bad offset in CFFIndex"); + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + return size; + } + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) return; + let type = this.type || new $gfJaN$restructure.Buffer; + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr){ + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + let offsetType; + if (offset <= 0xff) offsetType = $gfJaN$restructure.uint8; + else if (offset <= 0xffff) offsetType = $gfJaN$restructure.uint16; + else if (offset <= 0xffffff) offsetType = $gfJaN$restructure.uint24; + else if (offset <= 0xffffffff) offsetType = $gfJaN$restructure.uint32; + else throw new Error("Bad offset in CFFIndex"); + // write offset size + stream.writeUInt8(offsetType.size()); + // write elements + offset = 1; + offsetType.encode(stream, offset); + for (let size of sizes){ + offset += size; + offsetType.encode(stream, offset); + } + for (let item of arr)type.encode(stream, item, parent); + return; + } + constructor(type){ + this.type = type; + } +} + + + + + +const $f77b592c17132d70$var$FLOAT_EOF = 0xf; +const $f77b592c17132d70$var$FLOAT_LOOKUP = [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '.', + 'E', + 'E-', + null, + '-' +]; +const $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; +class $f77b592c17132d70$export$2e2bcd8739ae039 { + static decode(stream, value) { + if (32 <= value && value <= 246) return value - 139; + if (247 <= value && value <= 250) return (value - 247) * 256 + stream.readUInt8() + 108; + if (251 <= value && value <= 254) return -(value - 251) * 256 - stream.readUInt8() - 108; + if (value === 28) return stream.readInt16BE(); + if (value === 29) return stream.readInt32BE(); + if (value === 30) { + let str = ''; + while(true){ + let b = stream.readUInt8(); + let n1 = b >> 4; + if (n1 === $f77b592c17132d70$var$FLOAT_EOF) break; + str += $f77b592c17132d70$var$FLOAT_LOOKUP[n1]; + let n2 = b & 15; + if (n2 === $f77b592c17132d70$var$FLOAT_EOF) break; + str += $f77b592c17132d70$var$FLOAT_LOOKUP[n2]; + } + return parseFloat(str); + } + return null; + } + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) value = 32768; + if ((value | 0) !== value) { + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + } else if (-107 <= value && value <= 107) return 1; + else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) return 2; + else if (-32768 <= value && value <= 32767) return 3; + else return 5; + } + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } else if ((val | 0) !== val) { + stream.writeUInt8(30); + let str = '' + val; + for(let i = 0; i < str.length; i += 2){ + let c1 = str[i]; + let n1 = $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP[c1] || +c1; + if (i === str.length - 1) var n2 = $f77b592c17132d70$var$FLOAT_EOF; + else { + let c2 = str[i + 1]; + var n2 = $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + stream.writeUInt8(n1 << 4 | n2 & 15); + } + if (n2 !== $f77b592c17132d70$var$FLOAT_EOF) return stream.writeUInt8($f77b592c17132d70$var$FLOAT_EOF << 4); + } else if (-107 <= val && val <= 107) return stream.writeUInt8(val + 139); + else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} + + +class $efe622f40a9c35bd$export$2e2bcd8739ae039 { + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.decodeOperands(type[i], stream, ret, [ + op + ])); + else if (type.decode != null) return type.decode(stream, ret, operands); + else switch(type){ + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.encodeOperands(type[i], stream, ctx, op)[0]); + else if (type.encode != null) return type.encode(stream, operands, ctx); + else if (typeof operands === 'number') return [ + operands + ]; + else if (typeof operands === 'boolean') return [ + +operands + ]; + else if (Array.isArray(operands)) return operands; + else return [ + operands + ]; + } + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + // define hidden properties + Object.defineProperties(ret, { + parent: { + value: parent + }, + _startOffset: { + value: stream.pos + } + }); + // fill in defaults + for(let key in this.fields){ + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + while(stream.pos < end){ + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) b = b << 8 | stream.readUInt8(); + let field = this.fields[b]; + if (!field) throw new Error(`Unknown operator ${b}`); + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof (0, $gfJaN$restructure.PropertyDescriptor)) Object.defineProperty(ret, field[1], val); + else ret[field[1]] = val; + } + operands = []; + } else operands.push((0, $f77b592c17132d70$export$2e2bcd8739ae039).decode(stream, b)); + } + return ret; + } + size(dict, parent, includePointers = true) { + let ctx = { + parent: parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + let len = 0; + for(let k in this.fields){ + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || (0, ($parcel$interopDefault($gfJaN$fastdeepequal)))(val, field[3])) continue; + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands)len += (0, $f77b592c17132d70$export$2e2bcd8739ae039).size(op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + len += key.length; + } + if (includePointers) len += ctx.pointerSize; + return len; + } + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: dict, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + for (let field of this.ops){ + let val = dict[field[1]]; + if (val == null || (0, ($parcel$interopDefault($gfJaN$fastdeepequal)))(val, field[3])) continue; + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands)(0, $f77b592c17132d70$export$2e2bcd8739ae039).encode(stream, op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + for (let op of key)stream.writeUInt8(op); + } + let i = 0; + while(i < ctx.pointers.length){ + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + return; + } + constructor(ops = []){ + this.ops = ops; + this.fields = {}; + for (let field of ops){ + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } +} + + + + +class $4aa1b0749c2770f8$export$2e2bcd8739ae039 extends $gfJaN$restructure.Pointer { + decode(stream, parent, operands) { + this.offsetType = { + decode: ()=>operands[0] + }; + return super.decode(stream, parent, operands); + } + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: ()=>0 + }; + this.size(value, ctx); + return [ + new $4aa1b0749c2770f8$var$Ptr(0) + ]; + } + let ptr = null; + this.offsetType = { + encode: (stream, val)=>ptr = val + }; + super.encode(stream, value, ctx); + return [ + new $4aa1b0749c2770f8$var$Ptr(ptr) + ]; + } + constructor(type, options = {}){ + if (options.type == null) options.type = 'global'; + super(null, type, options); + } +} +class $4aa1b0749c2770f8$var$Ptr { + valueOf() { + return this.val; + } + constructor(val){ + this.val = val; + this.forceLarge = true; + } +} + + + + + +class $15a0cbb3d09cf7ee$var$CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while(operands.length > numBlends)operands.pop(); + } +} +var $15a0cbb3d09cf7ee$export$2e2bcd8739ae039 = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type default + [ + 6, + 'BlueValues', + 'delta', + null + ], + [ + 7, + 'OtherBlues', + 'delta', + null + ], + [ + 8, + 'FamilyBlues', + 'delta', + null + ], + [ + 9, + 'FamilyOtherBlues', + 'delta', + null + ], + [ + [ + 12, + 9 + ], + 'BlueScale', + 'number', + 0.039625 + ], + [ + [ + 12, + 10 + ], + 'BlueShift', + 'number', + 7 + ], + [ + [ + 12, + 11 + ], + 'BlueFuzz', + 'number', + 1 + ], + [ + 10, + 'StdHW', + 'number', + null + ], + [ + 11, + 'StdVW', + 'number', + null + ], + [ + [ + 12, + 12 + ], + 'StemSnapH', + 'delta', + null + ], + [ + [ + 12, + 13 + ], + 'StemSnapV', + 'delta', + null + ], + [ + [ + 12, + 14 + ], + 'ForceBold', + 'boolean', + false + ], + [ + [ + 12, + 17 + ], + 'LanguageGroup', + 'number', + 0 + ], + [ + [ + 12, + 18 + ], + 'ExpansionFactor', + 'number', + 0.06 + ], + [ + [ + 12, + 19 + ], + 'initialRandomSeed', + 'number', + 0 + ], + [ + 20, + 'defaultWidthX', + 'number', + 0 + ], + [ + 21, + 'nominalWidthX', + 'number', + 0 + ], + [ + 22, + 'vsindex', + 'number', + 0 + ], + [ + 23, + 'blend', + $15a0cbb3d09cf7ee$var$CFFBlendOp, + null + ], + [ + 19, + 'Subrs', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039), { + type: 'local' + }), + null + ] +]); + + +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +var $860d3574d7fa3a51$export$2e2bcd8739ae039 = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold" +]; + + +let $c4ffe47cba1d7f36$export$dee0027060fa13bd = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + '', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + '', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + '', + 'questiondown', + '', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + '', + 'ring', + 'cedilla', + '', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'AE', + '', + 'ordfeminine', + '', + '', + '', + '', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + '', + '', + '', + '', + '', + 'ae', + '', + '', + '', + 'dotlessi', + '', + '', + 'lslash', + 'oslash', + 'oe', + 'germandbls' +]; +let $c4ffe47cba1d7f36$export$4f58f497e14a53c3 = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + '', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + '', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + '', + '', + 'isuperior', + '', + '', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + '', + '', + 'rsuperior', + 'ssuperior', + 'tsuperior', + '', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + '', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + '', + '', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + '', + 'Dotaccentsmall', + '', + '', + 'Macronsmall', + '', + '', + 'figuredash', + 'hypheninferior', + '', + '', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + '', + '', + '', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + '', + '', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; + + +let $1e7c7c16984e4427$export$c33b50336c234f16 = [ + '.notdef', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + 'questiondown', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + 'AE', + 'ordfeminine', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + 'ae', + 'dotlessi', + 'lslash', + 'oslash', + 'oe', + 'germandbls', + 'onesuperior', + 'logicalnot', + 'mu', + 'trademark', + 'Eth', + 'onehalf', + 'plusminus', + 'Thorn', + 'onequarter', + 'divide', + 'brokenbar', + 'degree', + 'thorn', + 'threequarters', + 'twosuperior', + 'registered', + 'minus', + 'eth', + 'multiply', + 'threesuperior', + 'copyright', + 'Aacute', + 'Acircumflex', + 'Adieresis', + 'Agrave', + 'Aring', + 'Atilde', + 'Ccedilla', + 'Eacute', + 'Ecircumflex', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Ntilde', + 'Oacute', + 'Ocircumflex', + 'Odieresis', + 'Ograve', + 'Otilde', + 'Scaron', + 'Uacute', + 'Ucircumflex', + 'Udieresis', + 'Ugrave', + 'Yacute', + 'Ydieresis', + 'Zcaron', + 'aacute', + 'acircumflex', + 'adieresis', + 'agrave', + 'aring', + 'atilde', + 'ccedilla', + 'eacute', + 'ecircumflex', + 'edieresis', + 'egrave', + 'iacute', + 'icircumflex', + 'idieresis', + 'igrave', + 'ntilde', + 'oacute', + 'ocircumflex', + 'odieresis', + 'ograve', + 'otilde', + 'scaron', + 'uacute', + 'ucircumflex', + 'udieresis', + 'ugrave', + 'yacute', + 'ydieresis', + 'zcaron' +]; +let $1e7c7c16984e4427$export$3ed0f9e1fee8d489 = [ + '.notdef', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + 'Dotaccentsmall', + 'Macronsmall', + 'figuredash', + 'hypheninferior', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; +let $1e7c7c16984e4427$export$dc28be11139d4120 = [ + '.notdef', + 'space', + 'dollaroldstyle', + 'dollarsuperior', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'hyphensuperior', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'centoldstyle', + 'figuredash', + 'hypheninferior', + 'onequarter', + 'onehalf', + 'threequarters', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior' +]; + + + +//######################## +// Scripts and Languages # +//######################## +let $b6dd765146ad212a$var$LangSysTable = new $gfJaN$restructure.Struct({ + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + reqFeatureIndex: $gfJaN$restructure.uint16, + featureCount: $gfJaN$restructure.uint16, + featureIndexes: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'featureCount') +}); +let $b6dd765146ad212a$var$LangSysRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + langSys: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$LangSysTable, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$var$Script = new $gfJaN$restructure.Struct({ + defaultLangSys: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$LangSysTable), + count: $gfJaN$restructure.uint16, + langSysRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LangSysRecord, 'count') +}); +let $b6dd765146ad212a$var$ScriptRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + script: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$Script, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$export$3e15fc05ce864229 = new $gfJaN$restructure.Array($b6dd765146ad212a$var$ScriptRecord, $gfJaN$restructure.uint16); +//####################### +// Features and Lookups # +//####################### +let $b6dd765146ad212a$var$FeatureParams = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + nameID: $gfJaN$restructure.uint16 +}); +let $b6dd765146ad212a$export$6e91cf7616333d5 = new $gfJaN$restructure.Struct({ + featureParams: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$FeatureParams), + lookupCount: $gfJaN$restructure.uint16, + lookupListIndexes: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'lookupCount') +}); +let $b6dd765146ad212a$var$FeatureRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + feature: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$6e91cf7616333d5, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$export$aa18130def4b6cb4 = new $gfJaN$restructure.Array($b6dd765146ad212a$var$FeatureRecord, $gfJaN$restructure.uint16); +let $b6dd765146ad212a$var$LookupFlags = new $gfJaN$restructure.Struct({ + markAttachmentType: $gfJaN$restructure.uint8, + flags: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint8, [ + 'rightToLeft', + 'ignoreBaseGlyphs', + 'ignoreLigatures', + 'ignoreMarks', + 'useMarkFilteringSet' + ]) +}); +function $b6dd765146ad212a$export$df0008c6ff2da22a(SubTable) { + let Lookup = new $gfJaN$restructure.Struct({ + lookupType: $gfJaN$restructure.uint16, + flags: $b6dd765146ad212a$var$LookupFlags, + subTableCount: $gfJaN$restructure.uint16, + subTables: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, SubTable), 'subTableCount'), + markFilteringSet: new $gfJaN$restructure.Optional($gfJaN$restructure.uint16, (t)=>t.flags.flags.useMarkFilteringSet) + }); + return new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, Lookup), $gfJaN$restructure.uint16); +} +//################# +// Coverage Table # +//################# +let $b6dd765146ad212a$var$RangeRecord = new $gfJaN$restructure.Struct({ + start: $gfJaN$restructure.uint16, + end: $gfJaN$restructure.uint16, + startCoverageIndex: $gfJaN$restructure.uint16 +}); +let $b6dd765146ad212a$export$17608c3f81a6111 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + glyphCount: $gfJaN$restructure.uint16, + glyphs: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'glyphCount') + }, + 2: { + rangeCount: $gfJaN$restructure.uint16, + rangeRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$RangeRecord, 'rangeCount') + } +}); +//######################### +// Class Definition Table # +//######################### +let $b6dd765146ad212a$var$ClassRangeRecord = new $gfJaN$restructure.Struct({ + start: $gfJaN$restructure.uint16, + end: $gfJaN$restructure.uint16, + class: $gfJaN$restructure.uint16 +}); +let $b6dd765146ad212a$export$843d551fbbafef71 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + startGlyph: $gfJaN$restructure.uint16, + glyphCount: $gfJaN$restructure.uint16, + classValueArray: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'glyphCount') + }, + 2: { + classRangeCount: $gfJaN$restructure.uint16, + classRangeRecord: new $gfJaN$restructure.Array($b6dd765146ad212a$var$ClassRangeRecord, 'classRangeCount') + } +}); +let $b6dd765146ad212a$export$8215d14a63d9fb10 = new $gfJaN$restructure.Struct({ + a: $gfJaN$restructure.uint16, + b: $gfJaN$restructure.uint16, + deltaFormat: $gfJaN$restructure.uint16 +}); +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# +let $b6dd765146ad212a$var$LookupRecord = new $gfJaN$restructure.Struct({ + sequenceIndex: $gfJaN$restructure.uint16, + lookupListIndex: $gfJaN$restructure.uint16 +}); +let $b6dd765146ad212a$var$Rule = new $gfJaN$restructure.Struct({ + glyphCount: $gfJaN$restructure.uint16, + lookupCount: $gfJaN$restructure.uint16, + input: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$RuleSet = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$Rule), $gfJaN$restructure.uint16); +let $b6dd765146ad212a$var$ClassRule = new $gfJaN$restructure.Struct({ + glyphCount: $gfJaN$restructure.uint16, + lookupCount: $gfJaN$restructure.uint16, + classes: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$ClassSet = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$ClassRule), $gfJaN$restructure.uint16); +let $b6dd765146ad212a$export$841858b892ce1f4c = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + ruleSetCount: $gfJaN$restructure.uint16, + ruleSets: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$RuleSet), 'ruleSetCount') + }, + 2: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + classDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + classSetCnt: $gfJaN$restructure.uint16, + classSet: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: $gfJaN$restructure.uint16, + lookupCount: $gfJaN$restructure.uint16, + coverages: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'glyphCount'), + lookupRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') + } +}); +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### +let $b6dd765146ad212a$var$ChainRule = new $gfJaN$restructure.Struct({ + backtrackGlyphCount: $gfJaN$restructure.uint16, + backtrack: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'backtrackGlyphCount'), + inputGlyphCount: $gfJaN$restructure.uint16, + input: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.inputGlyphCount - 1), + lookaheadGlyphCount: $gfJaN$restructure.uint16, + lookahead: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'lookaheadGlyphCount'), + lookupCount: $gfJaN$restructure.uint16, + lookupRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$ChainRuleSet = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$ChainRule), $gfJaN$restructure.uint16); +let $b6dd765146ad212a$export$5e6d09e6861162f6 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + chainCount: $gfJaN$restructure.uint16, + chainRuleSets: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$ChainRuleSet), 'chainCount') + }, + 2: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + backtrackClassDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + inputClassDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + lookaheadClassDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + chainCount: $gfJaN$restructure.uint16, + chainClassSet: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$var$ChainRuleSet), 'chainCount') + }, + 3: { + backtrackGlyphCount: $gfJaN$restructure.uint16, + backtrackCoverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'backtrackGlyphCount'), + inputGlyphCount: $gfJaN$restructure.uint16, + inputCoverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'inputGlyphCount'), + lookaheadGlyphCount: $gfJaN$restructure.uint16, + lookaheadCoverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'lookaheadGlyphCount'), + lookupCount: $gfJaN$restructure.uint16, + lookupRecords: new $gfJaN$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') + } +}); + + + +/******************* + * Variation Store * + *******************/ let $2e4adcda047b3383$var$F2DOT14 = new $gfJaN$restructure.Fixed(16, 'BE', 14); +let $2e4adcda047b3383$var$RegionAxisCoordinates = new $gfJaN$restructure.Struct({ + startCoord: $2e4adcda047b3383$var$F2DOT14, + peakCoord: $2e4adcda047b3383$var$F2DOT14, + endCoord: $2e4adcda047b3383$var$F2DOT14 +}); +let $2e4adcda047b3383$var$VariationRegionList = new $gfJaN$restructure.Struct({ + axisCount: $gfJaN$restructure.uint16, + regionCount: $gfJaN$restructure.uint16, + variationRegions: new $gfJaN$restructure.Array(new $gfJaN$restructure.Array($2e4adcda047b3383$var$RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); +let $2e4adcda047b3383$var$DeltaSet = new $gfJaN$restructure.Struct({ + shortDeltas: new $gfJaN$restructure.Array($gfJaN$restructure.int16, (t)=>t.parent.shortDeltaCount), + regionDeltas: new $gfJaN$restructure.Array($gfJaN$restructure.int8, (t)=>t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: (t)=>t.shortDeltas.concat(t.regionDeltas) +}); +let $2e4adcda047b3383$var$ItemVariationData = new $gfJaN$restructure.Struct({ + itemCount: $gfJaN$restructure.uint16, + shortDeltaCount: $gfJaN$restructure.uint16, + regionIndexCount: $gfJaN$restructure.uint16, + regionIndexes: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'regionIndexCount'), + deltaSets: new $gfJaN$restructure.Array($2e4adcda047b3383$var$DeltaSet, 'itemCount') +}); +let $2e4adcda047b3383$export$fe1b122a2710f241 = new $gfJaN$restructure.Struct({ + format: $gfJaN$restructure.uint16, + variationRegionList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $2e4adcda047b3383$var$VariationRegionList), + variationDataCount: $gfJaN$restructure.uint16, + itemVariationData: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $2e4adcda047b3383$var$ItemVariationData), 'variationDataCount') +}); +/********************** + * Feature Variations * + **********************/ let $2e4adcda047b3383$var$ConditionTable = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + axisIndex: $gfJaN$restructure.uint16, + axisIndex: $gfJaN$restructure.uint16, + filterRangeMinValue: $2e4adcda047b3383$var$F2DOT14, + filterRangeMaxValue: $2e4adcda047b3383$var$F2DOT14 + } +}); +let $2e4adcda047b3383$var$ConditionSet = new $gfJaN$restructure.Struct({ + conditionCount: $gfJaN$restructure.uint16, + conditionTable: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $2e4adcda047b3383$var$ConditionTable), 'conditionCount') +}); +let $2e4adcda047b3383$var$FeatureTableSubstitutionRecord = new $gfJaN$restructure.Struct({ + featureIndex: $gfJaN$restructure.uint16, + alternateFeatureTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $b6dd765146ad212a$export$6e91cf7616333d5), { + type: 'parent' + }) +}); +let $2e4adcda047b3383$var$FeatureTableSubstitution = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + substitutionCount: $gfJaN$restructure.uint16, + substitutions: new $gfJaN$restructure.Array($2e4adcda047b3383$var$FeatureTableSubstitutionRecord, 'substitutionCount') +}); +let $2e4adcda047b3383$var$FeatureVariationRecord = new $gfJaN$restructure.Struct({ + conditionSet: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $2e4adcda047b3383$var$ConditionSet, { + type: 'parent' + }), + featureTableSubstitution: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $2e4adcda047b3383$var$FeatureTableSubstitution, { + type: 'parent' + }) +}); +let $2e4adcda047b3383$export$441b70b7971dd419 = new $gfJaN$restructure.Struct({ + majorVersion: $gfJaN$restructure.uint16, + minorVersion: $gfJaN$restructure.uint16, + featureVariationRecordCount: $gfJaN$restructure.uint32, + featureVariationRecords: new $gfJaN$restructure.Array($2e4adcda047b3383$var$FeatureVariationRecord, 'featureVariationRecordCount') +}); + + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class $5b547cf9e5da519b$var$PredefinedOp { + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) return this.predefinedOps[operands[0]]; + return this.type.decode(stream, parent, operands); + } + size(value, ctx) { + return this.type.size(value, ctx); + } + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) return index; + return this.type.encode(stream, value, ctx); + } + constructor(predefinedOps, type){ + this.predefinedOps = predefinedOps; + this.type = type; + } +} +class $5b547cf9e5da519b$var$CFFEncodingVersion extends $gfJaN$restructure.Number { + decode(stream) { + return $gfJaN$restructure.uint8.decode(stream) & 0x7f; + } + constructor(){ + super('UInt8'); + } +} +let $5b547cf9e5da519b$var$Range1 = new $gfJaN$restructure.Struct({ + first: $gfJaN$restructure.uint16, + nLeft: $gfJaN$restructure.uint8 +}); +let $5b547cf9e5da519b$var$Range2 = new $gfJaN$restructure.Struct({ + first: $gfJaN$restructure.uint16, + nLeft: $gfJaN$restructure.uint16 +}); +let $5b547cf9e5da519b$var$CFFCustomEncoding = new $gfJaN$restructure.VersionedStruct(new $5b547cf9e5da519b$var$CFFEncodingVersion(), { + 0: { + nCodes: $gfJaN$restructure.uint8, + codes: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 'nCodes') + }, + 1: { + nRanges: $gfJaN$restructure.uint8, + ranges: new $gfJaN$restructure.Array($5b547cf9e5da519b$var$Range1, 'nRanges') + } +}); +let $5b547cf9e5da519b$var$CFFEncoding = new $5b547cf9e5da519b$var$PredefinedOp([ + (0, $c4ffe47cba1d7f36$export$dee0027060fa13bd), + (0, $c4ffe47cba1d7f36$export$4f58f497e14a53c3) +], new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFCustomEncoding, { + lazy: true +})); +// Decodes an array of ranges until the total +// length is equal to the provided length. +class $5b547cf9e5da519b$var$RangeArray extends $gfJaN$restructure.Array { + decode(stream, parent) { + let length = (0, $gfJaN$restructure.resolveLength)(this.length, stream, parent); + let count = 0; + let res = []; + while(count < length){ + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + return res; + } +} +let $5b547cf9e5da519b$var$CFFCustomCharset = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint8, { + 0: { + glyphs: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.parent.CharStrings.length - 1) + }, + 1: { + ranges: new $5b547cf9e5da519b$var$RangeArray($5b547cf9e5da519b$var$Range1, (t)=>t.parent.CharStrings.length - 1) + }, + 2: { + ranges: new $5b547cf9e5da519b$var$RangeArray($5b547cf9e5da519b$var$Range2, (t)=>t.parent.CharStrings.length - 1) + } +}); +let $5b547cf9e5da519b$var$CFFCharset = new $5b547cf9e5da519b$var$PredefinedOp([ + (0, $1e7c7c16984e4427$export$c33b50336c234f16), + (0, $1e7c7c16984e4427$export$3ed0f9e1fee8d489), + (0, $1e7c7c16984e4427$export$dc28be11139d4120) +], new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFCustomCharset, { + lazy: true +})); +let $5b547cf9e5da519b$var$FDRange3 = new $gfJaN$restructure.Struct({ + first: $gfJaN$restructure.uint16, + fd: $gfJaN$restructure.uint8 +}); +let $5b547cf9e5da519b$var$FDRange4 = new $gfJaN$restructure.Struct({ + first: $gfJaN$restructure.uint32, + fd: $gfJaN$restructure.uint16 +}); +let $5b547cf9e5da519b$var$FDSelect = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint8, { + 0: { + fds: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, (t)=>t.parent.CharStrings.length) + }, + 3: { + nRanges: $gfJaN$restructure.uint16, + ranges: new $gfJaN$restructure.Array($5b547cf9e5da519b$var$FDRange3, 'nRanges'), + sentinel: $gfJaN$restructure.uint16 + }, + 4: { + nRanges: $gfJaN$restructure.uint32, + ranges: new $gfJaN$restructure.Array($5b547cf9e5da519b$var$FDRange4, 'nRanges'), + sentinel: $gfJaN$restructure.uint32 + } +}); +let $5b547cf9e5da519b$var$ptr = new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)((0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039)); +class $5b547cf9e5da519b$var$CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return $5b547cf9e5da519b$var$ptr.decode(stream, parent, [ + operands[1] + ]); + } + size(dict, ctx) { + return [ + (0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039).size(dict, ctx, false), + $5b547cf9e5da519b$var$ptr.size(dict, ctx)[0] + ]; + } + encode(stream, dict, ctx) { + return [ + (0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039).size(dict, ctx, false), + $5b547cf9e5da519b$var$ptr.encode(stream, dict, ctx)[0] + ]; + } +} +let $5b547cf9e5da519b$var$FontDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + 18, + 'Private', + new $5b547cf9e5da519b$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ] +]); +let $5b547cf9e5da519b$var$CFFTopDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + [ + 12, + 30 + ], + 'ROS', + [ + 'sid', + 'sid', + 'number' + ], + null + ], + [ + 0, + 'version', + 'sid', + null + ], + [ + 1, + 'Notice', + 'sid', + null + ], + [ + [ + 12, + 0 + ], + 'Copyright', + 'sid', + null + ], + [ + 2, + 'FullName', + 'sid', + null + ], + [ + 3, + 'FamilyName', + 'sid', + null + ], + [ + 4, + 'Weight', + 'sid', + null + ], + [ + [ + 12, + 1 + ], + 'isFixedPitch', + 'boolean', + false + ], + [ + [ + 12, + 2 + ], + 'ItalicAngle', + 'number', + 0 + ], + [ + [ + 12, + 3 + ], + 'UnderlinePosition', + 'number', + -100 + ], + [ + [ + 12, + 4 + ], + 'UnderlineThickness', + 'number', + 50 + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ], + [ + [ + 12, + 6 + ], + 'CharstringType', + 'number', + 2 + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 13, + 'UniqueID', + 'number', + null + ], + [ + 5, + 'FontBBox', + 'array', + [ + 0, + 0, + 0, + 0 + ] + ], + [ + [ + 12, + 8 + ], + 'StrokeWidth', + 'number', + 0 + ], + [ + 14, + 'XUID', + 'array', + null + ], + [ + 15, + 'charset', + $5b547cf9e5da519b$var$CFFCharset, + (0, $1e7c7c16984e4427$export$c33b50336c234f16) + ], + [ + 16, + 'Encoding', + $5b547cf9e5da519b$var$CFFEncoding, + (0, $c4ffe47cba1d7f36$export$dee0027060fa13bd) + ], + [ + 17, + 'CharStrings', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)), + null + ], + [ + 18, + 'Private', + new $5b547cf9e5da519b$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 20 + ], + 'SyntheticBase', + 'number', + null + ], + [ + [ + 12, + 21 + ], + 'PostScript', + 'sid', + null + ], + [ + [ + 12, + 22 + ], + 'BaseFontName', + 'sid', + null + ], + [ + [ + 12, + 23 + ], + 'BaseFontBlend', + 'delta', + null + ], + // CID font specific + [ + [ + 12, + 31 + ], + 'CIDFontVersion', + 'number', + 0 + ], + [ + [ + 12, + 32 + ], + 'CIDFontRevision', + 'number', + 0 + ], + [ + [ + 12, + 33 + ], + 'CIDFontType', + 'number', + 0 + ], + [ + [ + 12, + 34 + ], + 'CIDCount', + 'number', + 8720 + ], + [ + [ + 12, + 35 + ], + 'UIDBase', + 'number', + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FontDict)), + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ] +]); +let $5b547cf9e5da519b$var$VariationStore = new $gfJaN$restructure.Struct({ + length: $gfJaN$restructure.uint16, + itemVariationStore: (0, $2e4adcda047b3383$export$fe1b122a2710f241) +}); +let $5b547cf9e5da519b$var$CFF2TopDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 17, + 'CharStrings', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)), + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FontDict)), + null + ], + [ + 24, + 'vstore', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$VariationStore), + null + ], + [ + 25, + 'maxstack', + 'number', + 193 + ] +]); +let $5b547cf9e5da519b$var$CFFTop = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.fixed16, { + 1: { + hdrSize: $gfJaN$restructure.uint8, + offSize: $gfJaN$restructure.uint8, + nameIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)(new $gfJaN$restructure.String('length')), + topDictIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFTopDict), + stringIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)(new $gfJaN$restructure.String('length')), + globalSubrIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039) + }, + 2: { + hdrSize: $gfJaN$restructure.uint8, + length: $gfJaN$restructure.uint16, + topDict: $5b547cf9e5da519b$var$CFF2TopDict, + globalSubrIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039) + } +}); +var $5b547cf9e5da519b$export$2e2bcd8739ae039 = $5b547cf9e5da519b$var$CFFTop; + + + + +class $f717432b360040c7$var$CFFFont { + static decode(stream) { + return new $f717432b360040c7$var$CFFFont(stream); + } + decode() { + let start = this.stream.pos; + let top = (0, $5b547cf9e5da519b$export$2e2bcd8739ae039).decode(this.stream); + for(let key in top){ + let val = top[key]; + this[key] = val; + } + if (this.version < 2) { + if (this.topDictIndex.length !== 1) throw new Error("Only a single font is allowed in CFF"); + this.topDict = this.topDictIndex[0]; + } + this.isCIDFont = this.topDict.ROS != null; + return this; + } + string(sid) { + if (this.version >= 2) return null; + if (sid < (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length) return (0, $860d3574d7fa3a51$export$2e2bcd8739ae039)[sid]; + return this.stringIndex[sid - (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length]; + } + get postscriptName() { + if (this.version < 2) return this.nameIndex[0]; + return null; + } + get fullName() { + return this.string(this.topDict.FullName); + } + get familyName() { + return this.string(this.topDict.FamilyName); + } + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) return null; + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) return null; + let { charset: charset } = this.topDict; + if (Array.isArray(charset)) return charset[gid]; + if (gid === 0) return '.notdef'; + gid -= 1; + switch(charset.version){ + case 0: + return this.string(charset.glyphs[gid]); + case 1: + case 2: + for(let i = 0; i < charset.ranges.length; i++){ + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) return this.string(range.first + (gid - range.offset)); + } + break; + } + return null; + } + fdForGlyph(gid) { + if (!this.topDict.FDSelect) return null; + switch(this.topDict.FDSelect.version){ + case 0: + return this.topDict.FDSelect.fds[gid]; + case 3: + case 4: + let { ranges: ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + while(low <= high){ + let mid = low + high >> 1; + if (gid < ranges[mid].first) high = mid - 1; + else if (mid < high && gid >= ranges[mid + 1].first) low = mid + 1; + else return ranges[mid].fd; + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) return this.topDict.FDArray[fd].Private; + return null; + } + if (this.version < 2) return this.topDict.Private; + return this.topDict.FDArray[0].Private; + } + constructor(stream){ + this.stream = stream; + this.decode(); + } +} +var $f717432b360040c7$export$2e2bcd8739ae039 = $f717432b360040c7$var$CFFFont; + + + +let $8cb7ae73ed7aa7d8$var$VerticalOrigin = new $gfJaN$restructure.Struct({ + glyphIndex: $gfJaN$restructure.uint16, + vertOriginY: $gfJaN$restructure.int16 +}); +var $8cb7ae73ed7aa7d8$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + majorVersion: $gfJaN$restructure.uint16, + minorVersion: $gfJaN$restructure.uint16, + defaultVertOriginY: $gfJaN$restructure.int16, + numVertOriginYMetrics: $gfJaN$restructure.uint16, + metrics: new $gfJaN$restructure.Array($8cb7ae73ed7aa7d8$var$VerticalOrigin, 'numVertOriginYMetrics') +}); + + + + +let $20e0c7bbecb76d75$export$16b227cb15d716a0 = new $gfJaN$restructure.Struct({ + height: $gfJaN$restructure.uint8, + width: $gfJaN$restructure.uint8, + horiBearingX: $gfJaN$restructure.int8, + horiBearingY: $gfJaN$restructure.int8, + horiAdvance: $gfJaN$restructure.uint8, + vertBearingX: $gfJaN$restructure.int8, + vertBearingY: $gfJaN$restructure.int8, + vertAdvance: $gfJaN$restructure.uint8 +}); +let $20e0c7bbecb76d75$export$62c53e75f69bfe12 = new $gfJaN$restructure.Struct({ + height: $gfJaN$restructure.uint8, + width: $gfJaN$restructure.uint8, + bearingX: $gfJaN$restructure.int8, + bearingY: $gfJaN$restructure.int8, + advance: $gfJaN$restructure.uint8 +}); +let $20e0c7bbecb76d75$var$EBDTComponent = new $gfJaN$restructure.Struct({ + glyph: $gfJaN$restructure.uint16, + xOffset: $gfJaN$restructure.int8, + yOffset: $gfJaN$restructure.int8 +}); +class $20e0c7bbecb76d75$var$ByteAligned { +} +class $20e0c7bbecb76d75$var$BitAligned { +} +let $20e0c7bbecb76d75$export$f1f5ddeb20d14f = new $gfJaN$restructure.VersionedStruct('version', { + 1: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + data: $20e0c7bbecb76d75$var$ByteAligned + }, + 2: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + data: $20e0c7bbecb76d75$var$BitAligned + }, + // format 3 is deprecated + // format 4 is not supported by Microsoft + 5: { + data: $20e0c7bbecb76d75$var$BitAligned + }, + 6: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + data: $20e0c7bbecb76d75$var$ByteAligned + }, + 7: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + data: $20e0c7bbecb76d75$var$BitAligned + }, + 8: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + pad: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8), + numComponents: $gfJaN$restructure.uint16, + components: new $gfJaN$restructure.Array($20e0c7bbecb76d75$var$EBDTComponent, 'numComponents') + }, + 9: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + pad: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8), + numComponents: $gfJaN$restructure.uint16, + components: new $gfJaN$restructure.Array($20e0c7bbecb76d75$var$EBDTComponent, 'numComponents') + }, + 17: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + dataLen: $gfJaN$restructure.uint32, + data: new $gfJaN$restructure.Buffer('dataLen') + }, + 18: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + dataLen: $gfJaN$restructure.uint32, + data: new $gfJaN$restructure.Buffer('dataLen') + }, + 19: { + dataLen: $gfJaN$restructure.uint32, + data: new $gfJaN$restructure.Buffer('dataLen') + } +}); + + +let $035bb95c0cdb1f6d$var$SBitLineMetrics = new $gfJaN$restructure.Struct({ + ascender: $gfJaN$restructure.int8, + descender: $gfJaN$restructure.int8, + widthMax: $gfJaN$restructure.uint8, + caretSlopeNumerator: $gfJaN$restructure.int8, + caretSlopeDenominator: $gfJaN$restructure.int8, + caretOffset: $gfJaN$restructure.int8, + minOriginSB: $gfJaN$restructure.int8, + minAdvanceSB: $gfJaN$restructure.int8, + maxBeforeBL: $gfJaN$restructure.int8, + minAfterBL: $gfJaN$restructure.int8, + pad: new $gfJaN$restructure.Reserved($gfJaN$restructure.int8, 2) +}); +let $035bb95c0cdb1f6d$var$CodeOffsetPair = new $gfJaN$restructure.Struct({ + glyphCode: $gfJaN$restructure.uint16, + offset: $gfJaN$restructure.uint16 +}); +let $035bb95c0cdb1f6d$var$IndexSubtable = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + header: { + imageFormat: $gfJaN$restructure.uint16, + imageDataOffset: $gfJaN$restructure.uint32 + }, + 1: { + offsetArray: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 2: { + imageSize: $gfJaN$restructure.uint32, + bigMetrics: (0, $20e0c7bbecb76d75$export$16b227cb15d716a0) + }, + 3: { + offsetArray: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 4: { + numGlyphs: $gfJaN$restructure.uint32, + glyphArray: new $gfJaN$restructure.Array($035bb95c0cdb1f6d$var$CodeOffsetPair, (t)=>t.numGlyphs + 1) + }, + 5: { + imageSize: $gfJaN$restructure.uint32, + bigMetrics: (0, $20e0c7bbecb76d75$export$16b227cb15d716a0), + numGlyphs: $gfJaN$restructure.uint32, + glyphCodeArray: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numGlyphs') + } +}); +let $035bb95c0cdb1f6d$var$IndexSubtableArray = new $gfJaN$restructure.Struct({ + firstGlyphIndex: $gfJaN$restructure.uint16, + lastGlyphIndex: $gfJaN$restructure.uint16, + subtable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $035bb95c0cdb1f6d$var$IndexSubtable) +}); +let $035bb95c0cdb1f6d$var$BitmapSizeTable = new $gfJaN$restructure.Struct({ + indexSubTableArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($035bb95c0cdb1f6d$var$IndexSubtableArray, 1), { + type: 'parent' + }), + indexTablesSize: $gfJaN$restructure.uint32, + numberOfIndexSubTables: $gfJaN$restructure.uint32, + colorRef: $gfJaN$restructure.uint32, + hori: $035bb95c0cdb1f6d$var$SBitLineMetrics, + vert: $035bb95c0cdb1f6d$var$SBitLineMetrics, + startGlyphIndex: $gfJaN$restructure.uint16, + endGlyphIndex: $gfJaN$restructure.uint16, + ppemX: $gfJaN$restructure.uint8, + ppemY: $gfJaN$restructure.uint8, + bitDepth: $gfJaN$restructure.uint8, + flags: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint8, [ + 'horizontal', + 'vertical' + ]) +}); +var $035bb95c0cdb1f6d$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint32, + numSizes: $gfJaN$restructure.uint32, + sizes: new $gfJaN$restructure.Array($035bb95c0cdb1f6d$var$BitmapSizeTable, 'numSizes') +}); + + + +let $73d13900b55a3c0c$var$ImageTable = new $gfJaN$restructure.Struct({ + ppem: $gfJaN$restructure.uint16, + resolution: $gfJaN$restructure.uint16, + imageOffsets: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, 'void'), (t)=>t.parent.parent.maxp.numGlyphs + 1) +}); +var // This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +$73d13900b55a3c0c$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + flags: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + 'renderOutlines' + ]), + numImgTables: $gfJaN$restructure.uint32, + imageTables: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $73d13900b55a3c0c$var$ImageTable), 'numImgTables') +}); + + + +let $97f6b8be3a347a8f$var$LayerRecord = new $gfJaN$restructure.Struct({ + gid: $gfJaN$restructure.uint16, + paletteIndex: $gfJaN$restructure.uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for +// the special case noted below. Each palette entry is 16 bits. +// A palette index of 0xFFFF is a special case indicating that +// the text foreground color should be used. +let $97f6b8be3a347a8f$var$BaseGlyphRecord = new $gfJaN$restructure.Struct({ + gid: $gfJaN$restructure.uint16, + // and is not rendered for color. + firstLayerIndex: $gfJaN$restructure.uint16, + // There will be numLayers consecutive entries for this base glyph. + numLayers: $gfJaN$restructure.uint16 +}); +var $97f6b8be3a347a8f$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numBaseGlyphRecords: $gfJaN$restructure.uint16, + baseGlyphRecord: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($97f6b8be3a347a8f$var$BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($97f6b8be3a347a8f$var$LayerRecord, 'numLayerRecords'), { + lazy: true + }), + numLayerRecords: $gfJaN$restructure.uint16 +}); + + + +let $16ca60ecbdee30ea$var$ColorRecord = new $gfJaN$restructure.Struct({ + blue: $gfJaN$restructure.uint8, + green: $gfJaN$restructure.uint8, + red: $gfJaN$restructure.uint8, + alpha: $gfJaN$restructure.uint8 +}); +var $16ca60ecbdee30ea$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + header: { + numPaletteEntries: $gfJaN$restructure.uint16, + numPalettes: $gfJaN$restructure.uint16, + numColorRecords: $gfJaN$restructure.uint16, + colorRecords: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($16ca60ecbdee30ea$var$ColorRecord, 'numColorRecords')), + colorRecordIndices: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numPalettes') + }, + 0: {}, + 1: { + offsetPaletteTypeArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 'numPalettes')), + offsetPaletteLabelArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numPalettes')), + offsetPaletteEntryLabelArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numPaletteEntries')) + } +}); + + + + + +let $7327e41706f9d5c7$var$BaseCoord = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coordinate: $gfJaN$restructure.int16 // X or Y value, in design units + }, + 2: { + coordinate: $gfJaN$restructure.int16, + referenceGlyph: $gfJaN$restructure.uint16, + baseCoordPoint: $gfJaN$restructure.uint16 // Index of contour point on the referenceGlyph + }, + 3: { + coordinate: $gfJaN$restructure.int16, + deviceTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) // Device table for X or Y value + } +}); +let $7327e41706f9d5c7$var$BaseValues = new $gfJaN$restructure.Struct({ + defaultIndex: $gfJaN$restructure.uint16, + baseCoordCount: $gfJaN$restructure.uint16, + baseCoords: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), 'baseCoordCount') +}); +let $7327e41706f9d5c7$var$FeatMinMaxRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + minCoord: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord, { + type: 'parent' + }), + maxCoord: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord, { + type: 'parent' + }) // May be NULL +}); +let $7327e41706f9d5c7$var$MinMax = new $gfJaN$restructure.Struct({ + minCoord: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), + maxCoord: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), + featMinMaxCount: $gfJaN$restructure.uint16, + featMinMaxRecords: new $gfJaN$restructure.Array($7327e41706f9d5c7$var$FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); +let $7327e41706f9d5c7$var$BaseLangSysRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + minMax: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$MinMax, { + type: 'parent' + }) +}); +let $7327e41706f9d5c7$var$BaseScript = new $gfJaN$restructure.Struct({ + baseValues: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseValues), + defaultMinMax: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$MinMax), + baseLangSysCount: $gfJaN$restructure.uint16, + baseLangSysRecords: new $gfJaN$restructure.Array($7327e41706f9d5c7$var$BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); +let $7327e41706f9d5c7$var$BaseScriptRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + script: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseScript, { + type: 'parent' + }) +}); +let $7327e41706f9d5c7$var$BaseScriptList = new $gfJaN$restructure.Array($7327e41706f9d5c7$var$BaseScriptRecord, $gfJaN$restructure.uint16); +// Array of 4-byte baseline identification tags-must be in alphabetical order +let $7327e41706f9d5c7$var$BaseTagList = new $gfJaN$restructure.Array(new $gfJaN$restructure.String(4), $gfJaN$restructure.uint16); +let $7327e41706f9d5c7$var$Axis = new $gfJaN$restructure.Struct({ + baseTagList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseTagList), + baseScriptList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$BaseScriptList) +}); +var $7327e41706f9d5c7$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint32, { + header: { + horizAxis: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$Axis), + vertAxis: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7327e41706f9d5c7$var$Axis) // May be NULL + }, + 0x00010000: {}, + 0x00010001: { + itemVariationStore: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)) + } +}); + + + + + +let $7e48bbe9e5345664$var$AttachPoint = new $gfJaN$restructure.Array($gfJaN$restructure.uint16, $gfJaN$restructure.uint16); +let $7e48bbe9e5345664$var$AttachList = new $gfJaN$restructure.Struct({ + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + glyphCount: $gfJaN$restructure.uint16, + attachPoints: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$AttachPoint), 'glyphCount') +}); +let $7e48bbe9e5345664$var$CaretValue = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coordinate: $gfJaN$restructure.int16 + }, + 2: { + caretValuePoint: $gfJaN$restructure.uint16 + }, + 3: { + coordinate: $gfJaN$restructure.int16, + deviceTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) + } +}); +let $7e48bbe9e5345664$var$LigGlyph = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$CaretValue), $gfJaN$restructure.uint16); +let $7e48bbe9e5345664$var$LigCaretList = new $gfJaN$restructure.Struct({ + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + ligGlyphCount: $gfJaN$restructure.uint16, + ligGlyphs: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$LigGlyph), 'ligGlyphCount') +}); +let $7e48bbe9e5345664$var$MarkGlyphSetsDef = new $gfJaN$restructure.Struct({ + markSetTableFormat: $gfJaN$restructure.uint16, + markSetCount: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'markSetCount') +}); +var $7e48bbe9e5345664$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint32, { + header: { + glyphClassDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + attachList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$AttachList), + ligCaretList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$LigCaretList), + markAttachClassDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)) + }, + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $7e48bbe9e5345664$var$MarkGlyphSetsDef), + itemVariationStore: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)) + } +}); + + + + + +let $b687332511a4da75$var$ValueFormat = new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + 'xPlacement', + 'yPlacement', + 'xAdvance', + 'yAdvance', + 'xPlaDevice', + 'yPlaDevice', + 'xAdvDevice', + 'yAdvDevice' +]); +let $b687332511a4da75$var$types = { + xPlacement: $gfJaN$restructure.int16, + yPlacement: $gfJaN$restructure.int16, + xAdvance: $gfJaN$restructure.int16, + yAdvance: $gfJaN$restructure.int16, + xPlaDevice: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yPlaDevice: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + xAdvDevice: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yAdvDevice: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }) +}; +class $b687332511a4da75$var$ValueRecord { + buildStruct(parent) { + let struct = parent; + while(!struct[this.key] && struct.parent)struct = struct.parent; + if (!struct[this.key]) return; + let fields = {}; + fields.rel = ()=>struct._startOffset; + let format = struct[this.key]; + for(let key in format)if (format[key]) fields[key] = $b687332511a4da75$var$types[key]; + return new $gfJaN$restructure.Struct(fields); + } + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } + constructor(key = 'valueFormat'){ + this.key = key; + } +} +let $b687332511a4da75$var$PairValueRecord = new $gfJaN$restructure.Struct({ + secondGlyph: $gfJaN$restructure.uint16, + value1: new $b687332511a4da75$var$ValueRecord('valueFormat1'), + value2: new $b687332511a4da75$var$ValueRecord('valueFormat2') +}); +let $b687332511a4da75$var$PairSet = new $gfJaN$restructure.Array($b687332511a4da75$var$PairValueRecord, $gfJaN$restructure.uint16); +let $b687332511a4da75$var$Class2Record = new $gfJaN$restructure.Struct({ + value1: new $b687332511a4da75$var$ValueRecord('valueFormat1'), + value2: new $b687332511a4da75$var$ValueRecord('valueFormat2') +}); +let $b687332511a4da75$var$Anchor = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + xCoordinate: $gfJaN$restructure.int16, + yCoordinate: $gfJaN$restructure.int16 + }, + 2: { + xCoordinate: $gfJaN$restructure.int16, + yCoordinate: $gfJaN$restructure.int16, + anchorPoint: $gfJaN$restructure.uint16 + }, + 3: { + xCoordinate: $gfJaN$restructure.int16, + yCoordinate: $gfJaN$restructure.int16, + xDeviceTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)), + yDeviceTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) + } +}); +let $b687332511a4da75$var$EntryExitRecord = new $gfJaN$restructure.Struct({ + entryAnchor: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }), + exitAnchor: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }) +}); +let $b687332511a4da75$var$MarkRecord = new $gfJaN$restructure.Struct({ + class: $gfJaN$restructure.uint16, + markAnchor: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }) +}); +let $b687332511a4da75$var$MarkArray = new $gfJaN$restructure.Array($b687332511a4da75$var$MarkRecord, $gfJaN$restructure.uint16); +let $b687332511a4da75$var$BaseRecord = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$Anchor), (t)=>t.parent.classCount); +let $b687332511a4da75$var$BaseArray = new $gfJaN$restructure.Array($b687332511a4da75$var$BaseRecord, $gfJaN$restructure.uint16); +let $b687332511a4da75$var$ComponentRecord = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$Anchor), (t)=>t.parent.parent.classCount); +let $b687332511a4da75$var$LigatureAttach = new $gfJaN$restructure.Array($b687332511a4da75$var$ComponentRecord, $gfJaN$restructure.uint16); +let $b687332511a4da75$var$LigatureArray = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$LigatureAttach), $gfJaN$restructure.uint16); +let $b687332511a4da75$export$73a8cfb19cd43a0f = new $gfJaN$restructure.VersionedStruct('lookupType', { + 1: new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat: $b687332511a4da75$var$ValueFormat, + value: new $b687332511a4da75$var$ValueRecord() + }, + 2: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat: $b687332511a4da75$var$ValueFormat, + valueCount: $gfJaN$restructure.uint16, + values: new $gfJaN$restructure.LazyArray(new $b687332511a4da75$var$ValueRecord(), 'valueCount') + } + }), + 2: new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat1: $b687332511a4da75$var$ValueFormat, + valueFormat2: $b687332511a4da75$var$ValueFormat, + pairSetCount: $gfJaN$restructure.uint16, + pairSets: new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$PairSet), 'pairSetCount') + }, + 2: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat1: $b687332511a4da75$var$ValueFormat, + valueFormat2: $b687332511a4da75$var$ValueFormat, + classDef1: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + classDef2: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + class1Count: $gfJaN$restructure.uint16, + class2Count: $gfJaN$restructure.uint16, + classRecords: new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.LazyArray($b687332511a4da75$var$Class2Record, 'class2Count'), 'class1Count') + } + }), + 3: { + format: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + entryExitCount: $gfJaN$restructure.uint16, + entryExitRecords: new $gfJaN$restructure.Array($b687332511a4da75$var$EntryExitRecord, 'entryExitCount') + }, + 4: { + format: $gfJaN$restructure.uint16, + markCoverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + baseCoverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $gfJaN$restructure.uint16, + markArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$MarkArray), + baseArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$BaseArray) + }, + 5: { + format: $gfJaN$restructure.uint16, + markCoverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + ligatureCoverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $gfJaN$restructure.uint16, + markArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$MarkArray), + ligatureArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$LigatureArray) + }, + 6: { + format: $gfJaN$restructure.uint16, + mark1Coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + mark2Coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $gfJaN$restructure.uint16, + mark1Array: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$MarkArray), + mark2Array: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $b687332511a4da75$var$BaseArray) + }, + 7: (0, $b6dd765146ad212a$export$841858b892ce1f4c), + 8: (0, $b6dd765146ad212a$export$5e6d09e6861162f6), + 9: { + posFormat: $gfJaN$restructure.uint16, + lookupType: $gfJaN$restructure.uint16, + extension: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, null) + } +}); +// Fix circular reference +$b687332511a4da75$export$73a8cfb19cd43a0f.versions[9].extension.type = $b687332511a4da75$export$73a8cfb19cd43a0f; +var $b687332511a4da75$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint32, { + header: { + scriptList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$3e15fc05ce864229)), + featureList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$aa18130def4b6cb4)), + lookupList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)($b687332511a4da75$export$73a8cfb19cd43a0f)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $2e4adcda047b3383$export$441b70b7971dd419)) + } +}); + + + + + +let $99ccad60b96f92fb$var$Sequence = new $gfJaN$restructure.Array($gfJaN$restructure.uint16, $gfJaN$restructure.uint16); +let $99ccad60b96f92fb$var$AlternateSet = $99ccad60b96f92fb$var$Sequence; +let $99ccad60b96f92fb$var$Ligature = new $gfJaN$restructure.Struct({ + glyph: $gfJaN$restructure.uint16, + compCount: $gfJaN$restructure.uint16, + components: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.compCount - 1) +}); +let $99ccad60b96f92fb$var$LigatureSet = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $99ccad60b96f92fb$var$Ligature), $gfJaN$restructure.uint16); +let $99ccad60b96f92fb$var$GSUBLookup = new $gfJaN$restructure.VersionedStruct('lookupType', { + 1: new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 1: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + deltaGlyphID: $gfJaN$restructure.int16 + }, + 2: { + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + glyphCount: $gfJaN$restructure.uint16, + substitute: new $gfJaN$restructure.LazyArray($gfJaN$restructure.uint16, 'glyphCount') + } + }), + 2: { + substFormat: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $gfJaN$restructure.uint16, + sequences: new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $99ccad60b96f92fb$var$Sequence), 'count') + }, + 3: { + substFormat: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $gfJaN$restructure.uint16, + alternateSet: new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $99ccad60b96f92fb$var$AlternateSet), 'count') + }, + 4: { + substFormat: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $gfJaN$restructure.uint16, + ligatureSets: new $gfJaN$restructure.LazyArray(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $99ccad60b96f92fb$var$LigatureSet), 'count') + }, + 5: (0, $b6dd765146ad212a$export$841858b892ce1f4c), + 6: (0, $b6dd765146ad212a$export$5e6d09e6861162f6), + 7: { + substFormat: $gfJaN$restructure.uint16, + lookupType: $gfJaN$restructure.uint16, + extension: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, null) + }, + 8: { + substFormat: $gfJaN$restructure.uint16, + coverage: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + backtrackCoverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'backtrackGlyphCount'), + lookaheadGlyphCount: $gfJaN$restructure.uint16, + lookaheadCoverage: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'lookaheadGlyphCount'), + glyphCount: $gfJaN$restructure.uint16, + substitutes: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'glyphCount') + } +}); +// Fix circular reference +$99ccad60b96f92fb$var$GSUBLookup.versions[7].extension.type = $99ccad60b96f92fb$var$GSUBLookup; +var $99ccad60b96f92fb$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint32, { + header: { + scriptList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$3e15fc05ce864229)), + featureList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, (0, $b6dd765146ad212a$export$aa18130def4b6cb4)), + lookupList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)($99ccad60b96f92fb$var$GSUBLookup)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $2e4adcda047b3383$export$441b70b7971dd419)) + } +}); + + + + + +let $573d5042c76c4940$var$JstfGSUBModList = new $gfJaN$restructure.Array($gfJaN$restructure.uint16, $gfJaN$restructure.uint16); +let $573d5042c76c4940$var$JstfPriority = new $gfJaN$restructure.Struct({ + shrinkageEnableGSUB: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageDisableGSUB: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageEnableGPOS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageDisableGPOS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageJstfMax: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)((0, $b687332511a4da75$export$73a8cfb19cd43a0f))), + extensionEnableGSUB: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionDisableGSUB: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionEnableGPOS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionDisableGPOS: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionJstfMax: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)((0, $b687332511a4da75$export$73a8cfb19cd43a0f))) +}); +let $573d5042c76c4940$var$JstfLangSys = new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfPriority), $gfJaN$restructure.uint16); +let $573d5042c76c4940$var$JstfLangSysRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + jstfLangSys: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfLangSys) +}); +let $573d5042c76c4940$var$JstfScript = new $gfJaN$restructure.Struct({ + extenderGlyphs: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $gfJaN$restructure.Array($gfJaN$restructure.uint16, $gfJaN$restructure.uint16)), + defaultLangSys: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfLangSys), + langSysCount: $gfJaN$restructure.uint16, + langSysRecords: new $gfJaN$restructure.Array($573d5042c76c4940$var$JstfLangSysRecord, 'langSysCount') +}); +let $573d5042c76c4940$var$JstfScriptRecord = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + script: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $573d5042c76c4940$var$JstfScript, { + type: 'parent' + }) +}); +var $573d5042c76c4940$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint32, + scriptCount: $gfJaN$restructure.uint16, + scriptList: new $gfJaN$restructure.Array($573d5042c76c4940$var$JstfScriptRecord, 'scriptCount') +}); + + + + +// TODO: add this to restructure +class $a5875b80d6087f61$var$VariableSizeNumber { + decode(stream, parent) { + switch(this.size(0, parent)){ + case 1: + return stream.readUInt8(); + case 2: + return stream.readUInt16BE(); + case 3: + return stream.readUInt24BE(); + case 4: + return stream.readUInt32BE(); + } + } + size(val, parent) { + return (0, $gfJaN$restructure.resolveLength)(this._size, null, parent); + } + constructor(size){ + this._size = size; + } +} +let $a5875b80d6087f61$var$MapDataEntry = new $gfJaN$restructure.Struct({ + entry: new $a5875b80d6087f61$var$VariableSizeNumber((t)=>((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: (t)=>t.entry >> (t.parent.entryFormat & 0x000F) + 1, + innerIndex: (t)=>t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1 +}); +let $a5875b80d6087f61$var$DeltaSetIndexMap = new $gfJaN$restructure.Struct({ + entryFormat: $gfJaN$restructure.uint16, + mapCount: $gfJaN$restructure.uint16, + mapData: new $gfJaN$restructure.Array($a5875b80d6087f61$var$MapDataEntry, 'mapCount') +}); +var $a5875b80d6087f61$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + majorVersion: $gfJaN$restructure.uint16, + minorVersion: $gfJaN$restructure.uint16, + itemVariationStore: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)), + advanceWidthMapping: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap), + LSBMapping: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap), + RSBMapping: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap) +}); + + + +let $4423bc1ac09bbbd1$var$Signature = new $gfJaN$restructure.Struct({ + format: $gfJaN$restructure.uint32, + length: $gfJaN$restructure.uint32, + offset: $gfJaN$restructure.uint32 +}); +let $4423bc1ac09bbbd1$var$SignatureBlock = new $gfJaN$restructure.Struct({ + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16, 2), + cbSignature: $gfJaN$restructure.uint32, + signature: new $gfJaN$restructure.Buffer('cbSignature') +}); +var $4423bc1ac09bbbd1$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + ulVersion: $gfJaN$restructure.uint32, + usNumSigs: $gfJaN$restructure.uint16, + usFlag: $gfJaN$restructure.uint16, + signatures: new $gfJaN$restructure.Array($4423bc1ac09bbbd1$var$Signature, 'usNumSigs'), + signatureBlocks: new $gfJaN$restructure.Array($4423bc1ac09bbbd1$var$SignatureBlock, 'usNumSigs') +}); + + + +let $7b50e3f8d83263de$var$GaspRange = new $gfJaN$restructure.Struct({ + rangeMaxPPEM: $gfJaN$restructure.uint16, + rangeGaspBehavior: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint16, [ + 'grayscale', + 'gridfit', + 'symmetricSmoothing', + 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); +var $7b50e3f8d83263de$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numRanges: $gfJaN$restructure.uint16, + gaspRanges: new $gfJaN$restructure.Array($7b50e3f8d83263de$var$GaspRange, 'numRanges') // Sorted by ppem +}); + + + +let $7bf92ec372cd2307$var$DeviceRecord = new $gfJaN$restructure.Struct({ + pixelSize: $gfJaN$restructure.uint8, + maximumWidth: $gfJaN$restructure.uint8, + widths: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, (t)=>t.parent.parent.maxp.numGlyphs) +}); +var // The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +$7bf92ec372cd2307$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numRecords: $gfJaN$restructure.int16, + sizeDeviceRecord: $gfJaN$restructure.int32, + records: new $gfJaN$restructure.Array($7bf92ec372cd2307$var$DeviceRecord, 'numRecords') +}); + + + +let $a3f544bcf76542d1$var$KernPair = new $gfJaN$restructure.Struct({ + left: $gfJaN$restructure.uint16, + right: $gfJaN$restructure.uint16, + value: $gfJaN$restructure.int16 +}); +let $a3f544bcf76542d1$var$ClassTable = new $gfJaN$restructure.Struct({ + firstGlyph: $gfJaN$restructure.uint16, + nGlyphs: $gfJaN$restructure.uint16, + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'nGlyphs'), + max: (t)=>t.offsets.length && Math.max.apply(Math, t.offsets) +}); +let $a3f544bcf76542d1$var$Kern2Array = new $gfJaN$restructure.Struct({ + off: (t)=>t._startOffset - t.parent.parent._startOffset, + len: (t)=>((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2), + values: new $gfJaN$restructure.LazyArray($gfJaN$restructure.int16, 'len') +}); +let $a3f544bcf76542d1$var$KernSubtable = new $gfJaN$restructure.VersionedStruct('format', { + 0: { + nPairs: $gfJaN$restructure.uint16, + searchRange: $gfJaN$restructure.uint16, + entrySelector: $gfJaN$restructure.uint16, + rangeShift: $gfJaN$restructure.uint16, + pairs: new $gfJaN$restructure.Array($a3f544bcf76542d1$var$KernPair, 'nPairs') + }, + 2: { + rowWidth: $gfJaN$restructure.uint16, + leftTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $a3f544bcf76542d1$var$ClassTable, { + type: 'parent' + }), + rightTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $a3f544bcf76542d1$var$ClassTable, { + type: 'parent' + }), + array: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $a3f544bcf76542d1$var$Kern2Array, { + type: 'parent' + }) + }, + 3: { + glyphCount: $gfJaN$restructure.uint16, + kernValueCount: $gfJaN$restructure.uint8, + leftClassCount: $gfJaN$restructure.uint8, + rightClassCount: $gfJaN$restructure.uint8, + flags: $gfJaN$restructure.uint8, + kernValue: new $gfJaN$restructure.Array($gfJaN$restructure.int16, 'kernValueCount'), + leftClass: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 'glyphCount'), + rightClass: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 'glyphCount'), + kernIndex: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, (t)=>t.leftClassCount * t.rightClassCount) + } +}); +let $a3f544bcf76542d1$var$KernTable = new $gfJaN$restructure.VersionedStruct('version', { + 0: { + subVersion: $gfJaN$restructure.uint16, + length: $gfJaN$restructure.uint16, + format: $gfJaN$restructure.uint8, + coverage: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint8, [ + 'horizontal', + 'minimum', + 'crossStream', + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: $a3f544bcf76542d1$var$KernSubtable, + padding: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8, (t)=>t.length - t._currentOffset) + }, + 1: { + length: $gfJaN$restructure.uint32, + coverage: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint8, [ + null, + null, + null, + null, + null, + 'variation', + 'crossStream', + 'vertical' // Set if table has vertical kerning values + ]), + format: $gfJaN$restructure.uint8, + tupleIndex: $gfJaN$restructure.uint16, + subtable: $a3f544bcf76542d1$var$KernSubtable, + padding: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8, (t)=>t.length - t._currentOffset) + } +}); +var $a3f544bcf76542d1$export$2e2bcd8739ae039 = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 0: { + nTables: $gfJaN$restructure.uint16, + tables: new $gfJaN$restructure.Array($a3f544bcf76542d1$var$KernTable, 'nTables') + }, + 1: { + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + nTables: $gfJaN$restructure.uint32, + tables: new $gfJaN$restructure.Array($a3f544bcf76542d1$var$KernTable, 'nTables') + } +}); + + + +var // Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +$86687befb45925d0$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numGlyphs: $gfJaN$restructure.uint16, + yPels: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 'numGlyphs') +}); + + + +var // PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +$91429006e51e0fe8$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + fontNumber: $gfJaN$restructure.uint32, + pitch: $gfJaN$restructure.uint16, + xHeight: $gfJaN$restructure.uint16, + style: $gfJaN$restructure.uint16, + typeFamily: $gfJaN$restructure.uint16, + capHeight: $gfJaN$restructure.uint16, + symbolSet: $gfJaN$restructure.uint16, + typeface: new $gfJaN$restructure.String(16), + characterComplement: new $gfJaN$restructure.String(8), + fileName: new $gfJaN$restructure.String(6), + strokeWeight: new $gfJaN$restructure.String(1), + widthType: new $gfJaN$restructure.String(1), + serifStyle: $gfJaN$restructure.uint8, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8) +}); + + + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. +let $627850fc9deed59a$var$Ratio = new $gfJaN$restructure.Struct({ + bCharSet: $gfJaN$restructure.uint8, + xRatio: $gfJaN$restructure.uint8, + yStartRatio: $gfJaN$restructure.uint8, + yEndRatio: $gfJaN$restructure.uint8 // Ending y-Ratio value +}); +let $627850fc9deed59a$var$vTable = new $gfJaN$restructure.Struct({ + yPelHeight: $gfJaN$restructure.uint16, + yMax: $gfJaN$restructure.int16, + yMin: $gfJaN$restructure.int16 // Minimum value (in pels) for this yPelHeight +}); +let $627850fc9deed59a$var$VdmxGroup = new $gfJaN$restructure.Struct({ + recs: $gfJaN$restructure.uint16, + startsz: $gfJaN$restructure.uint8, + endsz: $gfJaN$restructure.uint8, + entries: new $gfJaN$restructure.Array($627850fc9deed59a$var$vTable, 'recs') // The VDMX records +}); +var $627850fc9deed59a$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + numRecs: $gfJaN$restructure.uint16, + numRatios: $gfJaN$restructure.uint16, + ratioRanges: new $gfJaN$restructure.Array($627850fc9deed59a$var$Ratio, 'numRatios'), + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numRatios'), + groups: new $gfJaN$restructure.Array($627850fc9deed59a$var$VdmxGroup, 'numRecs') // The actual VDMX groupings +}); + + + +var // Vertical Header Table +$65c33f5f068fc77f$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + ascent: $gfJaN$restructure.int16, + descent: $gfJaN$restructure.int16, + lineGap: $gfJaN$restructure.int16, + advanceHeightMax: $gfJaN$restructure.int16, + minTopSideBearing: $gfJaN$restructure.int16, + minBottomSideBearing: $gfJaN$restructure.int16, + yMaxExtent: $gfJaN$restructure.int16, + caretSlopeRise: $gfJaN$restructure.int16, + caretSlopeRun: $gfJaN$restructure.int16, + caretOffset: $gfJaN$restructure.int16, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.int16, 4), + metricDataFormat: $gfJaN$restructure.int16, + numberOfMetrics: $gfJaN$restructure.uint16 // Number of advance heights in the Vertical Metrics table +}); + + + +let $597d739523b65bb3$var$VmtxEntry = new $gfJaN$restructure.Struct({ + advance: $gfJaN$restructure.uint16, + bearing: $gfJaN$restructure.int16 // The top sidebearing of the glyph +}); +var // Vertical Metrics Table +$597d739523b65bb3$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + metrics: new $gfJaN$restructure.LazyArray($597d739523b65bb3$var$VmtxEntry, (t)=>t.parent.vhea.numberOfMetrics), + bearings: new $gfJaN$restructure.LazyArray($gfJaN$restructure.int16, (t)=>t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); + + + +let $35aa0c87d9c3d3a0$var$shortFrac = new $gfJaN$restructure.Fixed(16, 'BE', 14); +let $35aa0c87d9c3d3a0$var$Correspondence = new $gfJaN$restructure.Struct({ + fromCoord: $35aa0c87d9c3d3a0$var$shortFrac, + toCoord: $35aa0c87d9c3d3a0$var$shortFrac +}); +let $35aa0c87d9c3d3a0$var$Segment = new $gfJaN$restructure.Struct({ + pairCount: $gfJaN$restructure.uint16, + correspondence: new $gfJaN$restructure.Array($35aa0c87d9c3d3a0$var$Correspondence, 'pairCount') +}); +var $35aa0c87d9c3d3a0$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + axisCount: $gfJaN$restructure.uint32, + segment: new $gfJaN$restructure.Array($35aa0c87d9c3d3a0$var$Segment, 'axisCount') +}); + + + + +class $22801616bd931ca3$var$UnboundedArrayAccessor { + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + return this._items[index]; + } + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } + constructor(type, stream, parent){ + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } +} +class $22801616bd931ca3$export$c5af1eebc882e39a extends $gfJaN$restructure.Array { + decode(stream, parent) { + return new $22801616bd931ca3$var$UnboundedArrayAccessor(this.type, stream, parent); + } + constructor(type){ + super(type, 0); + } +} +let $22801616bd931ca3$export$8351f8c2ae2f103c = function(ValueType = $gfJaN$restructure.uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + constructor(type){ + this.type = type; + } + } + ValueType = new Shadow(ValueType); + let BinarySearchHeader = new $gfJaN$restructure.Struct({ + unitSize: $gfJaN$restructure.uint16, + nUnits: $gfJaN$restructure.uint16, + searchRange: $gfJaN$restructure.uint16, + entrySelector: $gfJaN$restructure.uint16, + rangeShift: $gfJaN$restructure.uint16 + }); + let LookupSegmentSingle = new $gfJaN$restructure.Struct({ + lastGlyph: $gfJaN$restructure.uint16, + firstGlyph: $gfJaN$restructure.uint16, + value: ValueType + }); + let LookupSegmentArray = new $gfJaN$restructure.Struct({ + lastGlyph: $gfJaN$restructure.uint16, + firstGlyph: $gfJaN$restructure.uint16, + values: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $gfJaN$restructure.Array(ValueType, (t)=>t.lastGlyph - t.firstGlyph + 1), { + type: 'parent' + }) + }); + let LookupSingle = new $gfJaN$restructure.Struct({ + glyph: $gfJaN$restructure.uint16, + value: ValueType + }); + return new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint16, { + 0: { + values: new $22801616bd931ca3$export$c5af1eebc882e39a(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new $gfJaN$restructure.Array(LookupSegmentSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new $gfJaN$restructure.Array(LookupSegmentArray, (t)=>t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new $gfJaN$restructure.Array(LookupSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: $gfJaN$restructure.uint16, + count: $gfJaN$restructure.uint16, + values: new $gfJaN$restructure.Array(ValueType, 'count') + } + }); +}; +function $22801616bd931ca3$export$79f7d93d790934ba(entryData = {}, lookupType = $gfJaN$restructure.uint16) { + let entry = Object.assign({ + newState: $gfJaN$restructure.uint16, + flags: $gfJaN$restructure.uint16 + }, entryData); + let Entry = new $gfJaN$restructure.Struct(entry); + let StateArray = new $22801616bd931ca3$export$c5af1eebc882e39a(new $gfJaN$restructure.Array($gfJaN$restructure.uint16, (t)=>t.nClasses)); + let StateHeader = new $gfJaN$restructure.Struct({ + nClasses: $gfJaN$restructure.uint32, + classTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $22801616bd931ca3$export$8351f8c2ae2f103c(lookupType)), + stateArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, StateArray), + entryTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $22801616bd931ca3$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader; +} +function $22801616bd931ca3$export$105027425199cc51(entryData = {}, lookupType = $gfJaN$restructure.uint16) { + let ClassLookupTable = new $gfJaN$restructure.Struct({ + version () { + return 8; + }, + firstGlyph: $gfJaN$restructure.uint16, + values: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, $gfJaN$restructure.uint16) + }); + let entry = Object.assign({ + newStateOffset: $gfJaN$restructure.uint16, + // convert offset to stateArray index + newState: (t)=>(t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: $gfJaN$restructure.uint16 + }, entryData); + let Entry = new $gfJaN$restructure.Struct(entry); + let StateArray = new $22801616bd931ca3$export$c5af1eebc882e39a(new $gfJaN$restructure.Array($gfJaN$restructure.uint8, (t)=>t.nClasses)); + let StateHeader1 = new $gfJaN$restructure.Struct({ + nClasses: $gfJaN$restructure.uint16, + classTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, ClassLookupTable), + stateArray: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, StateArray), + entryTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $22801616bd931ca3$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader1; +} + + +let $3a5ca96d3e3aaf20$var$BslnSubtable = new $gfJaN$restructure.VersionedStruct('format', { + 0: { + deltas: new $gfJaN$restructure.Array($gfJaN$restructure.int16, 32) + }, + 1: { + deltas: new $gfJaN$restructure.Array($gfJaN$restructure.int16, 32), + mappingData: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($gfJaN$restructure.uint16) + }, + 2: { + standardGlyph: $gfJaN$restructure.uint16, + controlPoints: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 32) + }, + 3: { + standardGlyph: $gfJaN$restructure.uint16, + controlPoints: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 32), + mappingData: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($gfJaN$restructure.uint16) + } +}); +var $3a5ca96d3e3aaf20$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + format: $gfJaN$restructure.uint16, + defaultBaseline: $gfJaN$restructure.uint16, + subtable: $3a5ca96d3e3aaf20$var$BslnSubtable +}); + + + +let $8d4241d96b2b0589$var$Setting = new $gfJaN$restructure.Struct({ + setting: $gfJaN$restructure.uint16, + nameIndex: $gfJaN$restructure.int16, + name: (t)=>t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +let $8d4241d96b2b0589$var$FeatureName = new $gfJaN$restructure.Struct({ + feature: $gfJaN$restructure.uint16, + nSettings: $gfJaN$restructure.uint16, + settingTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array($8d4241d96b2b0589$var$Setting, 'nSettings'), { + type: 'parent' + }), + featureFlags: new $gfJaN$restructure.Bitfield($gfJaN$restructure.uint8, [ + null, + null, + null, + null, + null, + null, + 'hasDefault', + 'exclusive' + ]), + defaultSetting: $gfJaN$restructure.uint8, + nameIndex: $gfJaN$restructure.int16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +var $8d4241d96b2b0589$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + featureNameCount: $gfJaN$restructure.uint16, + reserved1: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + reserved2: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint32), + featureNames: new $gfJaN$restructure.Array($8d4241d96b2b0589$var$FeatureName, 'featureNameCount') +}); + + + +let $a79cd5132b1cf476$var$Axis = new $gfJaN$restructure.Struct({ + axisTag: new $gfJaN$restructure.String(4), + minValue: $gfJaN$restructure.fixed32, + defaultValue: $gfJaN$restructure.fixed32, + maxValue: $gfJaN$restructure.fixed32, + flags: $gfJaN$restructure.uint16, + nameID: $gfJaN$restructure.uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID] +}); +let $a79cd5132b1cf476$var$Instance = new $gfJaN$restructure.Struct({ + nameID: $gfJaN$restructure.uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID], + flags: $gfJaN$restructure.uint16, + coord: new $gfJaN$restructure.Array($gfJaN$restructure.fixed32, (t)=>t.parent.axisCount), + postscriptNameID: new $gfJaN$restructure.Optional($gfJaN$restructure.uint16, (t)=>t.parent.instanceSize - t._currentOffset > 0) +}); +var $a79cd5132b1cf476$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + offsetToData: $gfJaN$restructure.uint16, + countSizePairs: $gfJaN$restructure.uint16, + axisCount: $gfJaN$restructure.uint16, + axisSize: $gfJaN$restructure.uint16, + instanceCount: $gfJaN$restructure.uint16, + instanceSize: $gfJaN$restructure.uint16, + axis: new $gfJaN$restructure.Array($a79cd5132b1cf476$var$Axis, 'axisCount'), + instance: new $gfJaN$restructure.Array($a79cd5132b1cf476$var$Instance, 'instanceCount') +}); + + + +let $3f36f1a5e6989457$var$shortFrac = new $gfJaN$restructure.Fixed(16, 'BE', 14); +class $3f36f1a5e6989457$var$Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2; + } +} +let $3f36f1a5e6989457$var$gvar = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + axisCount: $gfJaN$restructure.uint16, + globalCoordCount: $gfJaN$restructure.uint16, + globalCoords: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new $gfJaN$restructure.Array(new $gfJaN$restructure.Array($3f36f1a5e6989457$var$shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: $gfJaN$restructure.uint16, + flags: $gfJaN$restructure.uint16, + offsetToData: $gfJaN$restructure.uint32, + offsets: new $gfJaN$restructure.Array(new $gfJaN$restructure.Pointer($3f36f1a5e6989457$var$Offset, 'void', { + relativeTo: (ctx)=>ctx.offsetToData, + allowNull: false + }), (t)=>t.glyphCount + 1) +}); +var $3f36f1a5e6989457$export$2e2bcd8739ae039 = $3f36f1a5e6989457$var$gvar; + + + + +let $0bd8fe7a6d1d9fb4$var$ClassTable = new $gfJaN$restructure.Struct({ + length: $gfJaN$restructure.uint16, + coverage: $gfJaN$restructure.uint16, + subFeatureFlags: $gfJaN$restructure.uint32, + stateTable: new (0, $22801616bd931ca3$export$105027425199cc51) +}); +let $0bd8fe7a6d1d9fb4$var$WidthDeltaRecord = new $gfJaN$restructure.Struct({ + justClass: $gfJaN$restructure.uint32, + beforeGrowLimit: $gfJaN$restructure.fixed32, + beforeShrinkLimit: $gfJaN$restructure.fixed32, + afterGrowLimit: $gfJaN$restructure.fixed32, + afterShrinkLimit: $gfJaN$restructure.fixed32, + growFlags: $gfJaN$restructure.uint16, + shrinkFlags: $gfJaN$restructure.uint16 +}); +let $0bd8fe7a6d1d9fb4$var$WidthDeltaCluster = new $gfJaN$restructure.Array($0bd8fe7a6d1d9fb4$var$WidthDeltaRecord, $gfJaN$restructure.uint32); +let $0bd8fe7a6d1d9fb4$var$ActionData = new $gfJaN$restructure.VersionedStruct('actionType', { + 0: { + lowerLimit: $gfJaN$restructure.fixed32, + upperLimit: $gfJaN$restructure.fixed32, + order: $gfJaN$restructure.uint16, + glyphs: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, $gfJaN$restructure.uint16) + }, + 1: { + addGlyph: $gfJaN$restructure.uint16 + }, + 2: { + substThreshold: $gfJaN$restructure.fixed32, + addGlyph: $gfJaN$restructure.uint16, + substGlyph: $gfJaN$restructure.uint16 + }, + 3: {}, + 4: { + variationAxis: $gfJaN$restructure.uint32, + minimumLimit: $gfJaN$restructure.fixed32, + noStretchValue: $gfJaN$restructure.fixed32, + maximumLimit: $gfJaN$restructure.fixed32 + }, + 5: { + flags: $gfJaN$restructure.uint16, + glyph: $gfJaN$restructure.uint16 + } +}); +let $0bd8fe7a6d1d9fb4$var$Action = new $gfJaN$restructure.Struct({ + actionClass: $gfJaN$restructure.uint16, + actionType: $gfJaN$restructure.uint16, + actionLength: $gfJaN$restructure.uint32, + actionData: $0bd8fe7a6d1d9fb4$var$ActionData, + padding: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8, (t)=>t.actionLength - t._currentOffset) +}); +let $0bd8fe7a6d1d9fb4$var$PostcompensationAction = new $gfJaN$restructure.Array($0bd8fe7a6d1d9fb4$var$Action, $gfJaN$restructure.uint32); +let $0bd8fe7a6d1d9fb4$var$PostCompensationTable = new $gfJaN$restructure.Struct({ + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$PostcompensationAction)) +}); +let $0bd8fe7a6d1d9fb4$var$JustificationTable = new $gfJaN$restructure.Struct({ + classTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$ClassTable, { + type: 'parent' + }), + wdcOffset: $gfJaN$restructure.uint16, + postCompensationTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$PostCompensationTable, { + type: 'parent' + }), + widthDeltaClusters: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$WidthDeltaCluster, { + type: 'parent', + relativeTo: (ctx)=>ctx.wdcOffset + })) +}); +var $0bd8fe7a6d1d9fb4$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint32, + format: $gfJaN$restructure.uint16, + horizontal: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$JustificationTable), + vertical: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $0bd8fe7a6d1d9fb4$var$JustificationTable) +}); + + + + +let $ef40c6dc80fd50a2$var$LigatureData = { + action: $gfJaN$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$ContextualData = { + markIndex: $gfJaN$restructure.uint16, + currentIndex: $gfJaN$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$InsertionData = { + currentInsertIndex: $gfJaN$restructure.uint16, + markedInsertIndex: $gfJaN$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$SubstitutionTable = new $gfJaN$restructure.Struct({ + items: new (0, $22801616bd931ca3$export$c5af1eebc882e39a)(new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new (0, $22801616bd931ca3$export$8351f8c2ae2f103c))) +}); +let $ef40c6dc80fd50a2$var$SubtableData = new $gfJaN$restructure.VersionedStruct('type', { + 0: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba) + }, + 1: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$ContextualData), + substitutionTable: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $ef40c6dc80fd50a2$var$SubstitutionTable) + }, + 2: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$LigatureData), + ligatureActions: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($gfJaN$restructure.uint32)), + components: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($gfJaN$restructure.uint16)), + ligatureList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($gfJaN$restructure.uint16)) + }, + 4: { + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c) + }, + 5: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$InsertionData), + insertionActions: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($gfJaN$restructure.uint16)) + } +}); +let $ef40c6dc80fd50a2$var$Subtable = new $gfJaN$restructure.Struct({ + length: $gfJaN$restructure.uint32, + coverage: $gfJaN$restructure.uint24, + type: $gfJaN$restructure.uint8, + subFeatureFlags: $gfJaN$restructure.uint32, + table: $ef40c6dc80fd50a2$var$SubtableData, + padding: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8, (t)=>t.length - t._currentOffset) +}); +let $ef40c6dc80fd50a2$var$FeatureEntry = new $gfJaN$restructure.Struct({ + featureType: $gfJaN$restructure.uint16, + featureSetting: $gfJaN$restructure.uint16, + enableFlags: $gfJaN$restructure.uint32, + disableFlags: $gfJaN$restructure.uint32 +}); +let $ef40c6dc80fd50a2$var$MorxChain = new $gfJaN$restructure.Struct({ + defaultFlags: $gfJaN$restructure.uint32, + chainLength: $gfJaN$restructure.uint32, + nFeatureEntries: $gfJaN$restructure.uint32, + nSubtables: $gfJaN$restructure.uint32, + features: new $gfJaN$restructure.Array($ef40c6dc80fd50a2$var$FeatureEntry, 'nFeatureEntries'), + subtables: new $gfJaN$restructure.Array($ef40c6dc80fd50a2$var$Subtable, 'nSubtables') +}); +var $ef40c6dc80fd50a2$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint16, + unused: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + nChains: $gfJaN$restructure.uint32, + chains: new $gfJaN$restructure.Array($ef40c6dc80fd50a2$var$MorxChain, 'nChains') +}); + + + + +let $ab24dea08b58a7cc$var$OpticalBounds = new $gfJaN$restructure.Struct({ + left: $gfJaN$restructure.int16, + top: $gfJaN$restructure.int16, + right: $gfJaN$restructure.int16, + bottom: $gfJaN$restructure.int16 +}); +var $ab24dea08b58a7cc$export$2e2bcd8739ae039 = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.fixed32, + format: $gfJaN$restructure.uint16, + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($ab24dea08b58a7cc$var$OpticalBounds) +}); + + +let $5825c04ce8f7102d$var$tables = {}; +var $5825c04ce8f7102d$export$2e2bcd8739ae039 = $5825c04ce8f7102d$var$tables; +$5825c04ce8f7102d$var$tables.cmap = (0, $e4ae0436c91af89f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.head = (0, $55a60976afb7c261$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hhea = (0, $dde72b7b5b650596$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hmtx = (0, $a7c40184072c9a5b$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.maxp = (0, $521197722369f691$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.name = (0, $51a9f4feb3a3b2b1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['OS/2'] = (0, $114ea85db469b435$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.post = (0, $f93b30299e1ea0f5$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.fpgm = (0, $873d79fea57d3161$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.loca = (0, $83c4155666d50c37$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.prep = (0, $b12598db7cdf7042$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['cvt '] = (0, $8fb09b0f473d61a0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.glyf = (0, $7707bdf21a3d89cc$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['CFF '] = (0, $f717432b360040c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['CFF2'] = (0, $f717432b360040c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.VORG = (0, $8cb7ae73ed7aa7d8$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.EBLC = (0, $035bb95c0cdb1f6d$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.CBLC = $5825c04ce8f7102d$var$tables.EBLC; +$5825c04ce8f7102d$var$tables.sbix = (0, $73d13900b55a3c0c$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.COLR = (0, $97f6b8be3a347a8f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.CPAL = (0, $16ca60ecbdee30ea$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.BASE = (0, $7327e41706f9d5c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GDEF = (0, $7e48bbe9e5345664$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GPOS = (0, $b687332511a4da75$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GSUB = (0, $99ccad60b96f92fb$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.JSTF = (0, $573d5042c76c4940$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.HVAR = (0, $a5875b80d6087f61$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.DSIG = (0, $4423bc1ac09bbbd1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.gasp = (0, $7b50e3f8d83263de$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hdmx = (0, $7bf92ec372cd2307$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.kern = (0, $a3f544bcf76542d1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.LTSH = (0, $86687befb45925d0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.PCLT = (0, $91429006e51e0fe8$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.VDMX = (0, $627850fc9deed59a$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.vhea = (0, $65c33f5f068fc77f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.vmtx = (0, $597d739523b65bb3$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.avar = (0, $35aa0c87d9c3d3a0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.bsln = (0, $3a5ca96d3e3aaf20$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.feat = (0, $8d4241d96b2b0589$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.fvar = (0, $a79cd5132b1cf476$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.gvar = (0, $3f36f1a5e6989457$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.just = (0, $0bd8fe7a6d1d9fb4$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.morx = (0, $ef40c6dc80fd50a2$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.opbd = (0, $ab24dea08b58a7cc$export$2e2bcd8739ae039); + + +let $df50e1efe10a1247$var$TableEntry = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + checkSum: $gfJaN$restructure.uint32, + offset: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, 'void', { + type: 'global' + }), + length: $gfJaN$restructure.uint32 +}); +let $df50e1efe10a1247$var$Directory = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + numTables: $gfJaN$restructure.uint16, + searchRange: $gfJaN$restructure.uint16, + entrySelector: $gfJaN$restructure.uint16, + rangeShift: $gfJaN$restructure.uint16, + tables: new $gfJaN$restructure.Array($df50e1efe10a1247$var$TableEntry, 'numTables') +}); +$df50e1efe10a1247$var$Directory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +$df50e1efe10a1247$var$Directory.preEncode = function() { + if (!Array.isArray(this.tables)) { + let tables = []; + for(let tag in this.tables){ + let table = this.tables[tag]; + if (table) tables.push({ + tag: tag, + checkSum: 0, + offset: new $gfJaN$restructure.VoidPointer((0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag], table), + length: (0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag].size(table) + }); + } + this.tables = tables; + } + this.tag = 'true'; + this.numTables = this.tables.length; + let maxExponentFor2 = Math.floor(Math.log(this.numTables) / Math.LN2); + let maxPowerOf2 = Math.pow(2, maxExponentFor2); + this.searchRange = maxPowerOf2 * 16; + this.entrySelector = Math.log(maxPowerOf2) / Math.LN2; + this.rangeShift = this.numTables * 16 - this.searchRange; +}; +var $df50e1efe10a1247$export$2e2bcd8739ae039 = $df50e1efe10a1247$var$Directory; + + + + +function $66a5b9fb5318558a$export$2e0ae67339d5f1ac(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while(min <= max){ + let mid = min + max >> 1; + let res = cmp(arr[mid]); + if (res < 0) max = mid - 1; + else if (res > 0) min = mid + 1; + else return mid; + } + return -1; +} +function $66a5b9fb5318558a$export$d02631cccf789723(index, end) { + let range = []; + while(index < end)range.push(index++); + return range; +} +const $66a5b9fb5318558a$export$3d28c1996ced1f14 = new TextDecoder('ascii'); +// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license. +const $66a5b9fb5318558a$var$CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const $66a5b9fb5318558a$var$LOOKUP = new Uint8Array(256); +for(let i = 0; i < $66a5b9fb5318558a$var$CHARS.length; i++)$66a5b9fb5318558a$var$LOOKUP[$66a5b9fb5318558a$var$CHARS.charCodeAt(i)] = i; +function $66a5b9fb5318558a$export$94fdf11bafc8de6b(base64) { + let bufferLength = base64.length * 0.75; + if (base64[base64.length - 1] === '=') { + bufferLength--; + if (base64[base64.length - 2] === '=') bufferLength--; + } + let bytes = new Uint8Array(bufferLength); + let p = 0; + for(let i = 0, len = base64.length; i < len; i += 4){ + let encoded1 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i)]; + let encoded2 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 1)]; + let encoded3 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 2)]; + let encoded4 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4; + bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; + bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return bytes; +} + + + + +class $0d6e160064c86e50$export$2e2bcd8739ae039 { + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs)for (let cmap of cmapTable.tables){ + if (cmap.platformID === platformID && cmap.encodingID === encodingID) return cmap.table; + } + return null; + } + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) codepoint = this.encoding.get(codepoint) || codepoint; + else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) return gid; + } + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return cmap.codeMap.get(codepoint) || 0; + case 4: + { + let min = 0; + let max = cmap.segCount - 1; + while(min <= max){ + let mid = min + max >> 1; + if (codepoint < cmap.startCode.get(mid)) max = mid - 1; + else if (codepoint > cmap.endCode.get(mid)) min = mid + 1; + else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + if (rangeOffset === 0) gid = codepoint + cmap.idDelta.get(mid); + else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) gid += cmap.idDelta.get(mid); + } + return gid & 0xffff; + } + } + return 0; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + case 12: + case 13: + { + let min = 0; + let max = cmap.nGroups - 1; + while(min <= max){ + let mid = min + max >> 1; + let group = cmap.groups.get(mid); + if (codepoint < group.startCharCode) max = mid - 1; + else if (codepoint > group.endCharCode) min = mid + 1; + else { + if (cmap.version === 12) return group.glyphID + (codepoint - group.startCharCode); + else return group.glyphID; + } + } + return 0; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) return 0; + let selectors = this.uvs.varSelectors.toArray(); + let i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(selectors, (x)=>variationSelector - x.varSelector); + let sel = selectors[i]; + if (i !== -1 && sel.defaultUVS) i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(sel.defaultUVS, (x)=>codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? 1 : 0); + if (i !== -1 && sel.nonDefaultUVS) { + i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(sel.nonDefaultUVS, (x)=>codepoint - x.unicodeValue); + if (i !== -1) return sel.nonDefaultUVS[i].glyphID; + } + return 0; + } + getCharacterSet() { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return (0, $66a5b9fb5318558a$export$d02631cccf789723)(0, cmap.codeMap.length); + case 4: + { + let res = []; + let endCodes = cmap.endCode.toArray(); + for(let i = 0; i < endCodes.length; i++){ + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(start, tail)); + } + return res; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return (0, $66a5b9fb5318558a$export$d02631cccf789723)(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + case 12: + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + { + let res = []; + for(let i = 0; i < 256; i++)if (cmap.codeMap.get(i) === gid) res.push(i); + return res; + } + case 4: + { + let res = []; + for(let i = 0; i < cmap.segCount; i++){ + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + for(var c = start; c <= end; c++){ + let g = 0; + if (rangeOffset === 0) g = c + delta; + else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) g += delta; + } + if (g === gid) res.push(c); + } + } + return res; + } + case 12: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) res.push(group.startCharCode + (gid - group.glyphID)); + return res; + } + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid === group.glyphID) res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + constructor(cmapTable){ + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [ + 3, + 10 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + // 16-bit subtables + [ + 3, + 1 + ], + [ + 0, + 3 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ]); + // If not unicode cmap was found, take the first table with a supported encoding. + if (!this.cmap) for (let cmap of cmapTable.tables){ + let encoding = (0, $e2613b812f052cbe$export$badc544e0651b6b1)(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + let mapping = (0, $e2613b812f052cbe$export$1dceb3c14ed68bee)(encoding); + if (mapping) { + this.cmap = cmap.table; + this.encoding = mapping; + } + } + if (!this.cmap) throw new Error("Could not find a supported cmap table"); + this.uvs = this.findSubtable(cmapTable, [ + [ + 0, + 5 + ] + ]); + if (this.uvs && this.uvs.version !== 14) this.uvs = null; + } +} +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0d6e160064c86e50$export$2e2bcd8739ae039.prototype, "getCharacterSet", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0d6e160064c86e50$export$2e2bcd8739ae039.prototype, "codePointsForGlyph", null); + + + +class $4646d52c2a559cdb$export$2e2bcd8739ae039 { + process(glyphs, positions) { + for(let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++){ + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + getKerning(left, right) { + let res = 0; + for (let table of this.kern.tables){ + if (table.coverage.crossStream) continue; + switch(table.version){ + case 0: + if (!table.coverage.horizontal) continue; + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) continue; + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + let val = 0; + let s = table.subtable; + switch(table.format){ + case 0: + let pairIdx = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(s.pairs, function(pair) { + return left - pair.left || right - pair.right; + }); + if (pairIdx >= 0) val = s.pairs[pairIdx].value; + break; + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + else leftOffset = s.array.off; + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) return 0; + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) res = val; + else res += val; + } + return res; + } + constructor(font){ + this.kern = font.kern; + } +} + + + +class $a57a26817cd35108$export$2e2bcd8739ae039 { + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for(let index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.isMark) clusterEnd = index; + else { + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + clusterStart = clusterEnd = index; + } + } + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + return positions; + } + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) // LTR. TODO: RTL support. + baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length; + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + // position each of the mark glyphs relative to the base glyph + for(let index = clusterStart + 1; index <= clusterEnd; index++){ + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + // x positioning + switch(combiningClass){ + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + default: + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + // y positioning + switch(combiningClass){ + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') baseBox.minY += yGap; + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') baseBox.maxY += yGap; + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + return; + } + getCombiningClass(codePoint) { + let combiningClass = (0, $gfJaN$unicodeproperties.getCombiningClass)(codePoint); + // Thai / Lao need some per-character work + if ((codePoint & -256) === 0x0e00) { + if (combiningClass === 'Not_Reordered') switch(codePoint){ + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + case 0x0ebc: + return 'Below'; + } + else if (codePoint === 0x0e3a) return 'Below_Right'; + } + switch(combiningClass){ + // Hebrew + case 'CCC10': + case 'CCC11': + case 'CCC12': + case 'CCC13': + case 'CCC14': + case 'CCC15': + case 'CCC16': + case 'CCC17': + case 'CCC18': + case 'CCC20': + case 'CCC22': + return 'Below'; + case 'CCC23': + return 'Attached_Above'; + case 'CCC24': + return 'Above_Right'; + case 'CCC25': + case 'CCC19': + return 'Above_Left'; + case 'CCC26': + return 'Above'; + case 'CCC21': + break; + // Arabic and Syriac + case 'CCC27': + case 'CCC28': + case 'CCC30': + case 'CCC31': + case 'CCC33': + case 'CCC34': + case 'CCC35': + case 'CCC36': + return 'Above'; + case 'CCC29': + case 'CCC32': + return 'Below'; + // Thai + case 'CCC103': + return 'Below_Right'; + case 'CCC107': + return 'Above_Right'; + // Lao + case 'CCC118': + return 'Below'; + case 'CCC122': + return 'Above'; + // Tibetan + case 'CCC129': + case 'CCC132': + return 'Below'; + case 'CCC130': + return 'Above'; + } + return combiningClass; + } + constructor(font){ + this.font = font; + } +} + + +/** + * Represents a glyph bounding box + */ class $0e2da1c4ce69e8ad$export$2e2bcd8739ae039 { + /** + * The width of the bounding box + * @type {number} + */ get width() { + return this.maxX - this.minX; + } + /** + * The height of the bounding box + * @type {number} + */ get height() { + return this.maxY - this.minY; + } + addPoint(x, y) { + if (Math.abs(x) !== Infinity) { + if (x < this.minX) this.minX = x; + if (x > this.maxX) this.maxX = x; + } + if (Math.abs(y) !== Infinity) { + if (y < this.minY) this.minY = y; + if (y > this.maxY) this.maxY = y; + } + } + copy() { + return new $0e2da1c4ce69e8ad$export$2e2bcd8739ae039(this.minX, this.minY, this.maxX, this.maxY); + } + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity){ + /** + * The minimum X position in the bounding box + * @type {number} + */ this.minX = minX; + /** + * The minimum Y position in the bounding box + * @type {number} + */ this.minY = minY; + /** + * The maxmimum X position in the bounding box + * @type {number} + */ this.maxX = maxX; + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ this.maxY = maxY; + } +} + + + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const $e38a1a895f6aeb54$var$UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: [ + 'bng2', + 'beng' + ], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: [ + 'dev2', + 'deva' + ], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: [ + 'gjr2', + 'gujr' + ], + Gurmukhi: [ + 'gur2', + 'guru' + ], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: [ + 'knd2', + 'knda' + ], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: [ + 'mlm2', + 'mlym' + ], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: [ + 'mym2', + 'mymr' + ], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: [ + 'ory2', + 'orya' + ], + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: [ + 'tml2', + 'taml' + ], + Tai_Viet: 'tavt', + Telugu: [ + 'tel2', + 'telu' + ], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; +const $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS = {}; +for(let script in $e38a1a895f6aeb54$var$UNICODE_SCRIPTS){ + let tag = $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + if (Array.isArray(tag)) for (let t of tag)$e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[t] = script; + else $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[tag] = script; +} +function $e38a1a895f6aeb54$export$b32f0b5f69d65e51(script) { + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; +} +function $e38a1a895f6aeb54$export$ce50e82f12a827a4(tag) { + return $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[tag]; +} +function $e38a1a895f6aeb54$export$e5cb25e204fb8450(string) { + let len = string.length; + let idx = 0; + while(idx < len){ + let code = string.charCodeAt(idx++); + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + let script = (0, $gfJaN$unicodeproperties.getScript)(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + } + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS.Unknown; +} +function $e38a1a895f6aeb54$export$16fab0757cfc223d(codePoints) { + for(let i = 0; i < codePoints.length; i++){ + let codePoint = codePoints[i]; + let script = (0, $gfJaN$unicodeproperties.getScript)(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + } + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS.Unknown; +} +// The scripts in this map are written from right to left +const $e38a1a895f6aeb54$var$RTL = { + arab: true, + hebr: true, + syrc: true, + thaa: true, + cprt: true, + khar: true, + phnx: true, + 'nko ': true, + lydi: true, + avst: true, + armi: true, + phli: true, + prti: true, + sarb: true, + orkh: true, + samr: true, + mand: true, + merc: true, + mero: true, + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, + mend: true, + nbat: true, + narb: true, + palm: true, + phlp: true // Psalter Pahlavi +}; +function $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script) { + if ($e38a1a895f6aeb54$var$RTL[script]) return 'rtl'; + return 'ltr'; +} + + +class $b19c79ec7a94fa39$export$2e2bcd8739ae039 { + /** + * The total advance width of the run. + * @type {number} + */ get advanceWidth() { + let width = 0; + for (let position of this.positions)width += position.xAdvance; + return width; + } + /** + * The total advance height of the run. + * @type {number} + */ get advanceHeight() { + let height = 0; + for (let position of this.positions)height += position.yAdvance; + return height; + } + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ get bbox() { + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + let x = 0; + let y = 0; + for(let index = 0; index < this.glyphs.length; index++){ + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + x += p.xAdvance; + y += p.yAdvance; + } + return bbox; + } + constructor(glyphs, features, script, language, direction){ + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ this.glyphs = glyphs; + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ this.positions = null; + /** + * The script that was requested for shaping. This was either passed in or detected automatically. + * @type {string} + */ this.script = script; + /** + * The language requested for shaping, as passed in. If `null`, the default language for the + * script was used. + * @type {string} + */ this.language = language || null; + /** + * The direction requested for shaping, as passed in (either ltr or rtl). + * If `null`, the default direction of the script is used. + * @type {string} + */ this.direction = direction || $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script); + /** + * The features requested during shaping. This is a combination of user + * specified features and features chosen by the shaper. + * @type {object} + */ this.features = {}; + // Convert features to an object + if (Array.isArray(features)) for (let tag of features)this.features[tag] = true; + else if (typeof features === 'object') this.features = features; + } +} + + +/** + * Represents positioning information for a glyph in a GlyphRun. + */ class $9195cf1266c12ea5$export$2e2bcd8739ae039 { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0){ + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ this.xAdvance = xAdvance; + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ this.yAdvance = yAdvance; + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ this.xOffset = xOffset; + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ this.yOffset = yOffset; + } +} + + + +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const $2b7f887ebcb5888a$var$features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; +const $2b7f887ebcb5888a$var$feature = (name, selector)=>[ + $2b7f887ebcb5888a$var$features[name].code, + $2b7f887ebcb5888a$var$features[name][selector] + ]; +const $2b7f887ebcb5888a$var$OTMapping = { + rlig: $2b7f887ebcb5888a$var$feature('ligatures', 'requiredLigatures'), + clig: $2b7f887ebcb5888a$var$feature('ligatures', 'contextualLigatures'), + dlig: $2b7f887ebcb5888a$var$feature('ligatures', 'rareLigatures'), + hlig: $2b7f887ebcb5888a$var$feature('ligatures', 'historicalLigatures'), + liga: $2b7f887ebcb5888a$var$feature('ligatures', 'commonLigatures'), + hist: $2b7f887ebcb5888a$var$feature('ligatures', 'historicalLigatures'), + smcp: $2b7f887ebcb5888a$var$feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: $2b7f887ebcb5888a$var$feature('lowerCase', 'lowerCasePetiteCaps'), + frac: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + dnom: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + numr: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + afrc: $2b7f887ebcb5888a$var$feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + case: $2b7f887ebcb5888a$var$feature('caseSensitiveLayout', 'caseSensitiveLayout'), + ccmp: $2b7f887ebcb5888a$var$feature('unicodeDecomposition', 'canonicalComposition'), + cpct: $2b7f887ebcb5888a$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + valt: $2b7f887ebcb5888a$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'swashAlternates'), + cswh: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'contextualSwashAlternates'), + curs: $2b7f887ebcb5888a$var$feature('cursiveConnection', 'cursive'), + c2pc: $2b7f887ebcb5888a$var$feature('upperCase', 'upperCasePetiteCaps'), + c2sc: $2b7f887ebcb5888a$var$feature('upperCase', 'upperCaseSmallCaps'), + init: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordInitialSwashes'), + fin2: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + medi: $2b7f887ebcb5888a$var$feature('smartSwash', 'nonFinalSwashes'), + med2: $2b7f887ebcb5888a$var$feature('smartSwash', 'nonFinalSwashes'), + fin3: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + fina: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + pkna: $2b7f887ebcb5888a$var$feature('kanaSpacing', 'proportionalKana'), + half: $2b7f887ebcb5888a$var$feature('textSpacing', 'halfWidthText'), + halt: $2b7f887ebcb5888a$var$feature('textSpacing', 'altHalfWidthText'), + hkna: $2b7f887ebcb5888a$var$feature('alternateKana', 'alternateHorizKana'), + vkna: $2b7f887ebcb5888a$var$feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + ital: $2b7f887ebcb5888a$var$feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: $2b7f887ebcb5888a$var$feature('numberCase', 'upperCaseNumbers'), + onum: $2b7f887ebcb5888a$var$feature('numberCase', 'lowerCaseNumbers'), + mgrk: $2b7f887ebcb5888a$var$feature('mathematicalExtras', 'mathematicalGreek'), + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + calt: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'contextualAlternates'), + vrt2: $2b7f887ebcb5888a$var$feature('verticalSubstitution', 'substituteVerticalForms'), + vert: $2b7f887ebcb5888a$var$feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: $2b7f887ebcb5888a$var$feature('numberSpacing', 'monospacedNumbers'), + pnum: $2b7f887ebcb5888a$var$feature('numberSpacing', 'proportionalNumbers'), + sups: $2b7f887ebcb5888a$var$feature('verticalPosition', 'superiors'), + subs: $2b7f887ebcb5888a$var$feature('verticalPosition', 'inferiors'), + ordn: $2b7f887ebcb5888a$var$feature('verticalPosition', 'ordinals'), + pwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'proportionalText'), + hwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'halfWidthText'), + qwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'quarterWidthText'), + twid: $2b7f887ebcb5888a$var$feature('textSpacing', 'thirdWidthText'), + fwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'proportionalText'), + palt: $2b7f887ebcb5888a$var$feature('textSpacing', 'altProportionalText'), + trad: $2b7f887ebcb5888a$var$feature('characterShape', 'traditionalCharacters'), + smpl: $2b7f887ebcb5888a$var$feature('characterShape', 'simplifiedCharacters'), + jp78: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1978Characters'), + jp83: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1983Characters'), + jp90: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1990Characters'), + jp04: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS2004Characters'), + expt: $2b7f887ebcb5888a$var$feature('characterShape', 'expertCharacters'), + hojo: $2b7f887ebcb5888a$var$feature('characterShape', 'hojoCharacters'), + nlck: $2b7f887ebcb5888a$var$feature('characterShape', 'NLCCharacters'), + tnam: $2b7f887ebcb5888a$var$feature('characterShape', 'traditionalNamesCharacters'), + ruby: $2b7f887ebcb5888a$var$feature('rubyKana', 'rubyKana'), + titl: $2b7f887ebcb5888a$var$feature('styleOptions', 'titlingCaps'), + zero: $2b7f887ebcb5888a$var$feature('typographicExtras', 'slashedZero'), + ss01: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwenty') +}; +// salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose +// Add cv01-cv99 features +for(let i = 1; i <= 99; i++)$2b7f887ebcb5888a$var$OTMapping[`cv${`00${i}`.slice(-2)}`] = [ + $2b7f887ebcb5888a$var$features.characterAlternatives.code, + i +]; +// create inverse mapping +let $2b7f887ebcb5888a$var$AATMapping = {}; +for(let ot in $2b7f887ebcb5888a$var$OTMapping){ + let aat = $2b7f887ebcb5888a$var$OTMapping[ot]; + if ($2b7f887ebcb5888a$var$AATMapping[aat[0]] == null) $2b7f887ebcb5888a$var$AATMapping[aat[0]] = {}; + $2b7f887ebcb5888a$var$AATMapping[aat[0]][aat[1]] = ot; +} +function $2b7f887ebcb5888a$export$b813f7d2a1677c16(features) { + let res = {}; + for(let k in features){ + let r; + if (r = $2b7f887ebcb5888a$var$OTMapping[k]) { + if (res[r[0]] == null) res[r[0]] = {}; + res[r[0]][r[1]] = features[k]; + } + } + return res; +} +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function $2b7f887ebcb5888a$var$mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) var typeCode = $2b7f887ebcb5888a$var$features[type] && $2b7f887ebcb5888a$var$features[type].code; + else var typeCode = type; + if (isNaN(setting)) var settingCode = $2b7f887ebcb5888a$var$features[type] && $2b7f887ebcb5888a$var$features[type][setting]; + else var settingCode = setting; + return [ + typeCode, + settingCode + ]; +} +function $2b7f887ebcb5888a$export$bd6df347a4f391c4(features) { + let res = {}; + if (Array.isArray(features)) for(let k = 0; k < features.length; k++){ + let r; + let f = $2b7f887ebcb5888a$var$mapFeatureStrings(features[k]); + if (r = $2b7f887ebcb5888a$var$AATMapping[f[0]] && $2b7f887ebcb5888a$var$AATMapping[f[0]][f[1]]) res[r] = true; + } + else if (typeof features === 'object') for(let type in features){ + let feature = features[type]; + for(let setting in feature){ + let r; + let f = $2b7f887ebcb5888a$var$mapFeatureStrings([ + type, + setting + ]); + if (feature[setting] && (r = $2b7f887ebcb5888a$var$AATMapping[f[0]] && $2b7f887ebcb5888a$var$AATMapping[f[0]][f[1]])) res[r] = true; + } + } + return Object.keys(res); +} + + + + + + + +class $f3d63ae925545400$export$2e2bcd8739ae039 { + lookup(glyph) { + switch(this.table.version){ + case 0: + return this.table.values.getItem(glyph); + case 2: + case 4: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.firstGlyph === 0xffff) return null; + if (glyph < seg.firstGlyph) max = mid - 1; + else if (glyph > seg.lastGlyph) min = mid + 1; + else { + if (this.table.version === 2) return seg.value; + else return seg.values[glyph - seg.firstGlyph]; + } + } + return null; + } + case 6: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.glyph === 0xffff) return null; + if (glyph < seg.glyph) max = mid - 1; + else if (glyph > seg.glyph) min = mid + 1; + else return seg.value; + } + return null; + } + case 8: + return this.table.values[glyph - this.table.firstGlyph]; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + glyphsForValue(classValue) { + let res = []; + switch(this.table.version){ + case 2: + case 4: + for (let segment of this.table.segments)if (this.table.version === 2 && segment.value === classValue) res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(segment.firstGlyph, segment.lastGlyph + 1)); + else { + for(let index = 0; index < segment.values.length; index++)if (segment.values[index] === classValue) res.push(segment.firstGlyph + index); + } + break; + case 6: + for (let segment of this.table.segments)if (segment.value === classValue) res.push(segment.glyph); + break; + case 8: + for(let i = 0; i < this.table.values.length; i++)if (this.table.values[i] === classValue) res.push(this.table.firstGlyph + i); + break; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + return res; + } + constructor(table){ + this.table = table; + } +} +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $f3d63ae925545400$export$2e2bcd8739ae039.prototype, "glyphsForValue", null); + + +const $860c6347bb941b91$var$START_OF_TEXT_STATE = 0; +const $860c6347bb941b91$var$START_OF_LINE_STATE = 1; +const $860c6347bb941b91$var$END_OF_TEXT_CLASS = 0; +const $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS = 1; +const $860c6347bb941b91$var$DELETED_GLYPH_CLASS = 2; +const $860c6347bb941b91$var$END_OF_LINE_CLASS = 3; +const $860c6347bb941b91$var$DONT_ADVANCE = 0x4000; +class $860c6347bb941b91$export$2e2bcd8739ae039 { + process(glyphs, reverse, processEntry) { + let currentState = $860c6347bb941b91$var$START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + while(dir === 1 && index <= glyphs.length || dir === -1 && index >= -1){ + let glyph = null; + let classCode = $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + if (index === glyphs.length || index === -1) classCode = $860c6347bb941b91$var$END_OF_TEXT_CLASS; + else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) classCode = $860c6347bb941b91$var$DELETED_GLYPH_CLASS; + else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) classCode = $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS; + } + } + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + if (classCode !== $860c6347bb941b91$var$END_OF_TEXT_CLASS && classCode !== $860c6347bb941b91$var$DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & $860c6347bb941b91$var$DONT_ADVANCE); + } + currentState = entry.newState; + if (shouldAdvance) index += dir; + } + return glyphs; + } + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) return; + visited.add(state); + let { nClasses: nClasses, stateArray: stateArray, entryTable: entryTable } = this.stateTable; + let row = stateArray.getItem(state); + // Skip predefined classes + for(let classCode = 4; classCode < nClasses; classCode++){ + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)){ + if (opts.enter) opts.enter(glyph, entry); + if (entry.newState !== 0) this.traverse(opts, entry.newState, visited); + if (opts.exit) opts.exit(glyph, entry); + } + } + } + constructor(stateTable){ + this.stateTable = stateTable; + this.lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(stateTable.classTable); + } +} + + + + +// indic replacement flags +const $99be642f82069918$var$MARK_FIRST = 0x8000; +const $99be642f82069918$var$MARK_LAST = 0x2000; +const $99be642f82069918$var$VERB = 0x000F; +// contextual substitution and glyph insertion flag +const $99be642f82069918$var$SET_MARK = 0x8000; +// ligature entry flags +const $99be642f82069918$var$SET_COMPONENT = 0x8000; +const $99be642f82069918$var$PERFORM_ACTION = 0x2000; +// ligature action masks +const $99be642f82069918$var$LAST_MASK = 0x80000000; +const $99be642f82069918$var$STORE_MASK = 0x40000000; +const $99be642f82069918$var$OFFSET_MASK = 0x3FFFFFFF; +const $99be642f82069918$var$VERTICAL_ONLY = 0x800000; +const $99be642f82069918$var$REVERSE_DIRECTION = 0x400000; +const $99be642f82069918$var$HORIZONTAL_AND_VERTICAL = 0x200000; +// glyph insertion flags +const $99be642f82069918$var$CURRENT_IS_KASHIDA_LIKE = 0x2000; +const $99be642f82069918$var$MARKED_IS_KASHIDA_LIKE = 0x1000; +const $99be642f82069918$var$CURRENT_INSERT_BEFORE = 0x0800; +const $99be642f82069918$var$MARKED_INSERT_BEFORE = 0x0400; +const $99be642f82069918$var$CURRENT_INSERT_COUNT = 0x03E0; +const $99be642f82069918$var$MARKED_INSERT_COUNT = 0x001F; +class $99be642f82069918$export$2e2bcd8739ae039 { + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:boolean}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + // enable/disable the requested features + for (let feature of chain.features){ + let f; + if (f = features[feature.featureType]) { + if (f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } else if (f[feature.featureSetting] === false) { + flags |= ~feature.disableFlags; + flags &= ~feature.enableFlags; + } + } + } + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.processSubtable(subtable, glyphs); + } + // remove deleted glyphs + let index = glyphs.length - 1; + while(index >= 0){ + if (glyphs[index].id === 0xffff) glyphs.splice(index, 1); + index--; + } + return glyphs; + } + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let reverse = !!(this.subtable.coverage & $99be642f82069918$var$REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + getStateMachine(subtable) { + return new (0, $860c6347bb941b91$export$2e2bcd8739ae039)(subtable.table.stateTable); + } + getProcessor() { + switch(this.subtable.type){ + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + processIndicRearragement(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$MARK_FIRST) this.firstGlyph = index; + if (entry.flags & $99be642f82069918$var$MARK_LAST) this.lastGlyph = index; + $99be642f82069918$var$reorderGlyphs(this.glyphs, entry.flags & $99be642f82069918$var$VERB, this.firstGlyph, this.lastGlyph); + } + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.flags & $99be642f82069918$var$SET_MARK) this.markedGlyph = index; + } + processLigature(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$SET_COMPONENT) this.ligatureStack.push(index); + if (entry.flags & $99be642f82069918$var$PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + while(!last){ + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + let action = actions.getItem(actionIndex++); + last = !!(action & $99be642f82069918$var$LAST_MASK); + let store = !!(action & $99be642f82069918$var$STORE_MASK); + let offset = (action & $99be642f82069918$var$OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + let component = components.getItem(offset); + ligatureIndex += component; + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(subtable.table.lookupTable); + for(index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while(count--){ + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + if (!isBefore) glyphIndex++; + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$SET_MARK) this.markedIndex = index; + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & $99be642f82069918$var$MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $99be642f82069918$var$MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & $99be642f82069918$var$CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $99be642f82069918$var$CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains)for (let feature of chain.features)features.push([ + feature.featureType, + feature.featureSetting + ]); + return features; + } + generateInputs(gid) { + if (!this.inputCache) this.generateInputCache(); + return this.inputCache[gid] || []; + } + generateInputCache() { + this.inputCache = {}; + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.generateInputsForSubtable(subtable); + } + } + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) return; + let reverse = !!(subtable.coverage & $99be642f82069918$var$REVERSE_DIRECTION); + if (reverse) throw new Error('Reverse subtable, not supported.'); + this.subtable = subtable; + this.ligatureStack = []; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let input = []; + let stack = []; + this.glyphs = []; + stateMachine.traverse({ + enter: (glyph, entry)=>{ + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for(let i = 0; i < glyphs.length && count <= 1; i++)if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + if (count === 1) { + let result = input.map((g)=>g.id); + let cache = this.inputCache[found]; + if (cache) cache.push(result); + else this.inputCache[found] = [ + result + ]; + } + }, + exit: ()=>{ + ({ glyphs: this.glyphs, ligatureStack: this.ligatureStack } = stack.pop()); + input.pop(); + } + }); + } + constructor(font){ + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } +} +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $99be642f82069918$export$2e2bcd8739ae039.prototype, "getStateMachine", null); +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function $99be642f82069918$var$swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) end.reverse(); + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) start.reverse(); + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} +function $99be642f82069918$var$reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch(verb){ + case 0: + return glyphs; + case 1: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 0 + ]); + case 2: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 1 + ]); + case 3: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 1 + ]); + case 4: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ]); + case 5: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ], true, false); + case 6: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ]); + case 7: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ], false, true); + case 8: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ]); + case 9: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ], false, true); + case 10: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ]); + case 11: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ], true, false); + case 12: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ]); + case 13: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, false); + case 14: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], false, true); + case 15: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, true); + default: + throw new Error(`Unknown verb: ${verb}`); + } +} + + +class $860fcbd64bc12fbc$export$2e2bcd8739ae039 { + substitute(glyphRun) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + if (glyphRun.direction === 'rtl') glyphRun.glyphs.reverse(); + this.morxProcessor.process(glyphRun.glyphs, $2b7f887ebcb5888a$export$b813f7d2a1677c16(glyphRun.features)); + } + getAvailableFeatures(script, language) { + return $2b7f887ebcb5888a$export$bd6df347a4f391c4(this.morxProcessor.getSupportedFeatures()); + } + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + for (let glyphs of glyphStrings)this._addStrings(glyphs, 0, result, ''); + return result; + } + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + for (let codePoint of codePoints){ + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) this._addStrings(glyphs, index + 1, strings, s); + else strings.add(s); + } + } + constructor(font){ + this.font = font; + this.morxProcessor = new (0, $99be642f82069918$export$2e2bcd8739ae039)(font); + this.fallbackPosition = false; + } +} + + + +class $d7e93cca3cf8ce8a$export$2e2bcd8739ae039 { + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ _addFeatures(features, global) { + let stageIndex = this.stages.length - 1; + let stage = this.stages[stageIndex]; + for (let feature of features)if (this.allFeatures[feature] == null) { + stage.push(feature); + this.allFeatures[feature] = stageIndex; + if (global) this.globalFeatures[feature] = true; + } + } + /** + * Add features to the last stage + */ add(arg, global = true) { + if (this.stages.length === 0) this.stages.push([]); + if (typeof arg === 'string') arg = [ + arg + ]; + if (Array.isArray(arg)) this._addFeatures(arg, global); + else if (typeof arg === 'object') { + this._addFeatures(arg.global || [], true); + this._addFeatures(arg.local || [], false); + } else throw new Error("Unsupported argument to ShapingPlan#add"); + } + /** + * Add a new stage + */ addStage(arg, global) { + if (typeof arg === 'function') this.stages.push(arg, []); + else { + this.stages.push([]); + this.add(arg, global); + } + } + setFeatureOverrides(features) { + if (Array.isArray(features)) this.add(features); + else if (typeof features === 'object') for(let tag in features){ + if (features[tag]) this.add(tag); + else if (this.allFeatures[tag] != null) { + let stage = this.stages[this.allFeatures[tag]]; + stage.splice(stage.indexOf(tag), 1); + delete this.allFeatures[tag]; + delete this.globalFeatures[tag]; + } + } + } + /** + * Assigns the global features to the given glyphs + */ assignGlobalFeatures(glyphs) { + for (let glyph of glyphs)for(let feature in this.globalFeatures)glyph.features[feature] = true; + } + /** + * Executes the planned stages using the given OTProcessor + */ process(processor, glyphs, positions) { + for (let stage of this.stages){ + if (typeof stage === 'function') { + if (!positions) stage(this.font, glyphs, this); + } else if (stage.length > 0) processor.applyFeatures(stage, glyphs, positions); + } + } + constructor(font, script, direction){ + this.font = font; + this.script = script; + this.direction = direction; + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } +} + + + + +const $d28fb665ee343afc$var$VARIATION_FEATURES = [ + 'rvrn' +]; +const $d28fb665ee343afc$var$COMMON_FEATURES = [ + 'ccmp', + 'locl', + 'rlig', + 'mark', + 'mkmk' +]; +const $d28fb665ee343afc$var$FRACTIONAL_FEATURES = [ + 'frac', + 'numr', + 'dnom' +]; +const $d28fb665ee343afc$var$HORIZONTAL_FEATURES = [ + 'calt', + 'clig', + 'liga', + 'rclt', + 'curs', + 'kern' +]; +const $d28fb665ee343afc$var$VERTICAL_FEATURES = [ + 'vert' +]; +const $d28fb665ee343afc$var$DIRECTIONAL_FEATURES = { + ltr: [ + 'ltra', + 'ltrm' + ], + rtl: [ + 'rtla', + 'rtlm' + ] +}; +class $d28fb665ee343afc$export$2e2bcd8739ae039 { + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + static planPreprocessing(plan) { + plan.add({ + global: [ + ...$d28fb665ee343afc$var$VARIATION_FEATURES, + ...$d28fb665ee343afc$var$DIRECTIONAL_FEATURES[plan.direction] + ], + local: $d28fb665ee343afc$var$FRACTIONAL_FEATURES + }); + } + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + static planPostprocessing(plan, userFeatures) { + plan.add([ + ...$d28fb665ee343afc$var$COMMON_FEATURES, + ...$d28fb665ee343afc$var$HORIZONTAL_FEATURES + ]); + plan.setFeatureOverrides(userFeatures); + } + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + for(let i = 0; i < glyphs.length; i++){ + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { + let start = i; + let end = i + 1; + // Apply numerator + while(start > 0 && (0, $gfJaN$unicodeproperties.isDigit)(glyphs[start - 1].codePoints[0])){ + glyphs[start - 1].features.numr = true; + glyphs[start - 1].features.frac = true; + start--; + } + // Apply denominator + while(end < glyphs.length && (0, $gfJaN$unicodeproperties.isDigit)(glyphs[end].codePoints[0])){ + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } + } + } +} +(0, $gfJaN$swchelperscjs_define_propertycjs._)($d28fb665ee343afc$export$2e2bcd8739ae039, "zeroMarkWidths", 'AFTER_GPOS'); + + + + + + +const $17ba6019f27bfcf9$var$trie = new (0, ($parcel$interopDefault($gfJaN$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==")); +const $17ba6019f27bfcf9$var$FEATURES = [ + 'isol', + 'fina', + 'fin2', + 'fin3', + 'medi', + 'med2', + 'init' +]; +const $17ba6019f27bfcf9$var$ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; +const $17ba6019f27bfcf9$var$ISOL = 'isol'; +const $17ba6019f27bfcf9$var$FINA = 'fina'; +const $17ba6019f27bfcf9$var$FIN2 = 'fin2'; +const $17ba6019f27bfcf9$var$FIN3 = 'fin3'; +const $17ba6019f27bfcf9$var$MEDI = 'medi'; +const $17ba6019f27bfcf9$var$MED2 = 'med2'; +const $17ba6019f27bfcf9$var$INIT = 'init'; +const $17ba6019f27bfcf9$var$NONE = null; +// Each entry is [prevAction, curAction, nextState] +const $17ba6019f27bfcf9$var$STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 2: prev was D/L in ISOL form, willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 1 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 3 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 4 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 6 + ] + ], + // State 3: prev was D in FINA form, willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 1 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 3 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 4 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 6 + ] + ], + // State 4: prev was FINA ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 6: prev was DALATH/RISH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$FIN3, + 5 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ] +]; +class $17ba6019f27bfcf9$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ccmp', + 'locl' + ]); + for(let i = 0; i < $17ba6019f27bfcf9$var$FEATURES.length; i++){ + let feature = $17ba6019f27bfcf9$var$FEATURES[i]; + plan.addStage(feature, false); + } + plan.addStage('mset'); + } + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + let prev = -1; + let state = 0; + let actions = []; + // Apply the state machine to map glyphs to features + for(let i = 0; i < glyphs.length; i++){ + let curAction, prevAction; + var glyph = glyphs[i]; + let type = $17ba6019f27bfcf9$var$getShapingClass(glyph.codePoints[0]); + if (type === $17ba6019f27bfcf9$var$ShapingClasses.Transparent) { + actions[i] = $17ba6019f27bfcf9$var$NONE; + continue; + } + [prevAction, curAction, state] = $17ba6019f27bfcf9$var$STATE_TABLE[state][type]; + if (prevAction !== $17ba6019f27bfcf9$var$NONE && prev !== -1) actions[prev] = prevAction; + actions[i] = curAction; + prev = i; + } + // Apply the chosen features to their respective glyphs + for(let index = 0; index < glyphs.length; index++){ + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) glyph.features[feature] = true; + } + } +} +function $17ba6019f27bfcf9$var$getShapingClass(codePoint) { + let res = $17ba6019f27bfcf9$var$trie.get(codePoint); + if (res) return res - 1; + let category = (0, $gfJaN$unicodeproperties.getCategory)(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') return $17ba6019f27bfcf9$var$ShapingClasses.Transparent; + return $17ba6019f27bfcf9$var$ShapingClasses.Non_Joining; +} + + + + + +class $d6368085223f631e$export$2e2bcd8739ae039 { + reset(options = {}, index = 0) { + this.options = options; + this.flags = options.flags || {}; + this.markAttachmentType = options.markAttachmentType || 0; + this.index = index; + } + get cur() { + return this.glyphs[this.index] || null; + } + shouldIgnore(glyph) { + return this.flags.ignoreMarks && glyph.isMark || this.flags.ignoreBaseGlyphs && glyph.isBase || this.flags.ignoreLigatures && glyph.isLigature || this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType; + } + move(dir) { + this.index += dir; + while(0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index]))this.index += dir; + if (0 > this.index || this.index >= this.glyphs.length) return null; + return this.glyphs[this.index]; + } + next() { + return this.move(1); + } + prev() { + return this.move(-1); + } + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while(count--)this.move(dir); + return this.glyphs[this.index]; + } + constructor(glyphs, options){ + this.glyphs = glyphs; + this.reset(options); + } +} + + + +const $7b226e6bbeadedeb$var$DEFAULT_SCRIPTS = [ + 'DFLT', + 'dflt', + 'latn' +]; +class $7b226e6bbeadedeb$export$2e2bcd8739ae039 { + findScript(script) { + if (this.table.scriptList == null) return null; + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script)for (let entry of this.table.scriptList){ + if (entry.tag === s) return entry; + } + return null; + } + selectScript(script, language, direction) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (!entry) entry = this.findScript($7b226e6bbeadedeb$var$DEFAULT_SCRIPTS); + if (!entry) return this.scriptTag; + this.scriptTag = entry.tag; + this.script = entry.script; + this.language = null; + this.languageTag = null; + changed = true; + } + if (!direction || direction !== this.direction) this.direction = direction || $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script); + if (language && language.length < 4) language += ' '.repeat(4 - language.length); + if (!language || language !== this.languageTag) { + this.language = null; + for (let lang of this.script.langSysRecords)if (lang.tag === language) { + this.language = lang.langSys; + this.languageTag = lang.tag; + break; + } + if (!this.language) { + this.language = this.script.defaultLangSys; + this.languageTag = null; + } + changed = true; + } + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) for (let featureIndex of this.language.featureIndexes){ + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + return this.scriptTag; + } + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures){ + let feature = this.features[tag]; + if (!feature) continue; + for (let lookupIndex of feature.lookupListIndexes){ + if (exclude && exclude.indexOf(lookupIndex) !== -1) continue; + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + lookups.sort((a, b)=>a.index - b.index); + return lookups; + } + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) return null; + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions){ + if (substitution.featureIndex === featureIndex) return substitution.alternateFeatureTable; + } + return null; + } + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) return -1; + let records = variations.featureVariationRecords; + for(let i = 0; i < records.length; i++){ + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) return i; + } + return -1; + } + variationConditionsMatch(conditions, coords) { + return conditions.every((condition)=>{ + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new (0, $d6368085223f631e$export$2e2bcd8739ae039)(glyphs); + for (let { feature: feature, lookup: lookup } of lookups){ + this.currentFeature = feature; + this.glyphIterator.reset(lookup.flags); + while(this.glyphIterator.index < glyphs.length){ + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + for (let table of lookup.subTables){ + let res = this.applyLookup(lookup.lookupType, table); + if (res) break; + } + this.glyphIterator.next(); + } + } + } + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + applyLookupList(lookupRecords) { + let options = this.glyphIterator.options; + let glyphIndex = this.glyphIterator.index; + for (let lookupRecord of lookupRecords){ + // Reset flags and find glyph index for this lookup record + this.glyphIterator.reset(options, glyphIndex); + this.glyphIterator.increment(lookupRecord.sequenceIndex); + // Get the lookup and setup flags for subtables + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); + // Apply lookup subtables until one matches + for (let table of lookup.subTables){ + if (this.applyLookup(lookup.lookupType, table)) break; + } + } + this.glyphIterator.reset(options, glyphIndex); + return true; + } + coverageIndex(coverage, glyph) { + if (glyph == null) glyph = this.glyphIterator.cur.id; + switch(coverage.version){ + case 1: + return coverage.glyphs.indexOf(glyph); + case 2: + for (let range of coverage.rangeRecords){ + if (range.start <= glyph && glyph <= range.end) return range.startCoverageIndex + glyph - range.start; + } + break; + } + return -1; + } + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + while(idx < sequence.length && glyph && fn(sequence[idx], glyph)){ + if (matched) matched.push(this.glyphIterator.index); + idx++; + glyph = this.glyphIterator.next(); + } + this.glyphIterator.index = pos; + if (idx < sequence.length) return false; + return matched || true; + } + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>component === glyph.id); + } + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>{ + // If the current feature doesn't apply to this glyph, + if (!(this.currentFeature in glyph.features)) return false; + return component === glyph.id; + }, []); + } + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph)=>this.coverageIndex(coverage, glyph.id) >= 0); + } + getClassID(glyph, classDef) { + switch(classDef.version){ + case 1: + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) return classDef.classValueArray[i]; + break; + case 2: + for (let range of classDef.classRangeRecord){ + if (range.start <= glyph && glyph <= range.end) return range.class; + } + break; + } + return 0; + } + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph)=>classID === this.getClassID(glyph.id, classDef)); + } + applyContext(table) { + let index, set; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + set = table.ruleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(1, rule.input)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) return false; + set = table.classSet[index]; + for (let rule of set){ + if (this.classSequenceMatches(1, rule.classes, table.classDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + applyChainingContext(table) { + let index; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let set = table.chainRuleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) return false; + for (let rule of rules){ + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, rule.input, table.inputClassDef) && this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + constructor(font, table){ + this.font = font; + this.table = table; + this.script = null; + this.scriptTag = null; + this.language = null; + this.languageTag = null; + this.features = {}; + this.lookups = {}; + // Setup variation substitutions + this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; + // initialize to default script + language + this.selectScript(); + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + this.currentFeature = null; + } +} + + +class $f22bb23c9fd478d8$export$2e2bcd8739ae039 { + get id() { + return this._id; + } + set id(id) { + this._id = id; + this.substituted = true; + let GDEF = this._font.GDEF; + if (GDEF && GDEF.glyphClassDef) { + // TODO: clean this up + let classID = (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.glyphClassDef); + this.isBase = classID === 1; + this.isLigature = classID === 2; + this.isMark = classID === 3; + this.markAttachmentType = GDEF.markAttachClassDef ? (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.markAttachClassDef) : 0; + } else { + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $gfJaN$unicodeproperties.isMark)); + this.isBase = !this.isMark; + this.isLigature = this.codePoints.length > 1; + this.markAttachmentType = 0; + } + } + copy() { + return new $f22bb23c9fd478d8$export$2e2bcd8739ae039(this._font, this.id, this.codePoints, this.features); + } + constructor(font, id, codePoints = [], features){ + this._font = font; + this.codePoints = codePoints; + this.id = id; + this.features = {}; + if (Array.isArray(features)) for(let i = 0; i < features.length; i++){ + let feature = features[i]; + this.features[feature] = true; + } + else if (typeof features === 'object') Object.assign(this.features, features); + this.ligatureID = null; + this.ligatureComponent = null; + this.isLigated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + this.isMultiplied = false; + } +} + + +class $fa1d9fd80dd7279e$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ljmo', + 'vjmo', + 'tjmo' + ], false); + } + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while(i < glyphs.length){ + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = $fa1d9fd80dd7279e$var$getType(code); + [action, state] = $fa1d9fd80dd7279e$var$STATE_TABLE[state][type]; + switch(action){ + case $fa1d9fd80dd7279e$var$DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) i = $fa1d9fd80dd7279e$var$decompose(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = $fa1d9fd80dd7279e$var$compose(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + $fa1d9fd80dd7279e$var$reorderToneMark(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = $fa1d9fd80dd7279e$var$insertDottedCircle(glyphs, i, plan.font); + break; + } + i++; + } + } +} +(0, $gfJaN$swchelperscjs_define_propertycjs._)($fa1d9fd80dd7279e$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +const $fa1d9fd80dd7279e$var$HANGUL_BASE = 0xac00; +const $fa1d9fd80dd7279e$var$HANGUL_END = 0xd7a4; +const $fa1d9fd80dd7279e$var$HANGUL_COUNT = $fa1d9fd80dd7279e$var$HANGUL_END - $fa1d9fd80dd7279e$var$HANGUL_BASE + 1; +const $fa1d9fd80dd7279e$var$L_BASE = 0x1100; // lead +const $fa1d9fd80dd7279e$var$V_BASE = 0x1161; // vowel +const $fa1d9fd80dd7279e$var$T_BASE = 0x11a7; // trail +const $fa1d9fd80dd7279e$var$L_COUNT = 19; +const $fa1d9fd80dd7279e$var$V_COUNT = 21; +const $fa1d9fd80dd7279e$var$T_COUNT = 28; +const $fa1d9fd80dd7279e$var$L_END = $fa1d9fd80dd7279e$var$L_BASE + $fa1d9fd80dd7279e$var$L_COUNT - 1; +const $fa1d9fd80dd7279e$var$V_END = $fa1d9fd80dd7279e$var$V_BASE + $fa1d9fd80dd7279e$var$V_COUNT - 1; +const $fa1d9fd80dd7279e$var$T_END = $fa1d9fd80dd7279e$var$T_BASE + $fa1d9fd80dd7279e$var$T_COUNT - 1; +const $fa1d9fd80dd7279e$var$DOTTED_CIRCLE = 0x25cc; +const $fa1d9fd80dd7279e$var$isL = (code)=>0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const $fa1d9fd80dd7279e$var$isV = (code)=>0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const $fa1d9fd80dd7279e$var$isT = (code)=>0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const $fa1d9fd80dd7279e$var$isTone = (code)=>0x302e <= code && code <= 0x302f; +const $fa1d9fd80dd7279e$var$isLVT = (code)=>$fa1d9fd80dd7279e$var$HANGUL_BASE <= code && code <= $fa1d9fd80dd7279e$var$HANGUL_END; +const $fa1d9fd80dd7279e$var$isLV = (code)=>code - $fa1d9fd80dd7279e$var$HANGUL_BASE < $fa1d9fd80dd7279e$var$HANGUL_COUNT && (code - $fa1d9fd80dd7279e$var$HANGUL_BASE) % $fa1d9fd80dd7279e$var$T_COUNT === 0; +const $fa1d9fd80dd7279e$var$isCombiningL = (code)=>$fa1d9fd80dd7279e$var$L_BASE <= code && code <= $fa1d9fd80dd7279e$var$L_END; +const $fa1d9fd80dd7279e$var$isCombiningV = (code)=>$fa1d9fd80dd7279e$var$V_BASE <= code && code <= $fa1d9fd80dd7279e$var$V_END; +const $fa1d9fd80dd7279e$var$isCombiningT = (code)=>$fa1d9fd80dd7279e$var$T_BASE + 1 && 1 <= code && code <= $fa1d9fd80dd7279e$var$T_END; +// Character categories +const $fa1d9fd80dd7279e$var$X = 0; // Other character +const $fa1d9fd80dd7279e$var$L = 1; // Leading consonant +const $fa1d9fd80dd7279e$var$V = 2; // Medial vowel +const $fa1d9fd80dd7279e$var$T = 3; // Trailing consonant +const $fa1d9fd80dd7279e$var$LV = 4; // Composed syllable +const $fa1d9fd80dd7279e$var$LVT = 5; // Composed syllable +const $fa1d9fd80dd7279e$var$M = 6; // Tone mark +// This function classifies a character using the above categories. +function $fa1d9fd80dd7279e$var$getType(code) { + if ($fa1d9fd80dd7279e$var$isL(code)) return $fa1d9fd80dd7279e$var$L; + if ($fa1d9fd80dd7279e$var$isV(code)) return $fa1d9fd80dd7279e$var$V; + if ($fa1d9fd80dd7279e$var$isT(code)) return $fa1d9fd80dd7279e$var$T; + if ($fa1d9fd80dd7279e$var$isLV(code)) return $fa1d9fd80dd7279e$var$LV; + if ($fa1d9fd80dd7279e$var$isLVT(code)) return $fa1d9fd80dd7279e$var$LVT; + if ($fa1d9fd80dd7279e$var$isTone(code)) return $fa1d9fd80dd7279e$var$M; + return $fa1d9fd80dd7279e$var$X; +} +// State machine actions +const $fa1d9fd80dd7279e$var$NO_ACTION = 0; +const $fa1d9fd80dd7279e$var$DECOMPOSE = 1; +const $fa1d9fd80dd7279e$var$COMPOSE = 2; +const $fa1d9fd80dd7279e$var$TONE_MARK = 4; +const $fa1d9fd80dd7279e$var$INVALID = 5; +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const $fa1d9fd80dd7279e$var$STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$INVALID, + 0 + ] + ], + // State 1: + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$COMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$INVALID, + 0 + ] + ], + // State 2: or + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$COMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$TONE_MARK, + 0 + ] + ], + // State 3: or + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$TONE_MARK, + 0 + ] + ] +]; +function $fa1d9fd80dd7279e$var$getGlyph(font, code, features) { + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, font.glyphForCodePoint(code).id, [ + code + ], features); +} +function $fa1d9fd80dd7279e$var$decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let s = code - $fa1d9fd80dd7279e$var$HANGUL_BASE; + let t = $fa1d9fd80dd7279e$var$T_BASE + s % $fa1d9fd80dd7279e$var$T_COUNT; + s = s / $fa1d9fd80dd7279e$var$T_COUNT | 0; + let l = $fa1d9fd80dd7279e$var$L_BASE + s / $fa1d9fd80dd7279e$var$V_COUNT | 0; + let v = $fa1d9fd80dd7279e$var$V_BASE + s % $fa1d9fd80dd7279e$var$V_COUNT; + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== $fa1d9fd80dd7279e$var$T_BASE && !font.hasGlyphForCodePoint(t)) return i; + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = $fa1d9fd80dd7279e$var$getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + let vjmo = $fa1d9fd80dd7279e$var$getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + let insert = [ + ljmo, + vjmo + ]; + if (t > $fa1d9fd80dd7279e$var$T_BASE) { + let tjmo = $fa1d9fd80dd7279e$var$getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} +function $fa1d9fd80dd7279e$var$compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = $fa1d9fd80dd7279e$var$getType(code); + let prev = glyphs[i - 1].codePoints[0]; + let prevType = $fa1d9fd80dd7279e$var$getType(prev); + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === $fa1d9fd80dd7279e$var$LV && type === $fa1d9fd80dd7279e$var$T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === $fa1d9fd80dd7279e$var$V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + // Make sure L and V are combining characters + if ($fa1d9fd80dd7279e$var$isCombiningL(l) && $fa1d9fd80dd7279e$var$isCombiningV(v)) lv = $fa1d9fd80dd7279e$var$HANGUL_BASE + ((l - $fa1d9fd80dd7279e$var$L_BASE) * $fa1d9fd80dd7279e$var$V_COUNT + (v - $fa1d9fd80dd7279e$var$V_BASE)) * $fa1d9fd80dd7279e$var$T_COUNT; + } + let t = tjmo && tjmo.codePoints[0] || $fa1d9fd80dd7279e$var$T_BASE; + if (lv != null && (t === $fa1d9fd80dd7279e$var$T_BASE || $fa1d9fd80dd7279e$var$isCombiningT(t))) { + let s = lv + (t - $fa1d9fd80dd7279e$var$T_BASE); + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === $fa1d9fd80dd7279e$var$V ? 3 : 2; + glyphs.splice(i - del + 1, del, $fa1d9fd80dd7279e$var$getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) ljmo.features.ljmo = true; + if (vjmo) vjmo.features.vjmo = true; + if (tjmo) tjmo.features.tjmo = true; + if (prevType === $fa1d9fd80dd7279e$var$LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + $fa1d9fd80dd7279e$var$decompose(glyphs, i - 1, font); + return i + 1; + } + return i; +} +function $fa1d9fd80dd7279e$var$getLength(code) { + switch($fa1d9fd80dd7279e$var$getType(code)){ + case $fa1d9fd80dd7279e$var$LV: + case $fa1d9fd80dd7279e$var$LVT: + return 1; + case $fa1d9fd80dd7279e$var$V: + return 2; + case $fa1d9fd80dd7279e$var$T: + return 3; + } +} +function $fa1d9fd80dd7279e$var$reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) return; + let prev = glyphs[i - 1].codePoints[0]; + let len = $fa1d9fd80dd7279e$var$getLength(prev); + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} +function $fa1d9fd80dd7279e$var$insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + if (font.hasGlyphForCodePoint($fa1d9fd80dd7279e$var$DOTTED_CIRCLE)) { + let dottedCircle = $fa1d9fd80dd7279e$var$getGlyph(font, $fa1d9fd80dd7279e$var$DOTTED_CIRCLE, glyph.features); + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + return i; +} + + + + + + + + + +var $d22b56f2cf15e5ba$exports = {}; +$d22b56f2cf15e5ba$exports = JSON.parse("{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}"); + + +var $79781f8c452881c2$exports = {}; +$79781f8c452881c2$exports = JSON.parse("{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0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,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}"); + + +// Cateories used in the OpenType spec: +// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx +const $79e3b6f2c331d0bf$export$a513ea61a7bee91c = { + X: 1, + C: 2, + V: 4, + N: 8, + H: 16, + ZWNJ: 32, + ZWJ: 64, + M: 128, + SM: 256, + VD: 512, + A: 1024, + Placeholder: 2048, + Dotted_Circle: 4096, + RS: 8192, + Coeng: 16384, + Repha: 32768, + Ra: 65536, + CM: 131072, + Symbol: 262144 // Avagraha, etc that take marks (SM,A,VD). +}; +const $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0 = { + Start: 1, + Ra_To_Become_Reph: 2, + Pre_M: 4, + Pre_C: 8, + Base_C: 16, + After_Main: 32, + Above_C: 64, + Before_Sub: 128, + Below_C: 256, + After_Sub: 512, + Before_Post: 1024, + Post_C: 2048, + After_Post: 4096, + Final_C: 8192, + SMVD: 16384, + End: 32768 +}; +const $79e3b6f2c331d0bf$export$8519deaa7de2b07 = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.C | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Ra | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.CM | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.V | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Placeholder | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Dotted_Circle; +const $79e3b6f2c331d0bf$export$bbcd928767338e0d = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.ZWJ | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.ZWNJ; +const $79e3b6f2c331d0bf$export$ca9599b2a300afc = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.H | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Coeng; +const $79e3b6f2c331d0bf$export$e99d119da76a0fc5 = { + Default: { + hasOldSpec: false, + virama: 0, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Devanagari: { + hasOldSpec: true, + virama: 0x094D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Bengali: { + hasOldSpec: true, + virama: 0x09CD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gurmukhi: { + hasOldSpec: true, + virama: 0x0A4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gujarati: { + hasOldSpec: true, + virama: 0x0ACD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Oriya: { + hasOldSpec: true, + virama: 0x0B4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Tamil: { + hasOldSpec: true, + virama: 0x0BCD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Telugu: { + hasOldSpec: true, + virama: 0x0C4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Explicit', + blwfMode: 'Post_Only' + }, + Kannada: { + hasOldSpec: true, + virama: 0x0CCD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Post_Only' + }, + Malayalam: { + hasOldSpec: true, + virama: 0x0D4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Log_Repha', + blwfMode: 'Pre_And_Post' + }, + // Handled by UniversalShaper + // Sinhala: { + // hasOldSpec: false, + // virama: 0x0DCA, + // basePos: 'Last_Sinhala', + // rephPos: POSITIONS.After_Main, + // rephMode: 'Explicit', + // blwfMode: 'Pre_And_Post' + // }, + Khmer: { + hasOldSpec: false, + virama: 0x17D2, + basePos: 'First', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Ra_To_Become_Reph, + rephMode: 'Vis_Repha', + blwfMode: 'Pre_And_Post' + } +}; +const $79e3b6f2c331d0bf$export$f647c9cfdd77d95a = { + // Khmer + 0x17BE: [ + 0x17C1, + 0x17BE + ], + 0x17BF: [ + 0x17C1, + 0x17BF + ], + 0x17C0: [ + 0x17C1, + 0x17C0 + ], + 0x17C4: [ + 0x17C1, + 0x17C4 + ], + 0x17C5: [ + 0x17C1, + 0x17C5 + ] +}; + + + +const { decompositions: $d203e6b9523d0071$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports))); +const $d203e6b9523d0071$var$trie = new (0, ($parcel$interopDefault($gfJaN$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXP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n+XwudrI2X2E2KdtJEov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=")); +const $d203e6b9523d0071$var$stateMachine = new (0, ($parcel$interopDefault($gfJaN$dfa)))((0, (/*@__PURE__*/$parcel$interopDefault($d22b56f2cf15e5ba$exports)))); +class $d203e6b9523d0071$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($d203e6b9523d0071$var$setupSyllables); + plan.addStage([ + 'locl', + 'ccmp' + ]); + plan.addStage($d203e6b9523d0071$var$initialReordering); + plan.addStage('nukt'); + plan.addStage('akhn'); + plan.addStage('rphf', false); + plan.addStage('rkrf'); + plan.addStage('pref', false); + plan.addStage('blwf', false); + plan.addStage('abvf', false); + plan.addStage('half', false); + plan.addStage('pstf', false); + plan.addStage('vatu'); + plan.addStage('cjct'); + plan.addStage('cfar', false); + plan.addStage($d203e6b9523d0071$var$finalReordering); + plan.addStage({ + local: [ + 'init' + ], + global: [ + 'pres', + 'abvs', + 'blws', + 'psts', + 'haln', + 'dist', + 'abvm', + 'blwm', + 'calt', + 'clig' + ] + }); + // Setup the indic config for the selected script + plan.unicodeScript = $e38a1a895f6aeb54$export$ce50e82f12a827a4(plan.script); + plan.indicConfig = (0, $79e3b6f2c331d0bf$export$e99d119da76a0fc5)[plan.unicodeScript] || (0, $79e3b6f2c331d0bf$export$e99d119da76a0fc5).Default; + plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; + // TODO: turn off kern (Khmer) and liga features. + } + static assignFeatures(plan, glyphs) { + // Decompose split matras + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + let d = (0, $79e3b6f2c331d0bf$export$f647c9cfdd77d95a)[codepoint] || $d203e6b9523d0071$var$decompositions[codepoint]; + if (d) { + let decomposed = d.map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $gfJaN$swchelperscjs_define_propertycjs._)($d203e6b9523d0071$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +function $d203e6b9523d0071$var$indicCategory(glyph) { + return $d203e6b9523d0071$var$trie.get(glyph.codePoints[0]) >> 8; +} +function $d203e6b9523d0071$var$indicPosition(glyph) { + return 1 << ($d203e6b9523d0071$var$trie.get(glyph.codePoints[0]) & 0xff); +} +class $d203e6b9523d0071$var$IndicInfo { + constructor(category, position, syllableType, syllable){ + this.category = category; + this.position = position; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $d203e6b9523d0071$var$setupSyllables(font, glyphs) { + let syllable = 0; + let last = 0; + for (let [start, end, tags] of $d203e6b9523d0071$var$stateMachine.match(glyphs.map($d203e6b9523d0071$var$indicCategory))){ + if (start > last) { + ++syllable; + for(let i = last; i < start; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).X, (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo(1 << $d203e6b9523d0071$var$indicCategory(glyphs[i]), $d203e6b9523d0071$var$indicPosition(glyphs[i]), tags[0], syllable); + last = end + 1; + } + if (last < glyphs.length) { + ++syllable; + for(let i = last; i < glyphs.length; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).X, (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } +} +function $d203e6b9523d0071$var$isConsonant(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$8519deaa7de2b07); +} +function $d203e6b9523d0071$var$isJoiner(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$bbcd928767338e0d); +} +function $d203e6b9523d0071$var$isHalantOrCoeng(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc); +} +function $d203e6b9523d0071$var$wouldSubstitute(glyphs, feature) { + for (let glyph of glyphs)glyph.features = { + [feature]: true + }; + let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor; + GSUB.applyFeatures([ + feature + ], glyphs); + return glyphs.length === 1; +} +function $d203e6b9523d0071$var$consonantPosition(font, consonant, virama) { + let glyphs = [ + virama, + consonant, + virama + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'blwf') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'blwf')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C; + else if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'pstf') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'pstf')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C; + else if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'pref') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'pref')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C; + return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; +} +function $d203e6b9523d0071$var$initialReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + let virama = font.glyphForCodePoint(indicConfig.virama).id; + if (virama) { + let info = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, virama, [ + indicConfig.virama + ]); + for(let i = 0; i < glyphs.length; i++)if (glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) glyphs[i].shaperInfo.position = $d203e6b9523d0071$var$consonantPosition(font, glyphs[i].copy(), info); + } + for(let start = 0, end = $d203e6b9523d0071$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $d203e6b9523d0071$var$nextSyllable(glyphs, start)){ + let { category: category, syllableType: syllableType } = glyphs[start].shaperInfo; + if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') continue; + if (syllableType === 'broken_cluster' && dottedCircle) { + let g = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = new $d203e6b9523d0071$var$IndicInfo(1 << $d203e6b9523d0071$var$indicCategory(g), $d203e6b9523d0071$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable); + // Insert after possible Repha. + let i = start; + while(i < end && glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha)i++; + glyphs.splice(i++, 0, g); + end++; + } + // 1. Find base consonant: + // + // The shaping engine finds the base consonant of the syllable, using the + // following algorithm: starting from the end of the syllable, move backwards + // until a consonant is found that does not have a below-base or post-base + // form (post-base forms have to follow below-base forms), or that is not a + // pre-base reordering Ra, or arrive at the first consonant. The consonant + // stopped at will be the base. + let base = end; + let limit = start; + let hasReph = false; + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + if (indicConfig.rephPos !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === 'Implicit' && !$d203e6b9523d0071$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ)) { + // See if it matches the 'rphf' feature. + let g = [ + glyphs[start].copy(), + glyphs[start + 1].copy(), + glyphs[start + 2].copy() + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(g.slice(0, 2), 'rphf') || indicConfig.rephMode === 'Explicit' && $d203e6b9523d0071$var$wouldSubstitute(g, 'rphf')) { + limit += 2; + while(limit < end && $d203e6b9523d0071$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha) { + limit++; + while(limit < end && $d203e6b9523d0071$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + switch(indicConfig.basePos){ + case 'Last': + { + // starting from the end of the syllable, move backwards + let i = end; + let seenBelow = false; + do { + let info = glyphs[--i].shaperInfo; + // until a consonant is found + if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) { + // that does not have a below-base or post-base form + // (post-base forms have to follow below-base forms), + if (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C && (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C || seenBelow)) { + base = i; + break; + } + // or that is not a pre-base reordering Ra, + // + // IMPLEMENTATION NOTES: + // + // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped + // by the logic above already. + // + // or arrive at the first consonant. The consonant stopped at will + // be the base. + if (info.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C) seenBelow = true; + base = i; + } else if (start < i && info.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ && glyphs[i - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) break; + }while (i > limit); + break; + } + case 'First': + // The first consonant is always the base. + base = start; + // Mark all subsequent consonants as below. + for(let i = base + 1; i < end; i++)if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) glyphs[i].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C; + } + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + // + // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ) + if (hasReph && base === start && limit - base <= 2) hasReph = false; + // 2. Decompose and reorder Matras: + // + // Each matra and any syllable modifier sign in the cluster are moved to the + // appropriate position relative to the consonant(s) in the cluster. The + // shaping engine decomposes two- or three-part matras into their constituent + // parts before any repositioning. Matra characters are classified by which + // consonant in a conjunct they have affinity for and are reordered to the + // following positions: + // + // o Before first half form in the syllable + // o After subjoined consonants + // o After post-form consonant + // o After main consonant (for above marks) + // + // IMPLEMENTATION NOTES: + // + // The normalize() routine has already decomposed matras for us, so we don't + // need to worry about that. + // 3. Reorder marks to canonical order: + // + // Adjacent nukta and halant or nukta and vedic sign are always repositioned + // if necessary, so that the nukta is first. + // + // IMPLEMENTATION NOTES: + // + // We don't need to do this: the normalize() routine already did this for us. + // Reorder characters + for(let i = start; i < base; i++){ + let info = glyphs[i].shaperInfo; + info.position = Math.min((0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_C, info.position); + } + if (base < end) glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; + // Mark final consonants. A final consonant is one appearing after a matra, + // like in Khmer. + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + for(let j = i + 1; j < end; j++)if ($d203e6b9523d0071$var$isConsonant(glyphs[j])) { + glyphs[j].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Final_C; + break; + } + break; + } + // Handle beginning Ra + if (hasReph) glyphs[start].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; + // For old-style Indic script tags, move the first post-base Halant after + // last consonant. + // + // Reports suggest that in some scripts Uniscribe does this only if there + // is *not* a Halant after last consonant already (eg. Kannada), while it + // does it unconditionally in other scripts (eg. Malayalam). We don't + // currently know about other scripts, so we single out Malayalam for now. + // + // Kannada test case: + // U+0C9A,U+0CCD,U+0C9A,U+0CCD + // With some versions of Lohit Kannada. + // https://bugs.freedesktop.org/show_bug.cgi?id=59118 + // + // Malayalam test case: + // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + // With lohit-ttf-20121122/Lohit-Malayalam.ttf + if (plan.isOldSpec) { + let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam'; + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) { + let j; + for(j = end - 1; j > i; j--){ + if ($d203e6b9523d0071$var$isConsonant(glyphs[j]) || disallowDoubleHalants && glyphs[j].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) break; + } + if (glyphs[j].shaperInfo.category !== (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && j > i) { + // Move Halant to after last consonant. + let t = glyphs[i]; + glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i)); + glyphs[j] = t; + } + break; + } + } + // Attach misc marks to previous char to move with them. + let lastPos = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Start; + for(let i = start; i < end; i++){ + let info = glyphs[i].shaperInfo; + if (info.category & ((0, $79e3b6f2c331d0bf$export$bbcd928767338e0d) | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).N | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).RS | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).CM | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc) & info.category)) { + info.position = lastPos; + if (info.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && info.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + // Uniscribe doesn't move the Halant with Left Matra. + // TEST: U+092B,U+093F,U+094DE + // We follow. This is important for the Sinhala + // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + // where U+0DD9 is a left matra and U+0DCA is the virama. + // We don't want to move the virama with the left matra. + // TEST: U+0D9A,U+0DDA + for(let j = i; j > start; j--)if (glyphs[j - 1].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + info.position = glyphs[j - 1].shaperInfo.position; + break; + } + } + } else if (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD) lastPos = info.position; + } + // For post-base consonants let them own anything before them + // since the last consonant or matra. + let last = base; + for(let i = base + 1; i < end; i++){ + if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) { + for(let j = last + 1; j < i; j++)if (glyphs[j].shaperInfo.position < (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD) glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position; + last = i; + } else if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) last = i; + } + let arr = glyphs.slice(start, end); + arr.sort((a, b)=>a.shaperInfo.position - b.shaperInfo.position); + glyphs.splice(start, arr.length, ...arr); + // Find base again + for(let i = start; i < end; i++)if (glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) { + base = i; + break; + } + // Setup features now + // Reph + for(let i = start; i < end && glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; i++)glyphs[i].features.rphf = true; + // Pre-base + let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post'; + for(let i = start; i < base; i++){ + glyphs[i].features.half = true; + if (blwf) glyphs[i].features.blwf = true; + } + // Post-base + for(let i = base + 1; i < end; i++){ + glyphs[i].features.abvf = true; + glyphs[i].features.pstf = true; + glyphs[i].features.blwf = true; + } + if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') { + // Old-spec eye-lash Ra needs special handling. From the + // spec: + // + // "The feature 'below-base form' is applied to consonants + // having below-base forms and following the base consonant. + // The exception is vattu, which may appear below half forms + // as well as below the base glyph. The feature 'below-base + // form' will be applied to all such occurrences of Ra as well." + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+0915 + // with Sanskrit 2003 font. + // + // However, note that Ra,Halant,ZWJ is the correct way to + // request eyelash form of Ra, so we wouldbn't inhibit it + // in that sequence. + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915 + for(let i = start; i + 1 < base; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Ra && glyphs[i + 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && (i + 1 === base || glyphs[i + 2].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ)) { + glyphs[i].features.blwf = true; + glyphs[i + 1].features.blwf = true; + } + } + let prefLen = 2; + if (features.pref && base + prefLen < end) // Find a Halant,Ra sequence and mark it for pre-base reordering processing. + for(let i = base + 1; i + prefLen - 1 < end; i++){ + let g = [ + glyphs[i].copy(), + glyphs[i + 1].copy() + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(g, 'pref')) { + for(let j = 0; j < prefLen; j++)glyphs[i++].features.pref = true; + // Mark the subsequent stuff with 'cfar'. Used in Khmer. + // Read the feature spec. + // This allows distinguishing the following cases with MS Khmer fonts: + // U+1784,U+17D2,U+179A,U+17D2,U+1782 + // U+1784,U+17D2,U+1782,U+17D2,U+179A + if (features.cfar) for(; i < end; i++)glyphs[i].features.cfar = true; + break; + } + } + // Apply ZWJ/ZWNJ effects + for(let i = start + 1; i < end; i++)if ($d203e6b9523d0071$var$isJoiner(glyphs[i])) { + let nonJoiner = glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWNJ; + let j = i; + do { + j--; + // ZWJ/ZWNJ should disable CJCT. They do that by simply + // being there, since we don't skip them for the CJCT + // feature (ie. F_MANUAL_ZWJ) + // A ZWNJ disables HALF. + if (nonJoiner) delete glyphs[j].features.half; + }while (j > start && !$d203e6b9523d0071$var$isConsonant(glyphs[j])); + } + } +} +function $d203e6b9523d0071$var$finalReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + for(let start = 0, end = $d203e6b9523d0071$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $d203e6b9523d0071$var$nextSyllable(glyphs, start)){ + // 4. Final reordering: + // + // After the localized forms and basic shaping forms GSUB features have been + // applied (see below), the shaping engine performs some final glyph + // reordering before applying all the remaining font features to the entire + // cluster. + let tryPref = !!features.pref; + // Find base again + let base = start; + for(; base < end; base++)if (glyphs[base].shaperInfo.position >= (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) { + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) { + // Ok, this was a 'pref' candidate but didn't form any. + // Base is around here... + base = i; + while(base < end && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[base]))base++; + glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).BASE_C; + tryPref = false; + } + break; + } + } + // For Malayalam, skip over unformed below- (but NOT post-) forms. + if (plan.unicodeScript === 'Malayalam') for(let i = base + 1; i < end; i++){ + while(i < end && $d203e6b9523d0071$var$isJoiner(glyphs[i]))i++; + if (i === end || !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[i])) break; + i++; // Skip halant. + while(i < end && $d203e6b9523d0071$var$isJoiner(glyphs[i]))i++; + if (i < end && $d203e6b9523d0071$var$isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C) { + base = i; + glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; + } + } + if (start < base && glyphs[base].shaperInfo.position > (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) base--; + break; + } + if (base === end && start < base && glyphs[base - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ) base--; + if (base < end) while(start < base && glyphs[base].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).N | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc)))base--; + // o Reorder matras: + // + // If a pre-base matra character had been reordered before applying basic + // features, the glyph can be moved closer to the main consonant based on + // whether half-forms had been formed. Actual position for the matra is + // defined as “after last standalone halant glyph, after initial matra + // position and before the main consonant”. If ZWJ or ZWNJ follow this + // halant, position is moved after it. + // + if (start + 1 < end && start < base) { + // If we lost track of base, alas, position before last thingy. + let newPos = base === end ? base - 2 : base - 1; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc))))newPos--; + // If we found no Halant we are done. + // Otherwise only proceed if the Halant does + // not belong to the Matra itself! + if ($d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) // If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos + 1 < end && $d203e6b9523d0071$var$isJoiner(glyphs[newPos + 1])) newPos++; + } else newPos = start; // No move. + } + if (start < newPos && glyphs[newPos].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + // Now go see if there's actually any matras... + for(let i = newPos; i > start; i--)if (glyphs[i - 1].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + let oldPos = i - 1; + if (oldPos < base && base <= newPos) base--; + let tmp = glyphs[oldPos]; + glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos)); + glyphs[newPos] = tmp; + newPos--; + } + } + } + // o Reorder reph: + // + // Reph’s original position is always at the beginning of the syllable, + // (i.e. it is not reordered at the character reordering stage). However, + // it will be reordered according to the basic-forms shaping results. + // Possible positions for reph, depending on the script, are; after main, + // before post-base consonant forms, and after post-base consonant forms. + // Two cases: + // + // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then + // we should only move it if the sequence ligated to the repha form. + // + // - If repha is encoded separately and in the logical position, we should only + // move it if it did NOT ligate. If it ligated, it's probably the font trying + // to make it work without the reordering. + if (start + 1 < end && glyphs[start].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && glyphs[start].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)) { + let newRephPos; + let rephPos = indicConfig.rephPos; + let found = false; + // 1. If reph should be positioned after post-base consonant forms, + // proceed to step 5. + if (rephPos !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Post) { + // 2. If the reph repositioning class is not after post-base: target + // position is after the first explicit halant glyph between the + // first post-reph consonant and last main consonant. If ZWJ or ZWNJ + // are following this halant, position is moved after it. If such + // position is found, this is the target position. Otherwise, + // proceed to the next step. + // + // Note: in old-implementation fonts, where classifications were + // fixed in shaping engine, there was no case where reph position + // will be found on this step. + newRephPos = start + 1; + while(newRephPos < base && !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $d203e6b9523d0071$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + // 3. If reph should be repositioned after the main consonant: find the + // first consonant not ligated with main, or find the first + // consonant that is not a potential pre-base reordering Ra. + if (!found && rephPos === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Main) { + newRephPos = base; + while(newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Main)newRephPos++; + found = newRephPos < end; + } + // 4. If reph should be positioned before post-base consonant, find + // first post-base classified consonant not ligated with main. If no + // consonant is found, the target position should be before the + // first matra, syllable modifier sign or vedic sign. + // + // This is our take on what step 4 is trying to say (and failing, BADLY). + if (!found && rephPos === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Sub) { + newRephPos = base; + while(newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & ((0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C | (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Post | (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD)))newRephPos++; + found = newRephPos < end; + } + } + // 5. If no consonant is found in steps 3 or 4, move reph to a position + // immediately before the first post-base matra, syllable modifier + // sign or vedic sign that has a reordering class after the intended + // reph position. For example, if the reordering position for reph + // is post-main, it will skip above-base matras that also have a + // post-main position. + if (!found) { + // Copied from step 2. + newRephPos = start + 1; + while(newRephPos < base && !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $d203e6b9523d0071$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + } + // 6. Otherwise, reorder reph to the end of the syllable. + if (!found) { + newRephPos = end - 1; + while(newRephPos > start && glyphs[newRephPos].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD)newRephPos--; + // If the Reph is to be ending up after a Matra,Halant sequence, + // position it before that Halant so it can interact with the Matra. + // However, if it's a plain Consonant,Halant we shouldn't do that. + // Uniscribe doesn't do this. + // TEST: U+0930,U+094D,U+0915,U+094B,U+094D + if ($d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + for(let i = base + 1; i < newRephPos; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) newRephPos--; + } + } + let reph = glyphs[start]; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start)); + glyphs[newRephPos] = reph; + if (start < base && base <= newRephPos) base--; + } + // o Reorder pre-base reordering consonants: + // + // If a pre-base reordering consonant is found, reorder it according to + // the following rules: + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + // 1. Only reorder a glyph produced by substitution during application + // of the feature. (Note that a font may shape a Ra consonant with + // the feature generally but block it in certain contexts.) + // Note: We just check that something got substituted. We don't check that + // the feature actually did it... + // + // Reorder pref only if it ligated. + if (glyphs[i].isLigated && !glyphs[i].isMultiplied) { + // 2. Try to find a target position the same way as for pre-base matra. + // If it is found, reorder pre-base consonant glyph. + // + // 3. If position is not found, reorder immediately before main + // consonant. + let newPos = base; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos - 1].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc))))newPos--; + // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a + // split matra, it should be reordered to *before* the left part of such matra. + if (newPos > start && glyphs[newPos - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + let oldPos = i; + for(let j = base + 1; j < oldPos; j++)if (glyphs[j].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + newPos--; + break; + } + } + } + if (newPos > start && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newPos - 1])) // -> If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos < end && $d203e6b9523d0071$var$isJoiner(glyphs[newPos])) newPos++; + } + let oldPos = i; + let tmp = glyphs[oldPos]; + glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos)); + glyphs[newPos] = tmp; + if (newPos <= base && base < oldPos) base++; + } + break; + } + } + // Apply 'init' to the Left Matra if it's a word start. + if (glyphs[start].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M && (!start || !/Cf|Mn/.test((0, $gfJaN$unicodeproperties.getCategory)(glyphs[start - 1].codePoints[0])))) glyphs[start].features.init = true; + } +} +function $d203e6b9523d0071$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + + + + + + + + + +const { categories: $9b772791ccede8a5$var$categories, decompositions: $9b772791ccede8a5$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports))); +const $9b772791ccede8a5$var$trie = new (0, ($parcel$interopDefault($gfJaN$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("AAACAAAAAAAQugAAAQUO+vHtnHuMX0UVx2d3u/t7bXe7FlqgvB+mpQhFmhikMRAg0ZQmakMU+cPWBzZisEGNjUpoiIYCEgmGUGOEGqOVNPUZUGNA+QNIBU2KREEFFSMBUYRISMXE+B3vnPzOzp553tcWfif5ZO5jnufMzJ2ZO/eumlDqFLAWnAMuBBvBZnC5uXZeBe4WsA1sBzs8/naCXcL1G8GtYDfYA74NvgfuAfcZHmT+fwEeBb8DTwvxPQWeAavACyZvq8z9VYxXwCGglijVBcvACnA8eCM4E6wHG8BF4BLwbvA+8AHwUbAd7AA7wS5wC9gN7gR7wX5wN7gXPAAeBr8Gvwd/Ac+CF8EhoCaV6oBZsBKcAE4FZ0wWeV8P9zxwoTnfCHczuBxsAdvAx8Gnzf1r4X4B3AxuA1+bHJb9m5PzdVGW/Yjv+xXHyfmxFfd9OH8Q/Ar8Bjw1WZT3GfACeAX8N5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8D")); +const $9b772791ccede8a5$var$stateMachine = new (0, ($parcel$interopDefault($gfJaN$dfa)))((0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports)))); +class $9b772791ccede8a5$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($9b772791ccede8a5$var$setupSyllables); + // Default glyph pre-processing group + plan.addStage([ + 'locl', + 'ccmp', + 'nukt', + 'akhn' + ]); + // Reordering group + plan.addStage($9b772791ccede8a5$var$clearSubstitutionFlags); + plan.addStage([ + 'rphf' + ], false); + plan.addStage($9b772791ccede8a5$var$recordRphf); + plan.addStage($9b772791ccede8a5$var$clearSubstitutionFlags); + plan.addStage([ + 'pref' + ]); + plan.addStage($9b772791ccede8a5$var$recordPref); + // Orthographic unit shaping group + plan.addStage([ + 'rkrf', + 'abvf', + 'blwf', + 'half', + 'pstf', + 'vatu', + 'cjct' + ]); + plan.addStage($9b772791ccede8a5$var$reorder); + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + // Standard topographic presentation and positional feature application + plan.addStage([ + 'abvs', + 'blws', + 'pres', + 'psts', + 'dist', + 'abvm', + 'blwm' + ]); + } + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + if ($9b772791ccede8a5$var$decompositions[codepoint]) { + let decomposed = $9b772791ccede8a5$var$decompositions[codepoint].map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $gfJaN$swchelperscjs_define_propertycjs._)($9b772791ccede8a5$export$2e2bcd8739ae039, "zeroMarkWidths", 'BEFORE_GPOS'); +function $9b772791ccede8a5$var$useCategory(glyph) { + return $9b772791ccede8a5$var$trie.get(glyph.codePoints[0]); +} +class $9b772791ccede8a5$var$USEInfo { + constructor(category, syllableType, syllable){ + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $9b772791ccede8a5$var$setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of $9b772791ccede8a5$var$stateMachine.match(glyphs.map($9b772791ccede8a5$var$useCategory))){ + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $9b772791ccede8a5$var$USEInfo($9b772791ccede8a5$var$categories[$9b772791ccede8a5$var$useCategory(glyphs[i])], tags[0], syllable); + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for(let i = start; i < start + limit; i++)glyphs[i].features.rphf = true; + } +} +function $9b772791ccede8a5$var$clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs)glyph.substituted = false; +} +function $9b772791ccede8a5$var$recordRphf(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted && glyph.features.rphf) // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; +} +function $9b772791ccede8a5$var$recordPref(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted) // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; +} +function $9b772791ccede8a5$var$reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + for(let start = 0, end = $9b772791ccede8a5$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $9b772791ccede8a5$var$nextSyllable(glyphs, start)){ + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') continue; + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = info; + // Insert after possible Repha. + for(i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + // Move things forward. + if (info.category === 'R' && end - start > 1) // Got a repha. Reorder it to after first base, before first halant. + for(i = start + 1; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($9b772791ccede8a5$var$isBase(info) || $9b772791ccede8a5$var$isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if ($9b772791ccede8a5$var$isHalant(glyphs[i])) i--; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + // Move things back. + for(i = start, j = end; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($9b772791ccede8a5$var$isBase(info) || $9b772791ccede8a5$var$isHalant(glyphs[i])) // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = $9b772791ccede8a5$var$isHalant(glyphs[i]) ? i + 1 : i; + else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } +} +function $9b772791ccede8a5$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} +function $9b772791ccede8a5$var$isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} +function $9b772791ccede8a5$var$isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} + + +const $fdb4471fc82bc2c2$var$SHAPERS = { + arab: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mong: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + syrc: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + 'nko ': (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + phag: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mand: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mani: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + phlp: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + hang: (0, $fa1d9fd80dd7279e$export$2e2bcd8739ae039), + bng2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + beng: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + dev2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + deva: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gjr2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gujr: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + guru: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gur2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + knda: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + knd2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + mlm2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + mlym: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + ory2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + orya: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + taml: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + tml2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + telu: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + tel2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + khmr: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + bali: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + batk: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + brah: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + bugi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + buhd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + cakm: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + cham: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + dupl: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + egyp: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + gran: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + hano: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + java: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + kthi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + kali: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + khar: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + khoj: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sind: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + lepc: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + limb: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + mahj: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + modi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + saur: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + shrd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sidd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sinh: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + sund: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sylo: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tglg: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tagb: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tale: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + lana: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tavt: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + takr: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tibt: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tfng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tirh: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + latn: (0, $d28fb665ee343afc$export$2e2bcd8739ae039), + DFLT: (0, $d28fb665ee343afc$export$2e2bcd8739ae039 // Default + ) +}; +function $fdb4471fc82bc2c2$export$7877a478dd30fd3d(script) { + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script){ + let shaper = $fdb4471fc82bc2c2$var$SHAPERS[s]; + if (shaper) return shaper; + } + return 0, $d28fb665ee343afc$export$2e2bcd8739ae039; +} + + + + + +class $86bc1883359e094a$export$2e2bcd8739ae039 extends (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039) { + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let glyph = this.glyphIterator.cur; + switch(table.version){ + case 1: + glyph.id = glyph.id + table.deltaGlyphID & 0xffff; + break; + case 2: + glyph.id = table.substitute.get(index); + break; + } + return true; + } + case 2: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + if (sequence.length === 0) { + // If the sequence length is zero, delete the glyph. + // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it. + this.glyphs.splice(this.glyphIterator.index, 1); + return true; + } + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i)=>{ + let glyph = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + glyph.isMultiplied = true; + return glyph; + }); + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + return false; + } + case 3: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + return false; + } + case 4: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + for (let ligature of table.ligatureSets.get(index)){ + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) continue; + let curGlyph = this.glyphIterator.cur; + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched)characters.push(...this.glyphs[index].codePoints); + // Create the replacement ligature glyph + let ligatureGlyph = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for(let i = 0; i < matched.length && isMarkLigature; i++)isMarkLigature = this.glyphs[matched[i]].isMark; + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched){ + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) idx = matchIndex; + else while(idx < matchIndex){ + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) for(let i = idx; i < this.glyphs.length; i++){ + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else break; + } + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for(let i = matched.length - 1; i >= 0; i--)this.glyphs.splice(matched[i], 1); + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + return false; + } + case 5: + return this.applyContext(table); + case 6: + return this.applyChainingContext(table); + case 7: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} + + + +class $79ea6270f0a90256$export$2e2bcd8739ae039 extends (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039) { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) position.xAdvance += value.xAdvance; + if (value.yAdvance != null) position.yAdvance += value.yAdvance; + if (value.xPlacement != null) position.xOffset += value.xPlacement; + if (value.yPlacement != null) position.yOffset += value.yPlacement; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (value.xPlaDevice) position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b); + if (value.yPlaDevice) position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b); + if (value.xAdvDevice) position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b); + if (value.yAdvDevice) position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b); + } + // TODO: device tables + } + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + this.applyPositionValue(0, table.value); + break; + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + return true; + } + case 2: + { + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) return false; + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + let set = table.pairSets.get(index); + for (let pair of set)if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + return false; + case 2: + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) return false; + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + case 3: + { + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) return false; + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) return false; + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) return false; + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + let d; + switch(this.direction){ + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + return true; + } + case 4: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)); + if (baseGlyphIndex < 0) return false; + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) return false; + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 5: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + if (baseGlyphIndex < 0) return false; + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) return false; + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent > 0 ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1; + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 6: + { + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) return false; + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) return false; + let cur = this.glyphIterator.cur; + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) good = true; + else if (cur.ligatureComponent === prev.ligatureComponent) good = true; + } else // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if (cur.ligatureID && !cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) good = true; + if (!good) return false; + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) return false; + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + case 7: + return this.applyContext(table); + case 8: + return this.applyChainingContext(table); + case 9: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + getAnchor(anchor) { + // TODO: contour point, device tables + let x = anchor.xCoordinate; + let y = anchor.yCoordinate; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (anchor.xDeviceTable) x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b); + if (anchor.yDeviceTable) y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b); + } + return { + x: x, + y: y + }; + } + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + for(var i = 0; i < this.glyphs.length; i++)this.fixCursiveAttachment(i); + this.fixMarkAttachment(); + } + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + fixMarkAttachment() { + for(let i = 0; i < this.glyphs.length; i++){ + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + if (this.direction === 'ltr') for(let k = j; k < i; k++){ + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + else for(let k = j + 1; k < i + 1; k++){ + this.positions[i].xOffset += this.positions[k].xAdvance; + this.positions[i].yOffset += this.positions[k].yAdvance; + } + } + } + } +} + + +class $b2f26a32cb9ab2fa$export$2e2bcd8739ae039 { + setup(glyphRun) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphRun.glyphs.map((glyph)=>new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, glyph.id, [ + ...glyph.codePoints + ])); + // Select a script based on what is available in GSUB/GPOS. + let script = null; + if (this.GPOSProcessor) script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + if (this.GSUBProcessor) script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = $fdb4471fc82bc2c2$export$7877a478dd30fd3d(script); + this.plan = new (0, $d7e93cca3cf8ce8a$export$2e2bcd8739ae039)(this.font, script, glyphRun.direction); + this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); + // Assign chosen features to output glyph run + for(let key in this.plan.allFeatures)glyphRun.features[key] = true; + } + substitute(glyphRun) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + // Map glyph infos back to normal Glyph objects + glyphRun.glyphs = this.glyphInfos.map((glyphInfo)=>this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + } + position(glyphRun) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') this.zeroMarkAdvances(glyphRun.positions); + if (this.GPOSProcessor) this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions); + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') this.zeroMarkAdvances(glyphRun.positions); + // Reverse the glyphs and positions if the script is right-to-left + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + glyphRun.positions.reverse(); + } + return this.GPOSProcessor && this.GPOSProcessor.features; + } + zeroMarkAdvances(positions) { + for(let i = 0; i < this.glyphInfos.length; i++)if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + getAvailableFeatures(script, language) { + let features = []; + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + return features; + } + constructor(font){ + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + this.fallbackPosition = true; + if (font.GSUB) this.GSUBProcessor = new (0, $86bc1883359e094a$export$2e2bcd8739ae039)(font, font.GSUB); + if (font.GPOS) this.GPOSProcessor = new (0, $79ea6270f0a90256$export$2e2bcd8739ae039)(font, font.GPOS); + } +} + + +class $9d641258c9d7180d$export$2e2bcd8739ae039 { + layout(string, features, script, language, direction) { + // Make the features parameter optional + if (typeof features === 'string') { + direction = language; + language = script; + script = features; + features = []; + } + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) script = $e38a1a895f6aeb54$export$e5cb25e204fb8450(string); + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string)codePoints.push(...glyph.codePoints); + script = $e38a1a895f6aeb54$export$16fab0757cfc223d(codePoints); + } + var glyphs = string; + } + let glyphRun = new (0, $b19c79ec7a94fa39$export$2e2bcd8739ae039)(glyphs, features, script, language, direction); + // Return early if there are no glyphs + if (glyphs.length === 0) { + glyphRun.positions = []; + return glyphRun; + } + // Setup the advanced layout engine + if (this.engine && this.engine.setup) this.engine.setup(glyphRun); + // Substitute and position the glyphs + this.substitute(glyphRun); + this.position(glyphRun); + this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) this.engine.cleanup(); + return glyphRun; + } + substitute(glyphRun) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) this.engine.substitute(glyphRun); + } + position(glyphRun) { + // Get initial glyph positions + glyphRun.positions = glyphRun.glyphs.map((glyph)=>new (0, $9195cf1266c12ea5$export$2e2bcd8739ae039)(glyph.advanceWidth)); + let positioned = null; + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) positioned = this.engine.position(glyphRun); + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned && (!this.engine || this.engine.fallbackPosition)) { + if (!this.unicodeLayoutEngine) this.unicodeLayoutEngine = new (0, $a57a26817cd35108$export$2e2bcd8739ae039)(this.font); + this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions); + } + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) { + if (!this.kernProcessor) this.kernProcessor = new (0, $4646d52c2a559cdb$export$2e2bcd8739ae039)(this.font); + this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions); + glyphRun.features.kern = true; + } + } + hideDefaultIgnorables(glyphs, positions) { + let space = this.font.glyphForCodePoint(0x20); + for(let i = 0; i < glyphs.length; i++)if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) { + glyphs[i] = space; + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + isDefaultIgnorable(ch) { + // From DerivedCoreProperties.txt in the Unicode database, + // minus U+115F, U+1160, U+3164 and U+FFA0, which is what + // Harfbuzz and Uniscribe do. + let plane = ch >> 16; + if (plane === 0) // BMP + switch(ch >> 8){ + case 0x00: + return ch === 0x00AD; + case 0x03: + return ch === 0x034F; + case 0x06: + return ch === 0x061C; + case 0x17: + return 0x17B4 <= ch && ch <= 0x17B5; + case 0x18: + return 0x180B <= ch && ch <= 0x180E; + case 0x20: + return 0x200B <= ch && ch <= 0x200F || 0x202A <= ch && ch <= 0x202E || 0x2060 <= ch && ch <= 0x206F; + case 0xFE: + return 0xFE00 <= ch && ch <= 0xFE0F || ch === 0xFEFF; + case 0xFF: + return 0xFFF0 <= ch && ch <= 0xFFF8; + default: + return false; + } + else // Other planes + switch(plane){ + case 0x01: + return 0x1BCA0 <= ch && ch <= 0x1BCA3 || 0x1D173 <= ch && ch <= 0x1D17A; + case 0x0E: + return 0xE0000 <= ch && ch <= 0xE0FFF; + default: + return false; + } + } + getAvailableFeatures(script, language) { + let features = []; + if (this.engine) features.push(...this.engine.getAvailableFeatures(script, language)); + if (this.font.kern && features.indexOf('kern') === -1) features.push('kern'); + return features; + } + stringsForGlyph(gid) { + let result = new Set; + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints)result.add(String.fromCodePoint(codePoint)); + if (this.engine && this.engine.stringsForGlyph) for (let string of this.engine.stringsForGlyph(gid))result.add(string); + return Array.from(result); + } + constructor(font){ + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) this.engine = new (0, $860fcbd64bc12fbc$export$2e2bcd8739ae039)(this.font); + else if (this.font.GSUB || this.font.GPOS) this.engine = new (0, $b2f26a32cb9ab2fa$export$2e2bcd8739ae039)(this.font); + } +} + + + + + + +const $67ee4828d81adb28$var$SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; +class $67ee4828d81adb28$export$2e2bcd8739ae039 { + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ toFunction() { + return (ctx)=>{ + this.commands.forEach((c)=>{ + return ctx[c.command].apply(ctx, c.args); + }); + }; + } + /** + * Converts the path to an SVG path data string + * @return {string} + */ toSVG() { + let cmds = this.commands.map((c)=>{ + let args = c.args.map((arg)=>Math.round(arg * 100) / 100); + return `${$67ee4828d81adb28$var$SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + return cmds.join(''); + } + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ get cbox() { + if (!this._cbox) { + let cbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + for (let command of this.commands)for(let i = 0; i < command.args.length; i += 2)cbox.addPoint(command.args[i], command.args[i + 1]); + this._cbox = Object.freeze(cbox); + } + return this._cbox; + } + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ get bbox() { + if (this._bbox) return this._bbox; + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + let cx = 0, cy = 0; + let f = (t)=>Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; + for (let c of this.commands)switch(c.command){ + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + var p0 = [ + cx, + cy + ]; + var p1 = [ + cp1x, + cp1y + ]; + var p2 = [ + cp2x, + cp2y + ]; + var p3 = [ + p3x, + p3y + ]; + for(var i = 0; i <= 1; i++){ + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + if (a === 0) { + if (b === 0) continue; + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) bbox.addPoint(f(t), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t)); + } + continue; + } + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) continue; + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) bbox.addPoint(f(t1), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t1)); + } + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) bbox.addPoint(f(t2), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t2)); + } + } + cx = p3x; + cy = p3y; + break; + } + return this._bbox = Object.freeze(bbox); + } + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ mapPoints(fn) { + let path = new $67ee4828d81adb28$export$2e2bcd8739ae039; + for (let c of this.commands){ + let args = []; + for(let i = 0; i < c.args.length; i += 2){ + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + path[c.command](...args); + } + return path; + } + /** + * Transforms the path by the given matrix. + */ transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y)=>{ + const tx = m0 * x + m2 * y + m4; + const ty = m1 * x + m3 * y + m5; + return [ + tx, + ty + ]; + }); + } + /** + * Translates the path by the given offset. + */ translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + /** + * Rotates the path by the given angle (in radians). + */ rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + /** + * Scales the path. + */ scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } + constructor(){ + this.commands = []; + this._bbox = null; + this._cbox = null; + } +} +for (let command of [ + 'moveTo', + 'lineTo', + 'quadraticCurveTo', + 'bezierCurveTo', + 'closePath' +])$67ee4828d81adb28$export$2e2bcd8739ae039.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command: command, + args: args + }); + return this; +}; + + + +var $85e16e40023cfb0f$export$2e2bcd8739ae039 = [ + '.notdef', + '.null', + 'nonmarkingreturn', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quotesingle', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'grave', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'Adieresis', + 'Aring', + 'Ccedilla', + 'Eacute', + 'Ntilde', + 'Odieresis', + 'Udieresis', + 'aacute', + 'agrave', + 'acircumflex', + 'adieresis', + 'atilde', + 'aring', + 'ccedilla', + 'eacute', + 'egrave', + 'ecircumflex', + 'edieresis', + 'iacute', + 'igrave', + 'icircumflex', + 'idieresis', + 'ntilde', + 'oacute', + 'ograve', + 'ocircumflex', + 'odieresis', + 'otilde', + 'uacute', + 'ugrave', + 'ucircumflex', + 'udieresis', + 'dagger', + 'degree', + 'cent', + 'sterling', + 'section', + 'bullet', + 'paragraph', + 'germandbls', + 'registered', + 'copyright', + 'trademark', + 'acute', + 'dieresis', + 'notequal', + 'AE', + 'Oslash', + 'infinity', + 'plusminus', + 'lessequal', + 'greaterequal', + 'yen', + 'mu', + 'partialdiff', + 'summation', + 'product', + 'pi', + 'integral', + 'ordfeminine', + 'ordmasculine', + 'Omega', + 'ae', + 'oslash', + 'questiondown', + 'exclamdown', + 'logicalnot', + 'radical', + 'florin', + 'approxequal', + 'Delta', + 'guillemotleft', + 'guillemotright', + 'ellipsis', + 'nonbreakingspace', + 'Agrave', + 'Atilde', + 'Otilde', + 'OE', + 'oe', + 'endash', + 'emdash', + 'quotedblleft', + 'quotedblright', + 'quoteleft', + 'quoteright', + 'divide', + 'lozenge', + 'ydieresis', + 'Ydieresis', + 'fraction', + 'currency', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'daggerdbl', + 'periodcentered', + 'quotesinglbase', + 'quotedblbase', + 'perthousand', + 'Acircumflex', + 'Ecircumflex', + 'Aacute', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Oacute', + 'Ocircumflex', + 'apple', + 'Ograve', + 'Uacute', + 'Ucircumflex', + 'Ugrave', + 'dotlessi', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'Lslash', + 'lslash', + 'Scaron', + 'scaron', + 'Zcaron', + 'zcaron', + 'brokenbar', + 'Eth', + 'eth', + 'Yacute', + 'yacute', + 'Thorn', + 'thorn', + 'minus', + 'multiply', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'onehalf', + 'onequarter', + 'threequarters', + 'franc', + 'Gbreve', + 'gbreve', + 'Idotaccent', + 'Scedilla', + 'scedilla', + 'Cacute', + 'cacute', + 'Ccaron', + 'ccaron', + 'dcroat' +]; + + +class $0e4f52d7996e478b$export$2e2bcd8739ae039 { + _getPath() { + return new (0, $67ee4828d81adb28$export$2e2bcd8739ae039)(); + } + _getCBox() { + return this.path.cbox; + } + _getBBox() { + return this.path.bbox; + } + _getTableMetrics(table) { + if (this.id < table.metrics.length) return table.metrics.get(this.id); + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + return res; + } + _getMetrics(cbox) { + if (this._metrics) return this._metrics; + let { advance: advanceWidth, bearing: leftBearing } = this._getTableMetrics(this._font.hmtx); + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) var { advance: advanceHeight, bearing: topBearing } = this._getTableMetrics(this._font.vmtx); + else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) ({ cbox: cbox } = this); + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + } else { + let { hhea: hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + if (this._font._variationProcessor && this._font.HVAR) advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + return this._metrics = { + advanceWidth: advanceWidth, + advanceHeight: advanceHeight, + leftBearing: leftBearing, + topBearing: topBearing + }; + } + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ get cbox() { + return this._getCBox(); + } + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ get bbox() { + return this._getBBox(); + } + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + /** + * The glyph's advance width. + * @type {number} + */ get advanceWidth() { + return this._getMetrics().advanceWidth; + } + /** + * The glyph's advance height. + * @type {number} + */ get advanceHeight() { + return this._getMetrics().advanceHeight; + } + get ligatureCaretPositions() {} + _getName() { + let { post: post } = this._font; + if (!post) return null; + switch(post.version){ + case 1: + return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[this.id]; + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < (0, $85e16e40023cfb0f$export$2e2bcd8739ae039).length) return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[id]; + return post.names[id - (0, $85e16e40023cfb0f$export$2e2bcd8739ae039).length]; + case 2.5: + return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[this.id + post.offsets[this.id]]; + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + /** + * The glyph's name + * @type {string} + */ get name() { + return this._getName(); + } + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ render(ctx, size) { + ctx.save(); + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + ctx.restore(); + } + constructor(id, codePoints, font){ + /** + * The glyph id in the font + * @type {number} + */ this.id = id; + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ this.codePoints = codePoints; + this._font = font; + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $gfJaN$unicodeproperties.isMark)); + this.isLigature = this.codePoints.length > 1; + } +} +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "cbox", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "path", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "advanceWidth", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "advanceHeight", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "name", null); + + + + + +// The header for both simple and composite glyphs +let $f680320fa07ef53d$var$GlyfHeader = new $gfJaN$restructure.Struct({ + numberOfContours: $gfJaN$restructure.int16, + xMin: $gfJaN$restructure.int16, + yMin: $gfJaN$restructure.int16, + xMax: $gfJaN$restructure.int16, + yMax: $gfJaN$restructure.int16 +}); +// Flags for simple glyphs +const $f680320fa07ef53d$var$ON_CURVE = 1; +const $f680320fa07ef53d$var$X_SHORT_VECTOR = 2; +const $f680320fa07ef53d$var$Y_SHORT_VECTOR = 4; +const $f680320fa07ef53d$var$REPEAT = 8; +const $f680320fa07ef53d$var$SAME_X = 16; +const $f680320fa07ef53d$var$SAME_Y = 32; +// Flags for composite glyphs +const $f680320fa07ef53d$var$ARG_1_AND_2_ARE_WORDS = 1; +const $f680320fa07ef53d$var$ARGS_ARE_XY_VALUES = 2; +const $f680320fa07ef53d$var$ROUND_XY_TO_GRID = 4; +const $f680320fa07ef53d$var$WE_HAVE_A_SCALE = 8; +const $f680320fa07ef53d$var$MORE_COMPONENTS = 32; +const $f680320fa07ef53d$var$WE_HAVE_AN_X_AND_Y_SCALE = 64; +const $f680320fa07ef53d$var$WE_HAVE_A_TWO_BY_TWO = 128; +const $f680320fa07ef53d$var$WE_HAVE_INSTRUCTIONS = 256; +const $f680320fa07ef53d$var$USE_MY_METRICS = 512; +const $f680320fa07ef53d$var$OVERLAP_COMPOUND = 1024; +const $f680320fa07ef53d$var$SCALED_COMPONENT_OFFSET = 2048; +const $f680320fa07ef53d$var$UNSCALED_COMPONENT_OFFSET = 4096; +class $f680320fa07ef53d$export$baf26146a414f24a { + copy() { + return new $f680320fa07ef53d$export$baf26146a414f24a(this.onCurve, this.endContour, this.x, this.y); + } + constructor(onCurve, endContour, x = 0, y = 0){ + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } +} +// Represents a component in a composite glyph +class $f680320fa07ef53d$var$Component { + constructor(glyphID, dx, dy){ + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} +class $f680320fa07ef53d$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) return this.path.cbox; + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = $f680320fa07ef53d$var$GlyfHeader.decode(stream); + let cbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039)(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) val = -val; + val += prev; + } else if (same) var val = prev; + else var val = prev + stream.readInt16BE(); + return val; + } + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) return null; + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + let glyph = $f680320fa07ef53d$var$GlyfHeader.decode(stream); + if (glyph.numberOfContours > 0) this._decodeSimple(glyph, stream); + else if (glyph.numberOfContours < 0) this._decodeComposite(glyph, stream, startPos); + return glyph; + } + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + let endPtsOfContours = new $gfJaN$restructure.Array($gfJaN$restructure.uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new $gfJaN$restructure.Array($gfJaN$restructure.uint8, $gfJaN$restructure.uint16).decode(stream); + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + while(flags.length < numCoords){ + var flag = stream.readUInt8(); + flags.push(flag); + // check for repeat flag + if (flag & $f680320fa07ef53d$var$REPEAT) { + let count = stream.readUInt8(); + for(let j = 0; j < count; j++)flags.push(flag); + } + } + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + let point = new $f680320fa07ef53d$export$baf26146a414f24a(!!(flag & $f680320fa07ef53d$var$ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + let px = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & $f680320fa07ef53d$var$X_SHORT_VECTOR, flag & $f680320fa07ef53d$var$SAME_X); + } + let py = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & $f680320fa07ef53d$var$Y_SHORT_VECTOR, flag & $f680320fa07ef53d$var$SAME_Y); + } + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + return; + } + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = $f680320fa07ef53d$var$MORE_COMPONENTS; + while(flags & $f680320fa07ef53d$var$MORE_COMPONENTS){ + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) haveInstructions = (flags & $f680320fa07ef53d$var$WE_HAVE_INSTRUCTIONS) !== 0; + if (flags & $f680320fa07ef53d$var$ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + var component = new $f680320fa07ef53d$var$Component(glyphID, dx, dy); + component.pos = gPos; + if (flags & $f680320fa07ef53d$var$WE_HAVE_A_SCALE) // fixed number with 14 bits of fraction + component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + else if (flags & $f680320fa07ef53d$var$WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & $f680320fa07ef53d$var$WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } + glyph.components.push(component); + } + if (this._font._variationProcessor) { + let points = []; + for(let j = 0; j < glyph.components.length; j++){ + var component = glyph.components[j]; + points.push(new $f680320fa07ef53d$export$baf26146a414f24a(true, true, component.dx, component.dy)); + } + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + for(let i = 0; i < points.length; i++){ + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + return haveInstructions; + } + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) this._metrics = (0, $0e4f52d7996e478b$export$2e2bcd8739ae039).prototype._getMetrics.call(this, cbox); + let { advanceWidth: advanceWidth, advanceHeight: advanceHeight, leftBearing: leftBearing, topBearing: topBearing } = this._metrics; + return [ + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing, 0), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) return []; + let points = []; + if (glyph.numberOfContours < 0) // resolve composite glyphs + for (let component of glyph.components){ + let contours = this._font.getGlyph(component.glyphID)._getContours(); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + for(let j = 0; j < contour.length; j++){ + let point = contour[j]; + let x = point.x * component.scaleX + point.y * component.scale01 + component.dx; + let y = point.y * component.scaleY + point.x * component.scale10 + component.dy; + points.push(new $f680320fa07ef53d$export$baf26146a414f24a(point.onCurve, point.endContour, x, y)); + } + } + } + else points = glyph.points || []; + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + let contours = []; + let cur = []; + for(let k = 0; k < points.length; k++){ + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + return contours; + } + _getMetrics() { + if (this._metrics) return this._metrics; + let cbox = this._getCBox(true); + super._getMetrics(cbox); + if (this._font._variationProcessor && !this._font.HVAR) // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + return this._metrics; + } + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new (0, $67ee4828d81adb28$export$2e2bcd8739ae039); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + else // Start at the middle if both the first and last points are off curve + firstPt = new $f680320fa07ef53d$export$baf26146a414f24a(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + var curvePt = firstPt; + } + path.moveTo(firstPt.x, firstPt.y); + for(let j = start; j < contour.length; j++){ + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + if (prevPt.onCurve && pt.onCurve) path.lineTo(pt.x, pt.y); + else if (prevPt.onCurve && !pt.onCurve) var curvePt = pt; + else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + } else throw new Error("Unknown TTF path state"); + } + // Connect the first and last points + if (curvePt) path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + path.closePath(); + } + return path; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'TTF'); + } +} + + + + + +class $7ee0705195f3b047$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + _getName() { + if (this._font.CFF2) return super._getName(); + return this._font['CFF '].getGlyphName(this.id); + } + bias(s) { + if (s.length < 1240) return 107; + else if (s.length < 33900) return 1131; + else return 32768; + } + _getPath() { + let cff = this._font.CFF2 || this._font['CFF ']; + let { stream: stream } = cff; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + let path = new (0, $67ee4828d81adb28$export$2e2bcd8739ae039); + let stack = []; + let trans = []; + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + let privateDict = cff.privateDictForGlyph(this.id) || {}; + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + function checkWidth() { + if (width == null) width = stack.shift() + privateDict.nominalWidthX; + } + function parseStems() { + if (stack.length % 2 !== 0) checkWidth(); + nStems += stack.length >> 1; + return stack.length = 0; + } + function moveTo(x, y) { + if (open) path.closePath(); + path.moveTo(x, y); + open = true; + } + let parse = function() { + while(stream.pos < end){ + let op = stream.readUInt8(); + if (op < 32) { + let index, subr, phase; + let c1x, c1y, c2x, c2y, c3x, c3y; + let c4x, c4y, c5x, c5y, c6x, c6y; + let pts; + switch(op){ + case 1: + case 3: + case 18: + case 23: + parseStems(); + break; + case 4: + if (stack.length > 1) checkWidth(); + y += stack.shift(); + moveTo(x, y); + break; + case 5: + while(stack.length >= 2){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + case 6: + case 7: + phase = op === 6; + while(stack.length >= 1){ + if (phase) x += stack.shift(); + else y += stack.shift(); + path.lineTo(x, y); + phase = !phase; + } + break; + case 8: + while(stack.length > 0){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 10: + index = stack.pop() + subrsBias; + subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 11: + if (cff.version >= 2) break; + return; + case 14: + if (cff.version >= 2) break; + if (stack.length > 0) checkWidth(); + if (open) { + path.closePath(); + open = false; + } + break; + case 15: + if (cff.version < 2) throw new Error('vsindex operator not supported in CFF v1'); + vsindex = stack.pop(); + break; + case 16: + { + if (cff.version < 2) throw new Error('blend operator not supported in CFF v1'); + if (!variationProcessor) throw new Error('blend operator in non-variation font'); + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + for(let i = 0; i < numBlends; i++){ + let sum = stack[base + i]; + for(let j = 0; j < blendVector.length; j++)sum += blendVector[j] * stack[delta++]; + stack[base + i] = sum; + } + while(numOperands--)stack.pop(); + break; + } + case 19: + case 20: + parseStems(); + stream.pos += nStems + 7 >> 3; + break; + case 21: + if (stack.length > 2) checkWidth(); + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + case 22: + if (stack.length > 1) checkWidth(); + x += stack.shift(); + moveTo(x, y); + break; + case 24: + while(stack.length >= 8){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + case 25: + while(stack.length >= 8){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + case 26: + if (stack.length % 2) x += stack.shift(); + while(stack.length >= 4){ + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 27: + if (stack.length % 2) y += stack.shift(); + while(stack.length >= 4){ + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 28: + stack.push(stream.readInt16BE()); + break; + case 29: + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 30: + case 31: + phase = op === 31; + while(stack.length >= 4){ + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + case 12: + op = stream.readUInt8(); + switch(op){ + case 3: + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + case 4: + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + case 5: + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + case 9: + a = stack.pop(); + stack.push(Math.abs(a)); + break; + case 10: + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + case 11: + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + case 12: + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + case 14: + a = stack.pop(); + stack.push(-a); + break; + case 15: + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + case 18: + stack.pop(); + break; + case 20: + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + case 21: + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + case 22: + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + case 23: + stack.push(Math.random()); + break; + case 24: + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + case 26: + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + case 27: + a = stack.pop(); + stack.push(a, a); + break; + case 28: + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + case 29: + idx = stack.pop(); + if (idx < 0) idx = 0; + else if (idx > stack.length - 1) idx = stack.length - 1; + stack.push(stack[idx]); + break; + case 30: + let n = stack.pop(); + let j = stack.pop(); + if (j >= 0) while(j > 0){ + var t = stack[n - 1]; + for(let i = n - 2; i >= 0; i--)stack[i + 1] = stack[i]; + stack[0] = t; + j--; + } + else while(j < 0){ + var t = stack[0]; + for(let i = 0; i <= n; i++)stack[i] = stack[i + 1]; + stack[n - 1] = t; + j++; + } + break; + case 34: + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y; + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 35: + pts = []; + for(let i = 0; i <= 5; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + case 36: + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 37: + let startx = x; + let starty = y; + pts = []; + for(let i = 0; i <= 4; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + if (Math.abs(x - startx) > Math.abs(y - starty)) { + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + default: + throw new Error(`Unknown op: ${op}`); + } + } else if (op < 247) stack.push(op - 139); + else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else stack.push(stream.readInt32BE() / 65536); + } + }; + parse(); + if (open) path.closePath(); + return path; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'CFF'); + } +} + + + + + +let $55855d6d316b015e$var$SBIXImage = new $gfJaN$restructure.Struct({ + originX: $gfJaN$restructure.uint16, + originY: $gfJaN$restructure.uint16, + type: new $gfJaN$restructure.String(4), + data: new $gfJaN$restructure.Buffer((t)=>t.parent.buflen - t._currentOffset) +}); +class $55855d6d316b015e$export$2e2bcd8739ae039 extends (0, $f680320fa07ef53d$export$2e2bcd8739ae039) { + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ getImageForSize(size) { + for(let i = 0; i < this._font.sbix.imageTables.length; i++){ + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) break; + } + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + if (start === end) return null; + this._font.stream.pos = start; + return $55855d6d316b015e$var$SBIXImage.decode(this._font.stream, { + buflen: end - start + }); + } + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, { + height: size, + x: img.originX, + y: (this.bbox.minY - img.originY) * scale + }); + } + if (this._font.sbix.flags.renderOutlines) super.render(ctx, size); + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'SBIX'); + } +} + + + + + +class $42d9dbd2de9ee2d8$var$COLRLayer { + constructor(glyph, color){ + this.glyph = glyph; + this.color = color; + } +} +class $42d9dbd2de9ee2d8$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + _getBBox() { + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + for(let i = 0; i < this.layers.length; i++){ + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + return bbox; + } + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + while(low <= high){ + let mid = low + high >> 1; + var rec = colr.baseGlyphRecord[mid]; + if (this.id < rec.gid) high = mid - 1; + else if (this.id > rec.gid) low = mid + 1; + else { + var baseLayer = rec; + break; + } + } + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + return [ + new $42d9dbd2de9ee2d8$var$COLRLayer(g, color) + ]; + } + // otherwise, return an array of all the layers + let layers = []; + for(let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++){ + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new $42d9dbd2de9ee2d8$var$COLRLayer(g, color)); + } + return layers; + } + render(ctx, size) { + for (let { glyph: glyph, color: color } of this.layers){ + ctx.fillColor([ + color.red, + color.green, + color.blue + ], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + return; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'COLR'); + } +} + + +const $7586bb9ea67c41d8$var$TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const $7586bb9ea67c41d8$var$TUPLE_COUNT_MASK = 0x0fff; +const $7586bb9ea67c41d8$var$EMBEDDED_TUPLE_COORD = 0x8000; +const $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE = 0x4000; +const $7586bb9ea67c41d8$var$PRIVATE_POINT_NUMBERS = 0x2000; +const $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK = 0x0fff; +const $7586bb9ea67c41d8$var$POINTS_ARE_WORDS = 0x80; +const $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK = 0x7f; +const $7586bb9ea67c41d8$var$DELTAS_ARE_ZERO = 0x80; +const $7586bb9ea67c41d8$var$DELTAS_ARE_WORDS = 0x40; +const $7586bb9ea67c41d8$var$DELTA_RUN_COUNT_MASK = 0x3f; +class $7586bb9ea67c41d8$export$2e2bcd8739ae039 { + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for(var i = 0; i < this.font.fvar.axis.length; i++){ + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + else normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) for(var i = 0; i < this.font.avar.segment.length; i++){ + let segment = this.font.avar.segment[i]; + for(let j = 0; j < segment.correspondence.length; j++){ + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / (pair.fromCoord - prev.fromCoord + Number.EPSILON) + prev.toCoord; + break; + } + } + } + return normalized; + } + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) return; + let { gvar: gvar } = this.font; + if (gid >= gvar.glyphCount) return; + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) return; + // Read the gvar data for this glyph + let { stream: stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) return; + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + if (tupleCount & $7586bb9ea67c41d8$var$TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + let origPoints = glyphPoints.map((pt)=>pt.copy()); + tupleCount &= $7586bb9ea67c41d8$var$TUPLE_COUNT_MASK; + for(let i = 0; i < tupleCount; i++){ + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + if (tupleIndex & $7586bb9ea67c41d8$var$EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for(let a = 0; a < gvar.axisCount; a++)tupleCoords.push(stream.readInt16BE() / 16384); + } else { + if ((tupleIndex & $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK) >= gvar.globalCoordCount) throw new Error('Invalid gvar table'); + var tupleCoords = gvar.globalCoords[tupleIndex & $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK]; + } + if (tupleIndex & $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE) { + var startCoords = []; + for(let a = 0; a < gvar.axisCount; a++)startCoords.push(stream.readInt16BE() / 16384); + var endCoords = []; + for(let a = 0; a < gvar.axisCount; a++)endCoords.push(stream.readInt16BE() / 16384); + } + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + var here = stream.pos; + stream.pos = offsetToData; + if (tupleIndex & $7586bb9ea67c41d8$var$PRIVATE_POINT_NUMBERS) var points = this.decodePoints(); + else var points = sharedPoints; + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + if (points.length === 0) for(let i = 0; i < glyphPoints.length; i++){ + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + else { + let outPoints = origPoints.map((pt)=>pt.copy()); + let hasDelta = glyphPoints.map(()=>false); + for(let i = 0; i < points.length; i++){ + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + point.x += xDeltas[i] * factor; + point.y += yDeltas[i] * factor; + } + } + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + for(let i = 0; i < glyphPoints.length; i++){ + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX); + glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY); + } + } + offsetToData += tupleDataSize; + stream.pos = here; + } + } + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + if (count & $7586bb9ea67c41d8$var$POINTS_ARE_WORDS) count = (count & $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK) + 1; + let fn = run & $7586bb9ea67c41d8$var$POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + for(let j = 0; j < runCount && i < count; j++){ + point += fn.call(stream); + points[i++] = point; + } + } + return points; + } + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $7586bb9ea67c41d8$var$DELTA_RUN_COUNT_MASK) + 1; + if (run & $7586bb9ea67c41d8$var$DELTAS_ARE_ZERO) i += runCount; + else { + let fn = run & $7586bb9ea67c41d8$var$DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for(let j = 0; j < runCount && i < count; j++)deltas[i++] = fn.call(stream); + } + } + return deltas; + } + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar: gvar } = this.font; + let factor = 1; + for(let i = 0; i < gvar.axisCount; i++){ + if (tupleCoords[i] === 0) continue; + if (normalized[i] === 0) return 0; + if ((tupleIndex & $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE) === 0) { + if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) return 0; + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) return 0; + else if (normalized[i] < tupleCoords[i]) factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + else factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + return factor; + } + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) return; + let point = 0; + while(point < points.length){ + let firstPoint = point; + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while(!pt.endContour)pt = points[++endPoint]; + // find the first point that has a delta + while(point <= endPoint && !hasDelta[point])point++; + if (point > endPoint) continue; + let firstDelta = point; + let curDelta = point; + point++; + while(point <= endPoint){ + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + point++; + } + // shift contour if we only have a single delta + if (curDelta === firstDelta) this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + if (firstDelta > 0) this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + point = endPoint + 1; + } + } + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) return; + let iterable = [ + 'x', + 'y' + ]; + for(let i = 0; i < iterable.length; i++){ + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + for(let p = p1; p <= p2; p++){ + let out = inPoints[p][k]; + if (out <= in1) out += out1 - in1; + else if (out >= in2) out += out2 - in2; + else out = out1 + (out - in1) * scale; + outPoints[p][k] = out; + } + } + } + } + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + if (deltaX === 0 && deltaY === 0) return; + for(let p = p1; p <= p2; p++)if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) idx = table.advanceWidthMapping.mapCount - 1; + let entryFormat = table.advanceWidthMapping.entryFormat; + ({ outerIndex: outerIndex, innerIndex: innerIndex } = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + return this.getDelta(table.itemVariationStore, outerIndex, innerIndex); + } + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getDelta(itemStore, outerIndex, innerIndex) { + if (outerIndex >= itemStore.itemVariationData.length) return 0; + let varData = itemStore.itemVariationData[outerIndex]; + if (innerIndex >= varData.deltaSets.length) return 0; + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + for(let master = 0; master < varData.regionIndexCount; master++)netAdjustment += deltaSet.deltas[master] * blendVector[master]; + return netAdjustment; + } + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) return this.blendVectors.get(varData); + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + // outer loop steps through master designs to be blended + for(let master = 0; master < varData.regionIndexCount; master++){ + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + // inner loop steps through axes in this region + for(let j = 0; j < axes.length; j++){ + let axis = axes[j]; + let axisScalar; + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) axisScalar = 1; + else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) axisScalar = 1; + else if (axis.peakCoord === 0) axisScalar = 1; + else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) axisScalar = 0; + else { + if (normalizedCoords[j] === axis.peakCoord) axisScalar = 1; + else if (normalizedCoords[j] < axis.peakCoord) axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.startCoord + Number.EPSILON); + else axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + // take product of all the axis scalars + scalar *= axisScalar; + } + blendVector[master] = scalar; + } + this.blendVectors.set(varData, blendVector); + return blendVector; + } + constructor(font, coords){ + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } +} + + + + +const $a8ac370803cb82cf$var$resolved = Promise.resolve(); +class $a8ac370803cb82cf$export$2e2bcd8739ae039 { + includeGlyph(glyph) { + if (typeof glyph === 'object') glyph = glyph.id; + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + return this.mapping[glyph]; + } + constructor(font){ + this.font = font; + this.glyphs = []; + this.mapping = {}; + // always include the missing glyph + this.includeGlyph(0); + } +} + + + + + +// Flags for simple glyphs +const $2784eedf0b35a048$var$ON_CURVE = 1; +const $2784eedf0b35a048$var$X_SHORT_VECTOR = 2; +const $2784eedf0b35a048$var$Y_SHORT_VECTOR = 4; +const $2784eedf0b35a048$var$REPEAT = 8; +const $2784eedf0b35a048$var$SAME_X = 16; +const $2784eedf0b35a048$var$SAME_Y = 32; +class $2784eedf0b35a048$var$Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + static encode(stream, value) { + if (value >= 0 && value <= 255) stream.writeUInt8(value); + else stream.writeInt16BE(value); + } +} +let $2784eedf0b35a048$var$Glyf = new $gfJaN$restructure.Struct({ + numberOfContours: $gfJaN$restructure.int16, + xMin: $gfJaN$restructure.int16, + yMin: $gfJaN$restructure.int16, + xMax: $gfJaN$restructure.int16, + yMax: $gfJaN$restructure.int16, + endPtsOfContours: new $gfJaN$restructure.Array($gfJaN$restructure.uint16, 'numberOfContours'), + instructions: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, $gfJaN$restructure.uint16), + flags: new $gfJaN$restructure.Array($gfJaN$restructure.uint8, 0), + xPoints: new $gfJaN$restructure.Array($2784eedf0b35a048$var$Point, 0), + yPoints: new $gfJaN$restructure.Array($2784eedf0b35a048$var$Point, 0) +}); +class $2784eedf0b35a048$export$2e2bcd8739ae039 { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + for(let i = 0; i < path.commands.length; i++){ + let c = path.commands[i]; + for(let j = 0; j < c.args.length; j += 2){ + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + if (x === midX && y === midY) continue; + } + } + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) flag |= $2784eedf0b35a048$var$ON_CURVE; + flag = this._encodePoint(x, lastX, xPoints, flag, $2784eedf0b35a048$var$X_SHORT_VECTOR, $2784eedf0b35a048$var$SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, $2784eedf0b35a048$var$Y_SHORT_VECTOR, $2784eedf0b35a048$var$SAME_Y); + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= $2784eedf0b35a048$var$REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + flags.push(flag); + lastFlag = flag; + } + lastX = x; + lastY = y; + pointCount++; + } + if (c.command === 'closePath') endPtsOfContours.push(pointCount - 1); + } + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') endPtsOfContours.push(pointCount - 1); + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + let size = $2784eedf0b35a048$var$Glyf.size(glyf); + let tail = 4 - size % 4; + let stream = new $gfJaN$restructure.EncodeStream(size + tail); + $2784eedf0b35a048$var$Glyf.encode(stream, glyf); + // Align to 4-byte length + if (tail !== 0) stream.fill(0, tail); + return stream.buffer; + } + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + if (value === last) flag |= sameFlag; + else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) diff = -diff; + else flag |= sameFlag; + } + points.push(diff); + } + return flag; + } +} + + +class $fe042f4b88f46896$export$2e2bcd8739ae039 extends (0, $a8ac370803cb82cf$export$2e2bcd8739ae039) { + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + let buffer = stream.readBuffer(nextOffset - curOffset); + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Uint8Array(buffer); + let view = new DataView(buffer.buffer); + for (let component of glyf.components){ + gid = this.includeGlyph(component.glyphID); + view.setUint16(component.pos, gid); + } + } else if (glyf && this.font._variationProcessor) // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + this.offset += buffer.length; + return this.glyf.length - 1; + } + encode() { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [], + version: this.font.loca.version + }; + this.hmtx = { + metrics: [], + bearings: [] + }; + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while(i < this.glyphs.length)this._addGlyph(this.glyphs[i++]); + let maxp = (0, ($parcel$interopDefault($gfJaN$clone)))(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + this.loca.offsets.push(this.offset); + let head = (0, ($parcel$interopDefault($gfJaN$clone)))(this.font.head); + head.indexToLocFormat = this.loca.version; + let hhea = (0, ($parcel$interopDefault($gfJaN$clone)))(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + // TODO: subset prep, cvt, fpgm? + return (0, $df50e1efe10a1247$export$2e2bcd8739ae039).toBuffer({ + tables: { + head: head, + hhea: hhea, + loca: this.loca, + maxp: maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + } + }); + } + constructor(font){ + super(font); + this.glyphEncoder = new (0, $2784eedf0b35a048$export$2e2bcd8739ae039); + } +} + + + + + + +class $ec40f80c07a4e08a$export$2e2bcd8739ae039 extends (0, $a8ac370803cb82cf$export$2e2bcd8739ae039) { + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + for (let gid of this.glyphs){ + this.charstrings.push(this.cff.getCharString(gid)); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedGsubrs)gsubrs[subr] = true; + } + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + subsetSubrs(subrs, used) { + let res = []; + for(let i = 0; i < subrs.length; i++){ + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else res.push(new Uint8Array([ + 11 + ])); // return + } + return res; + } + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + let used_fds = {}; + let used_subrs = []; + let fd_select = {}; + for (let gid of this.glyphs){ + let fd = this.cff.fdForGlyph(gid); + if (fd == null) continue; + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + fd_select[fd] = topDict.FDArray.length - 1; + } + used_fds[fd] = true; + topDict.FDSelect.fds.push(fd_select[fd]); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[fd_select[fd]][subr] = true; + } + for(let i = 0; i < topDict.FDArray.length; i++){ + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + return; + } + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs){ + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[subr] = true; + } + let privateDict = Object.assign({}, this.cff.topDict.Private); + if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + topDict.FDArray = [ + { + Private: privateDict + } + ]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [ + { + first: 0, + fd: 0 + } + ], + sentinel: this.charstrings.length + }; + } + addString(string) { + if (!string) return null; + if (!this.strings) this.strings = []; + this.strings.push(string); + return (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length + this.strings.length - 1; + } + encode() { + this.subsetCharstrings(); + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [ + { + first: 1, + nLeft: this.charstrings.length - 2 + } + ] + }; + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + for (let key of [ + 'version', + 'Notice', + 'Copyright', + 'FullName', + 'FamilyName', + 'Weight', + 'PostScript', + 'BaseFontName', + 'FontName' + ])topDict[key] = this.addString(this.cff.string(topDict[key])); + topDict.ROS = [ + this.addString('Adobe'), + this.addString('Identity'), + 0 + ]; + topDict.CIDCount = this.charstrings.length; + if (this.cff.isCIDFont) this.subsetFontdict(topDict); + else this.createCIDFontdict(topDict); + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: 4, + header: this.cff.header, + nameIndex: [ + this.cff.postscriptName + ], + topDictIndex: [ + topDict + ], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + return (0, $5b547cf9e5da519b$export$2e2bcd8739ae039).toBuffer(top); + } + constructor(font){ + super(font); + this.cff = this.font['CFF ']; + if (!this.cff) throw new Error('Not a CFF Font'); + } +} + + + + +class $0a8ef2660a6ce4b6$export$2e2bcd8739ae039 { + static probe(buffer) { + let format = (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + setDefaultLanguage(lang = null) { + this.defaultLanguage = lang; + } + _getTable(table) { + if (!(table.tag in this._tables)) try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if ($59aa4ed98453e1d4$export$bd5c5d8b8dcafd78) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + return this._tables[table.tag]; + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + return null; + } + _decodeDirectory() { + return this.directory = (0, $df50e1efe10a1247$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _decodeTable(table) { + let pos = this.stream.pos; + let stream = this._getTableStream(table.tag); + let result = (0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[table.tag].decode(stream, this, table.length); + this.stream.pos = pos; + return result; + } + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ getName(key, lang = this.defaultLanguage || $59aa4ed98453e1d4$export$42940898df819940) { + let record = this.name && this.name.records[key]; + if (record) // Attempt to retrieve the entry, depending on which translation is available: + return record[lang] || record[this.defaultLanguage] || record[$59aa4ed98453e1d4$export$42940898df819940] || record['en'] || record[Object.keys(record)[0]] // Seriously, ANY language would be fine + || null; + return null; + } + /** + * The unique PostScript name for this font, e.g. "Helvetica-Bold" + * @type {string} + */ get postscriptName() { + return this.getName('postscriptName'); + } + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ get fullName() { + return this.getName('fullName'); + } + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ get familyName() { + return this.getName('fontFamily'); + } + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ get subfamilyName() { + return this.getName('fontSubfamily'); + } + /** + * The font's copyright information + * @type {string} + */ get copyright() { + return this.getName('copyright'); + } + /** + * The font's version number + * @type {string} + */ get version() { + return this.getName('version'); + } + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ get ascent() { + return this.hhea.ascent; + } + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ get descent() { + return this.hhea.descent; + } + /** + * The amount of space that should be included between lines + * @type {number} + */ get lineGap() { + return this.hhea.lineGap; + } + /** + * The offset from the normal underline position that should be used + * @type {number} + */ get underlinePosition() { + return this.post.underlinePosition; + } + /** + * The weight of the underline that should be used + * @type {number} + */ get underlineThickness() { + return this.post.underlineThickness; + } + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ get italicAngle() { + return this.post.italicAngle; + } + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + /** + * The number of glyphs in the font. + * @type {number} + */ get numGlyphs() { + return this.maxp.numGlyphs; + } + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ get unitsPerEm() { + return this.head.unitsPerEm; + } + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ get bbox() { + return Object.freeze(new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039)(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + get _cmapProcessor() { + return new (0, $0d6e160064c86e50$export$2e2bcd8739ae039)(this.cmap); + } + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [ + codePoint + ]); + } + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + while(idx <= len){ + let code = 0; + let nextState = 0; + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0; + } else idx++; + if (state === 0 && nextState === 1) // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [ + last, + code + ])); + else if (state === 0 && nextState === 0) // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + last = code; + state = nextState; + } + return glyphs; + } + get _layoutEngine() { + return new (0, $9d641258c9d7180d$export$2e2bcd8739ae039)(this); + } + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @param {string} [direction] + * @return {GlyphRun} + */ layout(string, userFeatures, script, language, direction) { + return this._layoutEngine.layout(string, userFeatures, script, language, direction); + } + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + getAvailableFeatures(script, language) { + return this._layoutEngine.getAvailableFeatures(script, language); + } + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) this._glyphs[glyph] = new (0, $f680320fa07ef53d$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) this._glyphs[glyph] = new (0, $7ee0705195f3b047$export$2e2bcd8739ae039)(glyph, characters, this); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) this._glyphs[glyph] = new (0, $55855d6d316b015e$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables.COLR && this.directory.tables.CPAL) this._glyphs[glyph] = new (0, $42d9dbd2de9ee2d8$export$2e2bcd8739ae039)(glyph, characters, this); + else this._getBaseGlyph(glyph, characters); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a Subset for this font. + * @return {Subset} + */ createSubset() { + if (this.directory.tables['CFF ']) return new (0, $ec40f80c07a4e08a$export$2e2bcd8739ae039)(this); + return new (0, $fe042f4b88f46896$export$2e2bcd8739ae039)(this); + } + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ get variationAxes() { + let res = {}; + if (!this.fvar) return res; + for (let axis of this.fvar.axis)res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + return res; + } + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ get namedVariations() { + let res = {}; + if (!this.fvar) return res; + for (let instance of this.fvar.instance){ + let settings = {}; + for(let i = 0; i < this.fvar.axis.length; i++){ + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + res[instance.name.en] = settings; + } + return res; + } + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ getVariation(settings) { + if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + if (typeof settings === 'string') settings = this.namedVariations[settings]; + if (typeof settings !== 'object') throw new Error('Variation settings must be either a variation name or settings object.'); + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i)=>{ + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + else return axis.defaultValue; + }); + let stream = new $gfJaN$restructure.DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + let font = new $0a8ef2660a6ce4b6$export$2e2bcd8739ae039(stream, coords); + font._tables = this._tables; + return font; + } + get _variationProcessor() { + if (!this.fvar) return null; + let variationCoords = this.variationCoords; + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) return null; + if (!variationCoords) variationCoords = this.fvar.axis.map((axis)=>axis.defaultValue); + return new (0, $7586bb9ea67c41d8$export$2e2bcd8739ae039)(this, variationCoords); + } + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } + constructor(stream, variationCoords = null){ + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'TTF'); + this.defaultLanguage = null; + this.stream = stream; + this.variationCoords = variationCoords; + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + // define properties for each table to lazily parse + for(let tag in this.directory.tables){ + let table = this.directory.tables[tag]; + if ((0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag] && table.length > 0) Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } +} +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_cmapProcessor", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "characterSet", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_layoutEngine", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "variationAxes", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "namedVariations", null); +(0, $gfJaN$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_variationProcessor", null); + + + + + + +let $89f72d2d7c9afc0d$var$WOFFDirectoryEntry = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + offset: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, 'void', { + type: 'global' + }), + compLength: $gfJaN$restructure.uint32, + length: $gfJaN$restructure.uint32, + origChecksum: $gfJaN$restructure.uint32 +}); +let $89f72d2d7c9afc0d$var$WOFFDirectory = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + flavor: $gfJaN$restructure.uint32, + length: $gfJaN$restructure.uint32, + numTables: $gfJaN$restructure.uint16, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + totalSfntSize: $gfJaN$restructure.uint32, + majorVersion: $gfJaN$restructure.uint16, + minorVersion: $gfJaN$restructure.uint16, + metaOffset: $gfJaN$restructure.uint32, + metaLength: $gfJaN$restructure.uint32, + metaOrigLength: $gfJaN$restructure.uint32, + privOffset: $gfJaN$restructure.uint32, + privLength: $gfJaN$restructure.uint32, + tables: new $gfJaN$restructure.Array($89f72d2d7c9afc0d$var$WOFFDirectoryEntry, 'numTables') +}); +$89f72d2d7c9afc0d$var$WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +var $89f72d2d7c9afc0d$export$2e2bcd8739ae039 = $89f72d2d7c9afc0d$var$WOFFDirectory; + + + + + + +class $8a0a49baaf5d834d$export$2e2bcd8739ae039 extends (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOFF'; + } + _decodeDirectory() { + this.directory = (0, $89f72d2d7c9afc0d$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Uint8Array(table.length); + let buf = (0, ($parcel$interopDefault($gfJaN$tinyinflate)))(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new $gfJaN$restructure.DecodeStream(buf); + } else return this.stream; + } + return null; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF'); + } +} + + + + + + + + + +class $44b9edca0e403d6d$export$2e2bcd8739ae039 extends (0, $f680320fa07ef53d$export$2e2bcd8739ae039) { + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + _getCBox() { + return this.path.bbox; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF2'); + } +} + + + +const $2f0bfd9a5c1d7b58$var$Base128 = { + decode (stream) { + let result = 0; + let iterable = [ + 0, + 1, + 2, + 3, + 4 + ]; + for(let j = 0; j < iterable.length; j++){ + let i = iterable[j]; + let code = stream.readUInt8(); + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) throw new Error('Overflow'); + result = result << 7 | code & 0x7f; + if ((code & 0x80) === 0) return result; + } + throw new Error('Bad base 128 number'); + } +}; +let $2f0bfd9a5c1d7b58$var$knownTags = [ + 'cmap', + 'head', + 'hhea', + 'hmtx', + 'maxp', + 'name', + 'OS/2', + 'post', + 'cvt ', + 'fpgm', + 'glyf', + 'loca', + 'prep', + 'CFF ', + 'VORG', + 'EBDT', + 'EBLC', + 'gasp', + 'hdmx', + 'kern', + 'LTSH', + 'PCLT', + 'VDMX', + 'vhea', + 'vmtx', + 'BASE', + 'GDEF', + 'GPOS', + 'GSUB', + 'EBSC', + 'JSTF', + 'MATH', + 'CBDT', + 'CBLC', + 'COLR', + 'CPAL', + 'SVG ', + 'sbix', + 'acnt', + 'avar', + 'bdat', + 'bloc', + 'bsln', + 'cvar', + 'fdsc', + 'feat', + 'fmtx', + 'fvar', + 'gvar', + 'hsty', + 'just', + 'lcar', + 'mort', + 'morx', + 'opbd', + 'prop', + 'trak', + 'Zapf', + 'Silf', + 'Glat', + 'Gloc', + 'Feat', + 'Sill' +]; +let $2f0bfd9a5c1d7b58$var$WOFF2DirectoryEntry = new $gfJaN$restructure.Struct({ + flags: $gfJaN$restructure.uint8, + customTag: new $gfJaN$restructure.Optional(new $gfJaN$restructure.String(4), (t)=>(t.flags & 0x3f) === 0x3f), + tag: (t)=>t.customTag || $2f0bfd9a5c1d7b58$var$knownTags[t.flags & 0x3f], + length: $2f0bfd9a5c1d7b58$var$Base128, + transformVersion: (t)=>t.flags >>> 6 & 0x03, + transformed: (t)=>t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new $gfJaN$restructure.Optional($2f0bfd9a5c1d7b58$var$Base128, (t)=>t.transformed) +}); +let $2f0bfd9a5c1d7b58$var$WOFF2Directory = new $gfJaN$restructure.Struct({ + tag: new $gfJaN$restructure.String(4), + flavor: $gfJaN$restructure.uint32, + length: $gfJaN$restructure.uint32, + numTables: $gfJaN$restructure.uint16, + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint16), + totalSfntSize: $gfJaN$restructure.uint32, + totalCompressedSize: $gfJaN$restructure.uint32, + majorVersion: $gfJaN$restructure.uint16, + minorVersion: $gfJaN$restructure.uint16, + metaOffset: $gfJaN$restructure.uint32, + metaLength: $gfJaN$restructure.uint32, + metaOrigLength: $gfJaN$restructure.uint32, + privOffset: $gfJaN$restructure.uint32, + privLength: $gfJaN$restructure.uint32, + tables: new $gfJaN$restructure.Array($2f0bfd9a5c1d7b58$var$WOFF2DirectoryEntry, 'numTables') +}); +$2f0bfd9a5c1d7b58$var$WOFF2Directory.process = function() { + let tables = {}; + for(let i = 0; i < this.tables.length; i++){ + let table = this.tables[i]; + tables[table.tag] = table; + } + return this.tables = tables; +}; +var $2f0bfd9a5c1d7b58$export$2e2bcd8739ae039 = $2f0bfd9a5c1d7b58$var$WOFF2Directory; + + + +class $333fb94547d9fb5c$export$2e2bcd8739ae039 extends (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOF2'; + } + _decodeDirectory() { + this.directory = (0, $2f0bfd9a5c1d7b58$export$2e2bcd8739ae039).decode(this.stream); + this._dataPos = this.stream.pos; + } + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + let decompressedSize = 0; + for(let tag in this.directory.tables){ + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length; + } + let decompressed = (0, ($parcel$interopDefault($gfJaN$brotlidecompressjs)))(buffer, decompressedSize); + if (!decompressed) throw new Error('Error decoding compressed data in WOFF2'); + this.stream = new $gfJaN$restructure.DecodeStream(decompressed); + this._decompressed = true; + } + } + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) this._transformGlyfTable(); + return this._glyphs[glyph] = new (0, $44b9edca0e403d6d$export$2e2bcd8739ae039)(glyph, characters, this); + } else return super._getBaseGlyph(glyph, characters); + } + } + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = $333fb94547d9fb5c$var$GlyfTable.decode(this.stream); + let glyphs = []; + for(let index = 0; index < table.numGlyphs; index++){ + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + if (nContours > 0) { + let nPoints = []; + let totalPoints = 0; + for(let i = 0; i < nContours; i++){ + let r = $333fb94547d9fb5c$var$read255UInt16(table.nPoints); + totalPoints += r; + nPoints.push(totalPoints); + } + glyph.points = $333fb94547d9fb5c$var$decodeTriplet(table.flags, table.glyphs, totalPoints); + for(let i = 0; i < nContours; i++)glyph.points[nPoints[i] - 1].endContour = true; + var instructionSize = $333fb94547d9fb5c$var$read255UInt16(table.glyphs); + } else if (nContours < 0) { + let haveInstructions = (0, $f680320fa07ef53d$export$2e2bcd8739ae039).prototype._decodeComposite.call({ + _font: this + }, glyph, table.composites); + if (haveInstructions) var instructionSize = $333fb94547d9fb5c$var$read255UInt16(table.glyphs); + } + glyphs.push(glyph); + } + this._transformedGlyphs = glyphs; + } + constructor(...args){ + super(...args); + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF2'); + } +} +// Special class that accepts a length and returns a sub-stream for that data +class $333fb94547d9fb5c$var$Substream { + decode(stream, parent) { + return new $gfJaN$restructure.DecodeStream(this._buf.decode(stream, parent)); + } + constructor(length){ + this.length = length; + this._buf = new $gfJaN$restructure.Buffer(length); + } +} +// This struct represents the entire glyf table +let $333fb94547d9fb5c$var$GlyfTable = new $gfJaN$restructure.Struct({ + version: $gfJaN$restructure.uint32, + numGlyphs: $gfJaN$restructure.uint16, + indexFormat: $gfJaN$restructure.uint16, + nContourStreamSize: $gfJaN$restructure.uint32, + nPointsStreamSize: $gfJaN$restructure.uint32, + flagStreamSize: $gfJaN$restructure.uint32, + glyphStreamSize: $gfJaN$restructure.uint32, + compositeStreamSize: $gfJaN$restructure.uint32, + bboxStreamSize: $gfJaN$restructure.uint32, + instructionStreamSize: $gfJaN$restructure.uint32, + nContours: new $333fb94547d9fb5c$var$Substream('nContourStreamSize'), + nPoints: new $333fb94547d9fb5c$var$Substream('nPointsStreamSize'), + flags: new $333fb94547d9fb5c$var$Substream('flagStreamSize'), + glyphs: new $333fb94547d9fb5c$var$Substream('glyphStreamSize'), + composites: new $333fb94547d9fb5c$var$Substream('compositeStreamSize'), + bboxes: new $333fb94547d9fb5c$var$Substream('bboxStreamSize'), + instructions: new $333fb94547d9fb5c$var$Substream('instructionStreamSize') +}); +const $333fb94547d9fb5c$var$WORD_CODE = 253; +const $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE2 = 254; +const $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE1 = 255; +const $333fb94547d9fb5c$var$LOWEST_U_CODE = 253; +function $333fb94547d9fb5c$var$read255UInt16(stream) { + let code = stream.readUInt8(); + if (code === $333fb94547d9fb5c$var$WORD_CODE) return stream.readUInt16BE(); + if (code === $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE1) return stream.readUInt8() + $333fb94547d9fb5c$var$LOWEST_U_CODE; + if (code === $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE2) return stream.readUInt8() + $333fb94547d9fb5c$var$LOWEST_U_CODE * 2; + return code; +} +function $333fb94547d9fb5c$var$withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} +function $333fb94547d9fb5c$var$decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + for(let i = 0; i < nPoints; i++){ + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + if (flag < 10) { + dx = 0; + dy = $333fb94547d9fb5c$var$withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + } else if (flag < 20) { + dx = $333fb94547d9fb5c$var$withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8()); + dy = 0; + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = $333fb94547d9fb5c$var$withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + } else if (flag < 120) { + var b0 = flag - 84; + dx = $333fb94547d9fb5c$var$withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8()); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8()); + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = $333fb94547d9fb5c$var$withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + } else { + dx = $333fb94547d9fb5c$var$withSign(flag, glyphs.readUInt16BE()); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, glyphs.readUInt16BE()); + } + x += dx; + y += dy; + res.push(new (0, $f680320fa07ef53d$export$baf26146a414f24a)(onCurve, false, x, y)); + } + return res; +} + + + + + + + + +let $e0b2de9958441c02$var$TTCHeader = new $gfJaN$restructure.VersionedStruct($gfJaN$restructure.uint32, { + 0x00010000: { + numFonts: $gfJaN$restructure.uint32, + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 'numFonts') + }, + 0x00020000: { + numFonts: $gfJaN$restructure.uint32, + offsets: new $gfJaN$restructure.Array($gfJaN$restructure.uint32, 'numFonts'), + dsigTag: $gfJaN$restructure.uint32, + dsigLength: $gfJaN$restructure.uint32, + dsigOffset: $gfJaN$restructure.uint32 + } +}); +class $e0b2de9958441c02$export$2e2bcd8739ae039 { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'ttcf'; + } + getFont(name) { + for (let offset of this.header.offsets){ + let stream = new $gfJaN$restructure.DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let offset of this.header.offsets){ + let stream = new $gfJaN$restructure.DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'TTC'); + this.stream = stream; + if (stream.readString(4) !== 'ttcf') throw new Error('Not a TrueType collection'); + this.header = $e0b2de9958441c02$var$TTCHeader.decode(stream); + } +} + + + + + +let $d0fe640dc6c78783$var$DFontName = new $gfJaN$restructure.String($gfJaN$restructure.uint8); +let $d0fe640dc6c78783$var$DFontData = new $gfJaN$restructure.Struct({ + len: $gfJaN$restructure.uint32, + buf: new $gfJaN$restructure.Buffer('len') +}); +let $d0fe640dc6c78783$var$Ref = new $gfJaN$restructure.Struct({ + id: $gfJaN$restructure.uint16, + nameOffset: $gfJaN$restructure.int16, + attr: $gfJaN$restructure.uint8, + dataOffset: $gfJaN$restructure.uint24, + handle: $gfJaN$restructure.uint32 +}); +let $d0fe640dc6c78783$var$Type = new $gfJaN$restructure.Struct({ + name: new $gfJaN$restructure.String(4), + maxTypeIndex: $gfJaN$restructure.uint16, + refList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, new $gfJaN$restructure.Array($d0fe640dc6c78783$var$Ref, (t)=>t.maxTypeIndex + 1), { + type: 'parent' + }) +}); +let $d0fe640dc6c78783$var$TypeList = new $gfJaN$restructure.Struct({ + length: $gfJaN$restructure.uint16, + types: new $gfJaN$restructure.Array($d0fe640dc6c78783$var$Type, (t)=>t.length + 1) +}); +let $d0fe640dc6c78783$var$DFontMap = new $gfJaN$restructure.Struct({ + reserved: new $gfJaN$restructure.Reserved($gfJaN$restructure.uint8, 24), + typeList: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, $d0fe640dc6c78783$var$TypeList), + nameListOffset: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint16, 'void') +}); +let $d0fe640dc6c78783$var$DFontHeader = new $gfJaN$restructure.Struct({ + dataOffset: $gfJaN$restructure.uint32, + map: new $gfJaN$restructure.Pointer($gfJaN$restructure.uint32, $d0fe640dc6c78783$var$DFontMap), + dataLength: $gfJaN$restructure.uint32, + mapLength: $gfJaN$restructure.uint32 +}); +class $d0fe640dc6c78783$export$2e2bcd8739ae039 { + static probe(buffer) { + let stream = new $gfJaN$restructure.DecodeStream(buffer); + try { + var header = $d0fe640dc6c78783$var$DFontHeader.decode(stream); + } catch (e) { + return false; + } + for (let type of header.map.typeList.types){ + if (type.name === 'sfnt') return true; + } + return false; + } + getFont(name) { + if (!this.sfnt) return null; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $gfJaN$restructure.DecodeStream(this.stream.buffer.slice(pos)); + let font = new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $gfJaN$restructure.DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $gfJaN$swchelperscjs_define_propertycjs._)(this, "type", 'DFont'); + this.stream = stream; + this.header = $d0fe640dc6c78783$var$DFontHeader.decode(this.stream); + for (let type of this.header.map.typeList.types){ + for (let ref of type.refList)if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = $d0fe640dc6c78783$var$DFontName.decode(this.stream); + } else ref.name = null; + if (type.name === 'sfnt') this.sfnt = type; + } + } +} + + +// Register font formats +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $8a0a49baaf5d834d$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $333fb94547d9fb5c$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $e0b2de9958441c02$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $d0fe640dc6c78783$export$2e2bcd8739ae039)); +$parcel$exportWildcard(module.exports, $59aa4ed98453e1d4$exports); + + +//# sourceMappingURL=browser.cjs.map diff --git a/node_modules/fontkit/dist/browser.cjs.map b/node_modules/fontkit/dist/browser.cjs.map new file mode 100644 index 0000000..817431e --- /dev/null +++ b/node_modules/fontkit/dist/browser.cjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEO,IAAI,4CAAY;AAEvB,IAAI,gCAAU,EAAE;AACT,SAAS,yCAAe,MAAM;IACnC,8BAAQ,IAAI,CAAC;AACf;AAEO,SAAS,0CAAO,MAAM,EAAE,cAAc;IAC3C,IAAK,IAAI,IAAI,GAAG,IAAI,8BAAQ,MAAM,EAAE,IAAK;QACvC,IAAI,SAAS,6BAAO,CAAC,EAAE;QACvB,IAAI,OAAO,KAAK,CAAC,SAAS;YACxB,IAAI,OAAO,I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AAC,MAAM,CAAC,UAAU,GAAG,IAAI,UAAU,GAAG;YACpD,IAAI,SAAS,IAAI,gCAAe,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YACzD,MAAM,IAAI,CAAC,IAAI,CAAA,GAAA,wCAAM,EAAE;QACzB;QAEA,OAAO;IACT;IArDA,YAAY,MAAM,CAAE;QApBpB,qDAAA,QAAO;QAqBL,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,MAAM,GAAG,kCAAY,MAAM,CAAC,IAAI,CAAC,MAAM;QAE5C,KAAK,IAAI,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAE;YAC/C,KAAK,IAAI,OAAO,KAAK,OAAO,CAC1B,IAAI,IAAI,UAAU,IAAI,GAAG;gBACvB,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc;gBACjE,IAAI,IAAI,GAAG,gCAAU,MAAM,CAAC,IAAI,CAAC,MAAM;YACzC,OACE,IAAI,IAAI,GAAG;YAIf,IAAI,KAAK,IAAI,KAAK,QAChB,IAAI,CAAC,IAAI,GAAG;QAEhB;IACF;AAoCF;;;A9G7GA,wBAAwB;AACxB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAM;AACrB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAO;AACtB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAQ;AACvB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAiB;AAChC,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAI","sources":["src/index.js","src/base.js","src/TTFFont.js","src/decorators.js","src/tables/directory.js","src/tables/index.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/tables/name.js","src/encodings.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFFont.js","src/cff/CFFIndex.js","src/cff/CFFTop.js","src/cff/CFFDict.js","src/cff/CFFOperand.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/variations.js","src/tables/opentype.js","src/tables/VORG.js","src/tables/EBLC.js","src/tables/EBDT.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/bsln.js","src/tables/aat.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/CmapProcessor.js","src/utils.js","src/layout/LayoutEngine.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/layout/GlyphRun.js","src/glyph/BBox.js","src/layout/Script.js","src/layout/GlyphPosition.js","src/aat/AATLayoutEngine.js","src/aat/AATFeatureMap.js","src/aat/AATMorxProcessor.js","src/aat/AATStateMachine.js","src/aat/AATLookupTable.js","src/opentype/OTLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/index.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/shapers/HangulShaper.js","src/opentype/GlyphInfo.js","src/opentype/OTProcessor.js","src/opentype/GlyphIterator.js","src/opentype/shapers/IndicShaper.js","src/opentype/shapers/indic.json","src/opentype/shapers/use.json","src/opentype/shapers/indic-data.js","src/opentype/shapers/UniversalShaper.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/glyph/TTFGlyph.js","src/glyph/Glyph.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/TTFSubset.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/CFFSubset.js","src/WOFFFont.js","src/tables/WOFFDirectory.js","src/WOFF2Font.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/TrueTypeCollection.js","src/DFont.js"],"sourcesContent":["import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nregisterFormat(TTFFont);\nregisterFormat(WOFFFont);\nregisterFormat(WOFF2Font);\nregisterFormat(TrueTypeCollection);\nregisterFormat(DFont);\n\nexport * from './base';\n","import {DecodeStream} from 'restructure';\n\nexport let logErrors = false;\n\nlet formats = [];\nexport function registerFormat(format) {\n formats.push(format);\n};\n\nexport function create(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n\nexport let defaultLanguage = 'en';\nexport function setDefaultLanguage(lang = 'en') {\n defaultLanguage = lang;\n};\n","import * as r from 'restructure';\nimport { cache } from './decorators';\nimport * as fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\nimport { asciiDecoder } from './utils';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n type = 'TTF';\n\n static probe(buffer) {\n let format = asciiDecoder.decode(buffer.slice(0, 4));\n return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n }\n\n constructor(stream, variationCoords = null) {\n this.defaultLanguage = null;\n this.stream = stream;\n this.variationCoords = variationCoords;\n\n this._directoryPos = this.stream.pos;\n this._tables = {};\n this._glyphs = {};\n this._decodeDirectory();\n\n // define properties for each table to lazily parse\n for (let tag in this.directory.tables) {\n let table = this.directory.tables[tag];\n if (tables[tag] && table.length > 0) {\n Object.defineProperty(this, tag, {\n get: this._getTable.bind(this, table)\n });\n }\n }\n }\n\n setDefaultLanguage(lang = null) {\n this.defaultLanguage = lang;\n }\n\n _getTable(table) {\n if (!(table.tag in this._tables)) {\n try {\n this._tables[table.tag] = this._decodeTable(table);\n } catch (e) {\n if (fontkit.logErrors) {\n console.error(`Error decoding table ${table.tag}`);\n console.error(e.stack);\n }\n }\n }\n\n return this._tables[table.tag];\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n return this.stream;\n }\n\n return null;\n }\n\n _decodeDirectory() {\n return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n }\n\n _decodeTable(table) {\n let pos = this.stream.pos;\n\n let stream = this._getTableStream(table.tag);\n let result = tables[table.tag].decode(stream, this, table.length);\n\n this.stream.pos = pos;\n return result;\n }\n\n /**\n * Gets a string from the font's `name` table\n * `lang` is a BCP-47 language code.\n * @return {string}\n */\n getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) {\n let record = this.name && this.name.records[key];\n if (record) {\n // Attempt to retrieve the entry, depending on which translation is available:\n return (\n record[lang]\n || record[this.defaultLanguage]\n || record[fontkit.defaultLanguage]\n || record['en']\n || record[Object.keys(record)[0]] // Seriously, ANY language would be fine\n || null\n );\n }\n\n return null;\n }\n\n /**\n * The unique PostScript name for this font, e.g. \"Helvetica-Bold\"\n * @type {string}\n */\n get postscriptName() {\n return this.getName('postscriptName');\n }\n\n /**\n * The font's full name, e.g. \"Helvetica Bold\"\n * @type {string}\n */\n get fullName() {\n return this.getName('fullName');\n }\n\n /**\n * The font's family name, e.g. \"Helvetica\"\n * @type {string}\n */\n get familyName() {\n return this.getName('fontFamily');\n }\n\n /**\n * The font's sub-family, e.g. \"Bold\".\n * @type {string}\n */\n get subfamilyName() {\n return this.getName('fontSubfamily');\n }\n\n /**\n * The font's copyright information\n * @type {string}\n */\n get copyright() {\n return this.getName('copyright');\n }\n\n /**\n * The font's version number\n * @type {string}\n */\n get version() {\n return this.getName('version');\n }\n\n /**\n * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n * @type {number}\n */\n get ascent() {\n return this.hhea.ascent;\n }\n\n /**\n * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n * @type {number}\n */\n get descent() {\n return this.hhea.descent;\n }\n\n /**\n * The amount of space that should be included between lines\n * @type {number}\n */\n get lineGap() {\n return this.hhea.lineGap;\n }\n\n /**\n * The offset from the normal underline position that should be used\n * @type {number}\n */\n get underlinePosition() {\n return this.post.underlinePosition;\n }\n\n /**\n * The weight of the underline that should be used\n * @type {number}\n */\n get underlineThickness() {\n return this.post.underlineThickness;\n }\n\n /**\n * If this is an italic font, the angle the cursor should be drawn at to match the font design\n * @type {number}\n */\n get italicAngle() {\n return this.post.italicAngle;\n }\n\n /**\n * The height of capital letters above the baseline.\n * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n * @type {number}\n */\n get capHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.capHeight : this.ascent;\n }\n\n /**\n * The height of lower case letters in the font.\n * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n * @type {number}\n */\n get xHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.xHeight : 0;\n }\n\n /**\n * The number of glyphs in the font.\n * @type {number}\n */\n get numGlyphs() {\n return this.maxp.numGlyphs;\n }\n\n /**\n * The size of the font’s internal coordinate grid\n * @type {number}\n */\n get unitsPerEm() {\n return this.head.unitsPerEm;\n }\n\n /**\n * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n }\n\n @cache\n get _cmapProcessor() {\n return new CmapProcessor(this.cmap);\n }\n\n /**\n * An array of all of the unicode code points supported by the font.\n * @type {number[]}\n */\n @cache\n get characterSet() {\n return this._cmapProcessor.getCharacterSet();\n }\n\n /**\n * Returns whether there is glyph in the font for the given unicode code point.\n *\n * @param {number} codePoint\n * @return {boolean}\n */\n hasGlyphForCodePoint(codePoint) {\n return !!this._cmapProcessor.lookup(codePoint);\n }\n\n /**\n * Maps a single unicode code point to a Glyph object.\n * Does not perform any advanced substitutions (there is no context to do so).\n *\n * @param {number} codePoint\n * @return {Glyph}\n */\n glyphForCodePoint(codePoint) {\n return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n }\n\n /**\n * Returns an array of Glyph objects for the given string.\n * This is only a one-to-one mapping from characters to glyphs.\n * For most uses, you should use font.layout (described below), which\n * provides a much more advanced mapping supporting AAT and OpenType shaping.\n *\n * @param {string} string\n * @return {Glyph[]}\n */\n glyphsForString(string) {\n let glyphs = [];\n let len = string.length;\n let idx = 0;\n let last = -1;\n let state = -1;\n\n while (idx <= len) {\n let code = 0;\n let nextState = 0;\n\n if (idx < len) {\n // Decode the next codepoint from UTF 16\n code = string.charCodeAt(idx++);\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n }\n }\n\n // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n } else {\n idx++;\n }\n\n if (state === 0 && nextState === 1) {\n // Variation selector following normal codepoint.\n glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n } else if (state === 0 && nextState === 0) {\n // Normal codepoint following normal codepoint.\n glyphs.push(this.glyphForCodePoint(last));\n }\n\n last = code;\n state = nextState;\n }\n\n return glyphs;\n }\n\n @cache\n get _layoutEngine() {\n return new LayoutEngine(this);\n }\n\n /**\n * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n *\n * @param {string} string\n * @param {string[]} [userFeatures]\n * @param {string} [script]\n * @param {string} [language]\n * @param {string} [direction]\n * @return {GlyphRun}\n */\n layout(string, userFeatures, script, language, direction) {\n return this._layoutEngine.layout(string, userFeatures, script, language, direction);\n }\n\n /**\n * Returns an array of strings that map to the given glyph id.\n * @param {number} gid - glyph id\n */\n stringsForGlyph(gid) {\n return this._layoutEngine.stringsForGlyph(gid);\n }\n\n /**\n * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n * (or mapped AAT tags) supported by the font.\n * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n *\n * @type {string[]}\n */\n get availableFeatures() {\n return this._layoutEngine.getAvailableFeatures();\n }\n\n getAvailableFeatures(script, language) {\n return this._layoutEngine.getAvailableFeatures(script, language);\n }\n\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf) {\n this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a glyph object for the given glyph id.\n * You can pass the array of code points this glyph represents for\n * your use later, and it will be stored in the glyph object.\n *\n * @param {number} glyph\n * @param {number[]} characters\n * @return {Glyph}\n */\n getGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.sbix) {\n this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n } else {\n this._getBaseGlyph(glyph, characters);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a Subset for this font.\n * @return {Subset}\n */\n createSubset() {\n if (this.directory.tables['CFF ']) {\n return new CFFSubset(this);\n }\n\n return new TTFSubset(this);\n }\n\n /**\n * Returns an object describing the available variation axes\n * that this font supports. Keys are setting tags, and values\n * contain the axis name, range, and default value.\n *\n * @type {object}\n */\n @cache\n get variationAxes() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let axis of this.fvar.axis) {\n res[axis.axisTag.trim()] = {\n name: axis.name.en,\n min: axis.minValue,\n default: axis.defaultValue,\n max: axis.maxValue\n };\n }\n\n return res;\n }\n\n /**\n * Returns an object describing the named variation instances\n * that the font designer has specified. Keys are variation names\n * and values are the variation settings for this instance.\n *\n * @type {object}\n */\n @cache\n get namedVariations() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let instance of this.fvar.instance) {\n let settings = {};\n for (let i = 0; i < this.fvar.axis.length; i++) {\n let axis = this.fvar.axis[i];\n settings[axis.axisTag.trim()] = instance.coord[i];\n }\n\n res[instance.name.en] = settings;\n }\n\n return res;\n }\n\n /**\n * Returns a new font with the given variation settings applied.\n * Settings can either be an instance name, or an object containing\n * variation tags as specified by the `variationAxes` property.\n *\n * @param {object} settings\n * @return {TTFFont}\n */\n getVariation(settings) {\n if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n }\n\n if (typeof settings === 'string') {\n settings = this.namedVariations[settings];\n }\n\n if (typeof settings !== 'object') {\n throw new Error('Variation settings must be either a variation name or settings object.');\n }\n\n // normalize the coordinates\n let coords = this.fvar.axis.map((axis, i) => {\n let axisTag = axis.axisTag.trim();\n if (axisTag in settings) {\n return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n } else {\n return axis.defaultValue;\n }\n });\n\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = this._directoryPos;\n\n let font = new TTFFont(stream, coords);\n font._tables = this._tables;\n\n return font;\n }\n\n @cache\n get _variationProcessor() {\n if (!this.fvar) {\n return null;\n }\n\n let variationCoords = this.variationCoords;\n\n // Ignore if no variation coords and not CFF2\n if (!variationCoords && !this.CFF2) {\n return null;\n }\n\n if (!variationCoords) {\n variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n }\n\n return new GlyphVariationProcessor(this, variationCoords);\n }\n\n // Standardized format plugin API\n getFont(name) {\n return this.getVariation(name);\n }\n}\n","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n if (descriptor.get) {\n let get = descriptor.get;\n descriptor.get = function() {\n let value = get.call(this);\n Object.defineProperty(this, key, { value });\n return value;\n };\n } else if (typeof descriptor.value === 'function') {\n let fn = descriptor.value;\n\n return {\n get() {\n let cache = new Map;\n function memoized(...args) {\n let key = args.length > 0 ? args[0] : 'value';\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n let result = fn.apply(this, args);\n cache.set(key, result);\n return result;\n };\n\n Object.defineProperty(this, key, {value: memoized});\n return memoized;\n }\n };\n }\n}\n","import * as r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n tag: new r.String(4),\n checkSum: r.uint32,\n offset: new r.Pointer(r.uint32, 'void', { type: 'global' }),\n length: r.uint32\n});\n\nlet Directory = new r.Struct({\n tag: new r.String(4),\n numTables: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n tables: new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nDirectory.preEncode = function() {\n if (!Array.isArray(this.tables)) {\n let tables = [];\n for (let tag in this.tables) {\n let table = this.tables[tag];\n if (table) {\n tables.push({\n tag: tag,\n checkSum: 0,\n offset: new r.VoidPointer(Tables[tag], table),\n length: Tables[tag].size(table)\n });\n }\n }\n \n this.tables = tables;\n }\n\n this.tag = 'true';\n this.numTables = this.tables.length;\n\n let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2));\n let maxPowerOf2 = Math.pow(2, maxExponentFor2);\n\n this.searchRange = maxPowerOf2 * 16;\n this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;\n this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import * as r from 'restructure';\n\nlet SubHeader = new r.Struct({\n firstCode: r.uint16,\n entryCount: r.uint16,\n idDelta: r.int16,\n idRangeOffset: r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n startCharCode: r.uint32,\n endCharCode: r.uint32,\n glyphID: r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n startUnicodeValue: r.uint24,\n additionalCount: r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n unicodeValue: r.uint24,\n glyphID: r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n varSelector: r.uint24,\n defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n 0: { // Byte encoding\n length: r.uint16, // Total table length in bytes (set to 262 for format 0)\n language: r.uint16, // Language code for this encoding subtable, or zero if language-independent\n codeMap: new r.LazyArray(r.uint8, 256)\n },\n\n 2: { // High-byte mapping (CJK)\n length: r.uint16,\n language: r.uint16,\n subHeaderKeys: new r.Array(r.uint16, 256),\n subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys),\n subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')\n },\n\n 4: { // Segment mapping to delta values\n length: r.uint16, // Total table length in bytes\n language: r.uint16, // Language code\n segCountX2: r.uint16,\n segCount: t => t.segCountX2 >> 1,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n endCode: new r.LazyArray(r.uint16, 'segCount'),\n reservedPad: new r.Reserved(r.uint16), // This value should be zero\n startCode: new r.LazyArray(r.uint16, 'segCount'),\n idDelta: new r.LazyArray(r.int16, 'segCount'),\n idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n },\n\n 6: { // Trimmed table\n length: r.uint16,\n language: r.uint16,\n firstCode: r.uint16,\n entryCount: r.uint16,\n glyphIndices: new r.LazyArray(r.uint16, 'entryCount')\n },\n\n 8: { // mixed 16-bit and 32-bit coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint16,\n is32: new r.LazyArray(r.uint8, 8192),\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 10: { // Trimmed Array\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n firstCode: r.uint32,\n entryCount: r.uint32,\n glyphIndices: new r.LazyArray(r.uint16, 'numChars')\n },\n\n 12: { // Segmented coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 14: { // Unicode Variation Sequences\n length: r.uint32,\n numRecords: r.uint32,\n varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n }\n});\n\nlet CmapEntry = new r.Struct({\n platformID: r.uint16, // Platform identifier\n encodingID: r.uint16, // Platform-specific encoding identifier\n table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n version: r.uint16,\n numSubtables: r.uint16,\n tables: new r.Array(CmapEntry, 'numSubtables')\n});\n","import * as r from 'restructure';\n\n// font header\nexport default new r.Struct({\n version: r.int32, // 0x00010000 (version 1.0)\n revision: r.int32, // set by font manufacturer\n checkSumAdjustment: r.uint32,\n magicNumber: r.uint32, // set to 0x5F0F3CF5\n flags: r.uint16,\n unitsPerEm: r.uint16, // range from 64 to 16384\n created: new r.Array(r.int32, 2),\n modified: new r.Array(r.int32, 2),\n xMin: r.int16, // for all glyph bounding boxes\n yMin: r.int16, // for all glyph bounding boxes\n xMax: r.int16, // for all glyph bounding boxes\n yMax: r.int16, // for all glyph bounding boxes\n macStyle: new r.Bitfield(r.uint16, [\n 'bold', 'italic', 'underline', 'outline',\n 'shadow', 'condensed', 'extended'\n ]),\n lowestRecPPEM: r.uint16, // smallest readable size in pixels\n fontDirectionHint: r.int16,\n indexToLocFormat: r.int16, // 0 for short offsets, 1 for long\n glyphDataFormat: r.int16 // 0 for current format\n});\n","import * as r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n version: r.int32,\n ascent: r.int16, // Distance from baseline of highest ascender\n descent: r.int16, // Distance from baseline of lowest descender\n lineGap: r.int16, // Typographic line gap\n advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table\n minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table\n minRightSideBearing: r.int16, // Minimum right sidebearing value\n xMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n caretSlopeRun: r.int16, // 0 for vertical\n caretOffset: r.int16, // Set to 0 for non-slanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // 0 for current format\n numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table\n});\n","import * as r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n advance: r.uint16,\n bearing: r.int16\n});\n\nexport default new r.Struct({\n metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n version: r.int32,\n numGlyphs: r.uint16, // The number of glyphs in the font\n maxPoints: r.uint16, // Maximum points in a non-composite glyph\n maxContours: r.uint16, // Maximum contours in a non-composite glyph\n maxComponentPoints: r.uint16, // Maximum points in a composite glyph\n maxComponentContours: r.uint16, // Maximum contours in a composite glyph\n maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise\n maxTwilightPoints: r.uint16, // Maximum points used in Z0\n maxStorage: r.uint16, // Number of Storage Area locations\n maxFunctionDefs: r.uint16, // Number of FDEFs\n maxInstructionDefs: r.uint16, // Number of IDEFs\n maxStackElements: r.uint16, // Maximum stack depth\n maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions\n maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph\n maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components\n});\n","import * as r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n platformID: r.uint16,\n encodingID: r.uint16,\n languageID: r.uint16,\n nameID: r.uint16,\n length: r.uint16,\n string: new r.Pointer(r.uint16,\n new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n { type: 'parent', relativeTo: ctx => ctx.parent.stringOffset, allowNull: false }\n )\n});\n\nlet LangTagRecord = new r.Struct({\n length: r.uint16,\n tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: ctx => ctx.stringOffset})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n 0: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count')\n },\n 1: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count'),\n langTagCount: r.uint16,\n langTags: new r.Array(LangTagRecord, 'langTagCount')\n }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n 'copyright',\n 'fontFamily',\n 'fontSubfamily',\n 'uniqueSubfamily',\n 'fullName',\n 'version',\n 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n 'trademark',\n 'manufacturer',\n 'designer',\n 'description',\n 'vendorURL',\n 'designerURL',\n 'license',\n 'licenseURL',\n null, // reserved\n 'preferredFamily',\n 'preferredSubfamily',\n 'compatibleFull',\n 'sampleText',\n 'postscriptCIDFontName',\n 'wwsFamilyName',\n 'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n var records = {};\n for (let record of this.records) {\n // find out what language this is for\n let language = LANGUAGES[record.platformID][record.languageID];\n\n if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n language = this.langTags[record.languageID - 0x8000].tag;\n }\n\n if (language == null) {\n language = record.platformID + '-' + record.languageID;\n }\n\n // if the nameID is >= 256, it is a font feature record (AAT)\n let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n if (records[key] == null) {\n records[key] = {};\n }\n\n let obj = records[key];\n if (record.nameID >= 256) {\n obj = obj[record.nameID] || (obj[record.nameID] = {});\n }\n\n if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n obj[language] = record.string;\n }\n }\n\n this.records = records;\n};\n\nNameTable.preEncode = function() {\n if (Array.isArray(this.records)) return;\n this.version = 0;\n\n let records = [];\n for (let key in this.records) {\n let val = this.records[key];\n if (key === 'fontFeatures') continue;\n\n records.push({\n platformID: 3,\n encodingID: 1,\n languageID: 0x409,\n nameID: NAMES.indexOf(key),\n length: val.en.length * 2,\n string: val.en\n });\n\n if (key === 'postscriptName') {\n records.push({\n platformID: 1,\n encodingID: 0,\n languageID: 0,\n nameID: NAMES.indexOf(key),\n length: val.en.length,\n string: val.en\n });\n }\n }\n\n this.records = records;\n this.count = records.length;\n this.stringOffset = NameTable.size(this, null, false);\n};\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n return MAC_LANGUAGE_ENCODINGS[languageID];\n }\n \n return ENCODINGS[platformID][encodingID];\n}\n\nconst SINGLE_BYTE_ENCODINGS = new Set(['x-mac-roman', 'x-mac-cyrillic', 'iso-8859-6', 'iso-8859-8']);\nconst MAC_ENCODINGS = {\n 'x-mac-croatian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',\n 'x-mac-gaelic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',\n 'x-mac-greek': 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\\u00AD',\n 'x-mac-icelandic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-inuit': 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',\n 'x-mac-ce': 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',\n 'x-mac-romanian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-turkish': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'\n};\n\nconst encodingCache = new Map();\n\nexport function getEncodingMapping(encoding) {\n let cached = encodingCache.get(encoding);\n if (cached) {\n return cached;\n }\n\n // These encodings aren't supported by TextDecoder.\n let mapping = MAC_ENCODINGS[encoding];\n if (mapping) {\n let res = new Map();\n for (let i = 0; i < mapping.length; i++) {\n res.set(mapping.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n\n // Only single byte encodings can be mapped 1:1.\n if (SINGLE_BYTE_ENCODINGS.has(encoding)) {\n // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings.\n // Use this to create a mapping of code points.\n let decoder = new TextDecoder(encoding);\n let mapping = new Uint8Array(0x80);\n for (let i = 0; i < 0x80; i++) {\n mapping[i] = 0x80 + i;\n }\n\n let res = new Map();\n let s = decoder.decode(mapping);\n for (let i = 0; i < 0x80; i++) {\n res.set(s.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n // unicode\n ['utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be'],\n \n // macintosh\n // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n // 0\tRoman 17\tMalayalam\n // 1\tJapanese\t 18\tSinhalese\n // 2\tTraditional Chinese\t 19\tBurmese\n // 3\tKorean\t 20\tKhmer\n // 4\tArabic\t 21\tThai\n // 5\tHebrew\t 22\tLaotian\n // 6\tGreek\t 23\tGeorgian\n // 7\tRussian\t 24\tArmenian\n // 8\tRSymbol\t 25\tSimplified Chinese\n // 9\tDevanagari\t 26\tTibetan\n // 10\tGurmukhi\t 27\tMongolian\n // 11\tGujarati\t 28\tGeez\n // 12\tOriya\t 29\tSlavic\n // 13\tBengali\t 30\tVietnamese\n // 14\tTamil\t 31\tSindhi\n // 15\tTelugu\t 32\t(Uninterpreted)\n // 16\tKannada\n ['x-mac-roman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n 'x-mac-greek', 'x-mac-cyrillic', 'x-mac-symbol', 'x-mac-devanagari', 'x-mac-gurmukhi', 'x-mac-gujarati',\n 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n 'Burmese', 'Khmer', 'iso-8859-11', 'Laotian', 'Georgian', 'Armenian', 'gbk', \n 'Tibetan', 'Mongolian', 'Geez', 'x-mac-ce', 'Vietnamese', 'Sindhi'],\n \n // ISO (deprecated)\n ['ascii', null, 'iso-8859-1'],\n \n // windows\n // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n ['symbol', 'utf-16be', 'shift-jis', 'gb18030', 'big5', 'euc-kr', 'johab', null, null, null, 'utf-16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n 15: 'x-mac-icelandic',\n 17: 'x-mac-turkish',\n 18: 'x-mac-croatian',\n 24: 'x-mac-ce',\n 25: 'x-mac-ce',\n 26: 'x-mac-ce',\n 27: 'x-mac-ce',\n 28: 'x-mac-ce',\n 30: 'x-mac-icelandic',\n 37: 'x-mac-romanian',\n 38: 'x-mac-ce',\n 39: 'x-mac-ce',\n 40: 'x-mac-ce',\n 143: 'x-mac-inuit',\n 146: 'x-mac-gaelic'\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n // unicode\n [],\n \n { // macintosh\n 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw',\n 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn',\n 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny',\n 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg',\n 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo',\n 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy',\n 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu',\n 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca',\n 8: 'pt', 38: 'cz', 68: 'as', 131: 'la',\n 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu',\n 10: 'he', 40: 'si', 70: 'pa', 133: 'gn',\n 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay',\n 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt',\n 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug',\n 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz',\n 15: 'is', 45: 'uk', 75: 'te', 138: 'jv',\n 16: 'mt', 46: 'be', 76: 'si', 139: 'su',\n 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl',\n 18: 'hr', 48: 'kk', 78: 'km', 141: 'af',\n 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br',\n 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu',\n 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd',\n 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv',\n 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga',\n 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to',\n 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton',\n 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl',\n 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az',\n 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn',\n 29: 'se', 59: 'ps', 89: 'sw',\n },\n \n // ISO (deprecated)\n [],\n \n { // windows \n 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', \n 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', \n 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', \n 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', \n 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', \n 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', \n 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', \n 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', \n 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', \n 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', \n 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', \n 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', \n 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', \n 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', \n 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', \n 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', \n 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', \n 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', \n 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', \n 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', \n 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', \n 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', \n 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', \n 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', \n 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', \n 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', \n 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', \n 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', \n 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', \n 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', \n 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', \n 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', \n 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', \n 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', \n 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', \n 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', \n 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', \n 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', \n 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', \n 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', \n 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', \n 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', \n 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', \n 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', \n 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', \n 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', \n 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', \n 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', \n 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', \n 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', \n 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', \n 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', \n }\n];\n","import * as r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n header: {\n xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space\n usWeightClass: r.uint16, // visual weight of stroke in glyphs\n usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio)\n fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n null, 'noEmbedding', 'viewOnly', 'editable', null,\n null, null, null, 'noSubsetting', 'bitmapOnly'\n ]),\n ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts\n ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts\n ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts\n ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts\n ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts\n ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts\n ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts\n ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts\n yStrikeoutSize: r.int16, // width of the strikeout stroke\n yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline\n sFamilyClass: r.int16, // classification of font-family design\n panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface\n ulCharRange: new r.Array(r.uint32, 4),\n vendorID: new r.String(4), // four character identifier for the font vendor\n fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font\n 'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n ]),\n usFirstCharIndex: r.uint16, // The minimum Unicode index in this font\n usLastCharIndex: r.uint16 // The maximum Unicode index in this font\n },\n\n // The Apple version of this table ends here, but the Microsoft one continues on...\n 0: {},\n\n 1: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2)\n },\n\n 2: {\n // these should be common with version 1 somehow\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16\n },\n\n 5: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16,\n\n usLowerOpticalPointSize: r.uint16,\n usUpperOpticalPointSize: r.uint16\n }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import * as r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n header: { // these fields exist at the top of all versions\n italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline\n underlineThickness: r.int16, // Suggested values for the underline thickness\n isFixedPitch: r.uint32, // Whether the font is monospaced\n minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n },\n\n 1: {}, // version 1 has no additional fields\n\n 2: {\n numberOfGlyphs: r.uint16,\n glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n names: new r.Array(new r.String(r.uint8))\n },\n\n 2.5: {\n numberOfGlyphs: r.uint16,\n offsets: new r.Array(r.uint8, 'numberOfGlyphs')\n },\n\n 3: {}, // version 3 has no additional fields\n\n 4: {\n map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n }\n});\n","import * as r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n controlValues: new r.Array(r.int16)\n});\n","import * as r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n instructions: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n 0: {\n offsets: new r.Array(r.uint16)\n },\n 1: {\n offsets: new r.Array(r.uint32)\n }\n});\n\nloca.process = function() {\n if (this.version === 0 && !this._processed) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] <<= 1;\n }\n this._processed = true;\n }\n};\n\nloca.preEncode = function() {\n if (this.version === 0 && this._processed !== false) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] >>>= 1;\n }\n this._processed = false;\n }\n};\n\nexport default loca;\n","import * as r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n controlValueProgram: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import * as r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n constructor(stream) {\n this.stream = stream;\n this.decode();\n }\n\n static decode(stream) {\n return new CFFFont(stream);\n }\n\n decode() {\n let start = this.stream.pos;\n let top = CFFTop.decode(this.stream);\n for (let key in top) {\n let val = top[key];\n this[key] = val;\n }\n\n if (this.version < 2) {\n if (this.topDictIndex.length !== 1) {\n throw new Error(\"Only a single font is allowed in CFF\");\n }\n\n this.topDict = this.topDictIndex[0];\n }\n\n this.isCIDFont = this.topDict.ROS != null;\n return this;\n }\n\n string(sid) {\n if (this.version >= 2) {\n return null;\n }\n\n if (sid < standardStrings.length) {\n return standardStrings[sid];\n }\n\n return this.stringIndex[sid - standardStrings.length];\n }\n\n get postscriptName() {\n if (this.version < 2) {\n return this.nameIndex[0];\n }\n\n return null;\n }\n\n get fullName() {\n return this.string(this.topDict.FullName);\n }\n\n get familyName() {\n return this.string(this.topDict.FamilyName);\n }\n\n getCharString(glyph) {\n this.stream.pos = this.topDict.CharStrings[glyph].offset;\n return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n }\n\n getGlyphName(gid) {\n // CFF2 glyph names are in the post table.\n if (this.version >= 2) {\n return null;\n }\n\n // CID-keyed fonts don't have glyph names\n if (this.isCIDFont) {\n return null;\n }\n\n let { charset } = this.topDict;\n if (Array.isArray(charset)) {\n return charset[gid];\n }\n\n if (gid === 0) {\n return '.notdef';\n }\n\n gid -= 1;\n\n switch (charset.version) {\n case 0:\n return this.string(charset.glyphs[gid]);\n\n case 1:\n case 2:\n for (let i = 0; i < charset.ranges.length; i++) {\n let range = charset.ranges[i];\n if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n return this.string(range.first + (gid - range.offset));\n }\n }\n break;\n }\n\n return null;\n }\n\n fdForGlyph(gid) {\n if (!this.topDict.FDSelect) {\n return null;\n }\n\n switch (this.topDict.FDSelect.version) {\n case 0:\n return this.topDict.FDSelect.fds[gid];\n\n case 3:\n case 4:\n let { ranges } = this.topDict.FDSelect;\n let low = 0;\n let high = ranges.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n\n if (gid < ranges[mid].first) {\n high = mid - 1;\n } else if (mid < high && gid >= ranges[mid + 1].first) {\n low = mid + 1;\n } else {\n return ranges[mid].fd;\n }\n }\n default:\n throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n }\n }\n\n privateDictForGlyph(gid) {\n if (this.topDict.FDSelect) {\n let fd = this.fdForGlyph(gid);\n if (this.topDict.FDArray[fd]) {\n return this.topDict.FDArray[fd].Private;\n }\n\n return null;\n }\n\n if (this.version < 2) {\n return this.topDict.Private;\n }\n\n return this.topDict.FDArray[0].Private;\n }\n}\n\nexport default CFFFont;\n","import * as r from 'restructure';\n\nexport default class CFFIndex {\n constructor(type) {\n this.type = type;\n }\n\n getCFFVersion(ctx) {\n while (ctx && !ctx.hdrSize) {\n ctx = ctx.parent;\n }\n\n return ctx ? ctx.version : -1;\n }\n\n decode(stream, parent) {\n let version = this.getCFFVersion(parent);\n let count = version >= 2\n ? stream.readUInt32BE()\n : stream.readUInt16BE();\n\n if (count === 0) {\n return [];\n }\n\n let offSize = stream.readUInt8();\n let offsetType;\n if (offSize === 1) {\n offsetType = r.uint8;\n } else if (offSize === 2) {\n offsetType = r.uint16;\n } else if (offSize === 3) {\n offsetType = r.uint24;\n } else if (offSize === 4) {\n offsetType = r.uint32;\n } else {\n throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n }\n\n let ret = [];\n let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n let start = offsetType.decode(stream);\n for (let i = 0; i < count; i++) {\n let end = offsetType.decode(stream);\n\n if (this.type != null) {\n let pos = stream.pos;\n stream.pos = startPos + start;\n\n parent.length = end - start;\n ret.push(this.type.decode(stream, parent));\n stream.pos = pos;\n } else {\n ret.push({\n offset: startPos + start,\n length: end - start\n });\n }\n\n start = end;\n }\n\n stream.pos = startPos + start;\n return ret;\n }\n\n size(arr, parent) {\n let size = 2;\n if (arr.length === 0) {\n return size;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let offset = 1;\n for (let i = 0; i < arr.length; i++) {\n let item = arr[i];\n offset += type.size(item, parent);\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n size += 1 + offsetType.size() * (arr.length + 1);\n size += offset - 1;\n\n return size;\n }\n\n encode(stream, arr, parent) {\n stream.writeUInt16BE(arr.length);\n if (arr.length === 0) {\n return;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let sizes = [];\n let offset = 1;\n for (let item of arr) {\n let s = type.size(item, parent);\n sizes.push(s);\n offset += s;\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n // write offset size\n stream.writeUInt8(offsetType.size());\n\n // write elements\n offset = 1;\n offsetType.encode(stream, offset);\n\n for (let size of sizes) {\n offset += size;\n offsetType.encode(stream, offset);\n }\n\n for (let item of arr) {\n type.encode(stream, item, parent);\n }\n\n return;\n }\n}\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n constructor(predefinedOps, type) {\n this.predefinedOps = predefinedOps;\n this.type = type;\n }\n\n decode(stream, parent, operands) {\n if (this.predefinedOps[operands[0]]) {\n return this.predefinedOps[operands[0]];\n }\n\n return this.type.decode(stream, parent, operands);\n }\n\n size(value, ctx) {\n return this.type.size(value, ctx);\n }\n\n encode(stream, value, ctx) {\n let index = this.predefinedOps.indexOf(value);\n if (index !== -1) {\n return index;\n }\n\n return this.type.encode(stream, value, ctx);\n }\n}\n\nclass CFFEncodingVersion extends r.Number {\n constructor() {\n super('UInt8');\n }\n\n decode(stream) {\n return r.uint8.decode(stream) & 0x7f;\n }\n}\n\nlet Range1 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n 0: {\n nCodes: r.uint8,\n codes: new r.Array(r.uint8, 'nCodes')\n },\n\n 1: {\n nRanges: r.uint8,\n ranges: new r.Array(Range1, 'nRanges')\n }\n\n // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n decode(stream, parent) {\n let length = resolveLength(this.length, stream, parent);\n let count = 0;\n let res = [];\n while (count < length) {\n let range = this.type.decode(stream, parent);\n range.offset = count;\n count += range.nLeft + 1;\n res.push(range);\n }\n\n return res;\n }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n 0: {\n glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n },\n\n 1: {\n ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n },\n\n 2: {\n ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n first: r.uint16,\n fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n first: r.uint32,\n fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n 0: {\n fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n },\n\n 3: {\n nRanges: r.uint16,\n ranges: new r.Array(FDRange3, 'nRanges'),\n sentinel: r.uint16\n },\n\n 4: {\n nRanges: r.uint32,\n ranges: new r.Array(FDRange4, 'nRanges'),\n sentinel: r.uint32\n }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n decode(stream, parent, operands) {\n parent.length = operands[0];\n return ptr.decode(stream, parent, [operands[1]]);\n }\n\n size(dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n }\n\n encode(stream, dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n }\n}\n\nlet FontDict = new CFFDict([\n // key name type(s) default\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 38], 'FontName', 'sid', null],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [[12, 5], 'PaintType', 'number', 0],\n]);\n\nlet CFFTopDict = new CFFDict([\n // key name type(s) default\n [[12, 30], 'ROS', ['sid', 'sid', 'number'], null],\n\n [0, 'version', 'sid', null],\n [1, 'Notice', 'sid', null],\n [[12, 0], 'Copyright', 'sid', null],\n [2, 'FullName', 'sid', null],\n [3, 'FamilyName', 'sid', null],\n [4, 'Weight', 'sid', null],\n [[12, 1], 'isFixedPitch', 'boolean', false],\n [[12, 2], 'ItalicAngle', 'number', 0],\n [[12, 3], 'UnderlinePosition', 'number', -100],\n [[12, 4], 'UnderlineThickness', 'number', 50],\n [[12, 5], 'PaintType', 'number', 0],\n [[12, 6], 'CharstringType', 'number', 2],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [13, 'UniqueID', 'number', null],\n [5, 'FontBBox', 'array', [0, 0, 0, 0]],\n [[12, 8], 'StrokeWidth', 'number', 0],\n [14, 'XUID', 'array', null],\n [15, 'charset', CFFCharset, ISOAdobeCharset],\n [16, 'Encoding', CFFEncoding, StandardEncoding],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 20], 'SyntheticBase', 'number', null],\n [[12, 21], 'PostScript', 'sid', null],\n [[12, 22], 'BaseFontName', 'sid', null],\n [[12, 23], 'BaseFontBlend', 'delta', null],\n\n // CID font specific\n [[12, 31], 'CIDFontVersion', 'number', 0],\n [[12, 32], 'CIDFontRevision', 'number', 0],\n [[12, 33], 'CIDFontType', 'number', 0],\n [[12, 34], 'CIDCount', 'number', 8720],\n [[12, 35], 'UIDBase', 'number', null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet VariationStore = new r.Struct({\n length: r.uint16,\n itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [24, 'vstore', new CFFPointer(VariationStore), null],\n [25, 'maxstack', 'number', 193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n 1: {\n hdrSize: r.uint8,\n offSize: r.uint8,\n nameIndex: new CFFIndex(new r.String('length')),\n topDictIndex: new CFFIndex(CFFTopDict),\n stringIndex: new CFFIndex(new r.String('length')),\n globalSubrIndex: new CFFIndex\n },\n\n 2: {\n hdrSize: r.uint8,\n length: r.uint16,\n topDict: CFF2TopDict,\n globalSubrIndex: new CFFIndex\n }\n});\n\nexport default CFFTop;\n","import isEqual from 'fast-deep-equal';\nimport * as r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure';\n\nexport default class CFFDict {\n constructor(ops = []) {\n this.ops = ops;\n this.fields = {};\n for (let field of ops) {\n let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n this.fields[key] = field;\n }\n }\n\n decodeOperands(type, stream, ret, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n } else if (type.decode != null) {\n return type.decode(stream, ret, operands);\n } else {\n switch (type) {\n case 'number':\n case 'offset':\n case 'sid':\n return operands[0];\n case 'boolean':\n return !!operands[0];\n default:\n return operands;\n }\n }\n }\n\n encodeOperands(type, stream, ctx, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n } else if (type.encode != null) {\n return type.encode(stream, operands, ctx);\n } else if (typeof operands === 'number') {\n return [operands];\n } else if (typeof operands === 'boolean') {\n return [+operands];\n } else if (Array.isArray(operands)) {\n return operands;\n } else {\n return [operands];\n }\n }\n\n decode(stream, parent) {\n let end = stream.pos + parent.length;\n let ret = {};\n let operands = [];\n\n // define hidden properties\n Object.defineProperties(ret, {\n parent: { value: parent },\n _startOffset: { value: stream.pos }\n });\n\n // fill in defaults\n for (let key in this.fields) {\n let field = this.fields[key];\n ret[field[1]] = field[3];\n }\n\n while (stream.pos < end) {\n let b = stream.readUInt8();\n if (b < 28) {\n if (b === 12) {\n b = (b << 8) | stream.readUInt8();\n }\n\n let field = this.fields[b];\n if (!field) {\n throw new Error(`Unknown operator ${b}`);\n }\n\n let val = this.decodeOperands(field[2], stream, ret, operands);\n if (val != null) {\n if (val instanceof PropertyDescriptor) {\n Object.defineProperty(ret, field[1], val);\n } else {\n ret[field[1]] = val;\n }\n }\n\n operands = [];\n } else {\n operands.push(CFFOperand.decode(stream, b));\n }\n }\n\n return ret;\n }\n\n size(dict, parent, includePointers = true) {\n let ctx = {\n parent,\n val: dict,\n pointerSize: 0,\n startOffset: parent.startOffset || 0\n };\n\n let len = 0;\n\n for (let k in this.fields) {\n let field = this.fields[k];\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], null, ctx, val);\n for (let op of operands) {\n len += CFFOperand.size(op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n len += key.length;\n }\n\n if (includePointers) {\n len += ctx.pointerSize;\n }\n\n return len;\n }\n\n encode(stream, dict, parent) {\n let ctx = {\n pointers: [],\n startOffset: stream.pos,\n parent,\n val: dict,\n pointerSize: 0\n };\n\n ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n for (let field of this.ops) {\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], stream, ctx, val);\n for (let op of operands) {\n CFFOperand.encode(stream, op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n for (let op of key) {\n stream.writeUInt8(op);\n }\n }\n\n let i = 0;\n while (i < ctx.pointers.length) {\n let ptr = ctx.pointers[i++];\n ptr.type.encode(stream, ptr.val, ptr.parent);\n }\n\n return;\n }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n '.': 10,\n 'E': 11,\n 'E-': 12,\n '-': 14\n};\n\nexport default class CFFOperand {\n static decode(stream, value) {\n if (32 <= value && value <= 246) {\n return value - 139;\n }\n\n if (247 <= value && value <= 250) {\n return (value - 247) * 256 + stream.readUInt8() + 108;\n }\n\n if (251 <= value && value <= 254) {\n return -(value - 251) * 256 - stream.readUInt8() - 108;\n }\n\n if (value === 28) {\n return stream.readInt16BE();\n }\n\n if (value === 29) {\n return stream.readInt32BE();\n }\n\n if (value === 30) {\n let str = '';\n while (true) {\n let b = stream.readUInt8();\n\n let n1 = b >> 4;\n if (n1 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n1];\n\n let n2 = b & 15;\n if (n2 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n2];\n }\n\n return parseFloat(str);\n }\n\n return null;\n }\n\n static size(value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, set to 32768\n if (value.forceLarge) {\n value = 32768;\n }\n\n if ((value | 0) !== value) { // floating point\n let str = '' + value;\n return 1 + Math.ceil((str.length + 1) / 2);\n\n } else if (-107 <= value && value <= 107) {\n return 1;\n\n } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n return 2;\n\n } else if (-32768 <= value && value <= 32767) {\n return 3;\n\n } else {\n return 5;\n }\n }\n\n static encode(stream, value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, save the old value and set to 32768\n let val = Number(value);\n\n if (value.forceLarge) {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n\n } else if ((val | 0) !== val) { // floating point\n stream.writeUInt8(30);\n\n let str = '' + val;\n for (let i = 0; i < str.length; i += 2) {\n let c1 = str[i];\n let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n if (i === str.length - 1) {\n var n2 = FLOAT_EOF;\n } else {\n let c2 = str[i + 1];\n var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n }\n\n stream.writeUInt8((n1 << 4) | (n2 & 15));\n }\n\n if (n2 !== FLOAT_EOF) {\n return stream.writeUInt8((FLOAT_EOF << 4));\n }\n\n } else if (-107 <= val && val <= 107) {\n return stream.writeUInt8(val + 139);\n\n } else if (108 <= val && val <= 1131) {\n val -= 108;\n stream.writeUInt8((val >> 8) + 247);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-1131 <= val && val <= -108) {\n val = -val - 108;\n stream.writeUInt8((val >> 8) + 251);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-32768 <= val && val <= 32767) {\n stream.writeUInt8(28);\n return stream.writeInt16BE(val);\n\n } else {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n }\n }\n}\n","import * as r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n constructor(type, options = {}) {\n if (options.type == null) {\n options.type = 'global';\n }\n\n super(null, type, options);\n }\n\n decode(stream, parent, operands) {\n this.offsetType = {\n decode: () => operands[0]\n };\n\n return super.decode(stream, parent, operands);\n }\n\n encode(stream, value, ctx) {\n if (!stream) {\n // compute the size (so ctx.pointerSize is correct)\n this.offsetType = {\n size: () => 0\n };\n\n this.size(value, ctx);\n return [new Ptr(0)];\n }\n\n let ptr = null;\n this.offsetType = {\n encode: (stream, val) => ptr = val\n };\n\n super.encode(stream, value, ctx);\n return [new Ptr(ptr)];\n }\n}\n\nclass Ptr {\n constructor(val) {\n this.val = val;\n this.forceLarge = true;\n }\n\n valueOf() {\n return this.val;\n }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n static decode(stream, parent, operands) {\n let numBlends = operands.pop();\n\n // TODO: actually blend. For now just consume the deltas\n // since we don't use any of the values anyway.\n while (operands.length > numBlends) {\n operands.pop();\n }\n }\n}\n\nexport default new CFFDict([\n // key name type default\n [6, 'BlueValues', 'delta', null],\n [7, 'OtherBlues', 'delta', null],\n [8, 'FamilyBlues', 'delta', null],\n [9, 'FamilyOtherBlues', 'delta', null],\n [[12, 9], 'BlueScale', 'number', 0.039625],\n [[12, 10], 'BlueShift', 'number', 7],\n [[12, 11], 'BlueFuzz', 'number', 1],\n [10, 'StdHW', 'number', null],\n [11, 'StdVW', 'number', null],\n [[12, 12], 'StemSnapH', 'delta', null],\n [[12, 13], 'StemSnapV', 'delta', null],\n [[12, 14], 'ForceBold', 'boolean', false],\n [[12, 17], 'LanguageGroup', 'number', 0],\n [[12, 18], 'ExpansionFactor', 'number', 0.06],\n [[12, 19], 'initialRandomSeed', 'number', 0],\n [20, 'defaultWidthX', 'number', 0],\n [21, 'nominalWidthX', 'number', 0],\n [22, 'vsindex', 'number', 0],\n [23, 'blend', CFFBlendOp, null],\n [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n 'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n 'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n 'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior'\n];\n","import {Feature} from './opentype';\nimport * as r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n startCoord: F2DOT14,\n peakCoord: F2DOT14,\n endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n axisCount: r.uint16,\n regionCount: r.uint16,\n variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n itemCount: r.uint16,\n shortDeltaCount: r.uint16,\n regionIndexCount: r.uint16,\n regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n format: r.uint16,\n variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n variationDataCount: r.uint16,\n itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n 1: {\n axisIndex: r.uint16,\n axisIndex: r.uint16,\n filterRangeMinValue: F2DOT14,\n filterRangeMaxValue: F2DOT14\n }\n});\n\nlet ConditionSet = new r.Struct({\n conditionCount: r.uint16,\n conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n featureIndex: r.uint16,\n alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n version: r.fixed32,\n substitutionCount: r.uint16,\n substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n featureVariationRecordCount: r.uint32,\n featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import * as r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n reserved: new r.Reserved(r.uint16),\n reqFeatureIndex: r.uint16,\n featureCount: r.uint16,\n featureIndexes: new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n tag: new r.String(4),\n langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n count: r.uint16,\n langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nlet FeatureParams = new r.Struct({\n version: r.uint16, // should be set to 0 according OT spec\n nameID: r.uint16, //OT spec: UI Name ID or uiLabelNameId\n});\n\nexport let Feature = new r.Struct({\n featureParams: new r.Pointer(r.uint16, FeatureParams),\n lookupCount: r.uint16,\n lookupListIndexes: new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n tag: new r.String(4),\n feature: new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Struct({\n markAttachmentType: r.uint8,\n flags: new r.Bitfield(r.uint8, [\n 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n 'ignoreMarks', 'useMarkFilteringSet'\n ])\n});\n\nexport function LookupList(SubTable) {\n let Lookup = new r.Struct({\n lookupType: r.uint16,\n flags: LookupFlags,\n subTableCount: r.uint16,\n subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n markFilteringSet: new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet)\n });\n\n return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n 1: {\n glyphCount: r.uint16,\n glyphs: new r.Array(r.uint16, 'glyphCount')\n },\n 2: {\n rangeCount: r.uint16,\n rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n class: r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n 1: { // Class array\n startGlyph: r.uint16,\n glyphCount: r.uint16,\n classValueArray: new r.Array(r.uint16, 'glyphCount')\n },\n 2: { // Class ranges\n classRangeCount: r.uint16,\n classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex\n b: r.uint16, // endSize for Device, innerIndex for VariationIndex\n deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n sequenceIndex: r.uint16,\n lookupListIndex: r.uint16\n});\n\nlet Rule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n input: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n classes: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context\n coverage: new r.Pointer(r.uint16, Coverage),\n ruleSetCount: r.uint16,\n ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n },\n 2: { // Class-based context\n coverage: new r.Pointer(r.uint16, Coverage),\n classDef: new r.Pointer(r.uint16, ClassDef),\n classSetCnt: r.uint16,\n classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n },\n 3: {\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n backtrackGlyphCount: r.uint16,\n backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n input: new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n lookaheadGlyphCount: r.uint16,\n lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context glyph substitution\n coverage: new r.Pointer(r.uint16, Coverage),\n chainCount: r.uint16,\n chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 2: { // Class-based chaining context\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackClassDef: new r.Pointer(r.uint16, ClassDef),\n inputClassDef: new r.Pointer(r.uint16, ClassDef),\n lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),\n chainCount: r.uint16,\n chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 3: { // Coverage-based chaining context\n backtrackGlyphCount: r.uint16,\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n","import * as r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n glyphIndex: r.uint16,\n vertOriginY: r.int16\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n defaultVertOriginY: r.int16,\n numVertOriginYMetrics: r.uint16,\n metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import * as r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n ascender: r.int8,\n descender: r.int8,\n widthMax: r.uint8,\n caretSlopeNumerator: r.int8,\n caretSlopeDenominator: r.int8,\n caretOffset: r.int8,\n minOriginSB: r.int8,\n minAdvanceSB: r.int8,\n maxBeforeBL: r.int8,\n minAfterBL: r.int8,\n pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n glyphCode: r.uint16,\n offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n header: {\n imageFormat: r.uint16,\n imageDataOffset: r.uint32\n },\n\n 1: {\n offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 2: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics\n },\n\n 3: {\n offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 4: {\n numGlyphs: r.uint32,\n glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n },\n\n 5: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics,\n numGlyphs: r.uint32,\n glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n }\n});\n\nlet IndexSubtableArray = new r.Struct({\n firstGlyphIndex: r.uint16,\n lastGlyphIndex: r.uint16,\n subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n indexTablesSize: r.uint32,\n numberOfIndexSubTables: r.uint32,\n colorRef: r.uint32,\n hori: SBitLineMetrics,\n vert: SBitLineMetrics,\n startGlyphIndex: r.uint16,\n endGlyphIndex: r.uint16,\n ppemX: r.uint8,\n ppemY: r.uint8,\n bitDepth: r.uint8,\n flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n version: r.uint32, // 0x00020000\n numSizes: r.uint32,\n sizes: new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import * as r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n horiBearingX: r.int8,\n horiBearingY: r.int8,\n horiAdvance: r.uint8,\n vertBearingX: r.int8,\n vertBearingY: r.int8,\n vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n bearingX: r.int8,\n bearingY: r.int8,\n advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n glyph: r.uint16,\n xOffset: r.int8,\n yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n 1: {\n metrics: SmallMetrics,\n data: ByteAligned\n },\n\n 2: {\n metrics: SmallMetrics,\n data: BitAligned\n },\n\n // format 3 is deprecated\n // format 4 is not supported by Microsoft\n\n 5: {\n data: BitAligned\n },\n\n 6: {\n metrics: BigMetrics,\n data: ByteAligned\n },\n\n 7: {\n metrics: BigMetrics,\n data: BitAligned\n },\n\n 8: {\n metrics: SmallMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 9: {\n metrics: BigMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 17: {\n metrics: SmallMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 18: {\n metrics: BigMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 19: {\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n }\n});\n\n","import * as r from 'restructure';\n\nlet ImageTable = new r.Struct({\n ppem: r.uint16,\n resolution: r.uint16,\n imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n version: r.uint16,\n flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n numImgTables: r.uint32,\n imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import * as r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).\n paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must\n}); // be less than numPaletteEntries in the CPAL table, except for\n // the special case noted below. Each palette entry is 16 bits.\n // A palette index of 0xFFFF is a special case indicating that\n // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only\n // and is not rendered for color.\n firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n // There will be numLayers consecutive entries for this base glyph.\n numLayers: r.uint16\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numBaseGlyphRecords: r.uint16,\n baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n numLayerRecords: r.uint16\n});\n","import * as r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n blue: r.uint8,\n green: r.uint8,\n red: r.uint8,\n alpha: r.uint8\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n header: {\n numPaletteEntries: r.uint16,\n numPalettes: r.uint16,\n numColorRecords: r.uint16,\n colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n colorRecordIndices: new r.Array(r.uint16, 'numPalettes'),\n },\n 0: {},\n 1: {\n offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),\n offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),\n offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16 // X or Y value, in design units\n },\n\n 2: { // Design units plus contour point\n coordinate: r.int16, // X or Y value, in design units\n referenceGlyph: r.uint16, // GlyphID of control glyph\n baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16, // X or Y value, in design units\n deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value\n }\n});\n\nlet BaseValues = new r.Struct({\n defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList\n baseCoordCount: r.uint16,\n baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList\n minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL\n});\n\nlet MinMax = new r.Struct({\n minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n featMinMaxCount: r.uint16, // May be 0\n featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n tag: new r.String(4), // 4-byte language system identification tag\n minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL\n defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL\n baseLangSysCount: r.uint16, // May be 0\n baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n tag: new r.String(4), // 4-byte script identification tag\n script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL\n baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL\n vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL\n },\n\n 0x00010000: {},\n 0x00010001: {\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16\n },\n\n 2: { // Contour point\n caretValuePoint: r.uint16\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16,\n deviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n ligGlyphCount: r.uint16,\n ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n markSetTableFormat: r.uint16,\n markSetCount: r.uint16,\n coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n glyphClassDef: new r.Pointer(r.uint16, ClassDef),\n attachList: new r.Pointer(r.uint16, AttachList),\n ligCaretList: new r.Pointer(r.uint16, LigCaretList),\n markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n },\n\n 0x00010000: {},\n 0x00010002: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)\n },\n 0x00010003: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n 'xPlacement', 'yPlacement',\n 'xAdvance', 'yAdvance',\n 'xPlaDevice', 'yPlaDevice',\n 'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n xPlacement: r.int16,\n yPlacement: r.int16,\n xAdvance: r.int16,\n yAdvance: r.int16,\n xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel })\n};\n\nclass ValueRecord {\n constructor(key = 'valueFormat') {\n this.key = key;\n }\n\n buildStruct(parent) {\n let struct = parent;\n while (!struct[this.key] && struct.parent) {\n struct = struct.parent;\n }\n\n if (!struct[this.key]) return;\n\n let fields = {};\n fields.rel = () => struct._startOffset;\n\n let format = struct[this.key];\n for (let key in format) {\n if (format[key]) {\n fields[key] = types[key];\n }\n }\n\n return new r.Struct(fields);\n }\n\n size(val, ctx) {\n return this.buildStruct(ctx).size(val, ctx);\n }\n\n decode(stream, parent) {\n let res = this.buildStruct(parent).decode(stream, parent);\n delete res.rel;\n return res;\n }\n}\n\nlet PairValueRecord = new r.Struct({\n secondGlyph: r.uint16,\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n xCoordinate: r.int16,\n yCoordinate: r.int16\n },\n\n 2: { // Design units plus contour point\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n anchorPoint: r.uint16\n },\n\n 3: { // Design units plus Device tables\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n xDeviceTable: new r.Pointer(r.uint16, Device),\n yDeviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet EntryExitRecord = new r.Struct({\n entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n class: r.uint16,\n markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n 1: { // Single positioning value\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n value: new ValueRecord()\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n valueCount: r.uint16,\n values: new r.LazyArray(new ValueRecord(), 'valueCount')\n }\n }),\n\n 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n 1: { // Adjustments for glyph pairs\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n pairSetCount: r.uint16,\n pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n },\n\n 2: { // Class pair adjustment\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n classDef1: new r.Pointer(r.uint16, ClassDef),\n classDef2: new r.Pointer(r.uint16, ClassDef),\n class1Count: r.uint16,\n class2Count: r.uint16,\n classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n }\n }),\n\n 3: { // Cursive Attachment Positioning\n format: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n entryExitCount: r.uint16,\n entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')\n },\n\n 4: { // MarkToBase Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n baseCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n baseArray: new r.Pointer(r.uint16, BaseArray)\n },\n\n 5: { // MarkToLigature Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n ligatureCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n ligatureArray: new r.Pointer(r.uint16, LigatureArray)\n },\n\n 6: { // MarkToMark Attachment Positioning\n format: r.uint16,\n mark1Coverage: new r.Pointer(r.uint16, Coverage),\n mark2Coverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n mark1Array: new r.Pointer(r.uint16, MarkArray),\n mark2Array: new r.Pointer(r.uint16, BaseArray)\n },\n\n 7: Context, // Contextual positioning\n 8: ChainingContext, // Chaining contextual positioning\n\n 9: { // Extension Positioning\n posFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 9\n extension: new r.Pointer(r.uint32, null)\n }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n glyph: r.uint16,\n compCount: r.uint16,\n components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, {// Single Substitution\n 1: {\n coverage: new r.Pointer(r.uint16, Coverage),\n deltaGlyphID: r.int16\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n substitute: new r.LazyArray(r.uint16, 'glyphCount')\n }\n }),\n\n 2: { // Multiple Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n },\n\n 3: { // Alternate Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n },\n\n 4: { // Ligature Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n },\n\n 5: Context, // Contextual Substitution\n 6: ChainingContext, // Chaining Contextual Substitution\n\n 7: { // Extension Substitution\n substFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 7\n extension: new r.Pointer(r.uint32, null)\n },\n\n 8: { // Reverse Chaining Contextual Single Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n glyphCount: r.uint16,\n substitutes: new r.Array(r.uint16, 'glyphCount')\n }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n","import * as r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n tag: new r.String(4),\n jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n langSysCount: r.uint16,\n langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n version: r.uint32, // should be 0x00010000\n scriptCount: r.uint16,\n scriptList: new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport { ItemVariationStore } from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n constructor(size) {\n this._size = size;\n }\n\n decode(stream, parent) {\n switch (this.size(0, parent)) {\n case 1: return stream.readUInt8();\n case 2: return stream.readUInt16BE();\n case 3: return stream.readUInt24BE();\n case 4: return stream.readUInt32BE();\n }\n }\n\n size(val, parent) {\n return resolveLength(this._size, null, parent);\n }\n}\n\nlet MapDataEntry = new r.Struct({\n entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n entryFormat: r.uint16,\n mapCount: r.uint16,\n mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import * as r from 'restructure';\n\nlet Signature = new r.Struct({\n format: r.uint32,\n length: r.uint32,\n offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n reserved: new r.Reserved(r.uint16, 2),\n cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature\n signature: new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n ulVersion: r.uint32, // Version number of the DSIG table (0x00000001)\n usNumSigs: r.uint16, // Number of signatures in the table\n usFlag: r.uint16, // Permission flags\n signatures: new r.Array(Signature, 'usNumSigs'),\n signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import * as r from 'restructure';\n\nlet GaspRange = new r.Struct({\n rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem\n rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n 'grayscale', 'gridfit',\n 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType\n ])\n});\n\nexport default new r.Struct({\n version: r.uint16, // set to 0\n numRanges: r.uint16,\n gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import * as r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n pixelSize: r.uint8,\n maximumWidth: r.uint8,\n widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n version: r.uint16,\n numRecords: r.int16,\n sizeDeviceRecord: r.int32,\n records: new r.Array(DeviceRecord, 'numRecords')\n});\n","import * as r from 'restructure';\n\nlet KernPair = new r.Struct({\n left: r.uint16,\n right: r.uint16,\n value: r.int16\n});\n\nlet ClassTable = new r.Struct({\n firstGlyph: r.uint16,\n nGlyphs: r.uint16,\n offsets: new r.Array(r.uint16, 'nGlyphs'),\n max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n off: t => t._startOffset - t.parent.parent._startOffset,\n len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n 0: {\n nPairs: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n pairs: new r.Array(KernPair, 'nPairs')\n },\n\n 2: {\n rowWidth: r.uint16,\n leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n },\n\n 3: {\n glyphCount: r.uint16,\n kernValueCount: r.uint8,\n leftClassCount: r.uint8,\n rightClassCount: r.uint8,\n flags: r.uint8,\n kernValue: new r.Array(r.int16, 'kernValueCount'),\n leftClass: new r.Array(r.uint8, 'glyphCount'),\n rightClass: new r.Array(r.uint8, 'glyphCount'),\n kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n 0: { // Microsoft uses this format\n subVersion: r.uint16, // Microsoft has an extra sub-table version number\n length: r.uint16, // Length of the subtable, in bytes\n format: r.uint8, // Format of subtable\n coverage: new r.Bitfield(r.uint8, [\n 'horizontal', // 1 if table has horizontal data, 0 if vertical\n 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text\n 'override' // If set to 1 the value in this table replaces the accumulated value\n ]),\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n },\n 1: { // Apple uses this format\n length: r.uint32,\n coverage: new r.Bitfield(r.uint8, [\n null, null, null, null, null,\n 'variation', // Set if table has variation kerning values\n 'crossStream', // Set if table has cross-stream kerning values\n 'vertical' // Set if table has vertical kerning values\n ]),\n format: r.uint8,\n tupleIndex: r.uint16,\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n 0: { // Microsoft Version\n nTables: r.uint16,\n tables: new r.Array(KernTable, 'nTables')\n },\n\n 1: { // Apple Version\n reserved: new r.Reserved(r.uint16), // the other half of the version number\n nTables: r.uint32,\n tables: new r.Array(KernTable, 'nTables')\n }\n});\n","import * as r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n version: r.uint16,\n numGlyphs: r.uint16,\n yPels: new r.Array(r.uint8, 'numGlyphs')\n});\n","import * as r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n version: r.uint16,\n fontNumber: r.uint32,\n pitch: r.uint16,\n xHeight: r.uint16,\n style: r.uint16,\n typeFamily: r.uint16,\n capHeight: r.uint16,\n symbolSet: r.uint16,\n typeface: new r.String(16),\n characterComplement: new r.String(8),\n fileName: new r.String(6),\n strokeWeight: new r.String(1),\n widthType: new r.String(1),\n serifStyle: r.uint8,\n reserved: new r.Reserved(r.uint8)\n});\n","import * as r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n bCharSet: r.uint8, // Character set\n xRatio: r.uint8, // Value to use for x-Ratio\n yStartRatio: r.uint8, // Starting y-Ratio value\n yEndRatio: r.uint8 // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n yPelHeight: r.uint16, // yPelHeight to which values apply\n yMax: r.int16, // Maximum value (in pels) for this yPelHeight\n yMin: r.int16 // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n recs: r.uint16, // Number of height records in this group\n startsz: r.uint8, // Starting yPelHeight\n endsz: r.uint8, // Ending yPelHeight\n entries: new r.Array(vTable, 'recs') // The VDMX records\n});\n\nexport default new r.Struct({\n version: r.uint16, // Version number (0 or 1)\n numRecs: r.uint16, // Number of VDMX groups present\n numRatios: r.uint16, // Number of aspect ratio groupings\n ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges\n offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range\n groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings\n});\n","import * as r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n version: r.uint16, // Version number of the Vertical Header Table\n ascent: r.int16, // The vertical typographic ascender for this font\n descent: r.int16, // The vertical typographic descender for this font\n lineGap: r.int16, // The vertical typographic line gap for this font\n advanceHeightMax: r.int16, // The maximum advance height measurement found in the font\n minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font\n minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font\n yMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Caret slope (rise/run)\n caretSlopeRun: r.int16,\n caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // Set to 0\n numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table\n});\n","import * as r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n advance: r.uint16, // The advance height of the glyph\n bearing: r.int16 // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n fromCoord: shortFrac,\n toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n pairCount: r.uint16,\n correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n axisCount: r.uint32,\n segment: new r.Array(Segment, 'axisCount')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n 0: { // Distance-based, no mapping\n deltas: new r.Array(r.int16, 32)\n },\n\n 1: { // Distance-based, with mapping\n deltas: new r.Array(r.int16, 32),\n mappingData: new LookupTable(r.uint16)\n },\n\n 2: { // Control point-based, no mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32)\n },\n\n 3: { // Control point-based, with mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32),\n mappingData: new LookupTable(r.uint16)\n }\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n defaultBaseline: r.uint16,\n subtable: BslnSubtable\n});\n","import * as r from 'restructure';\n\nclass UnboundedArrayAccessor {\n constructor(type, stream, parent) {\n this.type = type;\n this.stream = stream;\n this.parent = parent;\n this.base = this.stream.pos;\n this._items = [];\n }\n\n getItem(index) {\n if (this._items[index] == null) {\n let pos = this.stream.pos;\n this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n this._items[index] = this.type.decode(this.stream, this.parent);\n this.stream.pos = pos;\n }\n\n return this._items[index];\n }\n\n inspect() {\n return `[UnboundedArray ${this.type.constructor.name}]`;\n }\n}\n\nexport class UnboundedArray extends r.Array {\n constructor(type) {\n super(type, 0);\n }\n\n decode(stream, parent) {\n return new UnboundedArrayAccessor(this.type, stream, parent);\n }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n // Helper class that makes internal structures invisible to pointers\n class Shadow {\n constructor(type) {\n this.type = type;\n }\n\n decode(stream, ctx) {\n ctx = ctx.parent.parent;\n return this.type.decode(stream, ctx);\n }\n\n size(val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.size(val, ctx);\n }\n\n encode(stream, val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.encode(stream, val, ctx);\n }\n }\n\n ValueType = new Shadow(ValueType);\n\n let BinarySearchHeader = new r.Struct({\n unitSize: r.uint16,\n nUnits: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16\n });\n\n let LookupSegmentSingle = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n value: ValueType\n });\n\n let LookupSegmentArray = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n });\n\n let LookupSingle = new r.Struct({\n glyph: r.uint16,\n value: ValueType\n });\n\n return new r.VersionedStruct(r.uint16, {\n 0: {\n values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n },\n 2: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n },\n 4: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n },\n 6: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n },\n 8: {\n firstGlyph: r.uint16,\n count: r.uint16,\n values: new r.Array(ValueType, 'count')\n }\n });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n let entry = Object.assign({\n newState: r.uint16,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n let StateHeader = new r.Struct({\n nClasses: r.uint32,\n classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n stateArray: new r.Pointer(r.uint32, StateArray),\n entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n });\n\n return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n let ClassLookupTable = new r.Struct({\n version() { return 8; }, // simulate LookupTable\n firstGlyph: r.uint16,\n values: new r.Array(r.uint8, r.uint16)\n });\n\n let entry = Object.assign({\n newStateOffset: r.uint16,\n // convert offset to stateArray index\n newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n let StateHeader1 = new r.Struct({\n nClasses: r.uint16,\n classTable: new r.Pointer(r.uint16, ClassLookupTable),\n stateArray: new r.Pointer(r.uint16, StateArray),\n entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n });\n\n return StateHeader1;\n}\n","import * as r from 'restructure';\n\nlet Setting = new r.Struct({\n setting: r.uint16,\n nameIndex: r.int16,\n name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n feature: r.uint16,\n nSettings: r.uint16,\n settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n featureFlags: new r.Bitfield(r.uint8, [\n null, null, null, null, null, null,\n 'hasDefault', 'exclusive'\n ]),\n defaultSetting: r.uint8,\n nameIndex: r.int16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n featureNameCount: r.uint16,\n reserved1: new r.Reserved(r.uint16),\n reserved2: new r.Reserved(r.uint32),\n featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import * as r from 'restructure';\n\nlet Axis = new r.Struct({\n axisTag: new r.String(4),\n minValue: r.fixed32,\n defaultValue: r.fixed32,\n maxValue: r.fixed32,\n flags: r.uint16,\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n flags: r.uint16,\n coord: new r.Array(r.fixed32, t => t.parent.axisCount),\n postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0)\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n offsetToData: r.uint16,\n countSizePairs: r.uint16,\n axisCount: r.uint16,\n axisSize: r.uint16,\n instanceCount: r.uint16,\n instanceSize: r.uint16,\n axis: new r.Array(Axis, 'axisCount'),\n instance: new r.Array(Instance, 'instanceCount')\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n static decode(stream, parent) {\n // In short format, offsets are multiplied by 2.\n // This doesn't seem to be documented by Apple, but it\n // is implemented this way in Freetype.\n return parent.flags\n ? stream.readUInt32BE()\n : stream.readUInt16BE() * 2;\n }\n}\n\nlet gvar = new r.Struct({\n version: r.uint16,\n reserved: new r.Reserved(r.uint16),\n axisCount: r.uint16,\n globalCoordCount: r.uint16,\n globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n glyphCount: r.uint16,\n flags: r.uint16,\n offsetToData: r.uint32,\n offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: ctx => ctx.offsetToData, allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import * as r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n length: r.uint16,\n coverage: r.uint16,\n subFeatureFlags: r.uint32,\n stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n justClass: r.uint32,\n beforeGrowLimit: r.fixed32,\n beforeShrinkLimit: r.fixed32,\n afterGrowLimit: r.fixed32,\n afterShrinkLimit: r.fixed32,\n growFlags: r.uint16,\n shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n 0: { // Decomposition action\n lowerLimit: r.fixed32,\n upperLimit: r.fixed32,\n order: r.uint16,\n glyphs: new r.Array(r.uint16, r.uint16)\n },\n\n 1: { // Unconditional add glyph action\n addGlyph: r.uint16\n },\n\n 2: { // Conditional add glyph action\n substThreshold: r.fixed32,\n addGlyph: r.uint16,\n substGlyph: r.uint16\n },\n\n 3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n 4: { // Ductile glyph action (not supported by CoreText)\n variationAxis: r.uint32,\n minimumLimit: r.fixed32,\n noStretchValue: r.fixed32,\n maximumLimit: r.fixed32\n },\n\n 5: { // Repeated add glyph action\n flags: r.uint16,\n glyph: r.uint16\n }\n});\n\nlet Action = new r.Struct({\n actionClass: r.uint16,\n actionType: r.uint16,\n actionLength: r.uint32,\n actionData: ActionData,\n padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n wdcOffset: r.uint16,\n postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: ctx => ctx.wdcOffset }))\n});\n\nexport default new r.Struct({\n version: r.uint32,\n format: r.uint16,\n horizontal: new r.Pointer(r.uint16, JustificationTable),\n vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import * as r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n action: r.uint16\n};\n\nlet ContextualData = {\n markIndex: r.uint16,\n currentIndex: r.uint16\n};\n\nlet InsertionData = {\n currentInsertIndex: r.uint16,\n markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n 0: { // Indic Rearrangement Subtable\n stateTable: new StateTable\n },\n\n 1: { // Contextual Glyph Substitution Subtable\n stateTable: new StateTable(ContextualData),\n substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n },\n\n 2: { // Ligature subtable\n stateTable: new StateTable(LigatureData),\n ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n },\n\n 4: { // Non-contextual Glyph Substitution Subtable\n lookupTable: new LookupTable\n },\n\n 5: { // Glyph Insertion Subtable\n stateTable: new StateTable(InsertionData),\n insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n }\n});\n\nlet Subtable = new r.Struct({\n length: r.uint32,\n coverage: r.uint24,\n type: r.uint8,\n subFeatureFlags: r.uint32,\n table: SubtableData,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n featureType: r.uint16,\n featureSetting: r.uint16,\n enableFlags: r.uint32,\n disableFlags: r.uint32\n});\n\nlet MorxChain = new r.Struct({\n defaultFlags: r.uint32,\n chainLength: r.uint32,\n nFeatureEntries: r.uint32,\n nSubtables: r.uint32,\n features: new r.Array(FeatureEntry, 'nFeatureEntries'),\n subtables: new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n version: r.uint16,\n unused: new r.Reserved(r.uint16),\n nChains: r.uint32,\n chains: new r.Array(MorxChain, 'nChains')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n left: r.int16,\n top: r.int16,\n right: r.int16,\n bottom: r.int16\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n lookupTable: new LookupTable(OpticalBounds)\n});\n","import { binarySearch } from './utils';\nimport { encodingExists, getEncoding, getEncodingMapping } from './encodings';\nimport { cache } from './decorators';\nimport { range } from './utils';\n\nexport default class CmapProcessor {\n constructor(cmapTable) {\n // Attempt to find a Unicode cmap first\n this.encoding = null;\n this.cmap = this.findSubtable(cmapTable, [\n // 32-bit subtables\n [3, 10],\n [0, 6],\n [0, 4],\n\n // 16-bit subtables\n [3, 1],\n [0, 3],\n [0, 2],\n [0, 1],\n [0, 0]\n ]);\n\n // If not unicode cmap was found, take the first table with a supported encoding.\n if (!this.cmap) {\n for (let cmap of cmapTable.tables) {\n let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n let mapping = getEncodingMapping(encoding);\n if (mapping) {\n this.cmap = cmap.table;\n this.encoding = mapping;\n }\n }\n }\n\n if (!this.cmap) {\n throw new Error(\"Could not find a supported cmap table\");\n }\n\n this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n if (this.uvs && this.uvs.version !== 14) {\n this.uvs = null;\n }\n }\n\n findSubtable(cmapTable, pairs) {\n for (let [platformID, encodingID] of pairs) {\n for (let cmap of cmapTable.tables) {\n if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n return cmap.table;\n }\n }\n }\n\n return null;\n }\n\n lookup(codepoint, variationSelector) {\n // If there is no Unicode cmap in this font, we need to re-encode\n // the codepoint in the encoding that the cmap supports.\n if (this.encoding) {\n codepoint = this.encoding.get(codepoint) || codepoint;\n\n // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n } else if (variationSelector) {\n let gid = this.getVariationSelector(codepoint, variationSelector);\n if (gid) {\n return gid;\n }\n }\n\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return cmap.codeMap.get(codepoint) || 0;\n\n case 4: {\n let min = 0;\n let max = cmap.segCount - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n\n if (codepoint < cmap.startCode.get(mid)) {\n max = mid - 1;\n } else if (codepoint > cmap.endCode.get(mid)) {\n min = mid + 1;\n } else {\n let rangeOffset = cmap.idRangeOffset.get(mid);\n let gid;\n\n if (rangeOffset === 0) {\n gid = codepoint + cmap.idDelta.get(mid);\n } else {\n let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n gid = cmap.glyphIndexArray.get(index) || 0;\n if (gid !== 0) {\n gid += cmap.idDelta.get(mid);\n }\n }\n\n return gid & 0xffff;\n }\n }\n\n return 0;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n case 12:\n case 13: {\n let min = 0;\n let max = cmap.nGroups - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let group = cmap.groups.get(mid);\n\n if (codepoint < group.startCharCode) {\n max = mid - 1;\n } else if (codepoint > group.endCharCode) {\n min = mid + 1;\n } else {\n if (cmap.version === 12) {\n return group.glyphID + (codepoint - group.startCharCode);\n } else {\n return group.glyphID;\n }\n }\n }\n\n return 0;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n getVariationSelector(codepoint, variationSelector) {\n if (!this.uvs) {\n return 0;\n }\n\n let selectors = this.uvs.varSelectors.toArray();\n let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n let sel = selectors[i];\n\n if (i !== -1 && sel.defaultUVS) {\n i = binarySearch(sel.defaultUVS, x =>\n codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n );\n }\n\n if (i !== -1 && sel.nonDefaultUVS) {\n i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n if (i !== -1) {\n return sel.nonDefaultUVS[i].glyphID;\n }\n }\n\n return 0;\n }\n\n @cache\n getCharacterSet() {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return range(0, cmap.codeMap.length);\n\n case 4: {\n let res = [];\n let endCodes = cmap.endCode.toArray();\n for (let i = 0; i < endCodes.length; i++) {\n let tail = endCodes[i] + 1;\n let start = cmap.startCode.get(i);\n res.push(...range(start, tail));\n }\n\n return res;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n case 12:\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n\n return res;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n @cache\n codePointsForGlyph(gid) {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0: {\n let res = [];\n for (let i = 0; i < 256; i++) {\n if (cmap.codeMap.get(i) === gid) {\n res.push(i);\n }\n }\n\n return res;\n }\n\n case 4: {\n let res = [];\n for (let i = 0; i < cmap.segCount; i++) {\n let end = cmap.endCode.get(i);\n let start = cmap.startCode.get(i);\n let rangeOffset = cmap.idRangeOffset.get(i);\n let delta = cmap.idDelta.get(i);\n\n for (var c = start; c <= end; c++) {\n let g = 0;\n if (rangeOffset === 0) {\n g = c + delta;\n } else {\n let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n g = cmap.glyphIndexArray.get(index) || 0;\n if (g !== 0) {\n g += delta;\n }\n }\n\n if (g === gid) {\n res.push(c);\n }\n }\n }\n\n return res;\n }\n\n case 12: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n res.push(group.startCharCode + (gid - group.glyphID));\n }\n }\n\n return res;\n }\n\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid === group.glyphID) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n }\n\n return res;\n }\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n}\n","export function binarySearch(arr, cmp) {\n let min = 0;\n let max = arr.length - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let res = cmp(arr[mid]);\n\n if (res < 0) {\n max = mid - 1;\n } else if (res > 0) {\n min = mid + 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n}\n\nexport function range(index, end) {\n let range = [];\n while (index < end) {\n range.push(index++);\n }\n return range;\n}\n\nexport const asciiDecoder = new TextDecoder('ascii');\n\n// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license.\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst LOOKUP = new Uint8Array(256);\nfor (let i = 0; i < CHARS.length; i++) {\n LOOKUP[CHARS.charCodeAt(i)] = i;\n}\n\nexport function decodeBase64(base64) {\n let bufferLength = base64.length * 0.75;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n let bytes = new Uint8Array(bufferLength);\n let p = 0;\n\n for (let i = 0, len = base64.length; i < len; i += 4) {\n let encoded1 = LOOKUP[base64.charCodeAt(i)];\n let encoded2 = LOOKUP[base64.charCodeAt(i + 1)];\n let encoded3 = LOOKUP[base64.charCodeAt(i + 2)];\n let 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 bytes;\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n constructor(font) {\n this.font = font;\n this.unicodeLayoutEngine = null;\n this.kernProcessor = null;\n\n // Choose an advanced layout engine. We try the AAT morx table first since more\n // scripts are currently supported because the shaping logic is built into the font.\n if (this.font.morx) {\n this.engine = new AATLayoutEngine(this.font);\n\n } else if (this.font.GSUB || this.font.GPOS) {\n this.engine = new OTLayoutEngine(this.font);\n }\n }\n\n layout(string, features, script, language, direction) {\n // Make the features parameter optional\n if (typeof features === 'string') {\n direction = language;\n language = script;\n script = features;\n features = [];\n }\n\n // Map string to glyphs if needed\n if (typeof string === 'string') {\n // Attempt to detect the script from the string if not provided.\n if (script == null) {\n script = Script.forString(string);\n }\n\n var glyphs = this.font.glyphsForString(string);\n } else {\n // Attempt to detect the script from the glyph code points if not provided.\n if (script == null) {\n let codePoints = [];\n for (let glyph of string) {\n codePoints.push(...glyph.codePoints);\n }\n\n script = Script.forCodePoints(codePoints);\n }\n\n var glyphs = string;\n }\n\n let glyphRun = new GlyphRun(glyphs, features, script, language, direction);\n\n // Return early if there are no glyphs\n if (glyphs.length === 0) {\n glyphRun.positions = [];\n return glyphRun;\n }\n\n // Setup the advanced layout engine\n if (this.engine && this.engine.setup) {\n this.engine.setup(glyphRun);\n }\n\n // Substitute and position the glyphs\n this.substitute(glyphRun);\n this.position(glyphRun);\n\n this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions);\n\n // Let the layout engine clean up any state it might have\n if (this.engine && this.engine.cleanup) {\n this.engine.cleanup();\n }\n\n return glyphRun;\n }\n\n substitute(glyphRun) {\n // Call the advanced layout engine to make substitutions\n if (this.engine && this.engine.substitute) {\n this.engine.substitute(glyphRun);\n }\n }\n\n position(glyphRun) {\n // Get initial glyph positions\n glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n let positioned = null;\n\n // Call the advanced layout engine. Returns the features applied.\n if (this.engine && this.engine.position) {\n positioned = this.engine.position(glyphRun);\n }\n\n // if there is no GPOS table, use unicode properties to position marks.\n if (!positioned && (!this.engine || this.engine.fallbackPosition)) {\n if (!this.unicodeLayoutEngine) {\n this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n }\n\n this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);\n }\n\n // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {\n if (!this.kernProcessor) {\n this.kernProcessor = new KernProcessor(this.font);\n }\n\n this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);\n glyphRun.features.kern = true;\n }\n }\n\n hideDefaultIgnorables(glyphs, positions) {\n let space = this.font.glyphForCodePoint(0x20);\n for (let i = 0; i < glyphs.length; i++) {\n if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {\n glyphs[i] = space;\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n isDefaultIgnorable(ch) {\n // From DerivedCoreProperties.txt in the Unicode database,\n // minus U+115F, U+1160, U+3164 and U+FFA0, which is what\n // Harfbuzz and Uniscribe do.\n let plane = ch >> 16;\n if (plane === 0) {\n // BMP\n switch (ch >> 8) {\n \tcase 0x00: return ch === 0x00AD;\n \tcase 0x03: return ch === 0x034F;\n \tcase 0x06: return ch === 0x061C;\n \tcase 0x17: return 0x17B4 <= ch && ch <= 0x17B5;\n \tcase 0x18: return 0x180B <= ch && ch <= 0x180E;\n \tcase 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F);\n \tcase 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF;\n \tcase 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8;\n \tdefault: return false;\n }\n } else {\n // Other planes\n switch (plane) {\n \tcase 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A);\n \tcase 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF;\n \tdefault: return false;\n }\n }\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.engine) {\n features.push(...this.engine.getAvailableFeatures(script, language));\n }\n\n if (this.font.kern && features.indexOf('kern') === -1) {\n features.push('kern');\n }\n\n return features;\n }\n\n stringsForGlyph(gid) {\n let result = new Set;\n\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n for (let codePoint of codePoints) {\n result.add(String.fromCodePoint(codePoint));\n }\n\n if (this.engine && this.engine.stringsForGlyph) {\n for (let string of this.engine.stringsForGlyph(gid)) {\n result.add(string);\n }\n }\n\n return Array.from(result);\n }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n constructor(font) {\n this.kern = font.kern;\n }\n\n process(glyphs, positions) {\n for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n let left = glyphs[glyphIndex].id;\n let right = glyphs[glyphIndex + 1].id;\n positions[glyphIndex].xAdvance += this.getKerning(left, right);\n }\n }\n\n getKerning(left, right) {\n let res = 0;\n\n for (let table of this.kern.tables) {\n if (table.coverage.crossStream) {\n continue;\n }\n\n switch (table.version) {\n case 0:\n if (!table.coverage.horizontal) {\n continue;\n }\n\n break;\n case 1:\n if (table.coverage.vertical || table.coverage.variation) {\n continue;\n }\n\n break;\n default:\n throw new Error(`Unsupported kerning table version ${table.version}`);\n }\n\n let val = 0;\n let s = table.subtable;\n switch (table.format) {\n case 0:\n let pairIdx = binarySearch(s.pairs, function (pair) {\n return (left - pair.left) || (right - pair.right);\n });\n\n if (pairIdx >= 0) {\n val = s.pairs[pairIdx].value;\n }\n\n break;\n\n case 2:\n let leftOffset = 0, rightOffset = 0;\n if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n } else {\n leftOffset = s.array.off;\n }\n\n if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n }\n\n let index = (leftOffset + rightOffset - s.array.off) / 2;\n val = s.array.values.get(index);\n break;\n\n case 3:\n if (left >= s.glyphCount || right >= s.glyphCount) {\n return 0;\n }\n\n val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n break;\n\n default:\n throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n }\n\n // Microsoft supports the override flag, which resets the result\n // Otherwise, the sum of the results from all subtables is returned\n if (table.coverage.override) {\n res = val;\n } else {\n res += val;\n }\n }\n\n return res;\n }\n}\n","import {getCombiningClass} from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n constructor(font) {\n this.font = font;\n }\n\n positionGlyphs(glyphs, positions) {\n // find each base + mark cluster, and position the marks relative to the base\n let clusterStart = 0;\n let clusterEnd = 0;\n for (let index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.isMark) { // TODO: handle ligatures\n clusterEnd = index;\n } else {\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n clusterStart = clusterEnd = index;\n }\n }\n\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n return positions;\n }\n\n positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n let base = glyphs[clusterStart];\n let baseBox = base.cbox.copy();\n\n // adjust bounding box for ligature glyphs\n if (base.codePoints.length > 1) {\n // LTR. TODO: RTL support.\n baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n }\n\n let xOffset = -positions[clusterStart].xAdvance;\n let yOffset = 0;\n let yGap = this.font.unitsPerEm / 16;\n\n // position each of the mark glyphs relative to the base glyph\n for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n let mark = glyphs[index];\n let markBox = mark.cbox;\n let position = positions[index];\n\n let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n if (combiningClass !== 'Not_Reordered') {\n position.xOffset = position.yOffset = 0;\n\n // x positioning\n switch (combiningClass) {\n case 'Double_Above':\n case 'Double_Below':\n // LTR. TODO: RTL support.\n position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n break;\n\n case 'Attached_Below_Left':\n case 'Below_Left':\n case 'Above_Left':\n // left align\n position.xOffset += baseBox.minX - markBox.minX;\n break;\n\n case 'Attached_Above_Right':\n case 'Below_Right':\n case 'Above_Right':\n // right align\n position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n break;\n\n default: // Attached_Below, Attached_Above, Below, Above, other\n // center align\n position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n }\n\n // y positioning\n switch (combiningClass) {\n case 'Double_Below':\n case 'Below_Left':\n case 'Below':\n case 'Below_Right':\n case 'Attached_Below_Left':\n case 'Attached_Below':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n baseBox.minY += yGap;\n }\n\n position.yOffset = -baseBox.minY - markBox.maxY;\n baseBox.minY += markBox.height;\n break;\n\n case 'Double_Above':\n case 'Above_Left':\n case 'Above':\n case 'Above_Right':\n case 'Attached_Above':\n case 'Attached_Above_Right':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n baseBox.maxY += yGap;\n }\n\n position.yOffset = baseBox.maxY - markBox.minY;\n baseBox.maxY += markBox.height;\n break;\n }\n\n position.xAdvance = position.yAdvance = 0;\n position.xOffset += xOffset;\n position.yOffset += yOffset;\n\n } else {\n xOffset -= position.xAdvance;\n yOffset -= position.yAdvance;\n }\n }\n\n return;\n }\n\n getCombiningClass(codePoint) {\n let combiningClass = getCombiningClass(codePoint);\n\n // Thai / Lao need some per-character work\n if ((codePoint & ~0xff) === 0x0e00) {\n if (combiningClass === 'Not_Reordered') {\n switch (codePoint) {\n case 0x0e31:\n case 0x0e34:\n case 0x0e35:\n case 0x0e36:\n case 0x0e37:\n case 0x0e47:\n case 0x0e4c:\n case 0x0e3d:\n case 0x0e4e:\n return 'Above_Right';\n\n case 0x0eb1:\n case 0x0eb4:\n case 0x0eb5:\n case 0x0eb6:\n case 0x0eb7:\n case 0x0ebb:\n case 0x0ecc:\n case 0x0ecd:\n return 'Above';\n\n case 0x0ebc:\n return 'Below';\n }\n } else if (codePoint === 0x0e3a) { // virama\n return 'Below_Right';\n }\n }\n\n switch (combiningClass) {\n // Hebrew\n\n case 'CCC10': // sheva\n case 'CCC11': // hataf segol\n case 'CCC12': // hataf patah\n case 'CCC13': // hataf qamats\n case 'CCC14': // hiriq\n case 'CCC15': // tsere\n case 'CCC16': // segol\n case 'CCC17': // patah\n case 'CCC18': // qamats\n case 'CCC20': // qubuts\n case 'CCC22': // meteg\n return 'Below';\n\n case 'CCC23': // rafe\n return 'Attached_Above';\n\n case 'CCC24': // shin dot\n return 'Above_Right';\n\n case 'CCC25': // sin dot\n case 'CCC19': // holam\n return 'Above_Left';\n\n case 'CCC26': // point varika\n return 'Above';\n\n case 'CCC21': // dagesh\n break;\n\n // Arabic and Syriac\n\n case 'CCC27': // fathatan\n case 'CCC28': // dammatan\n case 'CCC30': // fatha\n case 'CCC31': // damma\n case 'CCC33': // shadda\n case 'CCC34': // sukun\n case 'CCC35': // superscript alef\n case 'CCC36': // superscript alaph\n return 'Above';\n\n case 'CCC29': // kasratan\n case 'CCC32': // kasra\n return 'Below';\n\n // Thai\n\n case 'CCC103': // sara u / sara uu\n return 'Below_Right';\n\n case 'CCC107': // mai\n return 'Above_Right';\n\n // Lao\n\n case 'CCC118': // sign u / sign uu\n return 'Below';\n\n case 'CCC122': // mai\n return 'Above';\n\n // Tibetan\n\n case 'CCC129': // sign aa\n case 'CCC132': // sign u\n return 'Below';\n\n case 'CCC130': // sign i\n return 'Above';\n }\n\n return combiningClass;\n }\n}\n","import BBox from '../glyph/BBox';\nimport * as Script from '../layout/Script';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n constructor(glyphs, features, script, language, direction) {\n /**\n * An array of Glyph objects in the run\n * @type {Glyph[]}\n */\n this.glyphs = glyphs;\n\n /**\n * An array of GlyphPosition objects for each glyph in the run\n * @type {GlyphPosition[]}\n */\n this.positions = null;\n\n /**\n * The script that was requested for shaping. This was either passed in or detected automatically.\n * @type {string}\n */\n this.script = script;\n\n /**\n * The language requested for shaping, as passed in. If `null`, the default language for the\n * script was used.\n * @type {string}\n */\n this.language = language || null;\n\n /**\n * The direction requested for shaping, as passed in (either ltr or rtl).\n * If `null`, the default direction of the script is used.\n * @type {string}\n */\n this.direction = direction || Script.direction(script);\n\n /**\n * The features requested during shaping. This is a combination of user\n * specified features and features chosen by the shaper.\n * @type {object}\n */\n this.features = {};\n\n // Convert features to an object\n if (Array.isArray(features)) {\n for (let tag of features) {\n this.features[tag] = true;\n }\n } else if (typeof features === 'object') {\n this.features = features;\n }\n }\n\n /**\n * The total advance width of the run.\n * @type {number}\n */\n get advanceWidth() {\n let width = 0;\n for (let position of this.positions) {\n width += position.xAdvance;\n }\n\n return width;\n }\n\n /**\n * The total advance height of the run.\n * @type {number}\n */\n get advanceHeight() {\n let height = 0;\n for (let position of this.positions) {\n height += position.yAdvance;\n }\n\n return height;\n }\n\n /**\n * The bounding box containing all glyphs in the run.\n * @type {BBox}\n */\n get bbox() {\n let bbox = new BBox;\n\n let x = 0;\n let y = 0;\n for (let index = 0; index < this.glyphs.length; index++) {\n let glyph = this.glyphs[index];\n let p = this.positions[index];\n let b = glyph.bbox;\n\n bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n x += p.xAdvance;\n y += p.yAdvance;\n }\n\n return bbox;\n }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n /**\n * The minimum X position in the bounding box\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * The minimum Y position in the bounding box\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * The maxmimum X position in the bounding box\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * The maxmimum Y position in the bounding box\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * The width of the bounding box\n * @type {number}\n */\n get width() {\n return this.maxX - this.minX;\n }\n\n /**\n * The height of the bounding box\n * @type {number}\n */\n get height() {\n return this.maxY - this.minY;\n }\n\n addPoint(x, y) {\n if (Math.abs(x) !== Infinity) {\n if (x < this.minX) {\n this.minX = x;\n }\n\n if (x > this.maxX) {\n this.maxX = x;\n }\n }\n\n if (Math.abs(y) !== Infinity) {\n if (y < this.minY) {\n this.minY = y;\n }\n\n if (y > this.maxY) {\n this.maxY = y;\n }\n }\n }\n\n copy() {\n return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n }\n}\n","import {getScript} from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n Caucasian_Albanian: 'aghb',\n Arabic: 'arab',\n Imperial_Aramaic: 'armi',\n Armenian: 'armn',\n Avestan: 'avst',\n Balinese: 'bali',\n Bamum: 'bamu',\n Bassa_Vah: 'bass',\n Batak: 'batk',\n Bengali: ['bng2', 'beng'],\n Bopomofo: 'bopo',\n Brahmi: 'brah',\n Braille: 'brai',\n Buginese: 'bugi',\n Buhid: 'buhd',\n Chakma: 'cakm',\n Canadian_Aboriginal: 'cans',\n Carian: 'cari',\n Cham: 'cham',\n Cherokee: 'cher',\n Coptic: 'copt',\n Cypriot: 'cprt',\n Cyrillic: 'cyrl',\n Devanagari: ['dev2', 'deva'],\n Deseret: 'dsrt',\n Duployan: 'dupl',\n Egyptian_Hieroglyphs: 'egyp',\n Elbasan: 'elba',\n Ethiopic: 'ethi',\n Georgian: 'geor',\n Glagolitic: 'glag',\n Gothic: 'goth',\n Grantha: 'gran',\n Greek: 'grek',\n Gujarati: ['gjr2', 'gujr'],\n Gurmukhi: ['gur2', 'guru'],\n Hangul: 'hang',\n Han: 'hani',\n Hanunoo: 'hano',\n Hebrew: 'hebr',\n Hiragana: 'hira',\n Pahawh_Hmong: 'hmng',\n Katakana_Or_Hiragana: 'hrkt',\n Old_Italic: 'ital',\n Javanese: 'java',\n Kayah_Li: 'kali',\n Katakana: 'kana',\n Kharoshthi: 'khar',\n Khmer: 'khmr',\n Khojki: 'khoj',\n Kannada: ['knd2', 'knda'],\n Kaithi: 'kthi',\n Tai_Tham: 'lana',\n Lao: 'lao ',\n Latin: 'latn',\n Lepcha: 'lepc',\n Limbu: 'limb',\n Linear_A: 'lina',\n Linear_B: 'linb',\n Lisu: 'lisu',\n Lycian: 'lyci',\n Lydian: 'lydi',\n Mahajani: 'mahj',\n Mandaic: 'mand',\n Manichaean: 'mani',\n Mende_Kikakui: 'mend',\n Meroitic_Cursive: 'merc',\n Meroitic_Hieroglyphs: 'mero',\n Malayalam: ['mlm2', 'mlym'],\n Modi: 'modi',\n Mongolian: 'mong',\n Mro: 'mroo',\n Meetei_Mayek: 'mtei',\n Myanmar: ['mym2', 'mymr'],\n Old_North_Arabian: 'narb',\n Nabataean: 'nbat',\n Nko: 'nko ',\n Ogham: 'ogam',\n Ol_Chiki: 'olck',\n Old_Turkic: 'orkh',\n Oriya: ['ory2', 'orya'],\n Osmanya: 'osma',\n Palmyrene: 'palm',\n Pau_Cin_Hau: 'pauc',\n Old_Permic: 'perm',\n Phags_Pa: 'phag',\n Inscriptional_Pahlavi: 'phli',\n Psalter_Pahlavi: 'phlp',\n Phoenician: 'phnx',\n Miao: 'plrd',\n Inscriptional_Parthian: 'prti',\n Rejang: 'rjng',\n Runic: 'runr',\n Samaritan: 'samr',\n Old_South_Arabian: 'sarb',\n Saurashtra: 'saur',\n Shavian: 'shaw',\n Sharada: 'shrd',\n Siddham: 'sidd',\n Khudawadi: 'sind',\n Sinhala: 'sinh',\n Sora_Sompeng: 'sora',\n Sundanese: 'sund',\n Syloti_Nagri: 'sylo',\n Syriac: 'syrc',\n Tagbanwa: 'tagb',\n Takri: 'takr',\n Tai_Le: 'tale',\n New_Tai_Lue: 'talu',\n Tamil: ['tml2', 'taml'],\n Tai_Viet: 'tavt',\n Telugu: ['tel2', 'telu'],\n Tifinagh: 'tfng',\n Tagalog: 'tglg',\n Thaana: 'thaa',\n Thai: 'thai',\n Tibetan: 'tibt',\n Tirhuta: 'tirh',\n Ugaritic: 'ugar',\n Vai: 'vai ',\n Warang_Citi: 'wara',\n Old_Persian: 'xpeo',\n Cuneiform: 'xsux',\n Yi: 'yi ',\n Inherited: 'zinh',\n Common: 'zyyy',\n Unknown: 'zzzz'\n};\n\nconst OPENTYPE_SCRIPTS = {};\nfor (let script in UNICODE_SCRIPTS) {\n let tag = UNICODE_SCRIPTS[script];\n if (Array.isArray(tag)) {\n for (let t of tag) {\n OPENTYPE_SCRIPTS[t] = script;\n }\n } else {\n OPENTYPE_SCRIPTS[tag] = script;\n }\n}\n\nexport function fromUnicode(script) {\n return UNICODE_SCRIPTS[script];\n}\n\nexport function fromOpenType(tag) {\n return OPENTYPE_SCRIPTS[tag];\n}\n\nexport function forString(string) {\n let len = string.length;\n let idx = 0;\n while (idx < len) {\n let code = string.charCodeAt(idx++);\n\n // Check if this is a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n\n // Check if this is a low surrogate\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n }\n }\n\n let script = getScript(code);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n let codePoint = codePoints[i];\n let script = getScript(codePoint);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n arab: true, // Arabic\n hebr: true, // Hebrew\n syrc: true, // Syriac\n thaa: true, // Thaana\n cprt: true, // Cypriot Syllabary\n khar: true, // Kharosthi\n phnx: true, // Phoenician\n 'nko ': true, // N'Ko\n lydi: true, // Lydian\n avst: true, // Avestan\n armi: true, // Imperial Aramaic\n phli: true, // Inscriptional Pahlavi\n prti: true, // Inscriptional Parthian\n sarb: true, // Old South Arabian\n orkh: true, // Old Turkic, Orkhon Runic\n samr: true, // Samaritan\n mand: true, // Mandaic, Mandaean\n merc: true, // Meroitic Cursive\n mero: true, // Meroitic Hieroglyphs\n\n // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n mani: true, // Manichaean\n mend: true, // Mende Kikakui\n nbat: true, // Nabataean\n narb: true, // Old North Arabian\n palm: true, // Palmyrene\n phlp: true // Psalter Pahlavi\n};\n\nexport function direction(script) {\n if (RTL[script]) {\n return 'rtl';\n }\n\n return 'ltr';\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n /**\n * The amount to move the virtual pen in the X direction after rendering this glyph.\n * @type {number}\n */\n this.xAdvance = xAdvance;\n\n /**\n * The amount to move the virtual pen in the Y direction after rendering this glyph.\n * @type {number}\n */\n this.yAdvance = yAdvance;\n\n /**\n * The offset from the pen position in the X direction at which to render this glyph.\n * @type {number}\n */\n this.xOffset = xOffset;\n\n /**\n * The offset from the pen position in the Y direction at which to render this glyph.\n * @type {number}\n */\n this.yOffset = yOffset;\n }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n constructor(font) {\n this.font = font;\n this.morxProcessor = new AATMorxProcessor(font);\n this.fallbackPosition = false;\n }\n\n substitute(glyphRun) {\n // AAT expects the glyphs to be in visual order prior to morx processing,\n // so reverse the glyphs if the script is right-to-left.\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n }\n\n this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features));\n }\n\n getAvailableFeatures(script, language) {\n return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n }\n\n stringsForGlyph(gid) {\n let glyphStrings = this.morxProcessor.generateInputs(gid);\n let result = new Set;\n\n for (let glyphs of glyphStrings) {\n this._addStrings(glyphs, 0, result, '');\n }\n\n return result;\n }\n\n _addStrings(glyphs, index, strings, string) {\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n for (let codePoint of codePoints) {\n let s = string + String.fromCodePoint(codePoint);\n if (index < glyphs.length - 1) {\n this._addStrings(glyphs, index + 1, strings, s);\n } else {\n strings.add(s);\n }\n }\n }\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n allTypographicFeatures: {\n code: 0,\n exclusive: false,\n allTypeFeatures: 0\n },\n ligatures: {\n code: 1,\n exclusive: false,\n requiredLigatures: 0,\n commonLigatures: 2,\n rareLigatures: 4,\n // logos: 6\n rebusPictures: 8,\n diphthongLigatures: 10,\n squaredLigatures: 12,\n abbrevSquaredLigatures: 14,\n symbolLigatures: 16,\n contextualLigatures: 18,\n historicalLigatures: 20\n },\n cursiveConnection: {\n code: 2,\n exclusive: true,\n unconnected: 0,\n partiallyConnected: 1,\n cursive: 2\n },\n letterCase: {\n code: 3,\n exclusive: true\n },\n // upperAndLowerCase: 0 # deprecated\n // allCaps: 1 # deprecated\n // allLowerCase: 2 # deprecated\n // smallCaps: 3 # deprecated\n // initialCaps: 4 # deprecated\n // initialCapsAndSmallCaps: 5 # deprecated\n verticalSubstitution: {\n code: 4,\n exclusive: false,\n substituteVerticalForms: 0\n },\n linguisticRearrangement: {\n code: 5,\n exclusive: false,\n linguisticRearrangement: 0\n },\n numberSpacing: {\n code: 6,\n exclusive: true,\n monospacedNumbers: 0,\n proportionalNumbers: 1,\n thirdWidthNumbers: 2,\n quarterWidthNumbers: 3\n },\n smartSwash: {\n code: 8,\n exclusive: false,\n wordInitialSwashes: 0,\n wordFinalSwashes: 2,\n // lineInitialSwashes: 4\n // lineFinalSwashes: 6\n nonFinalSwashes: 8\n },\n diacritics: {\n code: 9,\n exclusive: true,\n showDiacritics: 0,\n hideDiacritics: 1,\n decomposeDiacritics: 2\n },\n verticalPosition: {\n code: 10,\n exclusive: true,\n normalPosition: 0,\n superiors: 1,\n inferiors: 2,\n ordinals: 3,\n scientificInferiors: 4\n },\n fractions: {\n code: 11,\n exclusive: true,\n noFractions: 0,\n verticalFractions: 1,\n diagonalFractions: 2\n },\n overlappingCharacters: {\n code: 13,\n exclusive: false,\n preventOverlap: 0\n },\n typographicExtras: {\n code: 14,\n exclusive: false,\n // hyphensToEmDash: 0\n // hyphenToEnDash: 2\n slashedZero: 4\n },\n // formInterrobang: 6\n // smartQuotes: 8\n // periodsToEllipsis: 10\n mathematicalExtras: {\n code: 15,\n exclusive: false,\n // hyphenToMinus: 0\n // asteristoMultiply: 2\n // slashToDivide: 4\n // inequalityLigatures: 6\n // exponents: 8\n mathematicalGreek: 10\n },\n ornamentSets: {\n code: 16,\n exclusive: true,\n noOrnaments: 0,\n dingbats: 1,\n piCharacters: 2,\n fleurons: 3,\n decorativeBorders: 4,\n internationalSymbols: 5,\n mathSymbols: 6\n },\n characterAlternatives: {\n code: 17,\n exclusive: true,\n noAlternates: 0\n },\n // user defined options\n designComplexity: {\n code: 18,\n exclusive: true,\n designLevel1: 0,\n designLevel2: 1,\n designLevel3: 2,\n designLevel4: 3,\n designLevel5: 4\n },\n styleOptions: {\n code: 19,\n exclusive: true,\n noStyleOptions: 0,\n displayText: 1,\n engravedText: 2,\n illuminatedCaps: 3,\n titlingCaps: 4,\n tallCaps: 5\n },\n characterShape: {\n code: 20,\n exclusive: true,\n traditionalCharacters: 0,\n simplifiedCharacters: 1,\n JIS1978Characters: 2,\n JIS1983Characters: 3,\n JIS1990Characters: 4,\n traditionalAltOne: 5,\n traditionalAltTwo: 6,\n traditionalAltThree: 7,\n traditionalAltFour: 8,\n traditionalAltFive: 9,\n expertCharacters: 10,\n JIS2004Characters: 11,\n hojoCharacters: 12,\n NLCCharacters: 13,\n traditionalNamesCharacters: 14\n },\n numberCase: {\n code: 21,\n exclusive: true,\n lowerCaseNumbers: 0,\n upperCaseNumbers: 1\n },\n textSpacing: {\n code: 22,\n exclusive: true,\n proportionalText: 0,\n monospacedText: 1,\n halfWidthText: 2,\n thirdWidthText: 3,\n quarterWidthText: 4,\n altProportionalText: 5,\n altHalfWidthText: 6\n },\n transliteration: {\n code: 23,\n exclusive: true,\n noTransliteration: 0\n },\n // hanjaToHangul: 1\n // hiraganaToKatakana: 2\n // katakanaToHiragana: 3\n // kanaToRomanization: 4\n // romanizationToHiragana: 5\n // romanizationToKatakana: 6\n // hanjaToHangulAltOne: 7\n // hanjaToHangulAltTwo: 8\n // hanjaToHangulAltThree: 9\n annotation: {\n code: 24,\n exclusive: true,\n noAnnotation: 0,\n boxAnnotation: 1,\n roundedBoxAnnotation: 2,\n circleAnnotation: 3,\n invertedCircleAnnotation: 4,\n parenthesisAnnotation: 5,\n periodAnnotation: 6,\n romanNumeralAnnotation: 7,\n diamondAnnotation: 8,\n invertedBoxAnnotation: 9,\n invertedRoundedBoxAnnotation: 10\n },\n kanaSpacing: {\n code: 25,\n exclusive: true,\n fullWidthKana: 0,\n proportionalKana: 1\n },\n ideographicSpacing: {\n code: 26,\n exclusive: true,\n fullWidthIdeographs: 0,\n proportionalIdeographs: 1,\n halfWidthIdeographs: 2\n },\n unicodeDecomposition: {\n code: 27,\n exclusive: false,\n canonicalComposition: 0,\n compatibilityComposition: 2,\n transcodingComposition: 4\n },\n rubyKana: {\n code: 28,\n exclusive: false,\n // noRubyKana: 0 # deprecated - use rubyKanaOff instead\n // rubyKana: 1 # deprecated - use rubyKanaOn instead\n rubyKana: 2\n },\n CJKSymbolAlternatives: {\n code: 29,\n exclusive: true,\n noCJKSymbolAlternatives: 0,\n CJKSymbolAltOne: 1,\n CJKSymbolAltTwo: 2,\n CJKSymbolAltThree: 3,\n CJKSymbolAltFour: 4,\n CJKSymbolAltFive: 5\n },\n ideographicAlternatives: {\n code: 30,\n exclusive: true,\n noIdeographicAlternatives: 0,\n ideographicAltOne: 1,\n ideographicAltTwo: 2,\n ideographicAltThree: 3,\n ideographicAltFour: 4,\n ideographicAltFive: 5\n },\n CJKVerticalRomanPlacement: {\n code: 31,\n exclusive: true,\n CJKVerticalRomanCentered: 0,\n CJKVerticalRomanHBaseline: 1\n },\n italicCJKRoman: {\n code: 32,\n exclusive: false,\n // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead\n // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead\n CJKItalicRoman: 2\n },\n caseSensitiveLayout: {\n code: 33,\n exclusive: false,\n caseSensitiveLayout: 0,\n caseSensitiveSpacing: 2\n },\n alternateKana: {\n code: 34,\n exclusive: false,\n alternateHorizKana: 0,\n alternateVertKana: 2\n },\n stylisticAlternatives: {\n code: 35,\n exclusive: false,\n noStylisticAlternates: 0,\n stylisticAltOne: 2,\n stylisticAltTwo: 4,\n stylisticAltThree: 6,\n stylisticAltFour: 8,\n stylisticAltFive: 10,\n stylisticAltSix: 12,\n stylisticAltSeven: 14,\n stylisticAltEight: 16,\n stylisticAltNine: 18,\n stylisticAltTen: 20,\n stylisticAltEleven: 22,\n stylisticAltTwelve: 24,\n stylisticAltThirteen: 26,\n stylisticAltFourteen: 28,\n stylisticAltFifteen: 30,\n stylisticAltSixteen: 32,\n stylisticAltSeventeen: 34,\n stylisticAltEighteen: 36,\n stylisticAltNineteen: 38,\n stylisticAltTwenty: 40\n },\n contextualAlternates: {\n code: 36,\n exclusive: false,\n contextualAlternates: 0,\n swashAlternates: 2,\n contextualSwashAlternates: 4\n },\n lowerCase: {\n code: 37,\n exclusive: true,\n defaultLowerCase: 0,\n lowerCaseSmallCaps: 1,\n lowerCasePetiteCaps: 2\n },\n upperCase: {\n code: 38,\n exclusive: true,\n defaultUpperCase: 0,\n upperCaseSmallCaps: 1,\n upperCasePetiteCaps: 2\n },\n languageTag: { // indices into ltag table\n code: 39,\n exclusive: true\n },\n CJKRomanSpacing: {\n code: 103,\n exclusive: true,\n halfWidthCJKRoman: 0,\n proportionalCJKRoman: 1,\n defaultCJKRoman: 2,\n fullWidthCJKRoman: 3\n }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n rlig: feature('ligatures', 'requiredLigatures'),\n clig: feature('ligatures', 'contextualLigatures'),\n dlig: feature('ligatures', 'rareLigatures'),\n hlig: feature('ligatures', 'historicalLigatures'),\n liga: feature('ligatures', 'commonLigatures'),\n hist: feature('ligatures', 'historicalLigatures'), // ??\n\n smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n frac: feature('fractions', 'diagonalFractions'),\n dnom: feature('fractions', 'diagonalFractions'), // ??\n numr: feature('fractions', 'diagonalFractions'), // ??\n afrc: feature('fractions', 'verticalFractions'),\n // aalt\n // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n // unic, vatu, vhal, vjmo, vpal, vrt2\n // dist -> trak table?\n // kern, vkrn -> kern table\n // lfbd + opbd + rtbd -> opbd table?\n // mark, mkmk -> acnt table?\n // locl -> languageTag + ltag table\n\n case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n swsh: feature('contextualAlternates', 'swashAlternates'),\n cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n curs: feature('cursiveConnection', 'cursive'), // ??\n c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n init: feature('smartSwash', 'wordInitialSwashes'), // ??\n fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n pkna: feature('kanaSpacing', 'proportionalKana'),\n half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n halt: feature('textSpacing', 'altHalfWidthText'),\n\n hkna: feature('alternateKana', 'alternateHorizKana'),\n vkna: feature('alternateKana', 'alternateVertKana'),\n // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n lnum: feature('numberCase', 'upperCaseNumbers'),\n onum: feature('numberCase', 'lowerCaseNumbers'),\n mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n // nalt: not enough info. what type of annotation?\n // ornm: ditto, which ornament style?\n\n calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n tnum: feature('numberSpacing', 'monospacedNumbers'),\n pnum: feature('numberSpacing', 'proportionalNumbers'),\n sups: feature('verticalPosition', 'superiors'),\n subs: feature('verticalPosition', 'inferiors'),\n ordn: feature('verticalPosition', 'ordinals'),\n pwid: feature('textSpacing', 'proportionalText'),\n hwid: feature('textSpacing', 'halfWidthText'),\n qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n fwid: feature('textSpacing', 'proportionalText'), //??\n palt: feature('textSpacing', 'altProportionalText'),\n trad: feature('characterShape', 'traditionalCharacters'),\n smpl: feature('characterShape', 'simplifiedCharacters'),\n jp78: feature('characterShape', 'JIS1978Characters'),\n jp83: feature('characterShape', 'JIS1983Characters'),\n jp90: feature('characterShape', 'JIS1990Characters'),\n jp04: feature('characterShape', 'JIS2004Characters'),\n expt: feature('characterShape', 'expertCharacters'),\n hojo: feature('characterShape', 'hojoCharacters'),\n nlck: feature('characterShape', 'NLCCharacters'),\n tnam: feature('characterShape', 'traditionalNamesCharacters'),\n ruby: feature('rubyKana', 'rubyKana'),\n titl: feature('styleOptions', 'titlingCaps'),\n zero: feature('typographicExtras', 'slashedZero'),\n\n ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n let aat = OTMapping[ot];\n if (AATMapping[aat[0]] == null) {\n AATMapping[aat[0]] = {};\n }\n\n AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n let res = {};\n for (let k in features) {\n let r;\n if (r = OTMapping[k]) {\n if (res[r[0]] == null) {\n res[r[0]] = {};\n }\n\n res[r[0]][r[1]] = features[k];\n }\n }\n\n return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n let [type, setting] = f;\n if (isNaN(type)) {\n var typeCode = features[type] && features[type].code;\n } else {\n var typeCode = type;\n }\n\n if (isNaN(setting)) {\n var settingCode = features[type] && features[type][setting];\n } else {\n var settingCode = setting;\n }\n\n return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n let res = {};\n if (Array.isArray(features)) {\n for (let k = 0; k < features.length; k++) {\n let r;\n let f = mapFeatureStrings(features[k]);\n if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n res[r] = true;\n }\n }\n\n } else if (typeof features === 'object') {\n for (let type in features) {\n let feature = features[type];\n for (let setting in feature) {\n let r;\n let f = mapFeatureStrings([type, setting]);\n if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n res[r] = true;\n }\n }\n }\n }\n\n return Object.keys(res);\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST = 0x2000;\nconst VERB = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK = 0x80000000;\nconst STORE_MASK = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY = 0x800000;\nconst REVERSE_DIRECTION = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE = 0x1000;\nconst CURRENT_INSERT_BEFORE = 0x0800;\nconst MARKED_INSERT_BEFORE = 0x0400;\nconst CURRENT_INSERT_COUNT = 0x03E0;\nconst MARKED_INSERT_COUNT = 0x001F;\n\nexport default class AATMorxProcessor {\n constructor(font) {\n this.processIndicRearragement = this.processIndicRearragement.bind(this);\n this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n this.processLigature = this.processLigature.bind(this);\n this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n this.font = font;\n this.morx = font.morx;\n this.inputCache = null;\n }\n\n // Processes an array of glyphs and applies the specified features\n // Features should be in the form of {featureType:{featureSetting:boolean}}\n process(glyphs, features = {}) {\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n // enable/disable the requested features\n for (let feature of chain.features) {\n let f;\n if (f = features[feature.featureType]) {\n if (f[feature.featureSetting]) {\n flags &= feature.disableFlags;\n flags |= feature.enableFlags;\n } else if (f[feature.featureSetting] === false) {\n flags |= ~feature.disableFlags;\n flags &= ~feature.enableFlags;\n }\n }\n }\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.processSubtable(subtable, glyphs);\n }\n }\n }\n\n // remove deleted glyphs\n let index = glyphs.length - 1;\n while (index >= 0) {\n if (glyphs[index].id === 0xffff) {\n glyphs.splice(index, 1);\n }\n\n index--;\n }\n\n return glyphs;\n }\n\n processSubtable(subtable, glyphs) {\n this.subtable = subtable;\n this.glyphs = glyphs;\n if (this.subtable.type === 4) {\n this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n return;\n }\n\n this.ligatureStack = [];\n this.markedGlyph = null;\n this.firstGlyph = null;\n this.lastGlyph = null;\n this.markedIndex = null;\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n return stateMachine.process(this.glyphs, reverse, process);\n }\n\n @cache\n getStateMachine(subtable) {\n return new AATStateMachine(subtable.table.stateTable);\n }\n\n getProcessor() {\n switch (this.subtable.type) {\n case 0:\n return this.processIndicRearragement;\n case 1:\n return this.processContextualSubstitution;\n case 2:\n return this.processLigature;\n case 4:\n return this.processNoncontextualSubstitutions;\n case 5:\n return this.processGlyphInsertion;\n default:\n throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n }\n }\n\n processIndicRearragement(glyph, entry, index) {\n if (entry.flags & MARK_FIRST) {\n this.firstGlyph = index;\n }\n\n if (entry.flags & MARK_LAST) {\n this.lastGlyph = index;\n }\n\n reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n }\n\n processContextualSubstitution(glyph, entry, index) {\n let subsitutions = this.subtable.table.substitutionTable.items;\n if (entry.markIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.markIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[this.markedGlyph];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.currentIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.currentIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[index];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.flags & SET_MARK) {\n this.markedGlyph = index;\n }\n }\n\n processLigature(glyph, entry, index) {\n if (entry.flags & SET_COMPONENT) {\n this.ligatureStack.push(index);\n }\n\n if (entry.flags & PERFORM_ACTION) {\n let actions = this.subtable.table.ligatureActions;\n let components = this.subtable.table.components;\n let ligatureList = this.subtable.table.ligatureList;\n\n let actionIndex = entry.action;\n let last = false;\n let ligatureIndex = 0;\n let codePoints = [];\n let ligatureGlyphs = [];\n\n while (!last) {\n let componentGlyph = this.ligatureStack.pop();\n codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n let action = actions.getItem(actionIndex++);\n last = !!(action & LAST_MASK);\n let store = !!(action & STORE_MASK);\n let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n offset += this.glyphs[componentGlyph].id;\n\n let component = components.getItem(offset);\n ligatureIndex += component;\n\n if (last || store) {\n let ligatureEntry = ligatureList.getItem(ligatureIndex);\n this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n ligatureGlyphs.push(componentGlyph);\n ligatureIndex = 0;\n codePoints = [];\n } else {\n this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n }\n }\n\n // Put ligature glyph indexes back on the stack\n this.ligatureStack.push(...ligatureGlyphs);\n }\n }\n\n processNoncontextualSubstitutions(subtable, glyphs, index) {\n let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n for (index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.id !== 0xffff) {\n let gid = lookupTable.lookup(glyph.id);\n if (gid) { // 0 means do nothing\n glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n }\n }\n\n _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n let insertions = [];\n while (count--) {\n let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n insertions.push(this.font.getGlyph(gid));\n }\n\n if (!isBefore) {\n glyphIndex++;\n }\n\n this.glyphs.splice(glyphIndex, 0, ...insertions);\n }\n\n processGlyphInsertion(glyph, entry, index) {\n if (entry.flags & SET_MARK) {\n this.markedIndex = index;\n }\n\n if (entry.markedInsertIndex !== 0xffff) {\n let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n }\n\n if (entry.currentInsertIndex !== 0xffff) {\n let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n }\n }\n\n getSupportedFeatures() {\n let features = [];\n for (let chain of this.morx.chains) {\n for (let feature of chain.features) {\n features.push([feature.featureType, feature.featureSetting]);\n }\n }\n\n return features;\n }\n\n generateInputs(gid) {\n if (!this.inputCache) {\n this.generateInputCache();\n }\n\n return this.inputCache[gid] || [];\n }\n\n generateInputCache() {\n this.inputCache = {};\n\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.generateInputsForSubtable(subtable);\n }\n }\n }\n }\n\n generateInputsForSubtable(subtable) {\n // Currently, only supporting ligature subtables.\n if (subtable.type !== 2) {\n return;\n }\n\n let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n if (reverse) {\n throw new Error('Reverse subtable, not supported.');\n }\n\n this.subtable = subtable;\n this.ligatureStack = [];\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let input = [];\n let stack = [];\n this.glyphs = [];\n\n stateMachine.traverse({\n enter: (glyph, entry) => {\n let glyphs = this.glyphs;\n stack.push({\n glyphs: glyphs.slice(),\n ligatureStack: this.ligatureStack.slice()\n });\n\n // Add glyph to input and glyphs to process.\n let g = this.font.getGlyph(glyph);\n input.push(g);\n glyphs.push(input[input.length - 1]);\n\n // Process ligature substitution\n process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n // Add input to result if only one matching (non-deleted) glyph remains.\n let count = 0;\n let found = 0;\n for (let i = 0; i < glyphs.length && count <= 1; i++) {\n if (glyphs[i].id !== 0xffff) {\n count++;\n found = glyphs[i].id;\n }\n }\n\n if (count === 1) {\n let result = input.map(g => g.id);\n let cache = this.inputCache[found];\n if (cache) {\n cache.push(result);\n } else {\n this.inputCache[found] = [result];\n }\n }\n },\n\n exit: () => {\n ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n input.pop();\n }\n });\n }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n if (reverseB) {\n end.reverse();\n }\n\n let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n if (reverseA) {\n start.reverse();\n }\n\n glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n let length = lastGlyph - firstGlyph + 1;\n switch (verb) {\n case 0: // no change\n return glyphs;\n\n case 1: // Ax => xA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n case 2: // xD => Dx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n case 3: // AxD => DxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n case 4: // ABx => xAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n case 5: // ABx => xBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n case 6: // xCD => CDx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n case 7: // xCD => DCx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n case 8: // AxCD => CDxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n case 9: // AxCD => DCxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n case 10: // ABxD => DxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n case 11: // ABxD => DxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n case 12: // ABxCD => CDxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n case 13: // ABxCD => CDxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n case 14: // ABxCD => DCxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n case 15: // ABxCD => DCxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n default:\n throw new Error(`Unknown verb: ${verb}`);\n }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n constructor(stateTable) {\n this.stateTable = stateTable;\n this.lookupTable = new AATLookupTable(stateTable.classTable);\n }\n\n process(glyphs, reverse, processEntry) {\n let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n let index = reverse ? glyphs.length - 1 : 0;\n let dir = reverse ? -1 : 1;\n\n while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n let glyph = null;\n let classCode = OUT_OF_BOUNDS_CLASS;\n let shouldAdvance = true;\n\n if (index === glyphs.length || index === -1) {\n classCode = END_OF_TEXT_CLASS;\n } else {\n glyph = glyphs[index];\n if (glyph.id === 0xffff) { // deleted glyph\n classCode = DELETED_GLYPH_CLASS;\n } else {\n classCode = this.lookupTable.lookup(glyph.id);\n if (classCode == null) {\n classCode = OUT_OF_BOUNDS_CLASS;\n }\n }\n }\n\n let row = this.stateTable.stateArray.getItem(currentState);\n let entryIndex = row[classCode];\n let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {\n processEntry(glyph, entry, index);\n shouldAdvance = !(entry.flags & DONT_ADVANCE);\n }\n\n currentState = entry.newState;\n if (shouldAdvance) {\n index += dir;\n }\n }\n\n return glyphs;\n }\n\n /**\n * Performs a depth-first traversal of the glyph strings\n * represented by the state machine.\n */\n traverse(opts, state = 0, visited = new Set) {\n if (visited.has(state)) {\n return;\n }\n\n visited.add(state);\n\n let {nClasses, stateArray, entryTable} = this.stateTable;\n let row = stateArray.getItem(state);\n\n // Skip predefined classes\n for (let classCode = 4; classCode < nClasses; classCode++) {\n let entryIndex = row[classCode];\n let entry = entryTable.getItem(entryIndex);\n\n // Try all glyphs in the class\n for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n if (opts.enter) {\n opts.enter(glyph, entry);\n }\n\n if (entry.newState !== 0) {\n this.traverse(opts, entry.newState, visited);\n }\n\n if (opts.exit) {\n opts.exit(glyph, entry);\n }\n }\n }\n }\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n constructor(table) {\n this.table = table;\n }\n\n lookup(glyph) {\n switch (this.table.version) {\n case 0: // simple array format\n return this.table.values.getItem(glyph);\n\n case 2: // segment format\n case 4: {\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.firstGlyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.firstGlyph) {\n max = mid - 1;\n } else if (glyph > seg.lastGlyph) {\n min = mid + 1;\n } else {\n if (this.table.version === 2) {\n return seg.value;\n } else {\n return seg.values[glyph - seg.firstGlyph];\n }\n }\n }\n\n return null;\n }\n\n case 6: { // lookup single\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.glyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.glyph) {\n max = mid - 1;\n } else if (glyph > seg.glyph) {\n min = mid + 1;\n } else {\n return seg.value;\n }\n }\n\n return null;\n }\n\n case 8: // lookup trimmed\n return this.table.values[glyph - this.table.firstGlyph];\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n }\n\n @cache\n glyphsForValue(classValue) {\n let res = [];\n\n switch (this.table.version) {\n case 2: // segment format\n case 4: {\n for (let segment of this.table.segments) {\n if ((this.table.version === 2 && segment.value === classValue)) {\n res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n } else {\n for (let index = 0; index < segment.values.length; index++) {\n if (segment.values[index] === classValue) {\n res.push(segment.firstGlyph + index);\n }\n }\n }\n }\n\n break;\n }\n\n case 6: { // lookup single\n for (let segment of this.table.segments) {\n if (segment.value === classValue) {\n res.push(segment.glyph);\n }\n }\n\n break;\n }\n\n case 8: { // lookup trimmed\n for (let i = 0; i < this.table.values.length; i++) {\n if (this.table.values[i] === classValue) {\n res.push(this.table.firstGlyph + i);\n }\n }\n\n break;\n }\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n\n return res;\n }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n constructor(font) {\n this.font = font;\n this.glyphInfos = null;\n this.plan = null;\n this.GSUBProcessor = null;\n this.GPOSProcessor = null;\n this.fallbackPosition = true;\n\n if (font.GSUB) {\n this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n }\n\n if (font.GPOS) {\n this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n }\n }\n\n setup(glyphRun) {\n // Map glyphs to GlyphInfo objects so data can be passed between\n // GSUB and GPOS without mutating the real (shared) Glyph objects.\n this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n // Select a script based on what is available in GSUB/GPOS.\n let script = null;\n if (this.GPOSProcessor) {\n script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n if (this.GSUBProcessor) {\n script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n // Choose a shaper based on the script, and setup a shaping plan.\n // This determines which features to apply to which glyphs.\n this.shaper = Shapers.choose(script);\n this.plan = new ShapingPlan(this.font, script, glyphRun.direction);\n this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features);\n\n // Assign chosen features to output glyph run\n for (let key in this.plan.allFeatures) {\n glyphRun.features[key] = true;\n }\n }\n\n substitute(glyphRun) {\n if (this.GSUBProcessor) {\n this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n // Map glyph infos back to normal Glyph objects\n glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n }\n }\n\n position(glyphRun) {\n if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n if (this.GPOSProcessor) {\n this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);\n }\n\n if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n // Reverse the glyphs and positions if the script is right-to-left\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n glyphRun.positions.reverse();\n }\n\n return this.GPOSProcessor && this.GPOSProcessor.features;\n }\n\n zeroMarkAdvances(positions) {\n for (let i = 0; i < this.glyphInfos.length; i++) {\n if (this.glyphInfos[i].isMark) {\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n cleanup() {\n this.glyphInfos = null;\n this.plan = null;\n this.shaper = null;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.GSUBProcessor) {\n this.GSUBProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GSUBProcessor.features));\n }\n\n if (this.GPOSProcessor) {\n this.GPOSProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GPOSProcessor.features));\n }\n\n return features;\n }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n constructor(font, script, direction) {\n this.font = font;\n this.script = script;\n this.direction = direction;\n this.stages = [];\n this.globalFeatures = {};\n this.allFeatures = {};\n }\n\n /**\n * Adds the given features to the last stage.\n * Ignores features that have already been applied.\n */\n _addFeatures(features, global) {\n let stageIndex = this.stages.length - 1;\n let stage = this.stages[stageIndex];\n for (let feature of features) {\n if (this.allFeatures[feature] == null) {\n stage.push(feature);\n this.allFeatures[feature] = stageIndex;\n\n if (global) {\n this.globalFeatures[feature] = true;\n }\n }\n }\n }\n\n /**\n * Add features to the last stage\n */\n add(arg, global = true) {\n if (this.stages.length === 0) {\n this.stages.push([]);\n }\n\n if (typeof arg === 'string') {\n arg = [arg];\n }\n\n if (Array.isArray(arg)) {\n this._addFeatures(arg, global);\n } else if (typeof arg === 'object') {\n this._addFeatures(arg.global || [], true);\n this._addFeatures(arg.local || [], false);\n } else {\n throw new Error(\"Unsupported argument to ShapingPlan#add\");\n }\n }\n\n /**\n * Add a new stage\n */\n addStage(arg, global) {\n if (typeof arg === 'function') {\n this.stages.push(arg, []);\n } else {\n this.stages.push([]);\n this.add(arg, global);\n }\n }\n\n setFeatureOverrides(features) {\n if (Array.isArray(features)) {\n this.add(features);\n } else if (typeof features === 'object') {\n for (let tag in features) {\n if (features[tag]) {\n this.add(tag);\n } else if (this.allFeatures[tag] != null) {\n let stage = this.stages[this.allFeatures[tag]];\n stage.splice(stage.indexOf(tag), 1);\n delete this.allFeatures[tag];\n delete this.globalFeatures[tag];\n }\n }\n }\n }\n\n /**\n * Assigns the global features to the given glyphs\n */\n assignGlobalFeatures(glyphs) {\n for (let glyph of glyphs) {\n for (let feature in this.globalFeatures) {\n glyph.features[feature] = true;\n }\n }\n }\n\n /**\n * Executes the planned stages using the given OTProcessor\n */\n process(processor, glyphs, positions) {\n for (let stage of this.stages) {\n if (typeof stage === 'function') {\n if (!positions) {\n stage(this.font, glyphs, this);\n }\n\n } else if (stage.length > 0) {\n processor.applyFeatures(stage, glyphs, positions);\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport IndicShaper from './IndicShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n arab: ArabicShaper, // Arabic\n mong: ArabicShaper, // Mongolian\n syrc: ArabicShaper, // Syriac\n 'nko ': ArabicShaper, // N'Ko\n phag: ArabicShaper, // Phags Pa\n mand: ArabicShaper, // Mandaic\n mani: ArabicShaper, // Manichaean\n phlp: ArabicShaper, // Psalter Pahlavi\n\n hang: HangulShaper, // Hangul\n\n bng2: IndicShaper, // Bengali\n beng: IndicShaper, // Bengali\n dev2: IndicShaper, // Devanagari\n deva: IndicShaper, // Devanagari\n gjr2: IndicShaper, // Gujarati\n gujr: IndicShaper, // Gujarati\n guru: IndicShaper, // Gurmukhi\n gur2: IndicShaper, // Gurmukhi\n knda: IndicShaper, // Kannada\n knd2: IndicShaper, // Kannada\n mlm2: IndicShaper, // Malayalam\n mlym: IndicShaper, // Malayalam\n ory2: IndicShaper, // Oriya\n orya: IndicShaper, // Oriya\n taml: IndicShaper, // Tamil\n tml2: IndicShaper, // Tamil\n telu: IndicShaper, // Telugu\n tel2: IndicShaper, // Telugu\n khmr: IndicShaper, // Khmer\n\n bali: UniversalShaper, // Balinese\n batk: UniversalShaper, // Batak\n brah: UniversalShaper, // Brahmi\n bugi: UniversalShaper, // Buginese\n buhd: UniversalShaper, // Buhid\n cakm: UniversalShaper, // Chakma\n cham: UniversalShaper, // Cham\n dupl: UniversalShaper, // Duployan\n egyp: UniversalShaper, // Egyptian Hieroglyphs\n gran: UniversalShaper, // Grantha\n hano: UniversalShaper, // Hanunoo\n java: UniversalShaper, // Javanese\n kthi: UniversalShaper, // Kaithi\n kali: UniversalShaper, // Kayah Li\n khar: UniversalShaper, // Kharoshthi\n khoj: UniversalShaper, // Khojki\n sind: UniversalShaper, // Khudawadi\n lepc: UniversalShaper, // Lepcha\n limb: UniversalShaper, // Limbu\n mahj: UniversalShaper, // Mahajani\n // mand: UniversalShaper, // Mandaic\n // mani: UniversalShaper, // Manichaean\n mtei: UniversalShaper, // Meitei Mayek\n modi: UniversalShaper, // Modi\n // mong: UniversalShaper, // Mongolian\n // 'nko ': UniversalShaper, // N’Ko\n hmng: UniversalShaper, // Pahawh Hmong\n // phag: UniversalShaper, // Phags-pa\n // phlp: UniversalShaper, // Psalter Pahlavi\n rjng: UniversalShaper, // Rejang\n saur: UniversalShaper, // Saurashtra\n shrd: UniversalShaper, // Sharada\n sidd: UniversalShaper, // Siddham\n sinh: IndicShaper, // Sinhala\n sund: UniversalShaper, // Sundanese\n sylo: UniversalShaper, // Syloti Nagri\n tglg: UniversalShaper, // Tagalog\n tagb: UniversalShaper, // Tagbanwa\n tale: UniversalShaper, // Tai Le\n lana: UniversalShaper, // Tai Tham\n tavt: UniversalShaper, // Tai Viet\n takr: UniversalShaper, // Takri\n tibt: UniversalShaper, // Tibetan\n tfng: UniversalShaper, // Tifinagh\n tirh: UniversalShaper, // Tirhuta\n\n latn: DefaultShaper, // Latin\n DFLT: DefaultShaper // Default\n};\n\nexport function choose(script) {\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n let shaper = SHAPERS[s];\n if (shaper) {\n return shaper;\n }\n }\n\n return DefaultShaper;\n}\n","import {isDigit} from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n ltr: ['ltra', 'ltrm'],\n rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n static zeroMarkWidths = 'AFTER_GPOS';\n static plan(plan, glyphs, features) {\n // Plan the features we want to apply\n this.planPreprocessing(plan);\n this.planFeatures(plan);\n this.planPostprocessing(plan, features);\n\n // Assign the global features to all the glyphs\n plan.assignGlobalFeatures(glyphs);\n\n // Assign local features to glyphs\n this.assignFeatures(plan, glyphs);\n }\n\n static planPreprocessing(plan) {\n plan.add({\n global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n local: FRACTIONAL_FEATURES\n });\n }\n\n static planFeatures(plan) {\n // Do nothing by default. Let subclasses override this.\n }\n\n static planPostprocessing(plan, userFeatures) {\n plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]);\n plan.setFeatureOverrides(userFeatures);\n }\n\n static assignFeatures(plan, glyphs) {\n // Enable contextual fractions\n for (let i = 0; i < glyphs.length; i++) {\n let glyph = glyphs[i];\n if (glyph.codePoints[0] === 0x2044) { // fraction slash\n let start = i;\n let end = i + 1;\n\n // Apply numerator\n while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) {\n glyphs[start - 1].features.numr = true;\n glyphs[start - 1].features.frac = true;\n start--;\n }\n\n // Apply denominator\n while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) {\n glyphs[end].features.dnom = true;\n glyphs[end].features.frac = true;\n end++;\n }\n\n // Apply fraction slash\n glyph.features.frac = true;\n i = end - 1;\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport {getCategory} from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\nimport { decodeBase64 } from '../../utils';\n\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/data.trie', 'base64')));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n Non_Joining: 0,\n Left_Joining: 1,\n Right_Joining: 2,\n Dual_Joining: 3,\n Join_Causing: 3,\n ALAPH: 4,\n 'DALATH RISH': 5,\n Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH\n // State 0: prev was U, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ],\n\n // State 1: prev was R or ISOL/ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ],\n\n // State 2: prev was D/L in ISOL form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ],\n\n // State 3: prev was D in FINA form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ],\n\n // State 4: prev was FINA ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ],\n\n // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ],\n\n // State 6: prev was DALATH/RISH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n static planFeatures(plan) {\n plan.add(['ccmp', 'locl']);\n for (let i = 0; i < FEATURES.length; i++) {\n let feature = FEATURES[i];\n plan.addStage(feature, false);\n }\n\n plan.addStage('mset');\n }\n\n static assignFeatures(plan, glyphs) {\n super.assignFeatures(plan, glyphs);\n\n let prev = -1;\n let state = 0;\n let actions = [];\n\n // Apply the state machine to map glyphs to features\n for (let i = 0; i < glyphs.length; i++) {\n let curAction, prevAction;\n var glyph = glyphs[i];\n let type = getShapingClass(glyph.codePoints[0]);\n if (type === ShapingClasses.Transparent) {\n actions[i] = NONE;\n continue;\n }\n\n [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n if (prevAction !== NONE && prev !== -1) {\n actions[prev] = prevAction;\n }\n\n actions[i] = curAction;\n prev = i;\n }\n\n // Apply the chosen features to their respective glyphs\n for (let index = 0; index < glyphs.length; index++) {\n let feature;\n var glyph = glyphs[index];\n if (feature = actions[index]) {\n glyph.features[feature] = true;\n }\n }\n }\n}\n\nfunction getShapingClass(codePoint) {\n let res = trie.get(codePoint);\n if (res) {\n return res - 1;\n }\n\n let category = getCategory(codePoint);\n if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n return ShapingClasses.Transparent;\n }\n\n return ShapingClasses.Non_Joining;\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n * - decompose if unsupported by the font:\n * -> \n * -> \n * -> \n *\n * - compose if supported by the font:\n * -> \n * -> \n * -> \n *\n * - reorder tone marks (S is any valid syllable):\n * -> \n *\n * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n }\n\n static assignFeatures(plan, glyphs) {\n let state = 0;\n let i = 0;\n while (i < glyphs.length) {\n let action;\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n let type = getType(code);\n\n [ action, state ] = STATE_TABLE[state][type];\n\n switch (action) {\n case DECOMPOSE:\n // Decompose the composed syllable if it is not supported by the font.\n if (!plan.font.hasGlyphForCodePoint(code)) {\n i = decompose(glyphs, i, plan.font);\n }\n break;\n\n case COMPOSE:\n // Found a decomposed syllable. Try to compose if supported by the font.\n i = compose(glyphs, i, plan.font);\n break;\n\n case TONE_MARK:\n // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n reorderToneMark(glyphs, i, plan.font);\n break;\n\n case INVALID:\n // Tone mark has no valid syllable to attach to, so insert a dotted circle\n i = insertDottedCircle(glyphs, i, plan.font);\n break;\n }\n\n i++;\n }\n }\n}\n\nconst HANGUL_BASE = 0xac00;\nconst HANGUL_END = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE = 0x1100; // lead\nconst V_BASE = 0x1161; // vowel\nconst T_BASE = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END = L_BASE + L_COUNT - 1;\nconst V_END = V_BASE + V_COUNT - 1;\nconst T_END = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X = 0; // Other character\nconst L = 1; // Leading consonant\nconst V = 2; // Medial vowel\nconst T = 3; // Trailing consonant\nconst LV = 4; // Composed syllable\nconst LVT = 5; // Composed syllable\nconst M = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n if (isL(code)) { return L; }\n if (isV(code)) { return V; }\n if (isT(code)) { return T; }\n if (isLV(code)) { return LV; }\n if (isLVT(code)) { return LVT; }\n if (isTone(code)) { return M; }\n return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE = 2;\nconst TONE_MARK = 4;\nconst INVALID = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n // X L V T LV LVT M\n // State 0: start state\n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 1: \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 2: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n // State 3: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n\n let s = code - HANGUL_BASE;\n let t = T_BASE + s % T_COUNT;\n s = s / T_COUNT | 0;\n let l = L_BASE + s / V_COUNT | 0;\n let v = V_BASE + s % V_COUNT;\n\n // Don't decompose if all of the components are not available\n if (!font.hasGlyphForCodePoint(l) ||\n !font.hasGlyphForCodePoint(v) ||\n (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n return i;\n }\n\n // Replace the current glyph with decomposed L, V, and T glyphs,\n // and apply the proper OpenType features to each component.\n let ljmo = getGlyph(font, l, glyph.features);\n ljmo.features.ljmo = true;\n\n let vjmo = getGlyph(font, v, glyph.features);\n vjmo.features.vjmo = true;\n\n let insert = [ ljmo, vjmo ];\n\n if (t > T_BASE) {\n let tjmo = getGlyph(font, t, glyph.features);\n tjmo.features.tjmo = true;\n insert.push(tjmo);\n }\n\n glyphs.splice(i, 1, ...insert);\n return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n let type = getType(code);\n\n let prev = glyphs[i - 1].codePoints[0];\n let prevType = getType(prev);\n\n // Figure out what type of syllable we're dealing with\n let lv, ljmo, vjmo, tjmo;\n if (prevType === LV && type === T) {\n // \n lv = prev;\n tjmo = glyph;\n } else {\n if (type === V) {\n // \n ljmo = glyphs[i - 1];\n vjmo = glyph;\n } else {\n // \n ljmo = glyphs[i - 2];\n vjmo = glyphs[i - 1];\n tjmo = glyph;\n }\n\n let l = ljmo.codePoints[0];\n let v = vjmo.codePoints[0];\n\n // Make sure L and V are combining characters\n if (isCombiningL(l) && isCombiningV(v)) {\n lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n }\n }\n\n let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n let s = lv + (t - T_BASE);\n\n // Replace with a composed glyph if supported by the font,\n // otherwise apply the proper OpenType features to each component.\n if (font.hasGlyphForCodePoint(s)) {\n let del = prevType === V ? 3 : 2;\n glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n return i - del + 1;\n }\n }\n\n // Didn't compose (either a non-combining component or unsupported by font).\n if (ljmo) { ljmo.features.ljmo = true; }\n if (vjmo) { vjmo.features.vjmo = true; }\n if (tjmo) { tjmo.features.tjmo = true; }\n\n if (prevType === LV) {\n // Sequence was originally , which got combined earlier.\n // Either the T was non-combining, or the LVT glyph wasn't supported.\n // Decompose the glyph again and apply OT features.\n decompose(glyphs, i - 1, font);\n return i + 1;\n }\n\n return i;\n}\n\nfunction getLength(code) {\n switch (getType(code)) {\n case LV:\n case LVT:\n return 1;\n case V:\n return 2;\n case T:\n return 3;\n }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n // Move tone mark to the beginning of the previous syllable, unless it is zero width\n if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n let prev = glyphs[i - 1].codePoints[0];\n let len = getLength(prev);\n\n glyphs.splice(i, 1);\n return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n // If the tone mark is zero width, insert the dotted circle before, otherwise after\n let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n glyphs.splice(idx, 0, dottedCircle);\n i++;\n }\n\n return i;\n}\n","import {isMark} from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n constructor(font, id, codePoints = [], features) {\n this._font = font;\n this.codePoints = codePoints;\n this.id = id;\n\n this.features = {};\n if (Array.isArray(features)) {\n for (let i = 0; i < features.length; i++) {\n let feature = features[i];\n this.features[feature] = true;\n }\n } else if (typeof features === 'object') {\n Object.assign(this.features, features);\n }\n\n this.ligatureID = null;\n this.ligatureComponent = null;\n this.isLigated = false;\n this.cursiveAttachment = null;\n this.markAttachment = null;\n this.shaperInfo = null;\n this.substituted = false;\n this.isMultiplied = false;\n }\n\n get id() {\n return this._id;\n }\n\n set id(id) {\n this._id = id;\n this.substituted = true;\n\n let GDEF = this._font.GDEF;\n if (GDEF && GDEF.glyphClassDef) {\n // TODO: clean this up\n let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);\n this.isBase = classID === 1;\n this.isLigature = classID === 2;\n this.isMark = classID === 3;\n this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;\n } else {\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isBase = !this.isMark;\n this.isLigature = this.codePoints.length > 1;\n this.markAttachmentType = 0;\n }\n }\n\n copy() {\n return new GlyphInfo(this._font, this.id, this.codePoints, this.features);\n }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n constructor(font, table) {\n this.font = font;\n this.table = table;\n\n this.script = null;\n this.scriptTag = null;\n\n this.language = null;\n this.languageTag = null;\n\n this.features = {};\n this.lookups = {};\n\n // Setup variation substitutions\n this.variationsIndex = font._variationProcessor\n ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n : -1;\n\n // initialize to default script + language\n this.selectScript();\n\n // current context (set by applyFeatures)\n this.glyphs = [];\n this.positions = []; // only used by GPOS\n this.ligatureID = 1;\n this.currentFeature = null;\n }\n\n findScript(script) {\n if (this.table.scriptList == null) {\n return null;\n }\n\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n for (let entry of this.table.scriptList) {\n if (entry.tag === s) {\n return entry;\n }\n }\n }\n\n return null;\n }\n\n selectScript(script, language, direction) {\n let changed = false;\n let entry;\n if (!this.script || script !== this.scriptTag) {\n entry = this.findScript(script);\n if (!entry) {\n entry = this.findScript(DEFAULT_SCRIPTS);\n }\n\n if (!entry) {\n return this.scriptTag;\n }\n\n this.scriptTag = entry.tag;\n this.script = entry.script;\n this.language = null;\n this.languageTag = null;\n changed = true;\n }\n\n if (!direction || direction !== this.direction) {\n this.direction = direction || Script.direction(script);\n }\n\n if (language && language.length < 4) {\n language += ' '.repeat(4 - language.length);\n }\n\n if (!language || language !== this.languageTag) {\n this.language = null;\n\n for (let lang of this.script.langSysRecords) {\n if (lang.tag === language) {\n this.language = lang.langSys;\n this.languageTag = lang.tag;\n break;\n }\n }\n\n if (!this.language) {\n this.language = this.script.defaultLangSys;\n this.languageTag = null;\n }\n\n changed = true;\n }\n\n // Build a feature lookup table\n if (changed) {\n this.features = {};\n if (this.language) {\n for (let featureIndex of this.language.featureIndexes) {\n let record = this.table.featureList[featureIndex];\n let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n this.features[record.tag] = substituteFeature || record.feature;\n }\n }\n }\n\n return this.scriptTag;\n }\n\n lookupsForFeatures(userFeatures = [], exclude) {\n let lookups = [];\n for (let tag of userFeatures) {\n let feature = this.features[tag];\n if (!feature) {\n continue;\n }\n\n for (let lookupIndex of feature.lookupListIndexes) {\n if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n continue;\n }\n\n lookups.push({\n feature: tag,\n index: lookupIndex,\n lookup: this.table.lookupList.get(lookupIndex)\n });\n }\n }\n\n lookups.sort((a, b) => a.index - b.index);\n return lookups;\n }\n\n substituteFeatureForVariations(featureIndex) {\n if (this.variationsIndex === -1) {\n return null;\n }\n\n let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n let substitutions = record.featureTableSubstitution.substitutions;\n for (let substitution of substitutions) {\n if (substitution.featureIndex === featureIndex) {\n return substitution.alternateFeatureTable;\n }\n }\n\n return null;\n }\n\n findVariationsIndex(coords) {\n let variations = this.table.featureVariations;\n if (!variations) {\n return -1;\n }\n\n let records = variations.featureVariationRecords;\n for (let i = 0; i < records.length; i++) {\n let conditions = records[i].conditionSet.conditionTable;\n if (this.variationConditionsMatch(conditions, coords)) {\n return i;\n }\n }\n\n return -1;\n }\n\n variationConditionsMatch(conditions, coords) {\n return conditions.every(condition => {\n let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n });\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n let lookups = this.lookupsForFeatures(userFeatures);\n this.applyLookups(lookups, glyphs, advances);\n }\n\n applyLookups(lookups, glyphs, positions) {\n this.glyphs = glyphs;\n this.positions = positions;\n this.glyphIterator = new GlyphIterator(glyphs);\n\n for (let { feature, lookup } of lookups) {\n this.currentFeature = feature;\n this.glyphIterator.reset(lookup.flags);\n\n while (this.glyphIterator.index < glyphs.length) {\n if (!(feature in this.glyphIterator.cur.features)) {\n this.glyphIterator.next();\n continue;\n }\n\n for (let table of lookup.subTables) {\n let res = this.applyLookup(lookup.lookupType, table);\n if (res) {\n break;\n }\n }\n\n this.glyphIterator.next();\n }\n }\n }\n\n applyLookup(lookup, table) {\n throw new Error(\"applyLookup must be implemented by subclasses\");\n }\n\n applyLookupList(lookupRecords) {\n let options = this.glyphIterator.options;\n let glyphIndex = this.glyphIterator.index;\n\n for (let lookupRecord of lookupRecords) {\n // Reset flags and find glyph index for this lookup record\n this.glyphIterator.reset(options, glyphIndex);\n this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n // Get the lookup and setup flags for subtables\n let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n this.glyphIterator.reset(lookup.flags, this.glyphIterator.index);\n\n // Apply lookup subtables until one matches\n for (let table of lookup.subTables) {\n if (this.applyLookup(lookup.lookupType, table)) {\n break;\n }\n }\n }\n\n this.glyphIterator.reset(options, glyphIndex);\n return true;\n }\n\n coverageIndex(coverage, glyph) {\n if (glyph == null) {\n glyph = this.glyphIterator.cur.id;\n }\n\n switch (coverage.version) {\n case 1:\n return coverage.glyphs.indexOf(glyph);\n\n case 2:\n for (let range of coverage.rangeRecords) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.startCoverageIndex + glyph - range.start;\n }\n }\n\n break;\n }\n\n return -1;\n }\n\n match(sequenceIndex, sequence, fn, matched) {\n let pos = this.glyphIterator.index;\n let glyph = this.glyphIterator.increment(sequenceIndex);\n let idx = 0;\n\n while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {\n if (matched) {\n matched.push(this.glyphIterator.index);\n }\n\n idx++;\n glyph = this.glyphIterator.next();\n }\n\n this.glyphIterator.index = pos;\n if (idx < sequence.length) {\n return false;\n }\n\n return matched || true;\n }\n\n sequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id);\n }\n\n sequenceMatchIndices(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => {\n // If the current feature doesn't apply to this glyph,\n if (!(this.currentFeature in glyph.features)) {\n return false;\n }\n\n return component === glyph.id;\n }, []);\n }\n\n coverageSequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n this.coverageIndex(coverage, glyph.id) >= 0\n );\n }\n\n getClassID(glyph, classDef) {\n switch (classDef.version) {\n case 1: // Class array\n let i = glyph - classDef.startGlyph;\n if (i >= 0 && i < classDef.classValueArray.length) {\n return classDef.classValueArray[i];\n }\n\n break;\n\n case 2:\n for (let range of classDef.classRangeRecord) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.class;\n }\n }\n\n break;\n }\n\n return 0;\n }\n\n classSequenceMatches(sequenceIndex, sequence, classDef) {\n return this.match(sequenceIndex, sequence, (classID, glyph) =>\n classID === this.getClassID(glyph.id, classDef)\n );\n }\n\n applyContext(table) {\n let index, set;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n set = table.ruleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(1, rule.input)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n if (index === -1) {\n return false;\n }\n\n set = table.classSet[index];\n for (let rule of set) {\n if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(0, table.coverages)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n\n applyChainingContext(table) {\n let index;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.chainRuleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n && this.sequenceMatches(1, rule.input)\n && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n let rules = table.chainClassSet[index];\n if (!rules) {\n return false;\n }\n\n for (let rule of rules) {\n if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n this.coverageSequenceMatches(0, table.inputCoverage) &&\n this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n}\n","export default class GlyphIterator {\n constructor(glyphs, options) {\n this.glyphs = glyphs;\n this.reset(options);\n }\n\n reset(options = {}, index = 0) {\n this.options = options;\n this.flags = options.flags || {};\n this.markAttachmentType = options.markAttachmentType || 0;\n this.index = index;\n }\n\n get cur() {\n return this.glyphs[this.index] || null;\n }\n\n shouldIgnore(glyph) {\n return (this.flags.ignoreMarks && glyph.isMark) ||\n (this.flags.ignoreBaseGlyphs && glyph.isBase) ||\n (this.flags.ignoreLigatures && glyph.isLigature) ||\n (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType);\n }\n\n move(dir) {\n this.index += dir;\n while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {\n this.index += dir;\n }\n\n if (0 > this.index || this.index >= this.glyphs.length) {\n return null;\n }\n\n return this.glyphs[this.index];\n }\n\n next() {\n return this.move(+1);\n }\n\n prev() {\n return this.move(-1);\n }\n\n peek(count = 1) {\n let idx = this.index;\n let res = this.increment(count);\n this.index = idx;\n return res;\n }\n\n peekIndex(count = 1) {\n let idx = this.index;\n this.increment(count);\n let res = this.index;\n this.index = idx;\n return res;\n }\n\n increment(count = 1) {\n let dir = count < 0 ? -1 : 1;\n count = Math.abs(count);\n while (count--) {\n this.move(dir);\n }\n\n return this.glyphs[this.index];\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport {getCategory} from 'unicode-properties';\nimport * as Script from '../../layout/Script';\nimport GlyphInfo from '../GlyphInfo';\nimport indicMachine from './indic.json';\nimport useData from './use.json';\nimport {\n CATEGORIES,\n POSITIONS,\n CONSONANT_FLAGS,\n JOINER_FLAGS,\n HALANT_OR_COENG_FLAGS, INDIC_CONFIGS,\n INDIC_DECOMPOSITIONS\n} from './indic-data';\nimport { decodeBase64 } from '../../utils';\n\nconst {decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/indic.trie', 'base64')));\nconst stateMachine = new StateMachine(indicMachine);\n\n/**\n * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.\n * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc\n */\nexport default class IndicShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n plan.addStage(['locl', 'ccmp']);\n\n plan.addStage(initialReordering);\n\n plan.addStage('nukt');\n plan.addStage('akhn');\n plan.addStage('rphf', false);\n plan.addStage('rkrf');\n plan.addStage('pref', false);\n plan.addStage('blwf', false);\n plan.addStage('abvf', false);\n plan.addStage('half', false);\n plan.addStage('pstf', false);\n plan.addStage('vatu');\n plan.addStage('cjct');\n plan.addStage('cfar', false);\n\n plan.addStage(finalReordering);\n\n plan.addStage({\n local: ['init'],\n global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']\n });\n\n // Setup the indic config for the selected script\n plan.unicodeScript = Script.fromOpenType(plan.script);\n plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;\n plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';\n\n // TODO: turn off kern (Khmer) and liga features.\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split matras\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];\n if (d) {\n let decomposed = d.map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction indicCategory(glyph) {\n return trie.get(glyph.codePoints[0]) >> 8;\n}\n\nfunction indicPosition(glyph) {\n return 1 << (trie.get(glyph.codePoints[0]) & 0xff);\n}\n\nclass IndicInfo {\n constructor(category, position, syllableType, syllable) {\n this.category = category;\n this.position = position;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n let last = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) {\n if (start > last) {\n ++syllable;\n for (let i = last; i < start; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new IndicInfo(\n 1 << indicCategory(glyphs[i]),\n indicPosition(glyphs[i]),\n tags[0],\n syllable\n );\n }\n\n last = end + 1;\n }\n\n if (last < glyphs.length) {\n ++syllable;\n for (let i = last; i < glyphs.length; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n}\n\nfunction isConsonant(glyph) {\n return glyph.shaperInfo.category & CONSONANT_FLAGS;\n}\n\nfunction isJoiner(glyph) {\n return glyph.shaperInfo.category & JOINER_FLAGS;\n}\n\nfunction isHalantOrCoeng(glyph) {\n return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;\n}\n\nfunction wouldSubstitute(glyphs, feature) {\n for (let glyph of glyphs) {\n glyph.features = {[feature]: true};\n }\n\n let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;\n GSUB.applyFeatures([feature], glyphs);\n\n return glyphs.length === 1;\n}\n\nfunction consonantPosition(font, consonant, virama) {\n let glyphs = [virama, consonant, virama];\n if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {\n return POSITIONS.Below_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {\n return POSITIONS.Post_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {\n return POSITIONS.Post_C;\n }\n\n return POSITIONS.Base_C;\n}\n\nfunction initialReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n let virama = font.glyphForCodePoint(indicConfig.virama).id;\n if (virama) {\n let info = new GlyphInfo(font, virama, [indicConfig.virama]);\n for (let i = 0; i < glyphs.length; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);\n }\n }\n }\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let {category, syllableType} = glyphs[start].shaperInfo;\n\n if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {\n continue;\n }\n\n if (syllableType === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = new IndicInfo(\n 1 << indicCategory(g),\n indicPosition(g),\n glyphs[start].shaperInfo.syllableType,\n glyphs[start].shaperInfo.syllable\n );\n\n // Insert after possible Repha.\n let i = start;\n while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) {\n i++;\n }\n\n glyphs.splice(i++, 0, g);\n end++;\n }\n\n // 1. Find base consonant:\n //\n // The shaping engine finds the base consonant of the syllable, using the\n // following algorithm: starting from the end of the syllable, move backwards\n // until a consonant is found that does not have a below-base or post-base\n // form (post-base forms have to follow below-base forms), or that is not a\n // pre-base reordering Ra, or arrive at the first consonant. The consonant\n // stopped at will be the base.\n\n let base = end;\n let limit = start;\n let hasReph = false;\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph &&\n features.rphf &&\n start + 3 <= end && (\n (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) ||\n (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)\n )\n ) {\n // See if it matches the 'rphf' feature.\n let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];\n if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) {\n limit += 2;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {\n limit++;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n\n switch (indicConfig.basePos) {\n case 'Last': {\n // starting from the end of the syllable, move backwards\n let i = end;\n let seenBelow = false;\n\n do {\n let info = glyphs[--i].shaperInfo;\n\n // until a consonant is found\n if (isConsonant(glyphs[i])) {\n // that does not have a below-base or post-base form\n // (post-base forms have to follow below-base forms),\n if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) {\n base = i;\n break;\n }\n\n // or that is not a pre-base reordering Ra,\n //\n // IMPLEMENTATION NOTES:\n //\n // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped\n // by the logic above already.\n //\n\n // or arrive at the first consonant. The consonant stopped at will\n // be the base.\n if (info.position === POSITIONS.Below_C) {\n seenBelow = true;\n }\n\n base = i;\n } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) {\n // A ZWJ after a Halant stops the base search, and requests an explicit\n // half form.\n // A ZWJ before a Halant, requests a subjoined form instead, and hence\n // search continues. This is particularly important for Bengali\n // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.\n break;\n }\n } while (i > limit);\n break;\n }\n\n case 'First': {\n // The first consonant is always the base.\n base = start;\n\n // Mark all subsequent consonants as below.\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n glyphs[i].shaperInfo.position = POSITIONS.Below_C;\n }\n }\n }\n }\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n //\n // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)\n if (hasReph && base === start && limit - base <= 2) {\n hasReph = false;\n }\n\n // 2. Decompose and reorder Matras:\n //\n // Each matra and any syllable modifier sign in the cluster are moved to the\n // appropriate position relative to the consonant(s) in the cluster. The\n // shaping engine decomposes two- or three-part matras into their constituent\n // parts before any repositioning. Matra characters are classified by which\n // consonant in a conjunct they have affinity for and are reordered to the\n // following positions:\n //\n // o Before first half form in the syllable\n // o After subjoined consonants\n // o After post-form consonant\n // o After main consonant (for above marks)\n //\n // IMPLEMENTATION NOTES:\n //\n // The normalize() routine has already decomposed matras for us, so we don't\n // need to worry about that.\n\n // 3. Reorder marks to canonical order:\n //\n // Adjacent nukta and halant or nukta and vedic sign are always repositioned\n // if necessary, so that the nukta is first.\n //\n // IMPLEMENTATION NOTES:\n //\n // We don't need to do this: the normalize() routine already did this for us.\n\n // Reorder characters\n\n for (let i = start; i < base; i++) {\n let info = glyphs[i].shaperInfo;\n info.position = Math.min(POSITIONS.Pre_C, info.position);\n }\n\n if (base < end) {\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n\n // Mark final consonants. A final consonant is one appearing after a matra,\n // like in Khmer.\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n for (let j = i + 1; j < end; j++) {\n if (isConsonant(glyphs[j])) {\n glyphs[j].shaperInfo.position = POSITIONS.Final_C;\n break;\n }\n }\n break;\n }\n }\n\n // Handle beginning Ra\n if (hasReph) {\n glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;\n }\n\n // For old-style Indic script tags, move the first post-base Halant after\n // last consonant.\n //\n // Reports suggest that in some scripts Uniscribe does this only if there\n // is *not* a Halant after last consonant already (eg. Kannada), while it\n // does it unconditionally in other scripts (eg. Malayalam). We don't\n // currently know about other scripts, so we single out Malayalam for now.\n //\n // Kannada test case:\n // U+0C9A,U+0CCD,U+0C9A,U+0CCD\n // With some versions of Lohit Kannada.\n // https://bugs.freedesktop.org/show_bug.cgi?id=59118\n //\n // Malayalam test case:\n // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D\n // With lohit-ttf-20121122/Lohit-Malayalam.ttf\n if (plan.isOldSpec) {\n let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.H) {\n let j;\n for (j = end - 1; j > i; j--) {\n if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) {\n break;\n }\n }\n\n if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) {\n // Move Halant to after last consonant.\n let t = glyphs[i];\n glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i));\n glyphs[j] = t;\n }\n\n break;\n }\n }\n }\n\n // Attach misc marks to previous char to move with them.\n let lastPos = POSITIONS.Start;\n for (let i = start; i < end; i++) {\n let info = glyphs[i].shaperInfo;\n if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) {\n info.position = lastPos;\n if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) {\n // Uniscribe doesn't move the Halant with Left Matra.\n // TEST: U+092B,U+093F,U+094DE\n // We follow. This is important for the Sinhala\n // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA\n // where U+0DD9 is a left matra and U+0DCA is the virama.\n // We don't want to move the virama with the left matra.\n // TEST: U+0D9A,U+0DDA\n for (let j = i; j > start; j--) {\n if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) {\n info.position = glyphs[j - 1].shaperInfo.position;\n break;\n }\n }\n }\n } else if (info.position !== POSITIONS.SMVD) {\n lastPos = info.position;\n }\n }\n\n // For post-base consonants let them own anything before them\n // since the last consonant or matra.\n let last = base;\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n for (let j = last + 1; j < i; j++) {\n if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) {\n glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position;\n }\n }\n last = i;\n } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n last = i;\n }\n }\n\n let arr = glyphs.slice(start, end);\n arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position);\n glyphs.splice(start, arr.length, ...arr);\n\n // Find base again\n for (let i = start; i < end; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n base = i;\n break;\n }\n }\n\n // Setup features now\n\n // Reph\n for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) {\n glyphs[i].features.rphf = true;\n }\n\n // Pre-base\n let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';\n for (let i = start; i < base; i++) {\n glyphs[i].features.half = true;\n if (blwf) {\n glyphs[i].features.blwf = true;\n }\n }\n\n // Post-base\n for (let i = base + 1; i < end; i++) {\n glyphs[i].features.abvf = true;\n glyphs[i].features.pstf = true;\n glyphs[i].features.blwf = true;\n }\n\n if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {\n // Old-spec eye-lash Ra needs special handling. From the\n // spec:\n //\n // \"The feature 'below-base form' is applied to consonants\n // having below-base forms and following the base consonant.\n // The exception is vattu, which may appear below half forms\n // as well as below the base glyph. The feature 'below-base\n // form' will be applied to all such occurrences of Ra as well.\"\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+0915\n // with Sanskrit 2003 font.\n //\n // However, note that Ra,Halant,ZWJ is the correct way to\n // request eyelash form of Ra, so we wouldbn't inhibit it\n // in that sequence.\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915\n for (let i = start; i + 1 < base; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.Ra &&\n glyphs[i + 1].shaperInfo.category === CATEGORIES.H &&\n (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ)\n ) {\n glyphs[i].features.blwf = true;\n glyphs[i + 1].features.blwf = true;\n }\n }\n }\n\n let prefLen = 2;\n if (features.pref && base + prefLen < end) {\n // Find a Halant,Ra sequence and mark it for pre-base reordering processing.\n for (let i = base + 1; i + prefLen - 1 < end; i++) {\n let g = [glyphs[i].copy(), glyphs[i + 1].copy()];\n if (wouldSubstitute(g, 'pref')) {\n for (let j = 0; j < prefLen; j++) {\n glyphs[i++].features.pref = true;\n }\n\n // Mark the subsequent stuff with 'cfar'. Used in Khmer.\n // Read the feature spec.\n // This allows distinguishing the following cases with MS Khmer fonts:\n // U+1784,U+17D2,U+179A,U+17D2,U+1782\n // U+1784,U+17D2,U+1782,U+17D2,U+179A\n if (features.cfar) {\n for (; i < end; i++) {\n glyphs[i].features.cfar = true;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply ZWJ/ZWNJ effects\n for (let i = start + 1; i < end; i++) {\n if (isJoiner(glyphs[i])) {\n let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ;\n let j = i;\n\n do {\n j--;\n\n // ZWJ/ZWNJ should disable CJCT. They do that by simply\n // being there, since we don't skip them for the CJCT\n // feature (ie. F_MANUAL_ZWJ)\n\n // A ZWNJ disables HALF.\n if (nonJoiner) {\n delete glyphs[j].features.half;\n }\n } while (j > start && !isConsonant(glyphs[j]));\n }\n }\n }\n}\n\nfunction finalReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n // 4. Final reordering:\n //\n // After the localized forms and basic shaping forms GSUB features have been\n // applied (see below), the shaping engine performs some final glyph\n // reordering before applying all the remaining font features to the entire\n // cluster.\n\n let tryPref = !!features.pref;\n\n // Find base again\n let base = start;\n for (; base < end; base++) {\n if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {\n // Ok, this was a 'pref' candidate but didn't form any.\n // Base is around here...\n base = i;\n while (base < end && isHalantOrCoeng(glyphs[base])) {\n base++;\n }\n glyphs[base].shaperInfo.position = POSITIONS.BASE_C;\n tryPref = false;\n }\n break;\n }\n }\n }\n\n // For Malayalam, skip over unformed below- (but NOT post-) forms.\n if (plan.unicodeScript === 'Malayalam') {\n for (let i = base + 1; i < end; i++) {\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i === end || !isHalantOrCoeng(glyphs[i])) {\n break;\n }\n\n i++; // Skip halant.\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) {\n base = i;\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n }\n }\n\n if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {\n base--;\n }\n break;\n }\n }\n\n if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {\n base--;\n }\n\n if (base < end) {\n while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {\n base--;\n }\n }\n\n // o Reorder matras:\n //\n // If a pre-base matra character had been reordered before applying basic\n // features, the glyph can be moved closer to the main consonant based on\n // whether half-forms had been formed. Actual position for the matra is\n // defined as “after last standalone halant glyph, after initial matra\n // position and before the main consonant”. If ZWJ or ZWNJ follow this\n // halant, position is moved after it.\n //\n\n if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters.\n // If we lost track of base, alas, position before last thingy.\n let newPos = base === end ? base - 2 : base - 1;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // If we found no Halant we are done.\n // Otherwise only proceed if the Halant does\n // not belong to the Matra itself!\n if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {\n newPos++;\n }\n } else {\n newPos = start; // No move.\n }\n }\n\n if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // Now go see if there's actually any matras...\n for (let i = newPos; i > start; i--) {\n if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) {\n let oldPos = i - 1;\n if (oldPos < base && base <= newPos) { // Shouldn't actually happen.\n base--;\n }\n\n let tmp = glyphs[oldPos];\n glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos));\n glyphs[newPos] = tmp;\n\n newPos--;\n }\n }\n }\n }\n\n // o Reorder reph:\n //\n // Reph’s original position is always at the beginning of the syllable,\n // (i.e. it is not reordered at the character reordering stage). However,\n // it will be reordered according to the basic-forms shaping results.\n // Possible positions for reph, depending on the script, are; after main,\n // before post-base consonant forms, and after post-base consonant forms.\n\n // Two cases:\n //\n // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then\n // we should only move it if the sequence ligated to the repha form.\n //\n // - If repha is encoded separately and in the logical position, we should only\n // move it if it did NOT ligate. If it ligated, it's probably the font trying\n // to make it work without the reordering.\n if (start + 1 < end &&\n glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph &&\n (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)\n ) {\n let newRephPos;\n let rephPos = indicConfig.rephPos;\n let found = false;\n\n // 1. If reph should be positioned after post-base consonant forms,\n // proceed to step 5.\n if (rephPos !== POSITIONS.After_Post) {\n // 2. If the reph repositioning class is not after post-base: target\n // position is after the first explicit halant glyph between the\n // first post-reph consonant and last main consonant. If ZWJ or ZWNJ\n // are following this halant, position is moved after it. If such\n // position is found, this is the target position. Otherwise,\n // proceed to the next step.\n //\n // Note: in old-implementation fonts, where classifications were\n // fixed in shaping engine, there was no case where reph position\n // will be found on this step.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n\n // 3. If reph should be repositioned after the main consonant: find the\n // first consonant not ligated with main, or find the first\n // consonant that is not a potential pre-base reordering Ra.\n if (!found && rephPos === POSITIONS.After_Main) {\n newRephPos = base;\n while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n\n // 4. If reph should be positioned before post-base consonant, find\n // first post-base classified consonant not ligated with main. If no\n // consonant is found, the target position should be before the\n // first matra, syllable modifier sign or vedic sign.\n //\n // This is our take on what step 4 is trying to say (and failing, BADLY).\n if (!found && rephPos === POSITIONS.After_Sub) {\n newRephPos = base;\n while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n }\n\n // 5. If no consonant is found in steps 3 or 4, move reph to a position\n // immediately before the first post-base matra, syllable modifier\n // sign or vedic sign that has a reordering class after the intended\n // reph position. For example, if the reordering position for reph\n // is post-main, it will skip above-base matras that also have a\n // post-main position.\n if (!found) {\n // Copied from step 2.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n }\n\n // 6. Otherwise, reorder reph to the end of the syllable.\n if (!found) {\n newRephPos = end - 1;\n while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {\n newRephPos--;\n }\n\n // If the Reph is to be ending up after a Matra,Halant sequence,\n // position it before that Halant so it can interact with the Matra.\n // However, if it's a plain Consonant,Halant we shouldn't do that.\n // Uniscribe doesn't do this.\n // TEST: U+0930,U+094D,U+0915,U+094B,U+094D\n if (isHalantOrCoeng(glyphs[newRephPos])) {\n for (let i = base + 1; i < newRephPos; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n newRephPos--;\n }\n }\n }\n }\n\n let reph = glyphs[start];\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start));\n glyphs[newRephPos] = reph;\n\n if (start < base && base <= newRephPos) {\n base--;\n }\n }\n\n // o Reorder pre-base reordering consonants:\n //\n // If a pre-base reordering consonant is found, reorder it according to\n // the following rules:\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n // 1. Only reorder a glyph produced by substitution during application\n // of the feature. (Note that a font may shape a Ra consonant with\n // the feature generally but block it in certain contexts.)\n\n // Note: We just check that something got substituted. We don't check that\n // the feature actually did it...\n //\n // Reorder pref only if it ligated.\n if (glyphs[i].isLigated && !glyphs[i].isMultiplied) {\n // 2. Try to find a target position the same way as for pre-base matra.\n // If it is found, reorder pre-base consonant glyph.\n //\n // 3. If position is not found, reorder immediately before main\n // consonant.\n let newPos = base;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a\n // split matra, it should be reordered to *before* the left part of such matra.\n if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) {\n let oldPos = i;\n for (let j = base + 1; j < oldPos; j++) {\n if (glyphs[j].shaperInfo.category === CATEGORIES.M) {\n newPos--;\n break;\n }\n }\n }\n }\n\n if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) {\n // -> If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos < end && isJoiner(glyphs[newPos])) {\n newPos++;\n }\n }\n\n let oldPos = i;\n let tmp = glyphs[oldPos];\n glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos));\n glyphs[newPos] = tmp;\n\n if (newPos <= base && base < oldPos) {\n base++;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply 'init' to the Left Matra if it's a word start.\n if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) {\n glyphs[start].features.init = true;\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n","{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}","{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}","// Cateories used in the OpenType spec:\n// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx\nexport const CATEGORIES = {\n X: 1 << 0,\n C: 1 << 1,\n V: 1 << 2,\n N: 1 << 3,\n H: 1 << 4,\n ZWNJ: 1 << 5,\n ZWJ: 1 << 6,\n M: 1 << 7,\n SM: 1 << 8,\n VD: 1 << 9,\n A: 1 << 10,\n Placeholder: 1 << 11,\n Dotted_Circle: 1 << 12,\n RS: 1 << 13, // Register Shifter, used in Khmer OT spec.\n Coeng: 1 << 14, // Khmer-style Virama.\n Repha: 1 << 15, // Atomically-encoded logical or visual repha.\n Ra: 1 << 16,\n CM: 1 << 17, // Consonant-Medial.\n Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).\n};\n\n// Visual positions in a syllable from left to right.\nexport const POSITIONS = {\n Start: 1 << 0,\n\n Ra_To_Become_Reph: 1 << 1,\n Pre_M: 1 << 2,\n Pre_C: 1 << 3,\n\n Base_C: 1 << 4,\n After_Main: 1 << 5,\n\n Above_C: 1 << 6,\n\n Before_Sub: 1 << 7,\n Below_C: 1 << 8,\n After_Sub: 1 << 9,\n\n Before_Post: 1 << 10,\n Post_C: 1 << 11,\n After_Post: 1 << 12,\n\n Final_C: 1 << 13,\n SMVD: 1 << 14,\n\n End: 1 << 15\n};\n\nexport const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;\nexport const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;\nexport const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;\n\nexport const INDIC_CONFIGS = {\n Default: {\n hasOldSpec: false,\n virama: 0,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Devanagari: {\n hasOldSpec: true,\n virama: 0x094D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Bengali: {\n hasOldSpec: true,\n virama: 0x09CD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gurmukhi: {\n hasOldSpec: true,\n virama: 0x0A4D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gujarati: {\n hasOldSpec: true,\n virama: 0x0ACD,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Oriya: {\n hasOldSpec: true,\n virama: 0x0B4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Tamil: {\n hasOldSpec: true,\n virama: 0x0BCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Telugu: {\n hasOldSpec: true,\n virama: 0x0C4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Explicit',\n blwfMode: 'Post_Only'\n },\n\n Kannada: {\n hasOldSpec: true,\n virama: 0x0CCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Post_Only'\n },\n\n Malayalam: {\n hasOldSpec: true,\n virama: 0x0D4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Log_Repha',\n blwfMode: 'Pre_And_Post'\n },\n\n // Handled by UniversalShaper\n // Sinhala: {\n // hasOldSpec: false,\n // virama: 0x0DCA,\n // basePos: 'Last_Sinhala',\n // rephPos: POSITIONS.After_Main,\n // rephMode: 'Explicit',\n // blwfMode: 'Pre_And_Post'\n // },\n\n Khmer: {\n hasOldSpec: false,\n virama: 0x17D2,\n basePos: 'First',\n rephPos: POSITIONS.Ra_To_Become_Reph,\n rephMode: 'Vis_Repha',\n blwfMode: 'Pre_And_Post'\n }\n};\n\n// Additional decompositions that aren't in Unicode\nexport const INDIC_DECOMPOSITIONS = {\n // Khmer\n 0x17BE: [0x17C1, 0x17BE],\n 0x17BF: [0x17C1, 0x17BF],\n 0x17C0: [0x17C1, 0x17C0],\n 0x17C4: [0x17C1, 0x17C4],\n 0x17C5: [0x17C1, 0x17C5]\n};\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\nimport { decodeBase64 } from '../../utils';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/use.trie', 'base64')));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n static zeroMarkWidths = 'BEFORE_GPOS';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n // Default glyph pre-processing group\n plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n // Reordering group\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['rphf'], false);\n plan.addStage(recordRphf);\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['pref']);\n plan.addStage(recordPref);\n\n // Orthographic unit shaping group\n plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n plan.addStage(reorder);\n\n // Topographical features\n // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n // Standard topographic presentation and positional feature application\n plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split vowels\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n if (decompositions[codepoint]) {\n let decomposed = decompositions[codepoint].map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction useCategory(glyph) {\n return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n constructor(category, syllableType, syllable) {\n this.category = category;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n }\n\n // Assign rphf feature\n let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n for (let i = start; i < start + limit; i++) {\n glyphs[i].features.rphf = true;\n }\n }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n for (let glyph of glyphs) {\n glyph.substituted = false;\n }\n}\n\nfunction recordRphf(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted && glyph.features.rphf) {\n // Mark a substituted repha.\n glyph.shaperInfo.category = 'R';\n }\n }\n}\n\nfunction recordPref(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted) {\n // Mark a substituted pref as VPre, as they behave the same way.\n glyph.shaperInfo.category = 'VPre';\n }\n }\n}\n\nfunction reorder(font, glyphs) {\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let i, j;\n let info = glyphs[start].shaperInfo;\n let type = info.syllableType;\n\n // Only a few syllable types need reordering.\n if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n continue;\n }\n\n // Insert a dotted circle glyph in broken clusters.\n if (type === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = info;\n\n // Insert after possible Repha.\n for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n glyphs.splice(++i, 0, g);\n end++;\n }\n\n // Move things forward.\n if (info.category === 'R' && end - start > 1) {\n // Got a repha. Reorder it to after first base, before first halant.\n for (i = start + 1; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move before it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n if (isHalant(glyphs[i])) {\n i--;\n }\n\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n break;\n }\n }\n }\n\n // Move things back.\n for (i = start, j = end; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move after it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n j = isHalant(glyphs[i]) ? i + 1 : i;\n } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n }\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n\nfunction isHalant(glyph) {\n return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n return info.category === 'B' || info.category === 'GB';\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let glyph = this.glyphIterator.cur;\n switch (table.version) {\n case 1:\n glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n break;\n\n case 2:\n glyph.id = table.substitute.get(index);\n break;\n }\n\n return true;\n }\n\n case 2: { // Multiple Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let sequence = table.sequences.get(index);\n\n if (sequence.length === 0) {\n // If the sequence length is zero, delete the glyph.\n // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.\n this.glyphs.splice(this.glyphIterator.index, 1);\n return true;\n }\n\n this.glyphIterator.cur.id = sequence[0];\n this.glyphIterator.cur.ligatureComponent = 0;\n\n let features = this.glyphIterator.cur.features;\n let curGlyph = this.glyphIterator.cur;\n let replacement = sequence.slice(1).map((gid, i) => {\n let glyph = new GlyphInfo(this.font, gid, undefined, features);\n glyph.shaperInfo = curGlyph.shaperInfo;\n glyph.isLigated = curGlyph.isLigated;\n glyph.ligatureComponent = i + 1;\n glyph.substituted = true;\n glyph.isMultiplied = true;\n return glyph;\n });\n\n this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n return true;\n }\n\n return false;\n }\n\n case 3: { // Alternate Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let USER_INDEX = 0; // TODO\n this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n return true;\n }\n\n return false;\n }\n\n case 4: { // Ligature Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n for (let ligature of table.ligatureSets.get(index)) {\n let matched = this.sequenceMatchIndices(1, ligature.components);\n if (!matched) {\n continue;\n }\n\n let curGlyph = this.glyphIterator.cur;\n\n // Concatenate all of the characters the new ligature will represent\n let characters = curGlyph.codePoints.slice();\n for (let index of matched) {\n characters.push(...this.glyphs[index].codePoints);\n }\n\n // Create the replacement ligature glyph\n let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n ligatureGlyph.isLigated = true;\n ligatureGlyph.substituted = true;\n\n // From Harfbuzz:\n // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n // the ligature to keep its old ligature id. This will allow it to attach to\n // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature\n // later, we don't want them to lose their ligature id/component, otherwise\n // GPOS will fail to correctly position the mark ligature on top of the\n // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n //\n // - If a ligature is formed of components that some of which are also ligatures\n // themselves, and those ligature components had marks attached to *their*\n // components, we have to attach the marks to the new ligature component\n // positions! Now *that*'s tricky! And these marks may be following the\n // last component of the whole sequence, so we should loop forward looking\n // for them and update them.\n //\n // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature\n // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to\n // the new ligature with a component value of 2.\n //\n // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n let isMarkLigature = curGlyph.isMark;\n for (let i = 0; i < matched.length && isMarkLigature; i++) {\n isMarkLigature = this.glyphs[matched[i]].isMark;\n }\n\n ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n let lastLigID = curGlyph.ligatureID;\n let lastNumComps = curGlyph.codePoints.length;\n let curComps = lastNumComps;\n let idx = this.glyphIterator.index + 1;\n\n // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n // This allows GPOS to attach marks to the correct ligature components.\n for (let matchIndex of matched) {\n // Don't assign new ligature components for mark ligatures (see above)\n if (isMarkLigature) {\n idx = matchIndex;\n } else {\n while (idx < matchIndex) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n this.glyphs[idx].ligatureComponent = ligatureComponent;\n idx++;\n }\n }\n\n lastLigID = this.glyphs[idx].ligatureID;\n lastNumComps = this.glyphs[idx].codePoints.length;\n curComps += lastNumComps;\n idx++; // skip base glyph\n }\n\n // Adjust ligature components for any marks following\n if (lastLigID && !isMarkLigature) {\n for (let i = idx; i < this.glyphs.length; i++) {\n if (this.glyphs[i].ligatureID === lastLigID) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n this.glyphs[i].ligatureComponent = ligatureComponent;\n } else {\n break;\n }\n }\n }\n\n // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n for (let i = matched.length - 1; i >= 0; i--) {\n this.glyphs.splice(matched[i], 1);\n }\n\n this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n return true;\n }\n\n return false;\n }\n\n case 5: // Contextual Substitution\n return this.applyContext(table);\n\n case 6: // Chaining Contextual Substitution\n return this.applyChainingContext(table);\n\n case 7: // Extension Substitution\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n }\n }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n applyPositionValue(sequenceIndex, value) {\n let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n if (value.xAdvance != null) {\n position.xAdvance += value.xAdvance;\n }\n\n if (value.yAdvance != null) {\n position.yAdvance += value.yAdvance;\n }\n\n if (value.xPlacement != null) {\n position.xOffset += value.xPlacement;\n }\n\n if (value.yPlacement != null) {\n position.yOffset += value.yPlacement;\n }\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (value.xPlaDevice) {\n position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);\n }\n\n if (value.yPlaDevice) {\n position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);\n }\n\n if (value.xAdvDevice) {\n position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);\n }\n\n if (value.yAdvDevice) {\n position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);\n }\n }\n\n // TODO: device tables\n }\n\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single positioning value\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1:\n this.applyPositionValue(0, table.value);\n break;\n\n case 2:\n this.applyPositionValue(0, table.values.get(index));\n break;\n }\n\n return true;\n }\n\n case 2: { // Pair Adjustment Positioning\n let nextGlyph = this.glyphIterator.peek();\n if (!nextGlyph) {\n return false;\n }\n\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1: // Adjustments for glyph pairs\n let set = table.pairSets.get(index);\n\n for (let pair of set) {\n if (pair.secondGlyph === nextGlyph.id) {\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n return false;\n\n case 2: // Class pair adjustment\n let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n if (class1 === -1 || class2 === -1) {\n return false;\n }\n\n var pair = table.classRecords.get(class1).get(class2);\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n case 3: { // Cursive Attachment Positioning\n let nextIndex = this.glyphIterator.peekIndex();\n let nextGlyph = this.glyphs[nextIndex];\n if (!nextGlyph) {\n return false;\n }\n\n let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n if (!curRecord || !curRecord.exitAnchor) {\n return false;\n }\n\n let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n if (!nextRecord || !nextRecord.entryAnchor) {\n return false;\n }\n\n let entry = this.getAnchor(nextRecord.entryAnchor);\n let exit = this.getAnchor(curRecord.exitAnchor);\n\n let cur = this.positions[this.glyphIterator.index];\n let next = this.positions[nextIndex];\n let d;\n\n switch (this.direction) {\n case 'ltr':\n cur.xAdvance = exit.x + cur.xOffset;\n\n d = entry.x + next.xOffset;\n next.xAdvance -= d;\n next.xOffset -= d;\n break;\n\n case 'rtl':\n d = exit.x + cur.xOffset;\n cur.xAdvance -= d;\n cur.xOffset -= d;\n next.xAdvance = entry.x + next.xOffset;\n break;\n }\n\n if (this.glyphIterator.flags.rightToLeft) {\n this.glyphIterator.cur.cursiveAttachment = nextIndex;\n cur.yOffset = entry.y - exit.y;\n } else {\n nextGlyph.cursiveAttachment = this.glyphIterator.index;\n cur.yOffset = exit.y - entry.y;\n }\n\n return true;\n }\n\n case 4: { // Mark to base positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0));\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n if (baseIndex === -1) {\n return false;\n }\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 5: { // Mark to ligature positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n if (ligIndex === -1) {\n return false;\n }\n\n let ligAttach = table.ligatureArray[ligIndex];\n let markGlyph = this.glyphIterator.cur;\n let ligGlyph = this.glyphs[baseGlyphIndex];\n let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0)\n ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n : ligGlyph.codePoints.length - 1;\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = ligAttach[compIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 6: { // Mark to mark positioning\n let mark1Index = this.coverageIndex(table.mark1Coverage);\n if (mark1Index === -1) {\n return false;\n }\n\n // get the previous mark to attach to\n let prevIndex = this.glyphIterator.peekIndex(-1);\n let prev = this.glyphs[prevIndex];\n if (!prev || !prev.isMark) {\n return false;\n }\n\n let cur = this.glyphIterator.cur;\n\n // The following logic was borrowed from Harfbuzz\n let good = false;\n if (cur.ligatureID === prev.ligatureID) {\n if (!cur.ligatureID) { // Marks belonging to the same base\n good = true;\n } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n good = true;\n }\n } else {\n // If ligature ids don't match, it may be the case that one of the marks\n // itself is a ligature, in which case match.\n if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n good = true;\n }\n }\n\n if (!good) {\n return false;\n }\n\n let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n if (mark2Index === -1) {\n return false;\n }\n\n let markRecord = table.mark1Array[mark1Index];\n let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, prevIndex);\n return true;\n }\n\n case 7: // Contextual positioning\n return this.applyContext(table);\n\n case 8: // Chaining contextual positioning\n return this.applyChainingContext(table);\n\n case 9: // Extension positioning\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`Unsupported GPOS table: ${lookupType}`);\n }\n }\n\n applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n let baseCoords = this.getAnchor(baseAnchor);\n let markCoords = this.getAnchor(markRecord.markAnchor);\n\n let basePos = this.positions[baseGlyphIndex];\n let markPos = this.positions[this.glyphIterator.index];\n\n markPos.xOffset = baseCoords.x - markCoords.x;\n markPos.yOffset = baseCoords.y - markCoords.y;\n this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n }\n\n getAnchor(anchor) {\n // TODO: contour point, device tables\n let x = anchor.xCoordinate;\n let y = anchor.yCoordinate;\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (anchor.xDeviceTable) {\n x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);\n }\n\n if (anchor.yDeviceTable) {\n y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);\n }\n }\n\n return { x, y };\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n super.applyFeatures(userFeatures, glyphs, advances);\n\n for (var i = 0; i < this.glyphs.length; i++) {\n this.fixCursiveAttachment(i);\n }\n\n this.fixMarkAttachment();\n }\n\n fixCursiveAttachment(i) {\n let glyph = this.glyphs[i];\n if (glyph.cursiveAttachment != null) {\n let j = glyph.cursiveAttachment;\n\n glyph.cursiveAttachment = null;\n this.fixCursiveAttachment(j);\n\n this.positions[i].yOffset += this.positions[j].yOffset;\n }\n }\n\n fixMarkAttachment() {\n for (let i = 0; i < this.glyphs.length; i++) {\n let glyph = this.glyphs[i];\n if (glyph.markAttachment != null) {\n let j = glyph.markAttachment;\n\n this.positions[i].xOffset += this.positions[j].xOffset;\n this.positions[i].yOffset += this.positions[j].yOffset;\n\n if (this.direction === 'ltr') {\n for (let k = j; k < i; k++) {\n this.positions[i].xOffset -= this.positions[k].xAdvance;\n this.positions[i].yOffset -= this.positions[k].yAdvance;\n }\n } else {\n for (let k = j + 1; k < i + 1; k++) {\n this.positions[i].xOffset += this.positions[k].xAdvance;\n this.positions[i].yOffset += this.positions[k].yAdvance;\n }\n }\n }\n }\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport * as r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS = 1 << 0;\nconst ARGS_ARE_XY_VALUES = 1 << 1;\nconst ROUND_XY_TO_GRID = 1 << 2;\nconst WE_HAVE_A_SCALE = 1 << 3;\nconst MORE_COMPONENTS = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS = 1 << 8;\nconst USE_MY_METRICS = 1 << 9;\nconst OVERLAP_COMPOUND = 1 << 10;\nconst SCALED_COMPONENT_OFFSET = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n constructor(onCurve, endContour, x = 0, y = 0) {\n this.onCurve = onCurve;\n this.endContour = endContour;\n this.x = x;\n this.y = y;\n }\n\n copy() {\n return new Point(this.onCurve, this.endContour, this.x, this.y);\n }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n constructor(glyphID, dx, dy) {\n this.glyphID = glyphID;\n this.dx = dx;\n this.dy = dy;\n this.pos = 0;\n this.scaleX = this.scaleY = 1;\n this.scale01 = this.scale10 = 0;\n }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n type = 'TTF';\n\n // Parses just the glyph header and returns the bounding box\n _getCBox(internal) {\n // We need to decode the glyph if variation processing is requested,\n // so it's easier just to recompute the path's cbox after decoding.\n if (this._font._variationProcessor && !internal) {\n return this.path.cbox;\n }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += this._font.loca.offsets[this.id];\n let glyph = GlyfHeader.decode(stream);\n\n let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n return Object.freeze(cbox);\n }\n\n // Parses a single glyph coordinate\n _parseGlyphCoord(stream, prev, short, same) {\n if (short) {\n var val = stream.readUInt8();\n if (!same) {\n val = -val;\n }\n\n val += prev;\n } else {\n if (same) {\n var val = prev;\n } else {\n var val = prev + stream.readInt16BE();\n }\n }\n\n return val;\n }\n\n // Decodes the glyph data into points for simple glyphs,\n // or components for composite glyphs\n _decode() {\n let glyfPos = this._font.loca.offsets[this.id];\n let nextPos = this._font.loca.offsets[this.id + 1];\n\n // Nothing to do if there is no data for this glyph\n if (glyfPos === nextPos) { return null; }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += glyfPos;\n let startPos = stream.pos;\n\n let glyph = GlyfHeader.decode(stream);\n\n if (glyph.numberOfContours > 0) {\n this._decodeSimple(glyph, stream);\n\n } else if (glyph.numberOfContours < 0) {\n this._decodeComposite(glyph, stream, startPos);\n }\n\n return glyph;\n }\n\n _decodeSimple(glyph, stream) {\n // this is a simple glyph\n glyph.points = [];\n\n let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n let flags = [];\n let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n while (flags.length < numCoords) {\n var flag = stream.readUInt8();\n flags.push(flag);\n\n // check for repeat flag\n if (flag & REPEAT) {\n let count = stream.readUInt8();\n for (let j = 0; j < count; j++) {\n flags.push(flag);\n }\n }\n }\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n glyph.points.push(point);\n }\n\n let px = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n }\n\n let py = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n }\n\n if (this._font._variationProcessor) {\n let points = glyph.points.slice();\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.slice(-4);\n }\n\n return;\n }\n\n _decodeComposite(glyph, stream, offset = 0) {\n // this is a composite glyph\n glyph.components = [];\n let haveInstructions = false;\n let flags = MORE_COMPONENTS;\n\n while (flags & MORE_COMPONENTS) {\n flags = stream.readUInt16BE();\n let gPos = stream.pos - offset;\n let glyphID = stream.readUInt16BE();\n if (!haveInstructions) {\n haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n }\n\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n var dx = stream.readInt16BE();\n var dy = stream.readInt16BE();\n } else {\n var dx = stream.readInt8();\n var dy = stream.readInt8();\n }\n\n var component = new Component(glyphID, dx, dy);\n component.pos = gPos;\n\n if (flags & WE_HAVE_A_SCALE) {\n // fixed number with 14 bits of fraction\n component.scaleX =\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n }\n\n glyph.components.push(component);\n }\n\n if (this._font._variationProcessor) {\n let points = [];\n for (let j = 0; j < glyph.components.length; j++) {\n var component = glyph.components[j];\n points.push(new Point(true, true, component.dx, component.dy));\n }\n\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.splice(-4, 4);\n\n for (let i = 0; i < points.length; i++) {\n let point = points[i];\n glyph.components[i].dx = point.x;\n glyph.components[i].dy = point.y;\n }\n }\n\n return haveInstructions;\n }\n\n _getPhantomPoints(glyph) {\n let cbox = this._getCBox(true);\n if (this._metrics == null) {\n this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n }\n\n let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n return [\n new Point(false, true, glyph.xMin - leftBearing, 0),\n new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n new Point(false, true, 0, glyph.yMax + topBearing),\n new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n ];\n }\n\n // Decodes font data, resolves composite glyphs, and returns an array of contours\n _getContours() {\n let glyph = this._decode();\n if (!glyph) {\n return [];\n }\n\n let points = [];\n\n if (glyph.numberOfContours < 0) {\n // resolve composite glyphs\n for (let component of glyph.components) {\n let contours = this._font.getGlyph(component.glyphID)._getContours();\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n for (let j = 0; j < contour.length; j++) {\n let point = contour[j];\n let x = point.x * component.scaleX + point.y * component.scale01 + component.dx;\n let y = point.y * component.scaleY + point.x * component.scale10 + component.dy;\n points.push(new Point(point.onCurve, point.endContour, x, y));\n }\n }\n }\n } else {\n points = glyph.points || [];\n }\n\n // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;\n this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;\n }\n\n let contours = [];\n let cur = [];\n for (let k = 0; k < points.length; k++) {\n var point = points[k];\n cur.push(point);\n if (point.endContour) {\n contours.push(cur);\n cur = [];\n }\n }\n\n return contours;\n }\n\n _getMetrics() {\n if (this._metrics) {\n return this._metrics;\n }\n\n let cbox = this._getCBox(true);\n super._getMetrics(cbox);\n\n if (this._font._variationProcessor && !this._font.HVAR) {\n // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n this.path;\n }\n\n return this._metrics;\n }\n\n // Converts contours to a Path object that can be rendered\n _getPath() {\n let contours = this._getContours();\n let path = new Path;\n\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n let firstPt = contour[0];\n let lastPt = contour[contour.length - 1];\n let start = 0;\n\n if (firstPt.onCurve) {\n // The first point will be consumed by the moveTo command, so skip in the loop\n var curvePt = null;\n start = 1;\n } else {\n if (lastPt.onCurve) {\n // Start at the last point if the first point is off curve and the last point is on curve\n firstPt = lastPt;\n } else {\n // Start at the middle if both the first and last points are off curve\n firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n }\n\n var curvePt = firstPt;\n }\n\n path.moveTo(firstPt.x, firstPt.y);\n\n for (let j = start; j < contour.length; j++) {\n let pt = contour[j];\n let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n if (prevPt.onCurve && pt.onCurve) {\n path.lineTo(pt.x, pt.y);\n\n } else if (prevPt.onCurve && !pt.onCurve) {\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && !pt.onCurve) {\n let midX = (prevPt.x + pt.x) / 2;\n let midY = (prevPt.y + pt.y) / 2;\n path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && pt.onCurve) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n var curvePt = null;\n\n } else {\n throw new Error(\"Unknown TTF path state\");\n }\n }\n\n // Connect the first and last points\n if (curvePt) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n }\n\n path.closePath();\n }\n\n return path;\n }\n}\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport {isMark} from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n constructor(id, codePoints, font) {\n /**\n * The glyph id in the font\n * @type {number}\n */\n this.id = id;\n\n /**\n * An array of unicode code points that are represented by this glyph.\n * There can be multiple code points in the case of ligatures and other glyphs\n * that represent multiple visual characters.\n * @type {number[]}\n */\n this.codePoints = codePoints;\n this._font = font;\n\n // TODO: get this info from GDEF if available\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n\n _getPath() {\n return new Path();\n }\n\n _getCBox() {\n return this.path.cbox;\n }\n\n _getBBox() {\n return this.path.bbox;\n }\n\n _getTableMetrics(table) {\n if (this.id < table.metrics.length) {\n return table.metrics.get(this.id);\n }\n\n let metric = table.metrics.get(table.metrics.length - 1);\n let res = {\n advance: metric ? metric.advance : 0,\n bearing: table.bearings.get(this.id - table.metrics.length) || 0\n };\n\n return res;\n }\n\n _getMetrics(cbox) {\n if (this._metrics) { return this._metrics; }\n\n let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n if (this._font.vmtx) {\n var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n } else {\n let os2;\n if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n if ((os2 = this._font['OS/2']) && os2.version > 0) {\n var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n var topBearing = os2.typoAscender - cbox.maxY;\n\n } else {\n let { hhea } = this._font;\n var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n var topBearing = hhea.ascent - cbox.maxY;\n }\n }\n\n if (this._font._variationProcessor && this._font.HVAR) {\n advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n }\n\n return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n }\n\n /**\n * The glyph’s control box.\n * This is often the same as the bounding box, but is faster to compute.\n * Because of the way bezier curves are defined, some of the control points\n * can be outside of the bounding box. Where `bbox` takes this into account,\n * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n * for a more detailed description.\n *\n * @type {BBox}\n */\n @cache\n get cbox() {\n return this._getCBox();\n }\n\n /**\n * The glyph’s bounding box, i.e. the rectangle that encloses the\n * glyph outline as tightly as possible.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return this._getBBox();\n }\n\n /**\n * A vector Path object representing the glyph outline.\n * @type {Path}\n */\n @cache\n get path() {\n // Cache the path so we only decode it once\n // Decoding is actually performed by subclasses\n return this._getPath();\n }\n\n /**\n * Returns a path scaled to the given font size.\n * @param {number} size\n * @return {Path}\n */\n getScaledPath(size) {\n let scale = 1 / this._font.unitsPerEm * size;\n return this.path.scale(scale);\n }\n\n /**\n * The glyph's advance width.\n * @type {number}\n */\n @cache\n get advanceWidth() {\n return this._getMetrics().advanceWidth;\n }\n\n /**\n * The glyph's advance height.\n * @type {number}\n */\n @cache\n get advanceHeight() {\n return this._getMetrics().advanceHeight;\n }\n\n get ligatureCaretPositions() {}\n\n _getName() {\n let { post } = this._font;\n if (!post) {\n return null;\n }\n\n switch (post.version) {\n case 1:\n return StandardNames[this.id];\n\n case 2:\n let id = post.glyphNameIndex[this.id];\n if (id < StandardNames.length) {\n return StandardNames[id];\n }\n\n return post.names[id - StandardNames.length];\n\n case 2.5:\n return StandardNames[this.id + post.offsets[this.id]];\n\n case 4:\n return String.fromCharCode(post.map[this.id]);\n }\n }\n\n /**\n * The glyph's name\n * @type {string}\n */\n @cache\n get name() {\n return this._getName();\n }\n\n /**\n * Renders the glyph to the given graphics context, at the specified font size.\n * @param {CanvasRenderingContext2d} ctx\n * @param {number} size\n */\n render(ctx, size) {\n ctx.save();\n\n let scale = 1 / this._font.head.unitsPerEm * size;\n ctx.scale(scale, scale);\n\n let fn = this.path.toFunction();\n fn(ctx);\n ctx.fill();\n\n ctx.restore();\n }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n moveTo: 'M',\n lineTo: 'L',\n quadraticCurveTo: 'Q',\n bezierCurveTo: 'C',\n closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n constructor() {\n this.commands = [];\n this._bbox = null;\n this._cbox = null;\n }\n\n /**\n * Compiles the path to a JavaScript function that can be applied with\n * a graphics context in order to render the path.\n * @return {string}\n */\n toFunction() {\n return ctx => {\n this.commands.forEach(c => {\n return ctx[c.command].apply(ctx, c.args)\n })\n };\n }\n\n /**\n * Converts the path to an SVG path data string\n * @return {string}\n */\n toSVG() {\n let cmds = this.commands.map(c => {\n let args = c.args.map(arg => Math.round(arg * 100) / 100);\n return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n });\n\n return cmds.join('');\n }\n\n /**\n * Gets the \"control box\" of a path.\n * This is like the bounding box, but it includes all points including\n * control points of bezier segments and is much faster to compute than\n * the real bounding box.\n * @type {BBox}\n */\n get cbox() {\n if (!this._cbox) {\n let cbox = new BBox;\n for (let command of this.commands) {\n for (let i = 0; i < command.args.length; i += 2) {\n cbox.addPoint(command.args[i], command.args[i + 1]);\n }\n }\n\n this._cbox = Object.freeze(cbox);\n }\n\n return this._cbox;\n }\n\n /**\n * Gets the exact bounding box of the path by evaluating curve segments.\n * Slower to compute than the control box, but more accurate.\n * @type {BBox}\n */\n get bbox() {\n if (this._bbox) {\n return this._bbox;\n }\n\n let bbox = new BBox;\n let cx = 0, cy = 0;\n\n let f = t => (\n Math.pow(1 - t, 3) * p0[i]\n + 3 * Math.pow(1 - t, 2) * t * p1[i]\n + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n + Math.pow(t, 3) * p3[i]\n );\n\n for (let c of this.commands) {\n switch (c.command) {\n case 'moveTo':\n case 'lineTo':\n let [x, y] = c.args;\n bbox.addPoint(x, y);\n cx = x;\n cy = y;\n break;\n\n case 'quadraticCurveTo':\n case 'bezierCurveTo':\n if (c.command === 'quadraticCurveTo') {\n // http://fontforge.org/bezier.html\n var [qp1x, qp1y, p3x, p3y] = c.args;\n var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)\n var cp1y = cy + 2 / 3 * (qp1y - cy);\n var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)\n var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n } else {\n var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n }\n\n // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n bbox.addPoint(p3x, p3y);\n\n var p0 = [cx, cy];\n var p1 = [cp1x, cp1y];\n var p2 = [cp2x, cp2y];\n var p3 = [p3x, p3y];\n\n for (var i = 0; i <= 1; i++) {\n let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n\n if (a === 0) {\n if (b === 0) {\n continue;\n }\n\n let t = -c / b;\n if (0 < t && t < 1) {\n if (i === 0) {\n bbox.addPoint(f(t), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t));\n }\n }\n\n continue;\n }\n\n let b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n continue;\n }\n\n let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t1), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t1));\n }\n }\n\n let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t2), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t2));\n }\n }\n }\n\n cx = p3x;\n cy = p3y;\n break;\n }\n }\n\n return this._bbox = Object.freeze(bbox);\n }\n\n /**\n * Applies a mapping function to each point in the path.\n * @param {function} fn\n * @return {Path}\n */\n mapPoints(fn) {\n let path = new Path;\n\n for (let c of this.commands) {\n let args = [];\n for (let i = 0; i < c.args.length; i += 2) {\n let [x, y] = fn(c.args[i], c.args[i + 1]);\n args.push(x, y);\n }\n\n path[c.command](...args);\n }\n\n return path;\n }\n\n /**\n * Transforms the path by the given matrix.\n */\n transform(m0, m1, m2, m3, m4, m5) {\n return this.mapPoints((x, y) => {\n const tx = m0 * x + m2 * y + m4;\n const ty = m1 * x + m3 * y + m5;\n return [tx, ty];\n });\n }\n\n /**\n * Translates the path by the given offset.\n */\n translate(x, y) {\n return this.transform(1, 0, 0, 1, x, y);\n }\n\n /**\n * Rotates the path by the given angle (in radians).\n */\n rotate(angle) {\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n return this.transform(cos, sin, -sin, cos, 0, 0);\n }\n\n /**\n * Scales the path.\n */\n scale(scaleX, scaleY = scaleX) {\n return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n Path.prototype[command] = function(...args) {\n this._bbox = this._cbox = null;\n this.commands.push({\n command,\n args\n });\n\n return this;\n };\n}\n","export default [\n '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n type = 'CFF';\n\n _getName() {\n if (this._font.CFF2) {\n return super._getName();\n }\n\n return this._font['CFF '].getGlyphName(this.id);\n }\n\n bias(s) {\n if (s.length < 1240) {\n return 107;\n } else if (s.length < 33900) {\n return 1131;\n } else {\n return 32768;\n }\n }\n\n _getPath() {\n let cff = this._font.CFF2 || this._font['CFF '];\n let { stream } = cff;\n let str = cff.topDict.CharStrings[this.id];\n let end = str.offset + str.length;\n stream.pos = str.offset;\n\n let path = new Path;\n let stack = [];\n let trans = [];\n\n let width = null;\n let nStems = 0;\n let x = 0, y = 0;\n let usedGsubrs;\n let usedSubrs;\n let open = false;\n\n this._usedGsubrs = usedGsubrs = {};\n this._usedSubrs = usedSubrs = {};\n\n let gsubrs = cff.globalSubrIndex || [];\n let gsubrsBias = this.bias(gsubrs);\n\n let privateDict = cff.privateDictForGlyph(this.id) || {};\n let subrs = privateDict.Subrs || [];\n let subrsBias = this.bias(subrs);\n\n let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n let vsindex = privateDict.vsindex;\n let variationProcessor = this._font._variationProcessor;\n\n function checkWidth() {\n if (width == null) {\n width = stack.shift() + privateDict.nominalWidthX;\n }\n }\n\n function parseStems() {\n if (stack.length % 2 !== 0) {\n checkWidth();\n }\n\n nStems += stack.length >> 1;\n return stack.length = 0;\n }\n\n function moveTo(x, y) {\n if (open) {\n path.closePath();\n }\n\n path.moveTo(x, y);\n open = true;\n }\n\n let parse = function () {\n while (stream.pos < end) {\n let op = stream.readUInt8();\n if (op < 32) {\n let index, subr, phase;\n let c1x, c1y, c2x, c2y, c3x, c3y;\n let c4x, c4y, c5x, c5y, c6x, c6y;\n let pts;\n\n switch (op) {\n case 1: // hstem\n case 3: // vstem\n case 18: // hstemhm\n case 23: // vstemhm\n parseStems();\n break;\n\n case 4: // vmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 5: // rlineto\n while (stack.length >= 2) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n break;\n\n case 6: // hlineto\n case 7: // vlineto\n phase = op === 6;\n while (stack.length >= 1) {\n if (phase) {\n x += stack.shift();\n } else {\n y += stack.shift();\n }\n\n path.lineTo(x, y);\n phase = !phase;\n }\n break;\n\n case 8: // rrcurveto\n while (stack.length > 0) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 10: // callsubr\n index = stack.pop() + subrsBias;\n subr = subrs[index];\n if (subr) {\n usedSubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 11: // return\n if (cff.version >= 2) {\n break;\n }\n return;\n\n case 14: // endchar\n if (cff.version >= 2) {\n break;\n }\n\n if (stack.length > 0) {\n checkWidth();\n }\n\n if (open) {\n path.closePath();\n open = false;\n }\n break;\n\n case 15: { // vsindex\n if (cff.version < 2) {\n throw new Error('vsindex operator not supported in CFF v1');\n }\n\n vsindex = stack.pop();\n break;\n }\n\n case 16: { // blend\n if (cff.version < 2) {\n throw new Error('blend operator not supported in CFF v1');\n }\n\n if (!variationProcessor) {\n throw new Error('blend operator in non-variation font');\n }\n\n let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n let numBlends = stack.pop();\n let numOperands = numBlends * blendVector.length;\n let delta = stack.length - numOperands;\n let base = delta - numBlends;\n\n for (let i = 0; i < numBlends; i++) {\n let sum = stack[base + i];\n for (let j = 0; j < blendVector.length; j++) {\n sum += blendVector[j] * stack[delta++];\n }\n\n stack[base + i] = sum;\n }\n\n while (numOperands--) {\n stack.pop();\n }\n\n break;\n }\n\n case 19: // hintmask\n case 20: // cntrmask\n parseStems();\n stream.pos += (nStems + 7) >> 3;\n break;\n\n case 21: // rmoveto\n if (stack.length > 2) {\n checkWidth();\n }\n\n x += stack.shift();\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 22: // hmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n x += stack.shift();\n moveTo(x, y);\n break;\n\n case 24: // rcurveline\n while (stack.length >= 8) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n break;\n\n case 25: // rlinecurve\n while (stack.length >= 8) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n break;\n\n case 26: // vvcurveto\n if (stack.length % 2) {\n x += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x;\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 27: // hhcurveto\n if (stack.length % 2) {\n y += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y;\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 28: // shortint\n stack.push(stream.readInt16BE());\n break;\n\n case 29: // callgsubr\n index = stack.pop() + gsubrsBias;\n subr = gsubrs[index];\n if (subr) {\n usedGsubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 30: // vhcurveto\n case 31: // hvcurveto\n phase = op === 31;\n while (stack.length >= 4) {\n if (phase) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n y = c2y + stack.shift();\n x = c2x + (stack.length === 1 ? stack.shift() : 0);\n } else {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + (stack.length === 1 ? stack.shift() : 0);\n }\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n phase = !phase;\n }\n break;\n\n case 12:\n op = stream.readUInt8();\n switch (op) {\n case 3: // and\n let a = stack.pop();\n let b = stack.pop();\n stack.push(a && b ? 1 : 0);\n break;\n\n case 4: // or\n a = stack.pop();\n b = stack.pop();\n stack.push(a || b ? 1 : 0);\n break;\n\n case 5: // not\n a = stack.pop();\n stack.push(a ? 0 : 1);\n break;\n\n case 9: // abs\n a = stack.pop();\n stack.push(Math.abs(a));\n break;\n\n case 10: // add\n a = stack.pop();\n b = stack.pop();\n stack.push(a + b);\n break;\n\n case 11: // sub\n a = stack.pop();\n b = stack.pop();\n stack.push(a - b);\n break;\n\n case 12: // div\n a = stack.pop();\n b = stack.pop();\n stack.push(a / b);\n break;\n\n case 14: // neg\n a = stack.pop();\n stack.push(-a);\n break;\n\n case 15: // eq\n a = stack.pop();\n b = stack.pop();\n stack.push(a === b ? 1 : 0);\n break;\n\n case 18: // drop\n stack.pop();\n break;\n\n case 20: // put\n let val = stack.pop();\n let idx = stack.pop();\n trans[idx] = val;\n break;\n\n case 21: // get\n idx = stack.pop();\n stack.push(trans[idx] || 0);\n break;\n\n case 22: // ifelse\n let s1 = stack.pop();\n let s2 = stack.pop();\n let v1 = stack.pop();\n let v2 = stack.pop();\n stack.push(v1 <= v2 ? s1 : s2);\n break;\n\n case 23: // random\n stack.push(Math.random());\n break;\n\n case 24: // mul\n a = stack.pop();\n b = stack.pop();\n stack.push(a * b);\n break;\n\n case 26: // sqrt\n a = stack.pop();\n stack.push(Math.sqrt(a));\n break;\n\n case 27: // dup\n a = stack.pop();\n stack.push(a, a);\n break;\n\n case 28: // exch\n a = stack.pop();\n b = stack.pop();\n stack.push(b, a);\n break;\n\n case 29: // index\n idx = stack.pop();\n if (idx < 0) {\n idx = 0;\n } else if (idx > stack.length - 1) {\n idx = stack.length - 1;\n }\n\n stack.push(stack[idx]);\n break;\n\n case 30: // roll\n let n = stack.pop();\n let j = stack.pop();\n\n if (j >= 0) {\n while (j > 0) {\n var t = stack[n - 1];\n for (let i = n - 2; i >= 0; i--) {\n stack[i + 1] = stack[i];\n }\n\n stack[0] = t;\n j--;\n }\n } else {\n while (j < 0) {\n var t = stack[0];\n for (let i = 0; i <= n; i++) {\n stack[i] = stack[i + 1];\n }\n\n stack[n - 1] = t;\n j++;\n }\n }\n break;\n\n case 34: // hflex\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y;\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 35: // flex\n pts = [];\n\n for (let i = 0; i <= 5; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n stack.shift(); // fd\n break;\n\n case 36: // hflex1\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y + stack.shift();\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 37: // flex1\n let startx = x;\n let starty = y;\n\n pts = [];\n for (let i = 0; i <= 4; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n x += stack.shift();\n y = starty;\n } else {\n x = startx;\n y += stack.shift();\n }\n\n pts.push(x, y);\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n break;\n\n default:\n throw new Error(`Unknown op: 12 ${op}`);\n }\n break;\n\n default:\n throw new Error(`Unknown op: ${op}`);\n }\n\n } else if (op < 247) {\n stack.push(op - 139);\n } else if (op < 251) {\n var b1 = stream.readUInt8();\n stack.push((op - 247) * 256 + b1 + 108);\n } else if (op < 255) {\n var b1 = stream.readUInt8();\n stack.push(-(op - 251) * 256 - b1 - 108);\n } else {\n stack.push(stream.readInt32BE() / 65536);\n }\n }\n };\n\n parse();\n\n if (open) {\n path.closePath();\n }\n\n return path;\n }\n}\n","import TTFGlyph from './TTFGlyph';\nimport * as r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n originX: r.uint16,\n originY: r.uint16,\n type: new r.String(4),\n data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n type = 'SBIX';\n\n /**\n * Returns an object representing a glyph image at the given point size.\n * The object has a data property with a Buffer containing the actual image data,\n * along with the image type, and origin.\n *\n * @param {number} size\n * @return {object}\n */\n getImageForSize(size) {\n for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n var table = this._font.sbix.imageTables[i];\n if (table.ppem >= size) { break; }\n }\n\n let offsets = table.imageOffsets;\n let start = offsets[this.id];\n let end = offsets[this.id + 1];\n\n if (start === end) {\n return null;\n }\n\n this._font.stream.pos = start;\n return SBIXImage.decode(this._font.stream, {buflen: end - start});\n }\n\n render(ctx, size) {\n let img = this.getImageForSize(size);\n if (img != null) {\n let scale = size / this._font.unitsPerEm;\n ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n }\n\n if (this._font.sbix.flags.renderOutlines) {\n super.render(ctx, size);\n }\n }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n constructor(glyph, color) {\n this.glyph = glyph;\n this.color = color;\n }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n type = 'COLR';\n\n _getBBox() {\n let bbox = new BBox;\n for (let i = 0; i < this.layers.length; i++) {\n let layer = this.layers[i];\n let b = layer.glyph.bbox;\n bbox.addPoint(b.minX, b.minY);\n bbox.addPoint(b.maxX, b.maxY);\n }\n\n return bbox;\n }\n\n /**\n * Returns an array of objects containing the glyph and color for\n * each layer in the composite color glyph.\n * @type {object[]}\n */\n get layers() {\n let cpal = this._font.CPAL;\n let colr = this._font.COLR;\n let low = 0;\n let high = colr.baseGlyphRecord.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n var rec = colr.baseGlyphRecord[mid];\n\n if (this.id < rec.gid) {\n high = mid - 1;\n } else if (this.id > rec.gid) {\n low = mid + 1;\n } else {\n var baseLayer = rec;\n break;\n }\n }\n\n // if base glyph not found in COLR table,\n // default to normal glyph from glyf or CFF\n if (baseLayer == null) {\n var g = this._font._getBaseGlyph(this.id);\n var color = {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 255\n };\n\n return [new COLRLayer(g, color)];\n }\n\n // otherwise, return an array of all the layers\n let layers = [];\n for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n var rec = colr.layerRecords[i];\n var color = cpal.colorRecords[rec.paletteIndex];\n var g = this._font._getBaseGlyph(rec.gid);\n layers.push(new COLRLayer(g, color));\n }\n\n return layers;\n }\n\n render(ctx, size) {\n for (let {glyph, color} of this.layers) {\n ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n glyph.render(ctx, size);\n }\n\n return;\n }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK = 0x0fff;\nconst EMBEDDED_TUPLE_COORD = 0x8000;\nconst INTERMEDIATE_TUPLE = 0x4000;\nconst PRIVATE_POINT_NUMBERS = 0x2000;\nconst TUPLE_INDEX_MASK = 0x0fff;\nconst POINTS_ARE_WORDS = 0x80;\nconst POINT_RUN_COUNT_MASK = 0x7f;\nconst DELTAS_ARE_ZERO = 0x80;\nconst DELTAS_ARE_WORDS = 0x40;\nconst DELTA_RUN_COUNT_MASK = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n constructor(font, coords) {\n this.font = font;\n this.normalizedCoords = this.normalizeCoords(coords);\n this.blendVectors = new Map;\n }\n\n normalizeCoords(coords) {\n // the default mapping is linear along each axis, in two segments:\n // from the minValue to defaultValue, and from defaultValue to maxValue.\n let normalized = [];\n for (var i = 0; i < this.font.fvar.axis.length; i++) {\n let axis = this.font.fvar.axis[i];\n if (coords[i] < axis.defaultValue) {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n } else {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n }\n }\n\n // if there is an avar table, the normalized value is calculated\n // by interpolating between the two nearest mapped values.\n if (this.font.avar) {\n for (var i = 0; i < this.font.avar.segment.length; i++) {\n let segment = this.font.avar.segment[i];\n for (let j = 0; j < segment.correspondence.length; j++) {\n let pair = segment.correspondence[j];\n if (j >= 1 && normalized[i] < pair.fromCoord) {\n let prev = segment.correspondence[j - 1];\n normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n prev.toCoord;\n\n break;\n }\n }\n }\n }\n\n return normalized;\n }\n\n transformPoints(gid, glyphPoints) {\n if (!this.font.fvar || !this.font.gvar) { return; }\n\n let { gvar } = this.font;\n if (gid >= gvar.glyphCount) { return; }\n\n let offset = gvar.offsets[gid];\n if (offset === gvar.offsets[gid + 1]) { return; }\n\n // Read the gvar data for this glyph\n let { stream } = this.font;\n stream.pos = offset;\n if (stream.pos >= stream.length) {\n return;\n }\n\n let tupleCount = stream.readUInt16BE();\n let offsetToData = offset + stream.readUInt16BE();\n\n if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n var here = stream.pos;\n stream.pos = offsetToData;\n var sharedPoints = this.decodePoints();\n offsetToData = stream.pos;\n stream.pos = here;\n }\n\n let origPoints = glyphPoints.map(pt => pt.copy());\n\n tupleCount &= TUPLE_COUNT_MASK;\n for (let i = 0; i < tupleCount; i++) {\n let tupleDataSize = stream.readUInt16BE();\n let tupleIndex = stream.readUInt16BE();\n\n if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n var tupleCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n tupleCoords.push(stream.readInt16BE() / 16384);\n }\n\n } else {\n if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n throw new Error('Invalid gvar table');\n }\n\n var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n }\n\n if (tupleIndex & INTERMEDIATE_TUPLE) {\n var startCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n startCoords.push(stream.readInt16BE() / 16384);\n }\n\n var endCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n endCoords.push(stream.readInt16BE() / 16384);\n }\n }\n\n // Get the factor at which to apply this tuple\n let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n if (factor === 0) {\n offsetToData += tupleDataSize;\n continue;\n }\n\n var here = stream.pos;\n stream.pos = offsetToData;\n\n if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n var points = this.decodePoints();\n } else {\n var points = sharedPoints;\n }\n\n // points.length = 0 means there are deltas for all points\n let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n let xDeltas = this.decodeDeltas(nPoints);\n let yDeltas = this.decodeDeltas(nPoints);\n\n if (points.length === 0) { // all points\n for (let i = 0; i < glyphPoints.length; i++) {\n var point = glyphPoints[i];\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n } else {\n let outPoints = origPoints.map(pt => pt.copy());\n let hasDelta = glyphPoints.map(() => false);\n\n for (let i = 0; i < points.length; i++) {\n let idx = points[i];\n if (idx < glyphPoints.length) {\n let point = outPoints[idx];\n hasDelta[idx] = true;\n\n point.x += xDeltas[i] * factor;\n point.y += yDeltas[i] * factor;\n }\n }\n\n this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n for (let i = 0; i < glyphPoints.length; i++) {\n let deltaX = outPoints[i].x - origPoints[i].x;\n let deltaY = outPoints[i].y - origPoints[i].y;\n\n glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX);\n glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY);\n }\n }\n\n offsetToData += tupleDataSize;\n stream.pos = here;\n }\n }\n\n decodePoints() {\n let stream = this.font.stream;\n let count = stream.readUInt8();\n\n if (count & POINTS_ARE_WORDS) {\n count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n }\n\n let points = new Uint16Array(count);\n let i = 0;\n let point = 0;\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n for (let j = 0; j < runCount && i < count; j++) {\n point += fn.call(stream);\n points[i++] = point;\n }\n }\n\n return points;\n }\n\n decodeDeltas(count) {\n let stream = this.font.stream;\n let i = 0;\n let deltas = new Int16Array(count);\n\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n if (run & DELTAS_ARE_ZERO) {\n i += runCount;\n\n } else {\n let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n for (let j = 0; j < runCount && i < count; j++) {\n deltas[i++] = fn.call(stream);\n }\n }\n }\n\n return deltas;\n }\n\n tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n let normalized = this.normalizedCoords;\n let { gvar } = this.font;\n let factor = 1;\n\n for (let i = 0; i < gvar.axisCount; i++) {\n if (tupleCoords[i] === 0) {\n continue;\n }\n\n if (normalized[i] === 0) {\n return 0;\n }\n\n if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n (normalized[i] > Math.max(0, tupleCoords[i]))) {\n return 0;\n }\n\n factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n } else {\n if ((normalized[i] < startCoords[i]) ||\n (normalized[i] > endCoords[i])) {\n return 0;\n\n } else if (normalized[i] < tupleCoords[i]) {\n factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n } else {\n factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n }\n }\n }\n\n return factor;\n }\n\n // Interpolates points without delta values.\n // Needed for the Ø and Q glyphs in Skia.\n // Algorithm from Freetype.\n interpolateMissingDeltas(points, inPoints, hasDelta) {\n if (points.length === 0) {\n return;\n }\n\n let point = 0;\n while (point < points.length) {\n let firstPoint = point;\n\n // find the end point of the contour\n let endPoint = point;\n let pt = points[endPoint];\n while (!pt.endContour) {\n pt = points[++endPoint];\n }\n\n // find the first point that has a delta\n while (point <= endPoint && !hasDelta[point]) {\n point++;\n }\n\n if (point > endPoint) {\n continue;\n }\n\n let firstDelta = point;\n let curDelta = point;\n point++;\n\n while (point <= endPoint) {\n // find the next point with a delta, and interpolate intermediate points\n if (hasDelta[point]) {\n this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n curDelta = point;\n }\n\n point++;\n }\n\n // shift contour if we only have a single delta\n if (curDelta === firstDelta) {\n this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n } else {\n // otherwise, handle the remaining points at the end and beginning of the contour\n this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n if (firstDelta > 0) {\n this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n }\n }\n\n point = endPoint + 1;\n }\n }\n\n deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n if (p1 > p2) {\n return;\n }\n\n let iterable = ['x', 'y'];\n for (let i = 0; i < iterable.length; i++) {\n let k = iterable[i];\n if (inPoints[ref1][k] > inPoints[ref2][k]) {\n var p = ref1;\n ref1 = ref2;\n ref2 = p;\n }\n\n let in1 = inPoints[ref1][k];\n let in2 = inPoints[ref2][k];\n let out1 = outPoints[ref1][k];\n let out2 = outPoints[ref2][k];\n\n // If the reference points have the same coordinate but different\n // delta, inferred delta is zero. Otherwise interpolate.\n if (in1 !== in2 || out1 === out2) {\n let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n for (let p = p1; p <= p2; p++) {\n let out = inPoints[p][k];\n\n if (out <= in1) {\n out += out1 - in1;\n } else if (out >= in2) {\n out += out2 - in2;\n } else {\n out = out1 + (out - in1) * scale;\n }\n\n outPoints[p][k] = out;\n }\n }\n }\n }\n\n deltaShift(p1, p2, ref, inPoints, outPoints) {\n let deltaX = outPoints[ref].x - inPoints[ref].x;\n let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n for (let p = p1; p <= p2; p++) {\n if (p !== ref) {\n outPoints[p].x += deltaX;\n outPoints[p].y += deltaY;\n }\n }\n }\n\n getAdvanceAdjustment(gid, table) {\n let outerIndex, innerIndex;\n\n if (table.advanceWidthMapping) {\n let idx = gid;\n if (idx >= table.advanceWidthMapping.mapCount) {\n idx = table.advanceWidthMapping.mapCount - 1;\n }\n\n let entryFormat = table.advanceWidthMapping.entryFormat;\n ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n } else {\n outerIndex = 0;\n innerIndex = gid;\n }\n\n return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);\n }\n\n // See pseudo code from `Font Variations Overview'\n // in the OpenType specification.\n getDelta(itemStore, outerIndex, innerIndex) {\n if (outerIndex >= itemStore.itemVariationData.length) {\n return 0;\n }\n\n let varData = itemStore.itemVariationData[outerIndex];\n if (innerIndex >= varData.deltaSets.length) {\n return 0;\n }\n\n let deltaSet = varData.deltaSets[innerIndex];\n let blendVector = this.getBlendVector(itemStore, outerIndex);\n let netAdjustment = 0;\n\n for (let master = 0; master < varData.regionIndexCount; master++) {\n netAdjustment += deltaSet.deltas[master] * blendVector[master];\n }\n\n return netAdjustment;\n }\n\n getBlendVector(itemStore, outerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n if (this.blendVectors.has(varData)) {\n return this.blendVectors.get(varData);\n }\n\n let normalizedCoords = this.normalizedCoords;\n let blendVector = [];\n\n // outer loop steps through master designs to be blended\n for (let master = 0; master < varData.regionIndexCount; master++) {\n let scalar = 1;\n let regionIndex = varData.regionIndexes[master];\n let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n // inner loop steps through axes in this region\n for (let j = 0; j < axes.length; j++) {\n let axis = axes[j];\n let axisScalar;\n\n // compute the scalar contribution of this axis\n // ignore invalid ranges\n if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n axisScalar = 1;\n\n } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n axisScalar = 1;\n\n // peak of 0 means ignore this axis\n } else if (axis.peakCoord === 0) {\n axisScalar = 1;\n\n // ignore this region if coords are out of range\n } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n axisScalar = 0;\n\n // calculate a proportional factor\n } else {\n if (normalizedCoords[j] === axis.peakCoord) {\n axisScalar = 1;\n } else if (normalizedCoords[j] < axis.peakCoord) {\n axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n (axis.peakCoord - axis.startCoord + Number.EPSILON);\n } else {\n axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n (axis.endCoord - axis.peakCoord + Number.EPSILON);\n }\n }\n\n // take product of all the axis scalars\n scalar *= axisScalar;\n }\n\n blendVector[master] = scalar;\n }\n\n this.blendVectors.set(varData, blendVector);\n return blendVector;\n }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n constructor(font) {\n super(font);\n this.glyphEncoder = new TTFGlyphEncoder;\n }\n\n _addGlyph(gid) {\n let glyph = this.font.getGlyph(gid);\n let glyf = glyph._decode();\n\n // get the offset to the glyph from the loca table\n let curOffset = this.font.loca.offsets[gid];\n let nextOffset = this.font.loca.offsets[gid + 1];\n\n let stream = this.font._getTableStream('glyf');\n stream.pos += curOffset;\n\n let buffer = stream.readBuffer(nextOffset - curOffset);\n\n // if it is a compound glyph, include its components\n if (glyf && glyf.numberOfContours < 0) {\n buffer = new Uint8Array(buffer);\n let view = new DataView(buffer.buffer);\n for (let component of glyf.components) {\n gid = this.includeGlyph(component.glyphID);\n view.setUint16(component.pos, gid);\n }\n } else if (glyf && this.font._variationProcessor) {\n // If this is a TrueType variation glyph, re-encode the path\n buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n }\n\n this.glyf.push(buffer);\n this.loca.offsets.push(this.offset);\n\n this.hmtx.metrics.push({\n advance: glyph.advanceWidth,\n bearing: glyph._getMetrics().leftBearing\n });\n\n this.offset += buffer.length;\n return this.glyf.length - 1;\n }\n\n encode() {\n // tables required by PDF spec:\n // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n //\n // additional tables required for standalone fonts:\n // name, cmap, OS/2, post\n\n this.glyf = [];\n this.offset = 0;\n this.loca = {\n offsets: [],\n version: this.font.loca.version\n };\n\n this.hmtx = {\n metrics: [],\n bearings: []\n };\n\n // include all the glyphs\n // not using a for loop because we need to support adding more\n // glyphs to the array as we go, and CoffeeScript caches the length.\n let i = 0;\n while (i < this.glyphs.length) {\n this._addGlyph(this.glyphs[i++]);\n }\n\n let maxp = cloneDeep(this.font.maxp);\n maxp.numGlyphs = this.glyf.length;\n\n this.loca.offsets.push(this.offset);\n\n let head = cloneDeep(this.font.head);\n head.indexToLocFormat = this.loca.version;\n\n let hhea = cloneDeep(this.font.hhea);\n hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n // map = []\n // for index in [0...256]\n // if index < @numGlyphs\n // map[index] = index\n // else\n // map[index] = 0\n //\n // cmapTable =\n // version: 0\n // length: 262\n // language: 0\n // codeMap: map\n //\n // cmap =\n // version: 0\n // numSubtables: 1\n // tables: [\n // platformID: 1\n // encodingID: 0\n // table: cmapTable\n // ]\n\n // TODO: subset prep, cvt, fpgm?\n return Directory.toBuffer({\n tables: {\n head,\n hhea,\n loca: this.loca,\n maxp,\n 'cvt ': this.font['cvt '],\n prep: this.font.prep,\n glyf: this.glyf,\n hmtx: this.hmtx,\n fpgm: this.font.fpgm\n\n // name: clone @font.name\n // 'OS/2': clone @font['OS/2']\n // post: clone @font.post\n // cmap: cmap\n }\n });\n }\n}\n","import * as r from 'restructure';\n\nconst resolved = Promise.resolve();\n\nexport default class Subset {\n constructor(font) {\n this.font = font;\n this.glyphs = [];\n this.mapping = {};\n\n // always include the missing glyph\n this.includeGlyph(0);\n }\n\n includeGlyph(glyph) {\n if (typeof glyph === 'object') {\n glyph = glyph.id;\n }\n\n if (this.mapping[glyph] == null) {\n this.glyphs.push(glyph);\n this.mapping[glyph] = this.glyphs.length - 1;\n }\n\n return this.mapping[glyph];\n }\n}\n","import * as r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\nclass Point {\n static size(val) {\n return val >= 0 && val <= 255 ? 1 : 2;\n }\n \n static encode(stream, value) {\n if (value >= 0 && value <= 255) {\n stream.writeUInt8(value);\n } else {\n stream.writeInt16BE(value);\n }\n }\n}\n\nlet Glyf = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16,\n endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n instructions: new r.Array(r.uint8, r.uint16),\n flags: new r.Array(r.uint8, 0),\n xPoints: new r.Array(Point, 0),\n yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n encodeSimple(path, instructions = []) {\n let endPtsOfContours = [];\n let xPoints = [];\n let yPoints = [];\n let flags = [];\n let same = 0;\n let lastX = 0, lastY = 0, lastFlag = 0;\n let pointCount = 0;\n \n for (let i = 0; i < path.commands.length; i++) {\n let c = path.commands[i];\n \n for (let j = 0; j < c.args.length; j += 2) {\n let x = c.args[j];\n let y = c.args[j + 1];\n let flag = 0;\n \n // If the ending point of a quadratic curve is the midpoint\n // between the control point and the control point of the next\n // quadratic curve, we can omit the ending point.\n if (c.command === 'quadraticCurveTo' && j === 2) {\n let next = path.commands[i + 1];\n if (next && next.command === 'quadraticCurveTo') {\n let midX = (lastX + next.args[0]) / 2;\n let midY = (lastY + next.args[1]) / 2;\n \n if (x === midX && y === midY) {\n continue;\n }\n }\n }\n \n // All points except control points are on curve.\n if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n flag |= ON_CURVE;\n }\n \n flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n \n if (flag === lastFlag && same < 255) {\n flags[flags.length - 1] |= REPEAT;\n same++;\n } else {\n if (same > 0) {\n flags.push(same);\n same = 0;\n }\n \n flags.push(flag);\n lastFlag = flag;\n }\n \n lastX = x;\n lastY = y;\n pointCount++;\n }\n \n if (c.command === 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n }\n\n // Close the path if the last command didn't already\n if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n \n let bbox = path.bbox;\n let glyf = {\n numberOfContours: endPtsOfContours.length,\n xMin: bbox.minX,\n yMin: bbox.minY,\n xMax: bbox.maxX,\n yMax: bbox.maxY,\n endPtsOfContours: endPtsOfContours,\n instructions: instructions,\n flags: flags,\n xPoints: xPoints,\n yPoints: yPoints\n };\n \n let size = Glyf.size(glyf);\n let tail = 4 - (size % 4);\n \n let stream = new r.EncodeStream(size + tail);\n Glyf.encode(stream, glyf);\n \n // Align to 4-byte length\n if (tail !== 0) {\n stream.fill(0, tail);\n }\n \n return stream.buffer;\n }\n \n _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n let diff = value - last;\n \n if (value === last) {\n flag |= sameFlag;\n } else {\n if (-255 <= diff && diff <= 255) {\n flag |= shortFlag;\n if (diff < 0) {\n diff = -diff;\n } else {\n flag |= sameFlag;\n }\n }\n \n points.push(diff);\n }\n \n return flag;\n }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n constructor(font) {\n super(font);\n\n this.cff = this.font['CFF '];\n if (!this.cff) {\n throw new Error('Not a CFF Font');\n }\n }\n\n subsetCharstrings() {\n this.charstrings = [];\n let gsubrs = {};\n\n for (let gid of this.glyphs) {\n this.charstrings.push(this.cff.getCharString(gid));\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedGsubrs) {\n gsubrs[subr] = true;\n }\n }\n\n this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n }\n\n subsetSubrs(subrs, used) {\n let res = [];\n for (let i = 0; i < subrs.length; i++) {\n let subr = subrs[i];\n if (used[i]) {\n this.cff.stream.pos = subr.offset;\n res.push(this.cff.stream.readBuffer(subr.length));\n } else {\n res.push(new Uint8Array([11])); // return\n }\n }\n\n return res;\n }\n\n subsetFontdict(topDict) {\n topDict.FDArray = [];\n topDict.FDSelect = {\n version: 0,\n fds: []\n };\n\n let used_fds = {};\n let used_subrs = [];\n let fd_select = {};\n for (let gid of this.glyphs) {\n let fd = this.cff.fdForGlyph(gid);\n if (fd == null) {\n continue;\n }\n\n if (!used_fds[fd]) {\n topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n used_subrs.push({});\n fd_select[fd] = topDict.FDArray.length - 1;\n }\n\n used_fds[fd] = true;\n topDict.FDSelect.fds.push(fd_select[fd]);\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n for (let subr in glyph._usedSubrs) {\n used_subrs[fd_select[fd]][subr] = true;\n }\n }\n\n for (let i = 0; i < topDict.FDArray.length; i++) {\n let dict = topDict.FDArray[i];\n delete dict.FontName;\n if (dict.Private && dict.Private.Subrs) {\n dict.Private = Object.assign({}, dict.Private);\n dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n }\n }\n\n return;\n }\n\n createCIDFontdict(topDict) {\n let used_subrs = {};\n for (let gid of this.glyphs) {\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedSubrs) {\n used_subrs[subr] = true;\n }\n }\n\n let privateDict = Object.assign({}, this.cff.topDict.Private);\n if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {\n privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n }\n\n topDict.FDArray = [{ Private: privateDict }];\n return topDict.FDSelect = {\n version: 3,\n nRanges: 1,\n ranges: [{ first: 0, fd: 0 }],\n sentinel: this.charstrings.length\n };\n }\n\n addString(string) {\n if (!string) {\n return null;\n }\n\n if (!this.strings) {\n this.strings = [];\n }\n\n this.strings.push(string);\n return standardStrings.length + this.strings.length - 1;\n }\n\n encode() {\n this.subsetCharstrings();\n\n let charset = {\n version: this.charstrings.length > 255 ? 2 : 1,\n ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n };\n\n let topDict = Object.assign({}, this.cff.topDict);\n topDict.Private = null;\n topDict.charset = charset;\n topDict.Encoding = null;\n topDict.CharStrings = this.charstrings;\n\n for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n topDict[key] = this.addString(this.cff.string(topDict[key]));\n }\n\n topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n topDict.CIDCount = this.charstrings.length;\n\n if (this.cff.isCIDFont) {\n this.subsetFontdict(topDict);\n } else {\n this.createCIDFontdict(topDict);\n }\n\n let top = {\n version: 1,\n hdrSize: this.cff.hdrSize,\n offSize: 4,\n header: this.cff.header,\n nameIndex: [this.cff.postscriptName],\n topDictIndex: [topDict],\n stringIndex: this.strings,\n globalSubrIndex: this.gsubrs\n };\n\n return CFFTop.toBuffer(top);\n }\n}\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport * as r from 'restructure';\nimport { asciiDecoder } from './utils';\n\nexport default class WOFFFont extends TTFFont {\n type = 'WOFF';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOFF';\n }\n\n _decodeDirectory() {\n this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n\n if (table.compLength < table.length) {\n this.stream.pos += 2; // skip deflate header\n let outBuffer = new Uint8Array(table.length);\n let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n return new r.DecodeStream(buf);\n } else {\n return this.stream;\n }\n }\n\n return null;\n }\n}\n","import * as r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n tag: new r.String(4),\n offset: new r.Pointer(r.uint32, 'void', {type: 'global'}),\n compLength: r.uint32,\n length: r.uint32,\n origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n tag: new r.String(4), // should be 'wOFF'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import * as r from 'restructure';\nimport brotli from 'brotli/decompress.js';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\nimport { asciiDecoder } from './utils';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n type = 'WOFF2';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOF2';\n }\n\n _decodeDirectory() {\n this.directory = WOFF2Directory.decode(this.stream);\n this._dataPos = this.stream.pos;\n }\n\n _decompress() {\n // decompress data and setup table offsets if we haven't already\n if (!this._decompressed) {\n this.stream.pos = this._dataPos;\n let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n let decompressedSize = 0;\n for (let tag in this.directory.tables) {\n let entry = this.directory.tables[tag];\n entry.offset = decompressedSize;\n decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n }\n\n let decompressed = brotli(buffer, decompressedSize);\n if (!decompressed) {\n throw new Error('Error decoding compressed data in WOFF2');\n }\n\n this.stream = new r.DecodeStream(decompressed);\n this._decompressed = true;\n }\n }\n\n _decodeTable(table) {\n this._decompress();\n return super._decodeTable(table);\n }\n\n // Override this method to get a glyph and return our\n // custom subclass if there is a glyf table.\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n } else {\n return super._getBaseGlyph(glyph, characters);\n }\n }\n }\n\n _transformGlyfTable() {\n this._decompress();\n this.stream.pos = this.directory.tables.glyf.offset;\n let table = GlyfTable.decode(this.stream);\n let glyphs = [];\n\n for (let index = 0; index < table.numGlyphs; index++) {\n let glyph = {};\n let nContours = table.nContours.readInt16BE();\n glyph.numberOfContours = nContours;\n\n if (nContours > 0) { // simple glyph\n let nPoints = [];\n let totalPoints = 0;\n\n for (let i = 0; i < nContours; i++) {\n let r = read255UInt16(table.nPoints);\n totalPoints += r;\n nPoints.push(totalPoints);\n }\n\n glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n for (let i = 0; i < nContours; i++) {\n glyph.points[nPoints[i] - 1].endContour = true;\n }\n\n var instructionSize = read255UInt16(table.glyphs);\n\n } else if (nContours < 0) { // composite glyph\n let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n if (haveInstructions) {\n var instructionSize = read255UInt16(table.glyphs);\n }\n }\n\n glyphs.push(glyph);\n }\n\n this._transformedGlyphs = glyphs;\n }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n constructor(length) {\n this.length = length;\n this._buf = new r.Buffer(length);\n }\n\n decode(stream, parent) {\n return new r.DecodeStream(this._buf.decode(stream, parent));\n }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n version: r.uint32,\n numGlyphs: r.uint16,\n indexFormat: r.uint16,\n nContourStreamSize: r.uint32,\n nPointsStreamSize: r.uint32,\n flagStreamSize: r.uint32,\n glyphStreamSize: r.uint32,\n compositeStreamSize: r.uint32,\n bboxStreamSize: r.uint32,\n instructionStreamSize: r.uint32,\n nContours: new Substream('nContourStreamSize'),\n nPoints: new Substream('nPointsStreamSize'),\n flags: new Substream('flagStreamSize'),\n glyphs: new Substream('glyphStreamSize'),\n composites: new Substream('compositeStreamSize'),\n bboxes: new Substream('bboxStreamSize'),\n instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n let code = stream.readUInt8();\n\n if (code === WORD_CODE) {\n return stream.readUInt16BE();\n }\n\n if (code === ONE_MORE_BYTE_CODE1) {\n return stream.readUInt8() + LOWEST_U_CODE;\n }\n\n if (code === ONE_MORE_BYTE_CODE2) {\n return stream.readUInt8() + LOWEST_U_CODE * 2;\n }\n\n return code;\n}\n\nfunction withSign(flag, baseval) {\n return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n let y;\n let x = y = 0;\n let res = [];\n\n for (let i = 0; i < nPoints; i++) {\n let dx = 0, dy = 0;\n let flag = flags.readUInt8();\n let onCurve = !(flag >> 7);\n flag &= 0x7f;\n\n if (flag < 10) {\n dx = 0;\n dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n } else if (flag < 20) {\n dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n dy = 0;\n\n } else if (flag < 84) {\n var b0 = flag - 20;\n var b1 = glyphs.readUInt8();\n dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n } else if (flag < 120) {\n var b0 = flag - 84;\n dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n } else if (flag < 124) {\n var b1 = glyphs.readUInt8();\n let b2 = glyphs.readUInt8();\n dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n } else {\n dx = withSign(flag, glyphs.readUInt16BE());\n dy = withSign(flag >> 1, glyphs.readUInt16BE());\n }\n\n x += dx;\n y += dy;\n res.push(new Point(onCurve, false, x, y));\n }\n\n return res;\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n type = 'WOFF2';\n\n _decode() {\n // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n return this._font._transformedGlyphs[this.id];\n }\n\n _getCBox() {\n return this.path.bbox;\n }\n}\n","import * as r from 'restructure';\n\nconst Base128 = {\n decode(stream) {\n let result = 0;\n let iterable = [0, 1, 2, 3, 4];\n for (let j = 0; j < iterable.length; j++) {\n let i = iterable[j];\n let code = stream.readUInt8();\n\n // If any of the top seven bits are set then we're about to overflow.\n if (result & 0xe0000000) {\n throw new Error('Overflow');\n }\n\n result = (result << 7) | (code & 0x7f);\n if ((code & 0x80) === 0) {\n return result;\n }\n }\n\n throw new Error('Bad base 128 number');\n }\n};\n\nlet knownTags = [\n 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n flags: r.uint8,\n customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n length: Base128,\n transformVersion: t => (t.flags >>> 6) & 0x03,\n transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n tag: new r.String(4), // should be 'wOF2'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n totalCompressedSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n let tables = {};\n for (let i = 0; i < this.tables.length; i++) {\n let table = this.tables[i];\n tables[table.tag] = table;\n }\n\n return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport { asciiDecoder } from './utils';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n 0x00010000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts')\n },\n 0x00020000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts'),\n dsigTag: r.uint32,\n dsigLength: r.uint32,\n dsigOffset: r.uint32\n }\n});\n\nexport default class TrueTypeCollection {\n type = 'TTC';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'ttcf';\n }\n\n constructor(stream) {\n this.stream = stream;\n if (stream.readString(4) !== 'ttcf') {\n throw new Error('Not a TrueType collection');\n }\n\n this.header = TTCHeader.decode(stream);\n }\n\n getFont(name) {\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n len: r.uint32,\n buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n id: r.uint16,\n nameOffset: r.int16,\n attr: r.uint8,\n dataOffset: r.uint24,\n handle: r.uint32\n});\n\nlet Type = new r.Struct({\n name: new r.String(4),\n maxTypeIndex: r.uint16,\n refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n length: r.uint16,\n types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n reserved: new r.Reserved(r.uint8, 24),\n typeList: new r.Pointer(r.uint16, TypeList),\n nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n dataOffset: r.uint32,\n map: new r.Pointer(r.uint32, DFontMap),\n dataLength: r.uint32,\n mapLength: r.uint32\n});\n\nexport default class DFont {\n type = 'DFont';\n\n static probe(buffer) {\n let stream = new r.DecodeStream(buffer);\n\n try {\n var header = DFontHeader.decode(stream);\n } catch (e) {\n return false;\n }\n\n for (let type of header.map.typeList.types) {\n if (type.name === 'sfnt') {\n return true;\n }\n }\n\n return false;\n }\n\n constructor(stream) {\n this.stream = stream;\n this.header = DFontHeader.decode(this.stream);\n\n for (let type of this.header.map.typeList.types) {\n for (let ref of type.refList) {\n if (ref.nameOffset >= 0) {\n this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n ref.name = DFontName.decode(this.stream);\n } else {\n ref.name = null;\n }\n }\n\n if (type.name === 'sfnt') {\n this.sfnt = type;\n }\n }\n }\n\n getFont(name) {\n if (!this.sfnt) {\n return null;\n }\n\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n"],"names":[],"version":3,"file":"browser.cjs.map"} \ No newline at end of file diff --git a/node_modules/fontkit/dist/main.cjs b/node_modules/fontkit/dist/main.cjs new file mode 100644 index 0000000..851b2d2 --- /dev/null +++ b/node_modules/fontkit/dist/main.cjs @@ -0,0 +1,13355 @@ +var $elh9A$restructure = require("restructure"); +var $elh9A$fs = require("fs"); +var $elh9A$swchelperscjs_define_propertycjs = require("@swc/helpers/cjs/_define_property.cjs"); +var $elh9A$swchelperscjs_ts_decoratecjs = require("@swc/helpers/cjs/_ts_decorate.cjs"); +var $elh9A$fastdeepequal = require("fast-deep-equal"); +var $elh9A$unicodeproperties = require("unicode-properties"); +var $elh9A$unicodetrie = require("unicode-trie"); +var $elh9A$dfa = require("dfa"); +var $elh9A$clone = require("clone"); +var $elh9A$tinyinflate = require("tiny-inflate"); +var $elh9A$brotlidecompressjs = require("brotli/decompress.js"); + + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} +var $59aa4ed98453e1d4$exports = {}; + +$parcel$export($59aa4ed98453e1d4$exports, "logErrors", () => $59aa4ed98453e1d4$export$bd5c5d8b8dcafd78); +$parcel$export($59aa4ed98453e1d4$exports, "registerFormat", () => $59aa4ed98453e1d4$export$36b2f24e97d43be); +$parcel$export($59aa4ed98453e1d4$exports, "create", () => $59aa4ed98453e1d4$export$185802fd694ee1f5); +$parcel$export($59aa4ed98453e1d4$exports, "defaultLanguage", () => $59aa4ed98453e1d4$export$42940898df819940); +$parcel$export($59aa4ed98453e1d4$exports, "setDefaultLanguage", () => $59aa4ed98453e1d4$export$5157e7780d44cc36); + +let $59aa4ed98453e1d4$export$bd5c5d8b8dcafd78 = false; +let $59aa4ed98453e1d4$var$formats = []; +function $59aa4ed98453e1d4$export$36b2f24e97d43be(format) { + $59aa4ed98453e1d4$var$formats.push(format); +} +function $59aa4ed98453e1d4$export$185802fd694ee1f5(buffer, postscriptName) { + for(let i = 0; i < $59aa4ed98453e1d4$var$formats.length; i++){ + let format = $59aa4ed98453e1d4$var$formats[i]; + if (format.probe(buffer)) { + let font = new format(new (0, $elh9A$restructure.DecodeStream)(buffer)); + if (postscriptName) return font.getFont(postscriptName); + return font; + } + } + throw new Error('Unknown font format'); +} +let $59aa4ed98453e1d4$export$42940898df819940 = 'en'; +function $59aa4ed98453e1d4$export$5157e7780d44cc36(lang = 'en') { + $59aa4ed98453e1d4$export$42940898df819940 = lang; +} + + +var $f39726ff40304956$exports = {}; + +$parcel$export($f39726ff40304956$exports, "openSync", () => $f39726ff40304956$export$fa5499edb1ab414a); +$parcel$export($f39726ff40304956$exports, "open", () => $f39726ff40304956$export$3ce6949f20cea765); + + +function $f39726ff40304956$export$fa5499edb1ab414a(filename, postscriptName) { + let buffer = (0, ($parcel$interopDefault($elh9A$fs))).readFileSync(filename); + return (0, $59aa4ed98453e1d4$export$185802fd694ee1f5)(buffer, postscriptName); +} +async function $f39726ff40304956$export$3ce6949f20cea765(filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + let buffer = await (0, ($parcel$interopDefault($elh9A$fs))).promises.readFile(filename); + return (0, $59aa4ed98453e1d4$export$185802fd694ee1f5)(buffer, postscriptName); +} + + + + + +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ function $3bda6911913b43f0$export$69a3209f1a06c04d(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { + value: value + }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + return { + get () { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) return cache.get(key); + let result = fn.apply(this, args); + cache.set(key, result); + return result; + } + Object.defineProperty(this, key, { + value: memoized + }); + return memoized; + } + }; + } +} + + + + + +let $e4ae0436c91af89f$var$SubHeader = new $elh9A$restructure.Struct({ + firstCode: $elh9A$restructure.uint16, + entryCount: $elh9A$restructure.uint16, + idDelta: $elh9A$restructure.int16, + idRangeOffset: $elh9A$restructure.uint16 +}); +let $e4ae0436c91af89f$var$CmapGroup = new $elh9A$restructure.Struct({ + startCharCode: $elh9A$restructure.uint32, + endCharCode: $elh9A$restructure.uint32, + glyphID: $elh9A$restructure.uint32 +}); +let $e4ae0436c91af89f$var$UnicodeValueRange = new $elh9A$restructure.Struct({ + startUnicodeValue: $elh9A$restructure.uint24, + additionalCount: $elh9A$restructure.uint8 +}); +let $e4ae0436c91af89f$var$UVSMapping = new $elh9A$restructure.Struct({ + unicodeValue: $elh9A$restructure.uint24, + glyphID: $elh9A$restructure.uint16 +}); +let $e4ae0436c91af89f$var$DefaultUVS = new $elh9A$restructure.Array($e4ae0436c91af89f$var$UnicodeValueRange, $elh9A$restructure.uint32); +let $e4ae0436c91af89f$var$NonDefaultUVS = new $elh9A$restructure.Array($e4ae0436c91af89f$var$UVSMapping, $elh9A$restructure.uint32); +let $e4ae0436c91af89f$var$VarSelectorRecord = new $elh9A$restructure.Struct({ + varSelector: $elh9A$restructure.uint24, + defaultUVS: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $e4ae0436c91af89f$var$DefaultUVS, { + type: 'parent' + }), + nonDefaultUVS: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $e4ae0436c91af89f$var$NonDefaultUVS, { + type: 'parent' + }) +}); +let $e4ae0436c91af89f$var$CmapSubtable = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 0: { + length: $elh9A$restructure.uint16, + language: $elh9A$restructure.uint16, + codeMap: new $elh9A$restructure.LazyArray($elh9A$restructure.uint8, 256) + }, + 2: { + length: $elh9A$restructure.uint16, + language: $elh9A$restructure.uint16, + subHeaderKeys: new $elh9A$restructure.Array($elh9A$restructure.uint16, 256), + subHeaderCount: (t)=>Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new $elh9A$restructure.LazyArray($e4ae0436c91af89f$var$SubHeader, 'subHeaderCount'), + glyphIndexArray: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'subHeaderCount') + }, + 4: { + length: $elh9A$restructure.uint16, + language: $elh9A$restructure.uint16, + segCountX2: $elh9A$restructure.uint16, + segCount: (t)=>t.segCountX2 >> 1, + searchRange: $elh9A$restructure.uint16, + entrySelector: $elh9A$restructure.uint16, + rangeShift: $elh9A$restructure.uint16, + endCode: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'segCount'), + reservedPad: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + startCode: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'segCount'), + idDelta: new $elh9A$restructure.LazyArray($elh9A$restructure.int16, 'segCount'), + idRangeOffset: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'segCount'), + glyphIndexArray: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, (t)=>(t.length - t._currentOffset) / 2) + }, + 6: { + length: $elh9A$restructure.uint16, + language: $elh9A$restructure.uint16, + firstCode: $elh9A$restructure.uint16, + entryCount: $elh9A$restructure.uint16, + glyphIndices: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'entryCount') + }, + 8: { + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + length: $elh9A$restructure.uint32, + language: $elh9A$restructure.uint16, + is32: new $elh9A$restructure.LazyArray($elh9A$restructure.uint8, 8192), + nGroups: $elh9A$restructure.uint32, + groups: new $elh9A$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 10: { + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + length: $elh9A$restructure.uint32, + language: $elh9A$restructure.uint32, + firstCode: $elh9A$restructure.uint32, + entryCount: $elh9A$restructure.uint32, + glyphIndices: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'numChars') + }, + 12: { + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + length: $elh9A$restructure.uint32, + language: $elh9A$restructure.uint32, + nGroups: $elh9A$restructure.uint32, + groups: new $elh9A$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 13: { + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + length: $elh9A$restructure.uint32, + language: $elh9A$restructure.uint32, + nGroups: $elh9A$restructure.uint32, + groups: new $elh9A$restructure.LazyArray($e4ae0436c91af89f$var$CmapGroup, 'nGroups') + }, + 14: { + length: $elh9A$restructure.uint32, + numRecords: $elh9A$restructure.uint32, + varSelectors: new $elh9A$restructure.LazyArray($e4ae0436c91af89f$var$VarSelectorRecord, 'numRecords') + } +}); +let $e4ae0436c91af89f$var$CmapEntry = new $elh9A$restructure.Struct({ + platformID: $elh9A$restructure.uint16, + encodingID: $elh9A$restructure.uint16, + table: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $e4ae0436c91af89f$var$CmapSubtable, { + type: 'parent', + lazy: true + }) +}); +var // character to glyph mapping +$e4ae0436c91af89f$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numSubtables: $elh9A$restructure.uint16, + tables: new $elh9A$restructure.Array($e4ae0436c91af89f$var$CmapEntry, 'numSubtables') +}); + + + +var // font header +$55a60976afb7c261$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.int32, + revision: $elh9A$restructure.int32, + checkSumAdjustment: $elh9A$restructure.uint32, + magicNumber: $elh9A$restructure.uint32, + flags: $elh9A$restructure.uint16, + unitsPerEm: $elh9A$restructure.uint16, + created: new $elh9A$restructure.Array($elh9A$restructure.int32, 2), + modified: new $elh9A$restructure.Array($elh9A$restructure.int32, 2), + xMin: $elh9A$restructure.int16, + yMin: $elh9A$restructure.int16, + xMax: $elh9A$restructure.int16, + yMax: $elh9A$restructure.int16, + macStyle: new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + 'bold', + 'italic', + 'underline', + 'outline', + 'shadow', + 'condensed', + 'extended' + ]), + lowestRecPPEM: $elh9A$restructure.uint16, + fontDirectionHint: $elh9A$restructure.int16, + indexToLocFormat: $elh9A$restructure.int16, + glyphDataFormat: $elh9A$restructure.int16 // 0 for current format +}); + + + +var // horizontal header +$dde72b7b5b650596$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.int32, + ascent: $elh9A$restructure.int16, + descent: $elh9A$restructure.int16, + lineGap: $elh9A$restructure.int16, + advanceWidthMax: $elh9A$restructure.uint16, + minLeftSideBearing: $elh9A$restructure.int16, + minRightSideBearing: $elh9A$restructure.int16, + xMaxExtent: $elh9A$restructure.int16, + caretSlopeRise: $elh9A$restructure.int16, + caretSlopeRun: $elh9A$restructure.int16, + caretOffset: $elh9A$restructure.int16, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.int16, 4), + metricDataFormat: $elh9A$restructure.int16, + numberOfMetrics: $elh9A$restructure.uint16 // Number of advance widths in 'hmtx' table +}); + + + +let $a7c40184072c9a5b$var$HmtxEntry = new $elh9A$restructure.Struct({ + advance: $elh9A$restructure.uint16, + bearing: $elh9A$restructure.int16 +}); +var $a7c40184072c9a5b$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + metrics: new $elh9A$restructure.LazyArray($a7c40184072c9a5b$var$HmtxEntry, (t)=>t.parent.hhea.numberOfMetrics), + bearings: new $elh9A$restructure.LazyArray($elh9A$restructure.int16, (t)=>t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); + + + +var // maxiumum profile +$521197722369f691$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.int32, + numGlyphs: $elh9A$restructure.uint16, + maxPoints: $elh9A$restructure.uint16, + maxContours: $elh9A$restructure.uint16, + maxComponentPoints: $elh9A$restructure.uint16, + maxComponentContours: $elh9A$restructure.uint16, + maxZones: $elh9A$restructure.uint16, + maxTwilightPoints: $elh9A$restructure.uint16, + maxStorage: $elh9A$restructure.uint16, + maxFunctionDefs: $elh9A$restructure.uint16, + maxInstructionDefs: $elh9A$restructure.uint16, + maxStackElements: $elh9A$restructure.uint16, + maxSizeOfInstructions: $elh9A$restructure.uint16, + maxComponentElements: $elh9A$restructure.uint16, + maxComponentDepth: $elh9A$restructure.uint16 // Maximum levels of recursion; 1 for simple components +}); + + + +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ function $e2613b812f052cbe$export$badc544e0651b6b1(platformID, encodingID, languageID = 0) { + if (platformID === 1 && $e2613b812f052cbe$export$479e671907f486d1[languageID]) return $e2613b812f052cbe$export$479e671907f486d1[languageID]; + return $e2613b812f052cbe$export$6fef87b7618bdf0b[platformID][encodingID]; +} +const $e2613b812f052cbe$var$SINGLE_BYTE_ENCODINGS = new Set([ + 'x-mac-roman', + 'x-mac-cyrillic', + 'iso-8859-6', + 'iso-8859-8' +]); +const $e2613b812f052cbe$var$MAC_ENCODINGS = { + 'x-mac-croatian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017D\xd8\u221E\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220F\u0161\u222B\xaa\xba\u03A9\u017E\xf8\xbf\xa1\xac\u221A\u0192\u2248\u0106\xab\u010C\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\uF8FF\xa9\u2044\u20AC\u2039\u203A\xc6\xbb\u2013\xb7\u201A\u201E\u2030\xc2\u0107\xc1\u010D\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u03C0\xcb\u02DA\xb8\xca\xe6\u02C7", + 'x-mac-gaelic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1E02\xb1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xe6\xf8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xff\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xb7\u1EF2\u1EF3\u204A\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83", + 'x-mac-greek': "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20AC\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xdf\xae\xa9\u03A3\u03AA\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xac\u039F\u03A1\u2248\u03A4\xab\xbb\u2026 \u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xf7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xad", + 'x-mac-icelandic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\xd0\xf0\xde\xfe\xfd\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-inuit': "\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xb0\u14A1\u14A5\u14A6\u2022\xb6\u14A7\xae\xa9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026 \u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142", + 'x-mac-ce': "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010C\xe4\u010D\u0106\u0107\xe9\u0179\u017A\u010E\xed\u010F\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011A\u011B\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xac\u221A\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xc1\u0164\u0165\xcd\u017D\u017E\u016A\xd3\xd4\u016B\u016E\xda\u016F\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017B\u0141\u017C\u0122\u02C7", + 'x-mac-romanian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\u0103\u0219\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-turkish': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\uF8A0\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7" +}; +const $e2613b812f052cbe$var$encodingCache = new Map(); +function $e2613b812f052cbe$export$1dceb3c14ed68bee(encoding) { + let cached = $e2613b812f052cbe$var$encodingCache.get(encoding); + if (cached) return cached; + // These encodings aren't supported by TextDecoder. + let mapping = $e2613b812f052cbe$var$MAC_ENCODINGS[encoding]; + if (mapping) { + let res = new Map(); + for(let i = 0; i < mapping.length; i++)res.set(mapping.charCodeAt(i), 0x80 + i); + $e2613b812f052cbe$var$encodingCache.set(encoding, res); + return res; + } + // Only single byte encodings can be mapped 1:1. + if ($e2613b812f052cbe$var$SINGLE_BYTE_ENCODINGS.has(encoding)) { + // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings. + // Use this to create a mapping of code points. + let decoder = new TextDecoder(encoding); + let mapping = new Uint8Array(0x80); + for(let i = 0; i < 0x80; i++)mapping[i] = 0x80 + i; + let res = new Map(); + let s = decoder.decode(mapping); + for(let i = 0; i < 0x80; i++)res.set(s.charCodeAt(i), 0x80 + i); + $e2613b812f052cbe$var$encodingCache.set(encoding, res); + return res; + } +} +const $e2613b812f052cbe$export$6fef87b7618bdf0b = [ + // unicode + [ + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be' + ], + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + [ + 'x-mac-roman', + 'shift-jis', + 'big5', + 'euc-kr', + 'iso-8859-6', + 'iso-8859-8', + 'x-mac-greek', + 'x-mac-cyrillic', + 'x-mac-symbol', + 'x-mac-devanagari', + 'x-mac-gurmukhi', + 'x-mac-gujarati', + 'Oriya', + 'Bengali', + 'Tamil', + 'Telugu', + 'Kannada', + 'Malayalam', + 'Sinhalese', + 'Burmese', + 'Khmer', + 'iso-8859-11', + 'Laotian', + 'Georgian', + 'Armenian', + 'gbk', + 'Tibetan', + 'Mongolian', + 'Geez', + 'x-mac-ce', + 'Vietnamese', + 'Sindhi' + ], + // ISO (deprecated) + [ + 'ascii', + null, + 'iso-8859-1' + ], + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + [ + 'symbol', + 'utf-16be', + 'shift-jis', + 'gb18030', + 'big5', + 'euc-kr', + 'johab', + null, + null, + null, + 'utf-16be' + ] +]; +const $e2613b812f052cbe$export$479e671907f486d1 = { + 15: 'x-mac-icelandic', + 17: 'x-mac-turkish', + 18: 'x-mac-croatian', + 24: 'x-mac-ce', + 25: 'x-mac-ce', + 26: 'x-mac-ce', + 27: 'x-mac-ce', + 28: 'x-mac-ce', + 30: 'x-mac-icelandic', + 37: 'x-mac-romanian', + 38: 'x-mac-ce', + 39: 'x-mac-ce', + 40: 'x-mac-ce', + 143: 'x-mac-inuit', + 146: 'x-mac-gaelic' +}; +const $e2613b812f052cbe$export$2092376fd002e13 = [ + // unicode + [], + { + 0: 'en', + 30: 'fo', + 60: 'ks', + 90: 'rw', + 1: 'fr', + 31: 'fa', + 61: 'ku', + 91: 'rn', + 2: 'de', + 32: 'ru', + 62: 'sd', + 92: 'ny', + 3: 'it', + 33: 'zh', + 63: 'bo', + 93: 'mg', + 4: 'nl', + 34: 'nl-BE', + 64: 'ne', + 94: 'eo', + 5: 'sv', + 35: 'ga', + 65: 'sa', + 128: 'cy', + 6: 'es', + 36: 'sq', + 66: 'mr', + 129: 'eu', + 7: 'da', + 37: 'ro', + 67: 'bn', + 130: 'ca', + 8: 'pt', + 38: 'cz', + 68: 'as', + 131: 'la', + 9: 'no', + 39: 'sk', + 69: 'gu', + 132: 'qu', + 10: 'he', + 40: 'si', + 70: 'pa', + 133: 'gn', + 11: 'ja', + 41: 'yi', + 71: 'or', + 134: 'ay', + 12: 'ar', + 42: 'sr', + 72: 'ml', + 135: 'tt', + 13: 'fi', + 43: 'mk', + 73: 'kn', + 136: 'ug', + 14: 'el', + 44: 'bg', + 74: 'ta', + 137: 'dz', + 15: 'is', + 45: 'uk', + 75: 'te', + 138: 'jv', + 16: 'mt', + 46: 'be', + 76: 'si', + 139: 'su', + 17: 'tr', + 47: 'uz', + 77: 'my', + 140: 'gl', + 18: 'hr', + 48: 'kk', + 78: 'km', + 141: 'af', + 19: 'zh-Hant', + 49: 'az-Cyrl', + 79: 'lo', + 142: 'br', + 20: 'ur', + 50: 'az-Arab', + 80: 'vi', + 143: 'iu', + 21: 'hi', + 51: 'hy', + 81: 'id', + 144: 'gd', + 22: 'th', + 52: 'ka', + 82: 'tl', + 145: 'gv', + 23: 'ko', + 53: 'mo', + 83: 'ms', + 146: 'ga', + 24: 'lt', + 54: 'ky', + 84: 'ms-Arab', + 147: 'to', + 25: 'pl', + 55: 'tg', + 85: 'am', + 148: 'el-polyton', + 26: 'hu', + 56: 'tk', + 86: 'ti', + 149: 'kl', + 27: 'es', + 57: 'mn-CN', + 87: 'om', + 150: 'az', + 28: 'lv', + 58: 'mn', + 88: 'so', + 151: 'nn', + 29: 'se', + 59: 'ps', + 89: 'sw' + }, + // ISO (deprecated) + [], + { + 0x0436: 'af', + 0x4009: 'en-IN', + 0x0487: 'rw', + 0x0432: 'tn', + 0x041C: 'sq', + 0x1809: 'en-IE', + 0x0441: 'sw', + 0x045B: 'si', + 0x0484: 'gsw', + 0x2009: 'en-JM', + 0x0457: 'kok', + 0x041B: 'sk', + 0x045E: 'am', + 0x4409: 'en-MY', + 0x0412: 'ko', + 0x0424: 'sl', + 0x1401: 'ar-DZ', + 0x1409: 'en-NZ', + 0x0440: 'ky', + 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', + 0x3409: 'en-PH', + 0x0454: 'lo', + 0x400A: 'es-BO', + 0x0C01: 'ar', + 0x4809: 'en-SG', + 0x0426: 'lv', + 0x340A: 'es-CL', + 0x0801: 'ar-IQ', + 0x1C09: 'en-ZA', + 0x0427: 'lt', + 0x240A: 'es-CO', + 0x2C01: 'ar-JO', + 0x2C09: 'en-TT', + 0x082E: 'dsb', + 0x140A: 'es-CR', + 0x3401: 'ar-KW', + 0x0809: 'en-GB', + 0x046E: 'lb', + 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', + 0x0409: 'en', + 0x042F: 'mk', + 0x300A: 'es-EC', + 0x1001: 'ar-LY', + 0x3009: 'en-ZW', + 0x083E: 'ms-BN', + 0x440A: 'es-SV', + 0x1801: 'ary', + 0x0425: 'et', + 0x043E: 'ms', + 0x100A: 'es-GT', + 0x2001: 'ar-OM', + 0x0438: 'fo', + 0x044C: 'ml', + 0x480A: 'es-HN', + 0x4001: 'ar-QA', + 0x0464: 'fil', + 0x043A: 'mt', + 0x080A: 'es-MX', + 0x0401: 'ar-SA', + 0x040B: 'fi', + 0x0481: 'mi', + 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', + 0x080C: 'fr-BE', + 0x047A: 'arn', + 0x180A: 'es-PA', + 0x1C01: 'aeb', + 0x0C0C: 'fr-CA', + 0x044E: 'mr', + 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', + 0x040C: 'fr', + 0x047C: 'moh', + 0x280A: 'es-PE', + 0x2401: 'ar-YE', + 0x140C: 'fr-LU', + 0x0450: 'mn', + 0x500A: 'es-PR', + 0x042B: 'hy', + 0x180C: 'fr-MC', + 0x0850: 'mn-CN', + 0x0C0A: 'es', + 0x044D: 'as', + 0x100C: 'fr-CH', + 0x0461: 'ne', + 0x040A: 'es', + 0x082C: 'az-Cyrl', + 0x0462: 'fy', + 0x0414: 'nb', + 0x540A: 'es-US', + 0x042C: 'az', + 0x0456: 'gl', + 0x0814: 'nn', + 0x380A: 'es-UY', + 0x046D: 'ba', + 0x0437: 'ka', + 0x0482: 'oc', + 0x200A: 'es-VE', + 0x042D: 'eu', + 0x0C07: 'de-AT', + 0x0448: 'or', + 0x081D: 'sv-FI', + 0x0423: 'be', + 0x0407: 'de', + 0x0463: 'ps', + 0x041D: 'sv', + 0x0845: 'bn', + 0x1407: 'de-LI', + 0x0415: 'pl', + 0x045A: 'syr', + 0x0445: 'bn-IN', + 0x1007: 'de-LU', + 0x0416: 'pt', + 0x0428: 'tg', + 0x201A: 'bs-Cyrl', + 0x0807: 'de-CH', + 0x0816: 'pt-PT', + 0x085F: 'tzm', + 0x141A: 'bs', + 0x0408: 'el', + 0x0446: 'pa', + 0x0449: 'ta', + 0x047E: 'br', + 0x046F: 'kl', + 0x046B: 'qu-BO', + 0x0444: 'tt', + 0x0402: 'bg', + 0x0447: 'gu', + 0x086B: 'qu-EC', + 0x044A: 'te', + 0x0403: 'ca', + 0x0468: 'ha', + 0x0C6B: 'qu', + 0x041E: 'th', + 0x0C04: 'zh-HK', + 0x040D: 'he', + 0x0418: 'ro', + 0x0451: 'bo', + 0x1404: 'zh-MO', + 0x0439: 'hi', + 0x0417: 'rm', + 0x041F: 'tr', + 0x0804: 'zh', + 0x040E: 'hu', + 0x0419: 'ru', + 0x0442: 'tk', + 0x1004: 'zh-SG', + 0x040F: 'is', + 0x243B: 'smn', + 0x0480: 'ug', + 0x0404: 'zh-TW', + 0x0470: 'ig', + 0x103B: 'smj-NO', + 0x0422: 'uk', + 0x0483: 'co', + 0x0421: 'id', + 0x143B: 'smj', + 0x042E: 'hsb', + 0x041A: 'hr', + 0x045D: 'iu', + 0x0C3B: 'se-FI', + 0x0420: 'ur', + 0x101A: 'hr-BA', + 0x085D: 'iu-Latn', + 0x043B: 'se', + 0x0843: 'uz-Cyrl', + 0x0405: 'cs', + 0x083C: 'ga', + 0x083B: 'se-SE', + 0x0443: 'uz', + 0x0406: 'da', + 0x0434: 'xh', + 0x203B: 'sms', + 0x042A: 'vi', + 0x048C: 'prs', + 0x0435: 'zu', + 0x183B: 'sma-NO', + 0x0452: 'cy', + 0x0465: 'dv', + 0x0410: 'it', + 0x1C3B: 'sms', + 0x0488: 'wo', + 0x0813: 'nl-BE', + 0x0810: 'it-CH', + 0x044F: 'sa', + 0x0485: 'sah', + 0x0413: 'nl', + 0x0411: 'ja', + 0x1C1A: 'sr-Cyrl-BA', + 0x0478: 'ii', + 0x0C09: 'en-AU', + 0x044B: 'kn', + 0x0C1A: 'sr', + 0x046A: 'yo', + 0x2809: 'en-BZ', + 0x043F: 'kk', + 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', + 0x0453: 'km', + 0x081A: 'sr-Latn', + 0x2409: 'en-029', + 0x0486: 'quc', + 0x046C: 'nso' + } +]; + + +let $51a9f4feb3a3b2b1$var$NameRecord = new $elh9A$restructure.Struct({ + platformID: $elh9A$restructure.uint16, + encodingID: $elh9A$restructure.uint16, + languageID: $elh9A$restructure.uint16, + nameID: $elh9A$restructure.uint16, + length: $elh9A$restructure.uint16, + string: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $elh9A$restructure.String('length', (t)=>(0, $e2613b812f052cbe$export$badc544e0651b6b1)(t.platformID, t.encodingID, t.languageID)), { + type: 'parent', + relativeTo: (ctx)=>ctx.parent.stringOffset, + allowNull: false + }) +}); +let $51a9f4feb3a3b2b1$var$LangTagRecord = new $elh9A$restructure.Struct({ + length: $elh9A$restructure.uint16, + tag: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $elh9A$restructure.String('length', 'utf16be'), { + type: 'parent', + relativeTo: (ctx)=>ctx.stringOffset + }) +}); +var $51a9f4feb3a3b2b1$var$NameTable = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 0: { + count: $elh9A$restructure.uint16, + stringOffset: $elh9A$restructure.uint16, + records: new $elh9A$restructure.Array($51a9f4feb3a3b2b1$var$NameRecord, 'count') + }, + 1: { + count: $elh9A$restructure.uint16, + stringOffset: $elh9A$restructure.uint16, + records: new $elh9A$restructure.Array($51a9f4feb3a3b2b1$var$NameRecord, 'count'), + langTagCount: $elh9A$restructure.uint16, + langTags: new $elh9A$restructure.Array($51a9f4feb3a3b2b1$var$LangTagRecord, 'langTagCount') + } +}); +var $51a9f4feb3a3b2b1$export$2e2bcd8739ae039 = $51a9f4feb3a3b2b1$var$NameTable; +const $51a9f4feb3a3b2b1$var$NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; +$51a9f4feb3a3b2b1$var$NameTable.process = function(stream) { + var records = {}; + for (let record of this.records){ + // find out what language this is for + let language = (0, $e2613b812f052cbe$export$2092376fd002e13)[record.platformID][record.languageID]; + if (language == null && this.langTags != null && record.languageID >= 0x8000) language = this.langTags[record.languageID - 0x8000].tag; + if (language == null) language = record.platformID + '-' + record.languageID; + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : $51a9f4feb3a3b2b1$var$NAMES[record.nameID] || record.nameID; + if (records[key] == null) records[key] = {}; + let obj = records[key]; + if (record.nameID >= 256) obj = obj[record.nameID] || (obj[record.nameID] = {}); + if (typeof record.string === 'string' || typeof obj[language] !== 'string') obj[language] = record.string; + } + this.records = records; +}; +$51a9f4feb3a3b2b1$var$NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + let records = []; + for(let key in this.records){ + let val = this.records[key]; + if (key === 'fontFeatures') continue; + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: $51a9f4feb3a3b2b1$var$NAMES.indexOf(key), + length: val.en.length * 2, + string: val.en + }); + if (key === 'postscriptName') records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: $51a9f4feb3a3b2b1$var$NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + this.records = records; + this.count = records.length; + this.stringOffset = $51a9f4feb3a3b2b1$var$NameTable.size(this, null, false); +}; + + + +var $114ea85db469b435$var$OS2 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + header: { + xAvgCharWidth: $elh9A$restructure.int16, + usWeightClass: $elh9A$restructure.uint16, + usWidthClass: $elh9A$restructure.uint16, + fsType: new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + null, + 'noEmbedding', + 'viewOnly', + 'editable', + null, + null, + null, + null, + 'noSubsetting', + 'bitmapOnly' + ]), + ySubscriptXSize: $elh9A$restructure.int16, + ySubscriptYSize: $elh9A$restructure.int16, + ySubscriptXOffset: $elh9A$restructure.int16, + ySubscriptYOffset: $elh9A$restructure.int16, + ySuperscriptXSize: $elh9A$restructure.int16, + ySuperscriptYSize: $elh9A$restructure.int16, + ySuperscriptXOffset: $elh9A$restructure.int16, + ySuperscriptYOffset: $elh9A$restructure.int16, + yStrikeoutSize: $elh9A$restructure.int16, + yStrikeoutPosition: $elh9A$restructure.int16, + sFamilyClass: $elh9A$restructure.int16, + panose: new $elh9A$restructure.Array($elh9A$restructure.uint8, 10), + ulCharRange: new $elh9A$restructure.Array($elh9A$restructure.uint32, 4), + vendorID: new $elh9A$restructure.String(4), + fsSelection: new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + 'italic', + 'underscore', + 'negative', + 'outlined', + 'strikeout', + 'bold', + 'regular', + 'useTypoMetrics', + 'wws', + 'oblique' + ]), + usFirstCharIndex: $elh9A$restructure.uint16, + usLastCharIndex: $elh9A$restructure.uint16 // The maximum Unicode index in this font + }, + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + 1: { + typoAscender: $elh9A$restructure.int16, + typoDescender: $elh9A$restructure.int16, + typoLineGap: $elh9A$restructure.int16, + winAscent: $elh9A$restructure.uint16, + winDescent: $elh9A$restructure.uint16, + codePageRange: new $elh9A$restructure.Array($elh9A$restructure.uint32, 2) + }, + 2: { + // these should be common with version 1 somehow + typoAscender: $elh9A$restructure.int16, + typoDescender: $elh9A$restructure.int16, + typoLineGap: $elh9A$restructure.int16, + winAscent: $elh9A$restructure.uint16, + winDescent: $elh9A$restructure.uint16, + codePageRange: new $elh9A$restructure.Array($elh9A$restructure.uint32, 2), + xHeight: $elh9A$restructure.int16, + capHeight: $elh9A$restructure.int16, + defaultChar: $elh9A$restructure.uint16, + breakChar: $elh9A$restructure.uint16, + maxContent: $elh9A$restructure.uint16 + }, + 5: { + typoAscender: $elh9A$restructure.int16, + typoDescender: $elh9A$restructure.int16, + typoLineGap: $elh9A$restructure.int16, + winAscent: $elh9A$restructure.uint16, + winDescent: $elh9A$restructure.uint16, + codePageRange: new $elh9A$restructure.Array($elh9A$restructure.uint32, 2), + xHeight: $elh9A$restructure.int16, + capHeight: $elh9A$restructure.int16, + defaultChar: $elh9A$restructure.uint16, + breakChar: $elh9A$restructure.uint16, + maxContent: $elh9A$restructure.uint16, + usLowerOpticalPointSize: $elh9A$restructure.uint16, + usUpperOpticalPointSize: $elh9A$restructure.uint16 + } +}); +let $114ea85db469b435$var$versions = $114ea85db469b435$var$OS2.versions; +$114ea85db469b435$var$versions[3] = $114ea85db469b435$var$versions[4] = $114ea85db469b435$var$versions[2]; +var $114ea85db469b435$export$2e2bcd8739ae039 = $114ea85db469b435$var$OS2; + + + +var // PostScript information +$f93b30299e1ea0f5$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.fixed32, { + header: { + italicAngle: $elh9A$restructure.fixed32, + underlinePosition: $elh9A$restructure.int16, + underlineThickness: $elh9A$restructure.int16, + isFixedPitch: $elh9A$restructure.uint32, + minMemType42: $elh9A$restructure.uint32, + maxMemType42: $elh9A$restructure.uint32, + minMemType1: $elh9A$restructure.uint32, + maxMemType1: $elh9A$restructure.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + 1: {}, + 2: { + numberOfGlyphs: $elh9A$restructure.uint16, + glyphNameIndex: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numberOfGlyphs'), + names: new $elh9A$restructure.Array(new $elh9A$restructure.String($elh9A$restructure.uint8)) + }, + 2.5: { + numberOfGlyphs: $elh9A$restructure.uint16, + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint8, 'numberOfGlyphs') + }, + 3: {}, + 4: { + map: new $elh9A$restructure.Array($elh9A$restructure.uint32, (t)=>t.parent.maxp.numGlyphs) + } +}); + + + +var // An array of predefined values accessible by instructions +$8fb09b0f473d61a0$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + controlValues: new $elh9A$restructure.Array($elh9A$restructure.int16) +}); + + + +var // A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +$873d79fea57d3161$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + instructions: new $elh9A$restructure.Array($elh9A$restructure.uint8) +}); + + + +let $83c4155666d50c37$var$loca = new $elh9A$restructure.VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint16) + }, + 1: { + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint32) + } +}); +$83c4155666d50c37$var$loca.process = function() { + if (this.version === 0 && !this._processed) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] <<= 1; + this._processed = true; + } +}; +$83c4155666d50c37$var$loca.preEncode = function() { + if (this.version === 0 && this._processed !== false) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] >>>= 1; + this._processed = false; + } +}; +var $83c4155666d50c37$export$2e2bcd8739ae039 = $83c4155666d50c37$var$loca; + + + +var // Set of instructions executed whenever the point size or font transformation change +$b12598db7cdf7042$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + controlValueProgram: new $elh9A$restructure.Array($elh9A$restructure.uint8) +}); + + + +var // only used for encoding +$7707bdf21a3d89cc$export$2e2bcd8739ae039 = new $elh9A$restructure.Array(new $elh9A$restructure.Buffer); + + + + +class $9eaea3754914a290$export$2e2bcd8739ae039 { + getCFFVersion(ctx) { + while(ctx && !ctx.hdrSize)ctx = ctx.parent; + return ctx ? ctx.version : -1; + } + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE(); + if (count === 0) return []; + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) offsetType = $elh9A$restructure.uint8; + else if (offSize === 2) offsetType = $elh9A$restructure.uint16; + else if (offSize === 3) offsetType = $elh9A$restructure.uint24; + else if (offSize === 4) offsetType = $elh9A$restructure.uint32; + else throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + let ret = []; + let startPos = stream.pos + (count + 1) * offSize - 1; + let start = offsetType.decode(stream); + for(let i = 0; i < count; i++){ + let end = offsetType.decode(stream); + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else ret.push({ + offset: startPos + start, + length: end - start + }); + start = end; + } + stream.pos = startPos + start; + return ret; + } + size(arr, parent) { + let size = 2; + if (arr.length === 0) return size; + let type = this.type || new $elh9A$restructure.Buffer; + // find maximum offset to detminine offset type + let offset = 1; + for(let i = 0; i < arr.length; i++){ + let item = arr[i]; + offset += type.size(item, parent); + } + let offsetType; + if (offset <= 0xff) offsetType = $elh9A$restructure.uint8; + else if (offset <= 0xffff) offsetType = $elh9A$restructure.uint16; + else if (offset <= 0xffffff) offsetType = $elh9A$restructure.uint24; + else if (offset <= 0xffffffff) offsetType = $elh9A$restructure.uint32; + else throw new Error("Bad offset in CFFIndex"); + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + return size; + } + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) return; + let type = this.type || new $elh9A$restructure.Buffer; + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr){ + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + let offsetType; + if (offset <= 0xff) offsetType = $elh9A$restructure.uint8; + else if (offset <= 0xffff) offsetType = $elh9A$restructure.uint16; + else if (offset <= 0xffffff) offsetType = $elh9A$restructure.uint24; + else if (offset <= 0xffffffff) offsetType = $elh9A$restructure.uint32; + else throw new Error("Bad offset in CFFIndex"); + // write offset size + stream.writeUInt8(offsetType.size()); + // write elements + offset = 1; + offsetType.encode(stream, offset); + for (let size of sizes){ + offset += size; + offsetType.encode(stream, offset); + } + for (let item of arr)type.encode(stream, item, parent); + return; + } + constructor(type){ + this.type = type; + } +} + + + + + +const $f77b592c17132d70$var$FLOAT_EOF = 0xf; +const $f77b592c17132d70$var$FLOAT_LOOKUP = [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '.', + 'E', + 'E-', + null, + '-' +]; +const $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; +class $f77b592c17132d70$export$2e2bcd8739ae039 { + static decode(stream, value) { + if (32 <= value && value <= 246) return value - 139; + if (247 <= value && value <= 250) return (value - 247) * 256 + stream.readUInt8() + 108; + if (251 <= value && value <= 254) return -(value - 251) * 256 - stream.readUInt8() - 108; + if (value === 28) return stream.readInt16BE(); + if (value === 29) return stream.readInt32BE(); + if (value === 30) { + let str = ''; + while(true){ + let b = stream.readUInt8(); + let n1 = b >> 4; + if (n1 === $f77b592c17132d70$var$FLOAT_EOF) break; + str += $f77b592c17132d70$var$FLOAT_LOOKUP[n1]; + let n2 = b & 15; + if (n2 === $f77b592c17132d70$var$FLOAT_EOF) break; + str += $f77b592c17132d70$var$FLOAT_LOOKUP[n2]; + } + return parseFloat(str); + } + return null; + } + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) value = 32768; + if ((value | 0) !== value) { + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + } else if (-107 <= value && value <= 107) return 1; + else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) return 2; + else if (-32768 <= value && value <= 32767) return 3; + else return 5; + } + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } else if ((val | 0) !== val) { + stream.writeUInt8(30); + let str = '' + val; + for(let i = 0; i < str.length; i += 2){ + let c1 = str[i]; + let n1 = $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP[c1] || +c1; + if (i === str.length - 1) var n2 = $f77b592c17132d70$var$FLOAT_EOF; + else { + let c2 = str[i + 1]; + var n2 = $f77b592c17132d70$var$FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + stream.writeUInt8(n1 << 4 | n2 & 15); + } + if (n2 !== $f77b592c17132d70$var$FLOAT_EOF) return stream.writeUInt8($f77b592c17132d70$var$FLOAT_EOF << 4); + } else if (-107 <= val && val <= 107) return stream.writeUInt8(val + 139); + else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} + + +class $efe622f40a9c35bd$export$2e2bcd8739ae039 { + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.decodeOperands(type[i], stream, ret, [ + op + ])); + else if (type.decode != null) return type.decode(stream, ret, operands); + else switch(type){ + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.encodeOperands(type[i], stream, ctx, op)[0]); + else if (type.encode != null) return type.encode(stream, operands, ctx); + else if (typeof operands === 'number') return [ + operands + ]; + else if (typeof operands === 'boolean') return [ + +operands + ]; + else if (Array.isArray(operands)) return operands; + else return [ + operands + ]; + } + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + // define hidden properties + Object.defineProperties(ret, { + parent: { + value: parent + }, + _startOffset: { + value: stream.pos + } + }); + // fill in defaults + for(let key in this.fields){ + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + while(stream.pos < end){ + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) b = b << 8 | stream.readUInt8(); + let field = this.fields[b]; + if (!field) throw new Error(`Unknown operator ${b}`); + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof (0, $elh9A$restructure.PropertyDescriptor)) Object.defineProperty(ret, field[1], val); + else ret[field[1]] = val; + } + operands = []; + } else operands.push((0, $f77b592c17132d70$export$2e2bcd8739ae039).decode(stream, b)); + } + return ret; + } + size(dict, parent, includePointers = true) { + let ctx = { + parent: parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + let len = 0; + for(let k in this.fields){ + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || (0, ($parcel$interopDefault($elh9A$fastdeepequal)))(val, field[3])) continue; + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands)len += (0, $f77b592c17132d70$export$2e2bcd8739ae039).size(op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + len += key.length; + } + if (includePointers) len += ctx.pointerSize; + return len; + } + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: dict, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + for (let field of this.ops){ + let val = dict[field[1]]; + if (val == null || (0, ($parcel$interopDefault($elh9A$fastdeepequal)))(val, field[3])) continue; + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands)(0, $f77b592c17132d70$export$2e2bcd8739ae039).encode(stream, op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + for (let op of key)stream.writeUInt8(op); + } + let i = 0; + while(i < ctx.pointers.length){ + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + return; + } + constructor(ops = []){ + this.ops = ops; + this.fields = {}; + for (let field of ops){ + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } +} + + + + +class $4aa1b0749c2770f8$export$2e2bcd8739ae039 extends $elh9A$restructure.Pointer { + decode(stream, parent, operands) { + this.offsetType = { + decode: ()=>operands[0] + }; + return super.decode(stream, parent, operands); + } + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: ()=>0 + }; + this.size(value, ctx); + return [ + new $4aa1b0749c2770f8$var$Ptr(0) + ]; + } + let ptr = null; + this.offsetType = { + encode: (stream, val)=>ptr = val + }; + super.encode(stream, value, ctx); + return [ + new $4aa1b0749c2770f8$var$Ptr(ptr) + ]; + } + constructor(type, options = {}){ + if (options.type == null) options.type = 'global'; + super(null, type, options); + } +} +class $4aa1b0749c2770f8$var$Ptr { + valueOf() { + return this.val; + } + constructor(val){ + this.val = val; + this.forceLarge = true; + } +} + + + + + +class $15a0cbb3d09cf7ee$var$CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while(operands.length > numBlends)operands.pop(); + } +} +var $15a0cbb3d09cf7ee$export$2e2bcd8739ae039 = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type default + [ + 6, + 'BlueValues', + 'delta', + null + ], + [ + 7, + 'OtherBlues', + 'delta', + null + ], + [ + 8, + 'FamilyBlues', + 'delta', + null + ], + [ + 9, + 'FamilyOtherBlues', + 'delta', + null + ], + [ + [ + 12, + 9 + ], + 'BlueScale', + 'number', + 0.039625 + ], + [ + [ + 12, + 10 + ], + 'BlueShift', + 'number', + 7 + ], + [ + [ + 12, + 11 + ], + 'BlueFuzz', + 'number', + 1 + ], + [ + 10, + 'StdHW', + 'number', + null + ], + [ + 11, + 'StdVW', + 'number', + null + ], + [ + [ + 12, + 12 + ], + 'StemSnapH', + 'delta', + null + ], + [ + [ + 12, + 13 + ], + 'StemSnapV', + 'delta', + null + ], + [ + [ + 12, + 14 + ], + 'ForceBold', + 'boolean', + false + ], + [ + [ + 12, + 17 + ], + 'LanguageGroup', + 'number', + 0 + ], + [ + [ + 12, + 18 + ], + 'ExpansionFactor', + 'number', + 0.06 + ], + [ + [ + 12, + 19 + ], + 'initialRandomSeed', + 'number', + 0 + ], + [ + 20, + 'defaultWidthX', + 'number', + 0 + ], + [ + 21, + 'nominalWidthX', + 'number', + 0 + ], + [ + 22, + 'vsindex', + 'number', + 0 + ], + [ + 23, + 'blend', + $15a0cbb3d09cf7ee$var$CFFBlendOp, + null + ], + [ + 19, + 'Subrs', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039), { + type: 'local' + }), + null + ] +]); + + +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +var $860d3574d7fa3a51$export$2e2bcd8739ae039 = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold" +]; + + +let $c4ffe47cba1d7f36$export$dee0027060fa13bd = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + '', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + '', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + '', + 'questiondown', + '', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + '', + 'ring', + 'cedilla', + '', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'AE', + '', + 'ordfeminine', + '', + '', + '', + '', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + '', + '', + '', + '', + '', + 'ae', + '', + '', + '', + 'dotlessi', + '', + '', + 'lslash', + 'oslash', + 'oe', + 'germandbls' +]; +let $c4ffe47cba1d7f36$export$4f58f497e14a53c3 = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + '', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + '', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + '', + '', + 'isuperior', + '', + '', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + '', + '', + 'rsuperior', + 'ssuperior', + 'tsuperior', + '', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + '', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + '', + '', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + '', + 'Dotaccentsmall', + '', + '', + 'Macronsmall', + '', + '', + 'figuredash', + 'hypheninferior', + '', + '', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + '', + '', + '', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + '', + '', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; + + +let $1e7c7c16984e4427$export$c33b50336c234f16 = [ + '.notdef', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + 'questiondown', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + 'AE', + 'ordfeminine', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + 'ae', + 'dotlessi', + 'lslash', + 'oslash', + 'oe', + 'germandbls', + 'onesuperior', + 'logicalnot', + 'mu', + 'trademark', + 'Eth', + 'onehalf', + 'plusminus', + 'Thorn', + 'onequarter', + 'divide', + 'brokenbar', + 'degree', + 'thorn', + 'threequarters', + 'twosuperior', + 'registered', + 'minus', + 'eth', + 'multiply', + 'threesuperior', + 'copyright', + 'Aacute', + 'Acircumflex', + 'Adieresis', + 'Agrave', + 'Aring', + 'Atilde', + 'Ccedilla', + 'Eacute', + 'Ecircumflex', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Ntilde', + 'Oacute', + 'Ocircumflex', + 'Odieresis', + 'Ograve', + 'Otilde', + 'Scaron', + 'Uacute', + 'Ucircumflex', + 'Udieresis', + 'Ugrave', + 'Yacute', + 'Ydieresis', + 'Zcaron', + 'aacute', + 'acircumflex', + 'adieresis', + 'agrave', + 'aring', + 'atilde', + 'ccedilla', + 'eacute', + 'ecircumflex', + 'edieresis', + 'egrave', + 'iacute', + 'icircumflex', + 'idieresis', + 'igrave', + 'ntilde', + 'oacute', + 'ocircumflex', + 'odieresis', + 'ograve', + 'otilde', + 'scaron', + 'uacute', + 'ucircumflex', + 'udieresis', + 'ugrave', + 'yacute', + 'ydieresis', + 'zcaron' +]; +let $1e7c7c16984e4427$export$3ed0f9e1fee8d489 = [ + '.notdef', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + 'Dotaccentsmall', + 'Macronsmall', + 'figuredash', + 'hypheninferior', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; +let $1e7c7c16984e4427$export$dc28be11139d4120 = [ + '.notdef', + 'space', + 'dollaroldstyle', + 'dollarsuperior', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'hyphensuperior', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'centoldstyle', + 'figuredash', + 'hypheninferior', + 'onequarter', + 'onehalf', + 'threequarters', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior' +]; + + + +//######################## +// Scripts and Languages # +//######################## +let $b6dd765146ad212a$var$LangSysTable = new $elh9A$restructure.Struct({ + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + reqFeatureIndex: $elh9A$restructure.uint16, + featureCount: $elh9A$restructure.uint16, + featureIndexes: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'featureCount') +}); +let $b6dd765146ad212a$var$LangSysRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + langSys: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$LangSysTable, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$var$Script = new $elh9A$restructure.Struct({ + defaultLangSys: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$LangSysTable), + count: $elh9A$restructure.uint16, + langSysRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LangSysRecord, 'count') +}); +let $b6dd765146ad212a$var$ScriptRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + script: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$Script, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$export$3e15fc05ce864229 = new $elh9A$restructure.Array($b6dd765146ad212a$var$ScriptRecord, $elh9A$restructure.uint16); +//####################### +// Features and Lookups # +//####################### +let $b6dd765146ad212a$var$FeatureParams = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + nameID: $elh9A$restructure.uint16 +}); +let $b6dd765146ad212a$export$6e91cf7616333d5 = new $elh9A$restructure.Struct({ + featureParams: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$FeatureParams), + lookupCount: $elh9A$restructure.uint16, + lookupListIndexes: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'lookupCount') +}); +let $b6dd765146ad212a$var$FeatureRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + feature: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$6e91cf7616333d5, { + type: 'parent' + }) +}); +let $b6dd765146ad212a$export$aa18130def4b6cb4 = new $elh9A$restructure.Array($b6dd765146ad212a$var$FeatureRecord, $elh9A$restructure.uint16); +let $b6dd765146ad212a$var$LookupFlags = new $elh9A$restructure.Struct({ + markAttachmentType: $elh9A$restructure.uint8, + flags: new $elh9A$restructure.Bitfield($elh9A$restructure.uint8, [ + 'rightToLeft', + 'ignoreBaseGlyphs', + 'ignoreLigatures', + 'ignoreMarks', + 'useMarkFilteringSet' + ]) +}); +function $b6dd765146ad212a$export$df0008c6ff2da22a(SubTable) { + let Lookup = new $elh9A$restructure.Struct({ + lookupType: $elh9A$restructure.uint16, + flags: $b6dd765146ad212a$var$LookupFlags, + subTableCount: $elh9A$restructure.uint16, + subTables: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, SubTable), 'subTableCount'), + markFilteringSet: new $elh9A$restructure.Optional($elh9A$restructure.uint16, (t)=>t.flags.flags.useMarkFilteringSet) + }); + return new $elh9A$restructure.LazyArray(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, Lookup), $elh9A$restructure.uint16); +} +//################# +// Coverage Table # +//################# +let $b6dd765146ad212a$var$RangeRecord = new $elh9A$restructure.Struct({ + start: $elh9A$restructure.uint16, + end: $elh9A$restructure.uint16, + startCoverageIndex: $elh9A$restructure.uint16 +}); +let $b6dd765146ad212a$export$17608c3f81a6111 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + glyphCount: $elh9A$restructure.uint16, + glyphs: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'glyphCount') + }, + 2: { + rangeCount: $elh9A$restructure.uint16, + rangeRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$RangeRecord, 'rangeCount') + } +}); +//######################### +// Class Definition Table # +//######################### +let $b6dd765146ad212a$var$ClassRangeRecord = new $elh9A$restructure.Struct({ + start: $elh9A$restructure.uint16, + end: $elh9A$restructure.uint16, + class: $elh9A$restructure.uint16 +}); +let $b6dd765146ad212a$export$843d551fbbafef71 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + startGlyph: $elh9A$restructure.uint16, + glyphCount: $elh9A$restructure.uint16, + classValueArray: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'glyphCount') + }, + 2: { + classRangeCount: $elh9A$restructure.uint16, + classRangeRecord: new $elh9A$restructure.Array($b6dd765146ad212a$var$ClassRangeRecord, 'classRangeCount') + } +}); +let $b6dd765146ad212a$export$8215d14a63d9fb10 = new $elh9A$restructure.Struct({ + a: $elh9A$restructure.uint16, + b: $elh9A$restructure.uint16, + deltaFormat: $elh9A$restructure.uint16 +}); +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# +let $b6dd765146ad212a$var$LookupRecord = new $elh9A$restructure.Struct({ + sequenceIndex: $elh9A$restructure.uint16, + lookupListIndex: $elh9A$restructure.uint16 +}); +let $b6dd765146ad212a$var$Rule = new $elh9A$restructure.Struct({ + glyphCount: $elh9A$restructure.uint16, + lookupCount: $elh9A$restructure.uint16, + input: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$RuleSet = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$Rule), $elh9A$restructure.uint16); +let $b6dd765146ad212a$var$ClassRule = new $elh9A$restructure.Struct({ + glyphCount: $elh9A$restructure.uint16, + lookupCount: $elh9A$restructure.uint16, + classes: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$ClassSet = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$ClassRule), $elh9A$restructure.uint16); +let $b6dd765146ad212a$export$841858b892ce1f4c = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + ruleSetCount: $elh9A$restructure.uint16, + ruleSets: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$RuleSet), 'ruleSetCount') + }, + 2: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + classDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + classSetCnt: $elh9A$restructure.uint16, + classSet: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: $elh9A$restructure.uint16, + lookupCount: $elh9A$restructure.uint16, + coverages: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'glyphCount'), + lookupRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') + } +}); +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### +let $b6dd765146ad212a$var$ChainRule = new $elh9A$restructure.Struct({ + backtrackGlyphCount: $elh9A$restructure.uint16, + backtrack: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'backtrackGlyphCount'), + inputGlyphCount: $elh9A$restructure.uint16, + input: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.inputGlyphCount - 1), + lookaheadGlyphCount: $elh9A$restructure.uint16, + lookahead: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'lookaheadGlyphCount'), + lookupCount: $elh9A$restructure.uint16, + lookupRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') +}); +let $b6dd765146ad212a$var$ChainRuleSet = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$ChainRule), $elh9A$restructure.uint16); +let $b6dd765146ad212a$export$5e6d09e6861162f6 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + chainCount: $elh9A$restructure.uint16, + chainRuleSets: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$ChainRuleSet), 'chainCount') + }, + 2: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), + backtrackClassDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + inputClassDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + lookaheadClassDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$843d551fbbafef71), + chainCount: $elh9A$restructure.uint16, + chainClassSet: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$var$ChainRuleSet), 'chainCount') + }, + 3: { + backtrackGlyphCount: $elh9A$restructure.uint16, + backtrackCoverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'backtrackGlyphCount'), + inputGlyphCount: $elh9A$restructure.uint16, + inputCoverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'inputGlyphCount'), + lookaheadGlyphCount: $elh9A$restructure.uint16, + lookaheadCoverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b6dd765146ad212a$export$17608c3f81a6111), 'lookaheadGlyphCount'), + lookupCount: $elh9A$restructure.uint16, + lookupRecords: new $elh9A$restructure.Array($b6dd765146ad212a$var$LookupRecord, 'lookupCount') + } +}); + + + +/******************* + * Variation Store * + *******************/ let $2e4adcda047b3383$var$F2DOT14 = new $elh9A$restructure.Fixed(16, 'BE', 14); +let $2e4adcda047b3383$var$RegionAxisCoordinates = new $elh9A$restructure.Struct({ + startCoord: $2e4adcda047b3383$var$F2DOT14, + peakCoord: $2e4adcda047b3383$var$F2DOT14, + endCoord: $2e4adcda047b3383$var$F2DOT14 +}); +let $2e4adcda047b3383$var$VariationRegionList = new $elh9A$restructure.Struct({ + axisCount: $elh9A$restructure.uint16, + regionCount: $elh9A$restructure.uint16, + variationRegions: new $elh9A$restructure.Array(new $elh9A$restructure.Array($2e4adcda047b3383$var$RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); +let $2e4adcda047b3383$var$DeltaSet = new $elh9A$restructure.Struct({ + shortDeltas: new $elh9A$restructure.Array($elh9A$restructure.int16, (t)=>t.parent.shortDeltaCount), + regionDeltas: new $elh9A$restructure.Array($elh9A$restructure.int8, (t)=>t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: (t)=>t.shortDeltas.concat(t.regionDeltas) +}); +let $2e4adcda047b3383$var$ItemVariationData = new $elh9A$restructure.Struct({ + itemCount: $elh9A$restructure.uint16, + shortDeltaCount: $elh9A$restructure.uint16, + regionIndexCount: $elh9A$restructure.uint16, + regionIndexes: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'regionIndexCount'), + deltaSets: new $elh9A$restructure.Array($2e4adcda047b3383$var$DeltaSet, 'itemCount') +}); +let $2e4adcda047b3383$export$fe1b122a2710f241 = new $elh9A$restructure.Struct({ + format: $elh9A$restructure.uint16, + variationRegionList: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $2e4adcda047b3383$var$VariationRegionList), + variationDataCount: $elh9A$restructure.uint16, + itemVariationData: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $2e4adcda047b3383$var$ItemVariationData), 'variationDataCount') +}); +/********************** + * Feature Variations * + **********************/ let $2e4adcda047b3383$var$ConditionTable = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + axisIndex: $elh9A$restructure.uint16, + axisIndex: $elh9A$restructure.uint16, + filterRangeMinValue: $2e4adcda047b3383$var$F2DOT14, + filterRangeMaxValue: $2e4adcda047b3383$var$F2DOT14 + } +}); +let $2e4adcda047b3383$var$ConditionSet = new $elh9A$restructure.Struct({ + conditionCount: $elh9A$restructure.uint16, + conditionTable: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $2e4adcda047b3383$var$ConditionTable), 'conditionCount') +}); +let $2e4adcda047b3383$var$FeatureTableSubstitutionRecord = new $elh9A$restructure.Struct({ + featureIndex: $elh9A$restructure.uint16, + alternateFeatureTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $b6dd765146ad212a$export$6e91cf7616333d5), { + type: 'parent' + }) +}); +let $2e4adcda047b3383$var$FeatureTableSubstitution = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + substitutionCount: $elh9A$restructure.uint16, + substitutions: new $elh9A$restructure.Array($2e4adcda047b3383$var$FeatureTableSubstitutionRecord, 'substitutionCount') +}); +let $2e4adcda047b3383$var$FeatureVariationRecord = new $elh9A$restructure.Struct({ + conditionSet: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $2e4adcda047b3383$var$ConditionSet, { + type: 'parent' + }), + featureTableSubstitution: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $2e4adcda047b3383$var$FeatureTableSubstitution, { + type: 'parent' + }) +}); +let $2e4adcda047b3383$export$441b70b7971dd419 = new $elh9A$restructure.Struct({ + majorVersion: $elh9A$restructure.uint16, + minorVersion: $elh9A$restructure.uint16, + featureVariationRecordCount: $elh9A$restructure.uint32, + featureVariationRecords: new $elh9A$restructure.Array($2e4adcda047b3383$var$FeatureVariationRecord, 'featureVariationRecordCount') +}); + + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class $5b547cf9e5da519b$var$PredefinedOp { + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) return this.predefinedOps[operands[0]]; + return this.type.decode(stream, parent, operands); + } + size(value, ctx) { + return this.type.size(value, ctx); + } + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) return index; + return this.type.encode(stream, value, ctx); + } + constructor(predefinedOps, type){ + this.predefinedOps = predefinedOps; + this.type = type; + } +} +class $5b547cf9e5da519b$var$CFFEncodingVersion extends $elh9A$restructure.Number { + decode(stream) { + return $elh9A$restructure.uint8.decode(stream) & 0x7f; + } + constructor(){ + super('UInt8'); + } +} +let $5b547cf9e5da519b$var$Range1 = new $elh9A$restructure.Struct({ + first: $elh9A$restructure.uint16, + nLeft: $elh9A$restructure.uint8 +}); +let $5b547cf9e5da519b$var$Range2 = new $elh9A$restructure.Struct({ + first: $elh9A$restructure.uint16, + nLeft: $elh9A$restructure.uint16 +}); +let $5b547cf9e5da519b$var$CFFCustomEncoding = new $elh9A$restructure.VersionedStruct(new $5b547cf9e5da519b$var$CFFEncodingVersion(), { + 0: { + nCodes: $elh9A$restructure.uint8, + codes: new $elh9A$restructure.Array($elh9A$restructure.uint8, 'nCodes') + }, + 1: { + nRanges: $elh9A$restructure.uint8, + ranges: new $elh9A$restructure.Array($5b547cf9e5da519b$var$Range1, 'nRanges') + } +}); +let $5b547cf9e5da519b$var$CFFEncoding = new $5b547cf9e5da519b$var$PredefinedOp([ + (0, $c4ffe47cba1d7f36$export$dee0027060fa13bd), + (0, $c4ffe47cba1d7f36$export$4f58f497e14a53c3) +], new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFCustomEncoding, { + lazy: true +})); +// Decodes an array of ranges until the total +// length is equal to the provided length. +class $5b547cf9e5da519b$var$RangeArray extends $elh9A$restructure.Array { + decode(stream, parent) { + let length = (0, $elh9A$restructure.resolveLength)(this.length, stream, parent); + let count = 0; + let res = []; + while(count < length){ + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + return res; + } +} +let $5b547cf9e5da519b$var$CFFCustomCharset = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint8, { + 0: { + glyphs: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.parent.CharStrings.length - 1) + }, + 1: { + ranges: new $5b547cf9e5da519b$var$RangeArray($5b547cf9e5da519b$var$Range1, (t)=>t.parent.CharStrings.length - 1) + }, + 2: { + ranges: new $5b547cf9e5da519b$var$RangeArray($5b547cf9e5da519b$var$Range2, (t)=>t.parent.CharStrings.length - 1) + } +}); +let $5b547cf9e5da519b$var$CFFCharset = new $5b547cf9e5da519b$var$PredefinedOp([ + (0, $1e7c7c16984e4427$export$c33b50336c234f16), + (0, $1e7c7c16984e4427$export$3ed0f9e1fee8d489), + (0, $1e7c7c16984e4427$export$dc28be11139d4120) +], new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFCustomCharset, { + lazy: true +})); +let $5b547cf9e5da519b$var$FDRange3 = new $elh9A$restructure.Struct({ + first: $elh9A$restructure.uint16, + fd: $elh9A$restructure.uint8 +}); +let $5b547cf9e5da519b$var$FDRange4 = new $elh9A$restructure.Struct({ + first: $elh9A$restructure.uint32, + fd: $elh9A$restructure.uint16 +}); +let $5b547cf9e5da519b$var$FDSelect = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint8, { + 0: { + fds: new $elh9A$restructure.Array($elh9A$restructure.uint8, (t)=>t.parent.CharStrings.length) + }, + 3: { + nRanges: $elh9A$restructure.uint16, + ranges: new $elh9A$restructure.Array($5b547cf9e5da519b$var$FDRange3, 'nRanges'), + sentinel: $elh9A$restructure.uint16 + }, + 4: { + nRanges: $elh9A$restructure.uint32, + ranges: new $elh9A$restructure.Array($5b547cf9e5da519b$var$FDRange4, 'nRanges'), + sentinel: $elh9A$restructure.uint32 + } +}); +let $5b547cf9e5da519b$var$ptr = new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)((0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039)); +class $5b547cf9e5da519b$var$CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return $5b547cf9e5da519b$var$ptr.decode(stream, parent, [ + operands[1] + ]); + } + size(dict, ctx) { + return [ + (0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039).size(dict, ctx, false), + $5b547cf9e5da519b$var$ptr.size(dict, ctx)[0] + ]; + } + encode(stream, dict, ctx) { + return [ + (0, $15a0cbb3d09cf7ee$export$2e2bcd8739ae039).size(dict, ctx, false), + $5b547cf9e5da519b$var$ptr.encode(stream, dict, ctx)[0] + ]; + } +} +let $5b547cf9e5da519b$var$FontDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + 18, + 'Private', + new $5b547cf9e5da519b$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ] +]); +let $5b547cf9e5da519b$var$CFFTopDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + [ + 12, + 30 + ], + 'ROS', + [ + 'sid', + 'sid', + 'number' + ], + null + ], + [ + 0, + 'version', + 'sid', + null + ], + [ + 1, + 'Notice', + 'sid', + null + ], + [ + [ + 12, + 0 + ], + 'Copyright', + 'sid', + null + ], + [ + 2, + 'FullName', + 'sid', + null + ], + [ + 3, + 'FamilyName', + 'sid', + null + ], + [ + 4, + 'Weight', + 'sid', + null + ], + [ + [ + 12, + 1 + ], + 'isFixedPitch', + 'boolean', + false + ], + [ + [ + 12, + 2 + ], + 'ItalicAngle', + 'number', + 0 + ], + [ + [ + 12, + 3 + ], + 'UnderlinePosition', + 'number', + -100 + ], + [ + [ + 12, + 4 + ], + 'UnderlineThickness', + 'number', + 50 + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ], + [ + [ + 12, + 6 + ], + 'CharstringType', + 'number', + 2 + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 13, + 'UniqueID', + 'number', + null + ], + [ + 5, + 'FontBBox', + 'array', + [ + 0, + 0, + 0, + 0 + ] + ], + [ + [ + 12, + 8 + ], + 'StrokeWidth', + 'number', + 0 + ], + [ + 14, + 'XUID', + 'array', + null + ], + [ + 15, + 'charset', + $5b547cf9e5da519b$var$CFFCharset, + (0, $1e7c7c16984e4427$export$c33b50336c234f16) + ], + [ + 16, + 'Encoding', + $5b547cf9e5da519b$var$CFFEncoding, + (0, $c4ffe47cba1d7f36$export$dee0027060fa13bd) + ], + [ + 17, + 'CharStrings', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)), + null + ], + [ + 18, + 'Private', + new $5b547cf9e5da519b$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 20 + ], + 'SyntheticBase', + 'number', + null + ], + [ + [ + 12, + 21 + ], + 'PostScript', + 'sid', + null + ], + [ + [ + 12, + 22 + ], + 'BaseFontName', + 'sid', + null + ], + [ + [ + 12, + 23 + ], + 'BaseFontBlend', + 'delta', + null + ], + // CID font specific + [ + [ + 12, + 31 + ], + 'CIDFontVersion', + 'number', + 0 + ], + [ + [ + 12, + 32 + ], + 'CIDFontRevision', + 'number', + 0 + ], + [ + [ + 12, + 33 + ], + 'CIDFontType', + 'number', + 0 + ], + [ + [ + 12, + 34 + ], + 'CIDCount', + 'number', + 8720 + ], + [ + [ + 12, + 35 + ], + 'UIDBase', + 'number', + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FontDict)), + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ] +]); +let $5b547cf9e5da519b$var$VariationStore = new $elh9A$restructure.Struct({ + length: $elh9A$restructure.uint16, + itemVariationStore: (0, $2e4adcda047b3383$export$fe1b122a2710f241) +}); +let $5b547cf9e5da519b$var$CFF2TopDict = new (0, $efe622f40a9c35bd$export$2e2bcd8739ae039)([ + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 17, + 'CharStrings', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)), + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)(new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$FontDict)), + null + ], + [ + 24, + 'vstore', + new (0, $4aa1b0749c2770f8$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$VariationStore), + null + ], + [ + 25, + 'maxstack', + 'number', + 193 + ] +]); +let $5b547cf9e5da519b$var$CFFTop = new $elh9A$restructure.VersionedStruct($elh9A$restructure.fixed16, { + 1: { + hdrSize: $elh9A$restructure.uint8, + offSize: $elh9A$restructure.uint8, + nameIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)(new $elh9A$restructure.String('length')), + topDictIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)($5b547cf9e5da519b$var$CFFTopDict), + stringIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039)(new $elh9A$restructure.String('length')), + globalSubrIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039) + }, + 2: { + hdrSize: $elh9A$restructure.uint8, + length: $elh9A$restructure.uint16, + topDict: $5b547cf9e5da519b$var$CFF2TopDict, + globalSubrIndex: new (0, $9eaea3754914a290$export$2e2bcd8739ae039) + } +}); +var $5b547cf9e5da519b$export$2e2bcd8739ae039 = $5b547cf9e5da519b$var$CFFTop; + + + + +class $f717432b360040c7$var$CFFFont { + static decode(stream) { + return new $f717432b360040c7$var$CFFFont(stream); + } + decode() { + let start = this.stream.pos; + let top = (0, $5b547cf9e5da519b$export$2e2bcd8739ae039).decode(this.stream); + for(let key in top){ + let val = top[key]; + this[key] = val; + } + if (this.version < 2) { + if (this.topDictIndex.length !== 1) throw new Error("Only a single font is allowed in CFF"); + this.topDict = this.topDictIndex[0]; + } + this.isCIDFont = this.topDict.ROS != null; + return this; + } + string(sid) { + if (this.version >= 2) return null; + if (sid < (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length) return (0, $860d3574d7fa3a51$export$2e2bcd8739ae039)[sid]; + return this.stringIndex[sid - (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length]; + } + get postscriptName() { + if (this.version < 2) return this.nameIndex[0]; + return null; + } + get fullName() { + return this.string(this.topDict.FullName); + } + get familyName() { + return this.string(this.topDict.FamilyName); + } + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) return null; + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) return null; + let { charset: charset } = this.topDict; + if (Array.isArray(charset)) return charset[gid]; + if (gid === 0) return '.notdef'; + gid -= 1; + switch(charset.version){ + case 0: + return this.string(charset.glyphs[gid]); + case 1: + case 2: + for(let i = 0; i < charset.ranges.length; i++){ + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) return this.string(range.first + (gid - range.offset)); + } + break; + } + return null; + } + fdForGlyph(gid) { + if (!this.topDict.FDSelect) return null; + switch(this.topDict.FDSelect.version){ + case 0: + return this.topDict.FDSelect.fds[gid]; + case 3: + case 4: + let { ranges: ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + while(low <= high){ + let mid = low + high >> 1; + if (gid < ranges[mid].first) high = mid - 1; + else if (mid < high && gid >= ranges[mid + 1].first) low = mid + 1; + else return ranges[mid].fd; + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) return this.topDict.FDArray[fd].Private; + return null; + } + if (this.version < 2) return this.topDict.Private; + return this.topDict.FDArray[0].Private; + } + constructor(stream){ + this.stream = stream; + this.decode(); + } +} +var $f717432b360040c7$export$2e2bcd8739ae039 = $f717432b360040c7$var$CFFFont; + + + +let $8cb7ae73ed7aa7d8$var$VerticalOrigin = new $elh9A$restructure.Struct({ + glyphIndex: $elh9A$restructure.uint16, + vertOriginY: $elh9A$restructure.int16 +}); +var $8cb7ae73ed7aa7d8$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + majorVersion: $elh9A$restructure.uint16, + minorVersion: $elh9A$restructure.uint16, + defaultVertOriginY: $elh9A$restructure.int16, + numVertOriginYMetrics: $elh9A$restructure.uint16, + metrics: new $elh9A$restructure.Array($8cb7ae73ed7aa7d8$var$VerticalOrigin, 'numVertOriginYMetrics') +}); + + + + +let $20e0c7bbecb76d75$export$16b227cb15d716a0 = new $elh9A$restructure.Struct({ + height: $elh9A$restructure.uint8, + width: $elh9A$restructure.uint8, + horiBearingX: $elh9A$restructure.int8, + horiBearingY: $elh9A$restructure.int8, + horiAdvance: $elh9A$restructure.uint8, + vertBearingX: $elh9A$restructure.int8, + vertBearingY: $elh9A$restructure.int8, + vertAdvance: $elh9A$restructure.uint8 +}); +let $20e0c7bbecb76d75$export$62c53e75f69bfe12 = new $elh9A$restructure.Struct({ + height: $elh9A$restructure.uint8, + width: $elh9A$restructure.uint8, + bearingX: $elh9A$restructure.int8, + bearingY: $elh9A$restructure.int8, + advance: $elh9A$restructure.uint8 +}); +let $20e0c7bbecb76d75$var$EBDTComponent = new $elh9A$restructure.Struct({ + glyph: $elh9A$restructure.uint16, + xOffset: $elh9A$restructure.int8, + yOffset: $elh9A$restructure.int8 +}); +class $20e0c7bbecb76d75$var$ByteAligned { +} +class $20e0c7bbecb76d75$var$BitAligned { +} +let $20e0c7bbecb76d75$export$f1f5ddeb20d14f = new $elh9A$restructure.VersionedStruct('version', { + 1: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + data: $20e0c7bbecb76d75$var$ByteAligned + }, + 2: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + data: $20e0c7bbecb76d75$var$BitAligned + }, + // format 3 is deprecated + // format 4 is not supported by Microsoft + 5: { + data: $20e0c7bbecb76d75$var$BitAligned + }, + 6: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + data: $20e0c7bbecb76d75$var$ByteAligned + }, + 7: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + data: $20e0c7bbecb76d75$var$BitAligned + }, + 8: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + pad: new $elh9A$restructure.Reserved($elh9A$restructure.uint8), + numComponents: $elh9A$restructure.uint16, + components: new $elh9A$restructure.Array($20e0c7bbecb76d75$var$EBDTComponent, 'numComponents') + }, + 9: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + pad: new $elh9A$restructure.Reserved($elh9A$restructure.uint8), + numComponents: $elh9A$restructure.uint16, + components: new $elh9A$restructure.Array($20e0c7bbecb76d75$var$EBDTComponent, 'numComponents') + }, + 17: { + metrics: $20e0c7bbecb76d75$export$62c53e75f69bfe12, + dataLen: $elh9A$restructure.uint32, + data: new $elh9A$restructure.Buffer('dataLen') + }, + 18: { + metrics: $20e0c7bbecb76d75$export$16b227cb15d716a0, + dataLen: $elh9A$restructure.uint32, + data: new $elh9A$restructure.Buffer('dataLen') + }, + 19: { + dataLen: $elh9A$restructure.uint32, + data: new $elh9A$restructure.Buffer('dataLen') + } +}); + + +let $035bb95c0cdb1f6d$var$SBitLineMetrics = new $elh9A$restructure.Struct({ + ascender: $elh9A$restructure.int8, + descender: $elh9A$restructure.int8, + widthMax: $elh9A$restructure.uint8, + caretSlopeNumerator: $elh9A$restructure.int8, + caretSlopeDenominator: $elh9A$restructure.int8, + caretOffset: $elh9A$restructure.int8, + minOriginSB: $elh9A$restructure.int8, + minAdvanceSB: $elh9A$restructure.int8, + maxBeforeBL: $elh9A$restructure.int8, + minAfterBL: $elh9A$restructure.int8, + pad: new $elh9A$restructure.Reserved($elh9A$restructure.int8, 2) +}); +let $035bb95c0cdb1f6d$var$CodeOffsetPair = new $elh9A$restructure.Struct({ + glyphCode: $elh9A$restructure.uint16, + offset: $elh9A$restructure.uint16 +}); +let $035bb95c0cdb1f6d$var$IndexSubtable = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + header: { + imageFormat: $elh9A$restructure.uint16, + imageDataOffset: $elh9A$restructure.uint32 + }, + 1: { + offsetArray: new $elh9A$restructure.Array($elh9A$restructure.uint32, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 2: { + imageSize: $elh9A$restructure.uint32, + bigMetrics: (0, $20e0c7bbecb76d75$export$16b227cb15d716a0) + }, + 3: { + offsetArray: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 4: { + numGlyphs: $elh9A$restructure.uint32, + glyphArray: new $elh9A$restructure.Array($035bb95c0cdb1f6d$var$CodeOffsetPair, (t)=>t.numGlyphs + 1) + }, + 5: { + imageSize: $elh9A$restructure.uint32, + bigMetrics: (0, $20e0c7bbecb76d75$export$16b227cb15d716a0), + numGlyphs: $elh9A$restructure.uint32, + glyphCodeArray: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numGlyphs') + } +}); +let $035bb95c0cdb1f6d$var$IndexSubtableArray = new $elh9A$restructure.Struct({ + firstGlyphIndex: $elh9A$restructure.uint16, + lastGlyphIndex: $elh9A$restructure.uint16, + subtable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $035bb95c0cdb1f6d$var$IndexSubtable) +}); +let $035bb95c0cdb1f6d$var$BitmapSizeTable = new $elh9A$restructure.Struct({ + indexSubTableArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($035bb95c0cdb1f6d$var$IndexSubtableArray, 1), { + type: 'parent' + }), + indexTablesSize: $elh9A$restructure.uint32, + numberOfIndexSubTables: $elh9A$restructure.uint32, + colorRef: $elh9A$restructure.uint32, + hori: $035bb95c0cdb1f6d$var$SBitLineMetrics, + vert: $035bb95c0cdb1f6d$var$SBitLineMetrics, + startGlyphIndex: $elh9A$restructure.uint16, + endGlyphIndex: $elh9A$restructure.uint16, + ppemX: $elh9A$restructure.uint8, + ppemY: $elh9A$restructure.uint8, + bitDepth: $elh9A$restructure.uint8, + flags: new $elh9A$restructure.Bitfield($elh9A$restructure.uint8, [ + 'horizontal', + 'vertical' + ]) +}); +var $035bb95c0cdb1f6d$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint32, + numSizes: $elh9A$restructure.uint32, + sizes: new $elh9A$restructure.Array($035bb95c0cdb1f6d$var$BitmapSizeTable, 'numSizes') +}); + + + +let $73d13900b55a3c0c$var$ImageTable = new $elh9A$restructure.Struct({ + ppem: $elh9A$restructure.uint16, + resolution: $elh9A$restructure.uint16, + imageOffsets: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, 'void'), (t)=>t.parent.parent.maxp.numGlyphs + 1) +}); +var // This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +$73d13900b55a3c0c$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + flags: new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + 'renderOutlines' + ]), + numImgTables: $elh9A$restructure.uint32, + imageTables: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $73d13900b55a3c0c$var$ImageTable), 'numImgTables') +}); + + + +let $97f6b8be3a347a8f$var$LayerRecord = new $elh9A$restructure.Struct({ + gid: $elh9A$restructure.uint16, + paletteIndex: $elh9A$restructure.uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for +// the special case noted below. Each palette entry is 16 bits. +// A palette index of 0xFFFF is a special case indicating that +// the text foreground color should be used. +let $97f6b8be3a347a8f$var$BaseGlyphRecord = new $elh9A$restructure.Struct({ + gid: $elh9A$restructure.uint16, + // and is not rendered for color. + firstLayerIndex: $elh9A$restructure.uint16, + // There will be numLayers consecutive entries for this base glyph. + numLayers: $elh9A$restructure.uint16 +}); +var $97f6b8be3a347a8f$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numBaseGlyphRecords: $elh9A$restructure.uint16, + baseGlyphRecord: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($97f6b8be3a347a8f$var$BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($97f6b8be3a347a8f$var$LayerRecord, 'numLayerRecords'), { + lazy: true + }), + numLayerRecords: $elh9A$restructure.uint16 +}); + + + +let $16ca60ecbdee30ea$var$ColorRecord = new $elh9A$restructure.Struct({ + blue: $elh9A$restructure.uint8, + green: $elh9A$restructure.uint8, + red: $elh9A$restructure.uint8, + alpha: $elh9A$restructure.uint8 +}); +var $16ca60ecbdee30ea$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + header: { + numPaletteEntries: $elh9A$restructure.uint16, + numPalettes: $elh9A$restructure.uint16, + numColorRecords: $elh9A$restructure.uint16, + colorRecords: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($16ca60ecbdee30ea$var$ColorRecord, 'numColorRecords')), + colorRecordIndices: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numPalettes') + }, + 0: {}, + 1: { + offsetPaletteTypeArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($elh9A$restructure.uint32, 'numPalettes')), + offsetPaletteLabelArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numPalettes')), + offsetPaletteEntryLabelArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numPaletteEntries')) + } +}); + + + + + +let $7327e41706f9d5c7$var$BaseCoord = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coordinate: $elh9A$restructure.int16 // X or Y value, in design units + }, + 2: { + coordinate: $elh9A$restructure.int16, + referenceGlyph: $elh9A$restructure.uint16, + baseCoordPoint: $elh9A$restructure.uint16 // Index of contour point on the referenceGlyph + }, + 3: { + coordinate: $elh9A$restructure.int16, + deviceTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) // Device table for X or Y value + } +}); +let $7327e41706f9d5c7$var$BaseValues = new $elh9A$restructure.Struct({ + defaultIndex: $elh9A$restructure.uint16, + baseCoordCount: $elh9A$restructure.uint16, + baseCoords: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), 'baseCoordCount') +}); +let $7327e41706f9d5c7$var$FeatMinMaxRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + minCoord: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord, { + type: 'parent' + }), + maxCoord: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord, { + type: 'parent' + }) // May be NULL +}); +let $7327e41706f9d5c7$var$MinMax = new $elh9A$restructure.Struct({ + minCoord: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), + maxCoord: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseCoord), + featMinMaxCount: $elh9A$restructure.uint16, + featMinMaxRecords: new $elh9A$restructure.Array($7327e41706f9d5c7$var$FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); +let $7327e41706f9d5c7$var$BaseLangSysRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + minMax: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$MinMax, { + type: 'parent' + }) +}); +let $7327e41706f9d5c7$var$BaseScript = new $elh9A$restructure.Struct({ + baseValues: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseValues), + defaultMinMax: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$MinMax), + baseLangSysCount: $elh9A$restructure.uint16, + baseLangSysRecords: new $elh9A$restructure.Array($7327e41706f9d5c7$var$BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); +let $7327e41706f9d5c7$var$BaseScriptRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + script: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseScript, { + type: 'parent' + }) +}); +let $7327e41706f9d5c7$var$BaseScriptList = new $elh9A$restructure.Array($7327e41706f9d5c7$var$BaseScriptRecord, $elh9A$restructure.uint16); +// Array of 4-byte baseline identification tags-must be in alphabetical order +let $7327e41706f9d5c7$var$BaseTagList = new $elh9A$restructure.Array(new $elh9A$restructure.String(4), $elh9A$restructure.uint16); +let $7327e41706f9d5c7$var$Axis = new $elh9A$restructure.Struct({ + baseTagList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseTagList), + baseScriptList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$BaseScriptList) +}); +var $7327e41706f9d5c7$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint32, { + header: { + horizAxis: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$Axis), + vertAxis: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7327e41706f9d5c7$var$Axis) // May be NULL + }, + 0x00010000: {}, + 0x00010001: { + itemVariationStore: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)) + } +}); + + + + + +let $7e48bbe9e5345664$var$AttachPoint = new $elh9A$restructure.Array($elh9A$restructure.uint16, $elh9A$restructure.uint16); +let $7e48bbe9e5345664$var$AttachList = new $elh9A$restructure.Struct({ + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + glyphCount: $elh9A$restructure.uint16, + attachPoints: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$AttachPoint), 'glyphCount') +}); +let $7e48bbe9e5345664$var$CaretValue = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coordinate: $elh9A$restructure.int16 + }, + 2: { + caretValuePoint: $elh9A$restructure.uint16 + }, + 3: { + coordinate: $elh9A$restructure.int16, + deviceTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) + } +}); +let $7e48bbe9e5345664$var$LigGlyph = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$CaretValue), $elh9A$restructure.uint16); +let $7e48bbe9e5345664$var$LigCaretList = new $elh9A$restructure.Struct({ + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + ligGlyphCount: $elh9A$restructure.uint16, + ligGlyphs: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$LigGlyph), 'ligGlyphCount') +}); +let $7e48bbe9e5345664$var$MarkGlyphSetsDef = new $elh9A$restructure.Struct({ + markSetTableFormat: $elh9A$restructure.uint16, + markSetCount: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'markSetCount') +}); +var $7e48bbe9e5345664$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint32, { + header: { + glyphClassDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + attachList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$AttachList), + ligCaretList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$LigCaretList), + markAttachClassDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)) + }, + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $7e48bbe9e5345664$var$MarkGlyphSetsDef), + itemVariationStore: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)) + } +}); + + + + + +let $b687332511a4da75$var$ValueFormat = new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + 'xPlacement', + 'yPlacement', + 'xAdvance', + 'yAdvance', + 'xPlaDevice', + 'yPlaDevice', + 'xAdvDevice', + 'yAdvDevice' +]); +let $b687332511a4da75$var$types = { + xPlacement: $elh9A$restructure.int16, + yPlacement: $elh9A$restructure.int16, + xAdvance: $elh9A$restructure.int16, + yAdvance: $elh9A$restructure.int16, + xPlaDevice: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yPlaDevice: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + xAdvDevice: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yAdvDevice: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }) +}; +class $b687332511a4da75$var$ValueRecord { + buildStruct(parent) { + let struct = parent; + while(!struct[this.key] && struct.parent)struct = struct.parent; + if (!struct[this.key]) return; + let fields = {}; + fields.rel = ()=>struct._startOffset; + let format = struct[this.key]; + for(let key in format)if (format[key]) fields[key] = $b687332511a4da75$var$types[key]; + return new $elh9A$restructure.Struct(fields); + } + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } + constructor(key = 'valueFormat'){ + this.key = key; + } +} +let $b687332511a4da75$var$PairValueRecord = new $elh9A$restructure.Struct({ + secondGlyph: $elh9A$restructure.uint16, + value1: new $b687332511a4da75$var$ValueRecord('valueFormat1'), + value2: new $b687332511a4da75$var$ValueRecord('valueFormat2') +}); +let $b687332511a4da75$var$PairSet = new $elh9A$restructure.Array($b687332511a4da75$var$PairValueRecord, $elh9A$restructure.uint16); +let $b687332511a4da75$var$Class2Record = new $elh9A$restructure.Struct({ + value1: new $b687332511a4da75$var$ValueRecord('valueFormat1'), + value2: new $b687332511a4da75$var$ValueRecord('valueFormat2') +}); +let $b687332511a4da75$var$Anchor = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + xCoordinate: $elh9A$restructure.int16, + yCoordinate: $elh9A$restructure.int16 + }, + 2: { + xCoordinate: $elh9A$restructure.int16, + yCoordinate: $elh9A$restructure.int16, + anchorPoint: $elh9A$restructure.uint16 + }, + 3: { + xCoordinate: $elh9A$restructure.int16, + yCoordinate: $elh9A$restructure.int16, + xDeviceTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)), + yDeviceTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$8215d14a63d9fb10)) + } +}); +let $b687332511a4da75$var$EntryExitRecord = new $elh9A$restructure.Struct({ + entryAnchor: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }), + exitAnchor: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }) +}); +let $b687332511a4da75$var$MarkRecord = new $elh9A$restructure.Struct({ + class: $elh9A$restructure.uint16, + markAnchor: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$Anchor, { + type: 'parent' + }) +}); +let $b687332511a4da75$var$MarkArray = new $elh9A$restructure.Array($b687332511a4da75$var$MarkRecord, $elh9A$restructure.uint16); +let $b687332511a4da75$var$BaseRecord = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$Anchor), (t)=>t.parent.classCount); +let $b687332511a4da75$var$BaseArray = new $elh9A$restructure.Array($b687332511a4da75$var$BaseRecord, $elh9A$restructure.uint16); +let $b687332511a4da75$var$ComponentRecord = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$Anchor), (t)=>t.parent.parent.classCount); +let $b687332511a4da75$var$LigatureAttach = new $elh9A$restructure.Array($b687332511a4da75$var$ComponentRecord, $elh9A$restructure.uint16); +let $b687332511a4da75$var$LigatureArray = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$LigatureAttach), $elh9A$restructure.uint16); +let $b687332511a4da75$export$73a8cfb19cd43a0f = new $elh9A$restructure.VersionedStruct('lookupType', { + 1: new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat: $b687332511a4da75$var$ValueFormat, + value: new $b687332511a4da75$var$ValueRecord() + }, + 2: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat: $b687332511a4da75$var$ValueFormat, + valueCount: $elh9A$restructure.uint16, + values: new $elh9A$restructure.LazyArray(new $b687332511a4da75$var$ValueRecord(), 'valueCount') + } + }), + 2: new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat1: $b687332511a4da75$var$ValueFormat, + valueFormat2: $b687332511a4da75$var$ValueFormat, + pairSetCount: $elh9A$restructure.uint16, + pairSets: new $elh9A$restructure.LazyArray(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$PairSet), 'pairSetCount') + }, + 2: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + valueFormat1: $b687332511a4da75$var$ValueFormat, + valueFormat2: $b687332511a4da75$var$ValueFormat, + classDef1: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + classDef2: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$843d551fbbafef71)), + class1Count: $elh9A$restructure.uint16, + class2Count: $elh9A$restructure.uint16, + classRecords: new $elh9A$restructure.LazyArray(new $elh9A$restructure.LazyArray($b687332511a4da75$var$Class2Record, 'class2Count'), 'class1Count') + } + }), + 3: { + format: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + entryExitCount: $elh9A$restructure.uint16, + entryExitRecords: new $elh9A$restructure.Array($b687332511a4da75$var$EntryExitRecord, 'entryExitCount') + }, + 4: { + format: $elh9A$restructure.uint16, + markCoverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + baseCoverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $elh9A$restructure.uint16, + markArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$MarkArray), + baseArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$BaseArray) + }, + 5: { + format: $elh9A$restructure.uint16, + markCoverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + ligatureCoverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $elh9A$restructure.uint16, + markArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$MarkArray), + ligatureArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$LigatureArray) + }, + 6: { + format: $elh9A$restructure.uint16, + mark1Coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + mark2Coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + classCount: $elh9A$restructure.uint16, + mark1Array: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$MarkArray), + mark2Array: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $b687332511a4da75$var$BaseArray) + }, + 7: (0, $b6dd765146ad212a$export$841858b892ce1f4c), + 8: (0, $b6dd765146ad212a$export$5e6d09e6861162f6), + 9: { + posFormat: $elh9A$restructure.uint16, + lookupType: $elh9A$restructure.uint16, + extension: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, null) + } +}); +// Fix circular reference +$b687332511a4da75$export$73a8cfb19cd43a0f.versions[9].extension.type = $b687332511a4da75$export$73a8cfb19cd43a0f; +var $b687332511a4da75$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint32, { + header: { + scriptList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$3e15fc05ce864229)), + featureList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$aa18130def4b6cb4)), + lookupList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)($b687332511a4da75$export$73a8cfb19cd43a0f)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $2e4adcda047b3383$export$441b70b7971dd419)) + } +}); + + + + + +let $99ccad60b96f92fb$var$Sequence = new $elh9A$restructure.Array($elh9A$restructure.uint16, $elh9A$restructure.uint16); +let $99ccad60b96f92fb$var$AlternateSet = $99ccad60b96f92fb$var$Sequence; +let $99ccad60b96f92fb$var$Ligature = new $elh9A$restructure.Struct({ + glyph: $elh9A$restructure.uint16, + compCount: $elh9A$restructure.uint16, + components: new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.compCount - 1) +}); +let $99ccad60b96f92fb$var$LigatureSet = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $99ccad60b96f92fb$var$Ligature), $elh9A$restructure.uint16); +let $99ccad60b96f92fb$var$GSUBLookup = new $elh9A$restructure.VersionedStruct('lookupType', { + 1: new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 1: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + deltaGlyphID: $elh9A$restructure.int16 + }, + 2: { + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + glyphCount: $elh9A$restructure.uint16, + substitute: new $elh9A$restructure.LazyArray($elh9A$restructure.uint16, 'glyphCount') + } + }), + 2: { + substFormat: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $elh9A$restructure.uint16, + sequences: new $elh9A$restructure.LazyArray(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $99ccad60b96f92fb$var$Sequence), 'count') + }, + 3: { + substFormat: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $elh9A$restructure.uint16, + alternateSet: new $elh9A$restructure.LazyArray(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $99ccad60b96f92fb$var$AlternateSet), 'count') + }, + 4: { + substFormat: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + count: $elh9A$restructure.uint16, + ligatureSets: new $elh9A$restructure.LazyArray(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $99ccad60b96f92fb$var$LigatureSet), 'count') + }, + 5: (0, $b6dd765146ad212a$export$841858b892ce1f4c), + 6: (0, $b6dd765146ad212a$export$5e6d09e6861162f6), + 7: { + substFormat: $elh9A$restructure.uint16, + lookupType: $elh9A$restructure.uint16, + extension: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, null) + }, + 8: { + substFormat: $elh9A$restructure.uint16, + coverage: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), + backtrackCoverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'backtrackGlyphCount'), + lookaheadGlyphCount: $elh9A$restructure.uint16, + lookaheadCoverage: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$17608c3f81a6111)), 'lookaheadGlyphCount'), + glyphCount: $elh9A$restructure.uint16, + substitutes: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'glyphCount') + } +}); +// Fix circular reference +$99ccad60b96f92fb$var$GSUBLookup.versions[7].extension.type = $99ccad60b96f92fb$var$GSUBLookup; +var $99ccad60b96f92fb$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint32, { + header: { + scriptList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$3e15fc05ce864229)), + featureList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, (0, $b6dd765146ad212a$export$aa18130def4b6cb4)), + lookupList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)($99ccad60b96f92fb$var$GSUBLookup)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $2e4adcda047b3383$export$441b70b7971dd419)) + } +}); + + + + + +let $573d5042c76c4940$var$JstfGSUBModList = new $elh9A$restructure.Array($elh9A$restructure.uint16, $elh9A$restructure.uint16); +let $573d5042c76c4940$var$JstfPriority = new $elh9A$restructure.Struct({ + shrinkageEnableGSUB: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageDisableGSUB: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageEnableGPOS: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageDisableGPOS: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + shrinkageJstfMax: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)((0, $b687332511a4da75$export$73a8cfb19cd43a0f))), + extensionEnableGSUB: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionDisableGSUB: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionEnableGPOS: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionDisableGPOS: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfGSUBModList), + extensionJstfMax: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new (0, $b6dd765146ad212a$export$df0008c6ff2da22a)((0, $b687332511a4da75$export$73a8cfb19cd43a0f))) +}); +let $573d5042c76c4940$var$JstfLangSys = new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfPriority), $elh9A$restructure.uint16); +let $573d5042c76c4940$var$JstfLangSysRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + jstfLangSys: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfLangSys) +}); +let $573d5042c76c4940$var$JstfScript = new $elh9A$restructure.Struct({ + extenderGlyphs: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $elh9A$restructure.Array($elh9A$restructure.uint16, $elh9A$restructure.uint16)), + defaultLangSys: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfLangSys), + langSysCount: $elh9A$restructure.uint16, + langSysRecords: new $elh9A$restructure.Array($573d5042c76c4940$var$JstfLangSysRecord, 'langSysCount') +}); +let $573d5042c76c4940$var$JstfScriptRecord = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + script: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $573d5042c76c4940$var$JstfScript, { + type: 'parent' + }) +}); +var $573d5042c76c4940$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint32, + scriptCount: $elh9A$restructure.uint16, + scriptList: new $elh9A$restructure.Array($573d5042c76c4940$var$JstfScriptRecord, 'scriptCount') +}); + + + + +// TODO: add this to restructure +class $a5875b80d6087f61$var$VariableSizeNumber { + decode(stream, parent) { + switch(this.size(0, parent)){ + case 1: + return stream.readUInt8(); + case 2: + return stream.readUInt16BE(); + case 3: + return stream.readUInt24BE(); + case 4: + return stream.readUInt32BE(); + } + } + size(val, parent) { + return (0, $elh9A$restructure.resolveLength)(this._size, null, parent); + } + constructor(size){ + this._size = size; + } +} +let $a5875b80d6087f61$var$MapDataEntry = new $elh9A$restructure.Struct({ + entry: new $a5875b80d6087f61$var$VariableSizeNumber((t)=>((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: (t)=>t.entry >> (t.parent.entryFormat & 0x000F) + 1, + innerIndex: (t)=>t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1 +}); +let $a5875b80d6087f61$var$DeltaSetIndexMap = new $elh9A$restructure.Struct({ + entryFormat: $elh9A$restructure.uint16, + mapCount: $elh9A$restructure.uint16, + mapData: new $elh9A$restructure.Array($a5875b80d6087f61$var$MapDataEntry, 'mapCount') +}); +var $a5875b80d6087f61$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + majorVersion: $elh9A$restructure.uint16, + minorVersion: $elh9A$restructure.uint16, + itemVariationStore: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, (0, $2e4adcda047b3383$export$fe1b122a2710f241)), + advanceWidthMapping: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap), + LSBMapping: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap), + RSBMapping: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $a5875b80d6087f61$var$DeltaSetIndexMap) +}); + + + +let $4423bc1ac09bbbd1$var$Signature = new $elh9A$restructure.Struct({ + format: $elh9A$restructure.uint32, + length: $elh9A$restructure.uint32, + offset: $elh9A$restructure.uint32 +}); +let $4423bc1ac09bbbd1$var$SignatureBlock = new $elh9A$restructure.Struct({ + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16, 2), + cbSignature: $elh9A$restructure.uint32, + signature: new $elh9A$restructure.Buffer('cbSignature') +}); +var $4423bc1ac09bbbd1$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + ulVersion: $elh9A$restructure.uint32, + usNumSigs: $elh9A$restructure.uint16, + usFlag: $elh9A$restructure.uint16, + signatures: new $elh9A$restructure.Array($4423bc1ac09bbbd1$var$Signature, 'usNumSigs'), + signatureBlocks: new $elh9A$restructure.Array($4423bc1ac09bbbd1$var$SignatureBlock, 'usNumSigs') +}); + + + +let $7b50e3f8d83263de$var$GaspRange = new $elh9A$restructure.Struct({ + rangeMaxPPEM: $elh9A$restructure.uint16, + rangeGaspBehavior: new $elh9A$restructure.Bitfield($elh9A$restructure.uint16, [ + 'grayscale', + 'gridfit', + 'symmetricSmoothing', + 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); +var $7b50e3f8d83263de$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numRanges: $elh9A$restructure.uint16, + gaspRanges: new $elh9A$restructure.Array($7b50e3f8d83263de$var$GaspRange, 'numRanges') // Sorted by ppem +}); + + + +let $7bf92ec372cd2307$var$DeviceRecord = new $elh9A$restructure.Struct({ + pixelSize: $elh9A$restructure.uint8, + maximumWidth: $elh9A$restructure.uint8, + widths: new $elh9A$restructure.Array($elh9A$restructure.uint8, (t)=>t.parent.parent.maxp.numGlyphs) +}); +var // The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +$7bf92ec372cd2307$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numRecords: $elh9A$restructure.int16, + sizeDeviceRecord: $elh9A$restructure.int32, + records: new $elh9A$restructure.Array($7bf92ec372cd2307$var$DeviceRecord, 'numRecords') +}); + + + +let $a3f544bcf76542d1$var$KernPair = new $elh9A$restructure.Struct({ + left: $elh9A$restructure.uint16, + right: $elh9A$restructure.uint16, + value: $elh9A$restructure.int16 +}); +let $a3f544bcf76542d1$var$ClassTable = new $elh9A$restructure.Struct({ + firstGlyph: $elh9A$restructure.uint16, + nGlyphs: $elh9A$restructure.uint16, + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'nGlyphs'), + max: (t)=>t.offsets.length && Math.max.apply(Math, t.offsets) +}); +let $a3f544bcf76542d1$var$Kern2Array = new $elh9A$restructure.Struct({ + off: (t)=>t._startOffset - t.parent.parent._startOffset, + len: (t)=>((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2), + values: new $elh9A$restructure.LazyArray($elh9A$restructure.int16, 'len') +}); +let $a3f544bcf76542d1$var$KernSubtable = new $elh9A$restructure.VersionedStruct('format', { + 0: { + nPairs: $elh9A$restructure.uint16, + searchRange: $elh9A$restructure.uint16, + entrySelector: $elh9A$restructure.uint16, + rangeShift: $elh9A$restructure.uint16, + pairs: new $elh9A$restructure.Array($a3f544bcf76542d1$var$KernPair, 'nPairs') + }, + 2: { + rowWidth: $elh9A$restructure.uint16, + leftTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $a3f544bcf76542d1$var$ClassTable, { + type: 'parent' + }), + rightTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $a3f544bcf76542d1$var$ClassTable, { + type: 'parent' + }), + array: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $a3f544bcf76542d1$var$Kern2Array, { + type: 'parent' + }) + }, + 3: { + glyphCount: $elh9A$restructure.uint16, + kernValueCount: $elh9A$restructure.uint8, + leftClassCount: $elh9A$restructure.uint8, + rightClassCount: $elh9A$restructure.uint8, + flags: $elh9A$restructure.uint8, + kernValue: new $elh9A$restructure.Array($elh9A$restructure.int16, 'kernValueCount'), + leftClass: new $elh9A$restructure.Array($elh9A$restructure.uint8, 'glyphCount'), + rightClass: new $elh9A$restructure.Array($elh9A$restructure.uint8, 'glyphCount'), + kernIndex: new $elh9A$restructure.Array($elh9A$restructure.uint8, (t)=>t.leftClassCount * t.rightClassCount) + } +}); +let $a3f544bcf76542d1$var$KernTable = new $elh9A$restructure.VersionedStruct('version', { + 0: { + subVersion: $elh9A$restructure.uint16, + length: $elh9A$restructure.uint16, + format: $elh9A$restructure.uint8, + coverage: new $elh9A$restructure.Bitfield($elh9A$restructure.uint8, [ + 'horizontal', + 'minimum', + 'crossStream', + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: $a3f544bcf76542d1$var$KernSubtable, + padding: new $elh9A$restructure.Reserved($elh9A$restructure.uint8, (t)=>t.length - t._currentOffset) + }, + 1: { + length: $elh9A$restructure.uint32, + coverage: new $elh9A$restructure.Bitfield($elh9A$restructure.uint8, [ + null, + null, + null, + null, + null, + 'variation', + 'crossStream', + 'vertical' // Set if table has vertical kerning values + ]), + format: $elh9A$restructure.uint8, + tupleIndex: $elh9A$restructure.uint16, + subtable: $a3f544bcf76542d1$var$KernSubtable, + padding: new $elh9A$restructure.Reserved($elh9A$restructure.uint8, (t)=>t.length - t._currentOffset) + } +}); +var $a3f544bcf76542d1$export$2e2bcd8739ae039 = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 0: { + nTables: $elh9A$restructure.uint16, + tables: new $elh9A$restructure.Array($a3f544bcf76542d1$var$KernTable, 'nTables') + }, + 1: { + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + nTables: $elh9A$restructure.uint32, + tables: new $elh9A$restructure.Array($a3f544bcf76542d1$var$KernTable, 'nTables') + } +}); + + + +var // Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +$86687befb45925d0$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numGlyphs: $elh9A$restructure.uint16, + yPels: new $elh9A$restructure.Array($elh9A$restructure.uint8, 'numGlyphs') +}); + + + +var // PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +$91429006e51e0fe8$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + fontNumber: $elh9A$restructure.uint32, + pitch: $elh9A$restructure.uint16, + xHeight: $elh9A$restructure.uint16, + style: $elh9A$restructure.uint16, + typeFamily: $elh9A$restructure.uint16, + capHeight: $elh9A$restructure.uint16, + symbolSet: $elh9A$restructure.uint16, + typeface: new $elh9A$restructure.String(16), + characterComplement: new $elh9A$restructure.String(8), + fileName: new $elh9A$restructure.String(6), + strokeWeight: new $elh9A$restructure.String(1), + widthType: new $elh9A$restructure.String(1), + serifStyle: $elh9A$restructure.uint8, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint8) +}); + + + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. +let $627850fc9deed59a$var$Ratio = new $elh9A$restructure.Struct({ + bCharSet: $elh9A$restructure.uint8, + xRatio: $elh9A$restructure.uint8, + yStartRatio: $elh9A$restructure.uint8, + yEndRatio: $elh9A$restructure.uint8 // Ending y-Ratio value +}); +let $627850fc9deed59a$var$vTable = new $elh9A$restructure.Struct({ + yPelHeight: $elh9A$restructure.uint16, + yMax: $elh9A$restructure.int16, + yMin: $elh9A$restructure.int16 // Minimum value (in pels) for this yPelHeight +}); +let $627850fc9deed59a$var$VdmxGroup = new $elh9A$restructure.Struct({ + recs: $elh9A$restructure.uint16, + startsz: $elh9A$restructure.uint8, + endsz: $elh9A$restructure.uint8, + entries: new $elh9A$restructure.Array($627850fc9deed59a$var$vTable, 'recs') // The VDMX records +}); +var $627850fc9deed59a$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + numRecs: $elh9A$restructure.uint16, + numRatios: $elh9A$restructure.uint16, + ratioRanges: new $elh9A$restructure.Array($627850fc9deed59a$var$Ratio, 'numRatios'), + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numRatios'), + groups: new $elh9A$restructure.Array($627850fc9deed59a$var$VdmxGroup, 'numRecs') // The actual VDMX groupings +}); + + + +var // Vertical Header Table +$65c33f5f068fc77f$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + ascent: $elh9A$restructure.int16, + descent: $elh9A$restructure.int16, + lineGap: $elh9A$restructure.int16, + advanceHeightMax: $elh9A$restructure.int16, + minTopSideBearing: $elh9A$restructure.int16, + minBottomSideBearing: $elh9A$restructure.int16, + yMaxExtent: $elh9A$restructure.int16, + caretSlopeRise: $elh9A$restructure.int16, + caretSlopeRun: $elh9A$restructure.int16, + caretOffset: $elh9A$restructure.int16, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.int16, 4), + metricDataFormat: $elh9A$restructure.int16, + numberOfMetrics: $elh9A$restructure.uint16 // Number of advance heights in the Vertical Metrics table +}); + + + +let $597d739523b65bb3$var$VmtxEntry = new $elh9A$restructure.Struct({ + advance: $elh9A$restructure.uint16, + bearing: $elh9A$restructure.int16 // The top sidebearing of the glyph +}); +var // Vertical Metrics Table +$597d739523b65bb3$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + metrics: new $elh9A$restructure.LazyArray($597d739523b65bb3$var$VmtxEntry, (t)=>t.parent.vhea.numberOfMetrics), + bearings: new $elh9A$restructure.LazyArray($elh9A$restructure.int16, (t)=>t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); + + + +let $35aa0c87d9c3d3a0$var$shortFrac = new $elh9A$restructure.Fixed(16, 'BE', 14); +let $35aa0c87d9c3d3a0$var$Correspondence = new $elh9A$restructure.Struct({ + fromCoord: $35aa0c87d9c3d3a0$var$shortFrac, + toCoord: $35aa0c87d9c3d3a0$var$shortFrac +}); +let $35aa0c87d9c3d3a0$var$Segment = new $elh9A$restructure.Struct({ + pairCount: $elh9A$restructure.uint16, + correspondence: new $elh9A$restructure.Array($35aa0c87d9c3d3a0$var$Correspondence, 'pairCount') +}); +var $35aa0c87d9c3d3a0$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + axisCount: $elh9A$restructure.uint32, + segment: new $elh9A$restructure.Array($35aa0c87d9c3d3a0$var$Segment, 'axisCount') +}); + + + + +class $22801616bd931ca3$var$UnboundedArrayAccessor { + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + return this._items[index]; + } + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } + constructor(type, stream, parent){ + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } +} +class $22801616bd931ca3$export$c5af1eebc882e39a extends $elh9A$restructure.Array { + decode(stream, parent) { + return new $22801616bd931ca3$var$UnboundedArrayAccessor(this.type, stream, parent); + } + constructor(type){ + super(type, 0); + } +} +let $22801616bd931ca3$export$8351f8c2ae2f103c = function(ValueType = $elh9A$restructure.uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + constructor(type){ + this.type = type; + } + } + ValueType = new Shadow(ValueType); + let BinarySearchHeader = new $elh9A$restructure.Struct({ + unitSize: $elh9A$restructure.uint16, + nUnits: $elh9A$restructure.uint16, + searchRange: $elh9A$restructure.uint16, + entrySelector: $elh9A$restructure.uint16, + rangeShift: $elh9A$restructure.uint16 + }); + let LookupSegmentSingle = new $elh9A$restructure.Struct({ + lastGlyph: $elh9A$restructure.uint16, + firstGlyph: $elh9A$restructure.uint16, + value: ValueType + }); + let LookupSegmentArray = new $elh9A$restructure.Struct({ + lastGlyph: $elh9A$restructure.uint16, + firstGlyph: $elh9A$restructure.uint16, + values: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $elh9A$restructure.Array(ValueType, (t)=>t.lastGlyph - t.firstGlyph + 1), { + type: 'parent' + }) + }); + let LookupSingle = new $elh9A$restructure.Struct({ + glyph: $elh9A$restructure.uint16, + value: ValueType + }); + return new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint16, { + 0: { + values: new $22801616bd931ca3$export$c5af1eebc882e39a(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new $elh9A$restructure.Array(LookupSegmentSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new $elh9A$restructure.Array(LookupSegmentArray, (t)=>t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new $elh9A$restructure.Array(LookupSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: $elh9A$restructure.uint16, + count: $elh9A$restructure.uint16, + values: new $elh9A$restructure.Array(ValueType, 'count') + } + }); +}; +function $22801616bd931ca3$export$79f7d93d790934ba(entryData = {}, lookupType = $elh9A$restructure.uint16) { + let entry = Object.assign({ + newState: $elh9A$restructure.uint16, + flags: $elh9A$restructure.uint16 + }, entryData); + let Entry = new $elh9A$restructure.Struct(entry); + let StateArray = new $22801616bd931ca3$export$c5af1eebc882e39a(new $elh9A$restructure.Array($elh9A$restructure.uint16, (t)=>t.nClasses)); + let StateHeader = new $elh9A$restructure.Struct({ + nClasses: $elh9A$restructure.uint32, + classTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $22801616bd931ca3$export$8351f8c2ae2f103c(lookupType)), + stateArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, StateArray), + entryTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $22801616bd931ca3$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader; +} +function $22801616bd931ca3$export$105027425199cc51(entryData = {}, lookupType = $elh9A$restructure.uint16) { + let ClassLookupTable = new $elh9A$restructure.Struct({ + version () { + return 8; + }, + firstGlyph: $elh9A$restructure.uint16, + values: new $elh9A$restructure.Array($elh9A$restructure.uint8, $elh9A$restructure.uint16) + }); + let entry = Object.assign({ + newStateOffset: $elh9A$restructure.uint16, + // convert offset to stateArray index + newState: (t)=>(t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: $elh9A$restructure.uint16 + }, entryData); + let Entry = new $elh9A$restructure.Struct(entry); + let StateArray = new $22801616bd931ca3$export$c5af1eebc882e39a(new $elh9A$restructure.Array($elh9A$restructure.uint8, (t)=>t.nClasses)); + let StateHeader1 = new $elh9A$restructure.Struct({ + nClasses: $elh9A$restructure.uint16, + classTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, ClassLookupTable), + stateArray: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, StateArray), + entryTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $22801616bd931ca3$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader1; +} + + +let $3a5ca96d3e3aaf20$var$BslnSubtable = new $elh9A$restructure.VersionedStruct('format', { + 0: { + deltas: new $elh9A$restructure.Array($elh9A$restructure.int16, 32) + }, + 1: { + deltas: new $elh9A$restructure.Array($elh9A$restructure.int16, 32), + mappingData: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($elh9A$restructure.uint16) + }, + 2: { + standardGlyph: $elh9A$restructure.uint16, + controlPoints: new $elh9A$restructure.Array($elh9A$restructure.uint16, 32) + }, + 3: { + standardGlyph: $elh9A$restructure.uint16, + controlPoints: new $elh9A$restructure.Array($elh9A$restructure.uint16, 32), + mappingData: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($elh9A$restructure.uint16) + } +}); +var $3a5ca96d3e3aaf20$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + format: $elh9A$restructure.uint16, + defaultBaseline: $elh9A$restructure.uint16, + subtable: $3a5ca96d3e3aaf20$var$BslnSubtable +}); + + + +let $8d4241d96b2b0589$var$Setting = new $elh9A$restructure.Struct({ + setting: $elh9A$restructure.uint16, + nameIndex: $elh9A$restructure.int16, + name: (t)=>t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +let $8d4241d96b2b0589$var$FeatureName = new $elh9A$restructure.Struct({ + feature: $elh9A$restructure.uint16, + nSettings: $elh9A$restructure.uint16, + settingTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array($8d4241d96b2b0589$var$Setting, 'nSettings'), { + type: 'parent' + }), + featureFlags: new $elh9A$restructure.Bitfield($elh9A$restructure.uint8, [ + null, + null, + null, + null, + null, + null, + 'hasDefault', + 'exclusive' + ]), + defaultSetting: $elh9A$restructure.uint8, + nameIndex: $elh9A$restructure.int16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +var $8d4241d96b2b0589$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + featureNameCount: $elh9A$restructure.uint16, + reserved1: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + reserved2: new $elh9A$restructure.Reserved($elh9A$restructure.uint32), + featureNames: new $elh9A$restructure.Array($8d4241d96b2b0589$var$FeatureName, 'featureNameCount') +}); + + + +let $a79cd5132b1cf476$var$Axis = new $elh9A$restructure.Struct({ + axisTag: new $elh9A$restructure.String(4), + minValue: $elh9A$restructure.fixed32, + defaultValue: $elh9A$restructure.fixed32, + maxValue: $elh9A$restructure.fixed32, + flags: $elh9A$restructure.uint16, + nameID: $elh9A$restructure.uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID] +}); +let $a79cd5132b1cf476$var$Instance = new $elh9A$restructure.Struct({ + nameID: $elh9A$restructure.uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID], + flags: $elh9A$restructure.uint16, + coord: new $elh9A$restructure.Array($elh9A$restructure.fixed32, (t)=>t.parent.axisCount), + postscriptNameID: new $elh9A$restructure.Optional($elh9A$restructure.uint16, (t)=>t.parent.instanceSize - t._currentOffset > 0) +}); +var $a79cd5132b1cf476$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + offsetToData: $elh9A$restructure.uint16, + countSizePairs: $elh9A$restructure.uint16, + axisCount: $elh9A$restructure.uint16, + axisSize: $elh9A$restructure.uint16, + instanceCount: $elh9A$restructure.uint16, + instanceSize: $elh9A$restructure.uint16, + axis: new $elh9A$restructure.Array($a79cd5132b1cf476$var$Axis, 'axisCount'), + instance: new $elh9A$restructure.Array($a79cd5132b1cf476$var$Instance, 'instanceCount') +}); + + + +let $3f36f1a5e6989457$var$shortFrac = new $elh9A$restructure.Fixed(16, 'BE', 14); +class $3f36f1a5e6989457$var$Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2; + } +} +let $3f36f1a5e6989457$var$gvar = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + axisCount: $elh9A$restructure.uint16, + globalCoordCount: $elh9A$restructure.uint16, + globalCoords: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new $elh9A$restructure.Array(new $elh9A$restructure.Array($3f36f1a5e6989457$var$shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: $elh9A$restructure.uint16, + flags: $elh9A$restructure.uint16, + offsetToData: $elh9A$restructure.uint32, + offsets: new $elh9A$restructure.Array(new $elh9A$restructure.Pointer($3f36f1a5e6989457$var$Offset, 'void', { + relativeTo: (ctx)=>ctx.offsetToData, + allowNull: false + }), (t)=>t.glyphCount + 1) +}); +var $3f36f1a5e6989457$export$2e2bcd8739ae039 = $3f36f1a5e6989457$var$gvar; + + + + +let $0bd8fe7a6d1d9fb4$var$ClassTable = new $elh9A$restructure.Struct({ + length: $elh9A$restructure.uint16, + coverage: $elh9A$restructure.uint16, + subFeatureFlags: $elh9A$restructure.uint32, + stateTable: new (0, $22801616bd931ca3$export$105027425199cc51) +}); +let $0bd8fe7a6d1d9fb4$var$WidthDeltaRecord = new $elh9A$restructure.Struct({ + justClass: $elh9A$restructure.uint32, + beforeGrowLimit: $elh9A$restructure.fixed32, + beforeShrinkLimit: $elh9A$restructure.fixed32, + afterGrowLimit: $elh9A$restructure.fixed32, + afterShrinkLimit: $elh9A$restructure.fixed32, + growFlags: $elh9A$restructure.uint16, + shrinkFlags: $elh9A$restructure.uint16 +}); +let $0bd8fe7a6d1d9fb4$var$WidthDeltaCluster = new $elh9A$restructure.Array($0bd8fe7a6d1d9fb4$var$WidthDeltaRecord, $elh9A$restructure.uint32); +let $0bd8fe7a6d1d9fb4$var$ActionData = new $elh9A$restructure.VersionedStruct('actionType', { + 0: { + lowerLimit: $elh9A$restructure.fixed32, + upperLimit: $elh9A$restructure.fixed32, + order: $elh9A$restructure.uint16, + glyphs: new $elh9A$restructure.Array($elh9A$restructure.uint16, $elh9A$restructure.uint16) + }, + 1: { + addGlyph: $elh9A$restructure.uint16 + }, + 2: { + substThreshold: $elh9A$restructure.fixed32, + addGlyph: $elh9A$restructure.uint16, + substGlyph: $elh9A$restructure.uint16 + }, + 3: {}, + 4: { + variationAxis: $elh9A$restructure.uint32, + minimumLimit: $elh9A$restructure.fixed32, + noStretchValue: $elh9A$restructure.fixed32, + maximumLimit: $elh9A$restructure.fixed32 + }, + 5: { + flags: $elh9A$restructure.uint16, + glyph: $elh9A$restructure.uint16 + } +}); +let $0bd8fe7a6d1d9fb4$var$Action = new $elh9A$restructure.Struct({ + actionClass: $elh9A$restructure.uint16, + actionType: $elh9A$restructure.uint16, + actionLength: $elh9A$restructure.uint32, + actionData: $0bd8fe7a6d1d9fb4$var$ActionData, + padding: new $elh9A$restructure.Reserved($elh9A$restructure.uint8, (t)=>t.actionLength - t._currentOffset) +}); +let $0bd8fe7a6d1d9fb4$var$PostcompensationAction = new $elh9A$restructure.Array($0bd8fe7a6d1d9fb4$var$Action, $elh9A$restructure.uint32); +let $0bd8fe7a6d1d9fb4$var$PostCompensationTable = new $elh9A$restructure.Struct({ + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$PostcompensationAction)) +}); +let $0bd8fe7a6d1d9fb4$var$JustificationTable = new $elh9A$restructure.Struct({ + classTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$ClassTable, { + type: 'parent' + }), + wdcOffset: $elh9A$restructure.uint16, + postCompensationTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$PostCompensationTable, { + type: 'parent' + }), + widthDeltaClusters: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)(new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$WidthDeltaCluster, { + type: 'parent', + relativeTo: (ctx)=>ctx.wdcOffset + })) +}); +var $0bd8fe7a6d1d9fb4$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint32, + format: $elh9A$restructure.uint16, + horizontal: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$JustificationTable), + vertical: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $0bd8fe7a6d1d9fb4$var$JustificationTable) +}); + + + + +let $ef40c6dc80fd50a2$var$LigatureData = { + action: $elh9A$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$ContextualData = { + markIndex: $elh9A$restructure.uint16, + currentIndex: $elh9A$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$InsertionData = { + currentInsertIndex: $elh9A$restructure.uint16, + markedInsertIndex: $elh9A$restructure.uint16 +}; +let $ef40c6dc80fd50a2$var$SubstitutionTable = new $elh9A$restructure.Struct({ + items: new (0, $22801616bd931ca3$export$c5af1eebc882e39a)(new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new (0, $22801616bd931ca3$export$8351f8c2ae2f103c))) +}); +let $ef40c6dc80fd50a2$var$SubtableData = new $elh9A$restructure.VersionedStruct('type', { + 0: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba) + }, + 1: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$ContextualData), + substitutionTable: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $ef40c6dc80fd50a2$var$SubstitutionTable) + }, + 2: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$LigatureData), + ligatureActions: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($elh9A$restructure.uint32)), + components: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($elh9A$restructure.uint16)), + ligatureList: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($elh9A$restructure.uint16)) + }, + 4: { + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c) + }, + 5: { + stateTable: new (0, $22801616bd931ca3$export$79f7d93d790934ba)($ef40c6dc80fd50a2$var$InsertionData), + insertionActions: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, new (0, $22801616bd931ca3$export$c5af1eebc882e39a)($elh9A$restructure.uint16)) + } +}); +let $ef40c6dc80fd50a2$var$Subtable = new $elh9A$restructure.Struct({ + length: $elh9A$restructure.uint32, + coverage: $elh9A$restructure.uint24, + type: $elh9A$restructure.uint8, + subFeatureFlags: $elh9A$restructure.uint32, + table: $ef40c6dc80fd50a2$var$SubtableData, + padding: new $elh9A$restructure.Reserved($elh9A$restructure.uint8, (t)=>t.length - t._currentOffset) +}); +let $ef40c6dc80fd50a2$var$FeatureEntry = new $elh9A$restructure.Struct({ + featureType: $elh9A$restructure.uint16, + featureSetting: $elh9A$restructure.uint16, + enableFlags: $elh9A$restructure.uint32, + disableFlags: $elh9A$restructure.uint32 +}); +let $ef40c6dc80fd50a2$var$MorxChain = new $elh9A$restructure.Struct({ + defaultFlags: $elh9A$restructure.uint32, + chainLength: $elh9A$restructure.uint32, + nFeatureEntries: $elh9A$restructure.uint32, + nSubtables: $elh9A$restructure.uint32, + features: new $elh9A$restructure.Array($ef40c6dc80fd50a2$var$FeatureEntry, 'nFeatureEntries'), + subtables: new $elh9A$restructure.Array($ef40c6dc80fd50a2$var$Subtable, 'nSubtables') +}); +var $ef40c6dc80fd50a2$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint16, + unused: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + nChains: $elh9A$restructure.uint32, + chains: new $elh9A$restructure.Array($ef40c6dc80fd50a2$var$MorxChain, 'nChains') +}); + + + + +let $ab24dea08b58a7cc$var$OpticalBounds = new $elh9A$restructure.Struct({ + left: $elh9A$restructure.int16, + top: $elh9A$restructure.int16, + right: $elh9A$restructure.int16, + bottom: $elh9A$restructure.int16 +}); +var $ab24dea08b58a7cc$export$2e2bcd8739ae039 = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.fixed32, + format: $elh9A$restructure.uint16, + lookupTable: new (0, $22801616bd931ca3$export$8351f8c2ae2f103c)($ab24dea08b58a7cc$var$OpticalBounds) +}); + + +let $5825c04ce8f7102d$var$tables = {}; +var $5825c04ce8f7102d$export$2e2bcd8739ae039 = $5825c04ce8f7102d$var$tables; +$5825c04ce8f7102d$var$tables.cmap = (0, $e4ae0436c91af89f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.head = (0, $55a60976afb7c261$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hhea = (0, $dde72b7b5b650596$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hmtx = (0, $a7c40184072c9a5b$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.maxp = (0, $521197722369f691$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.name = (0, $51a9f4feb3a3b2b1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['OS/2'] = (0, $114ea85db469b435$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.post = (0, $f93b30299e1ea0f5$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.fpgm = (0, $873d79fea57d3161$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.loca = (0, $83c4155666d50c37$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.prep = (0, $b12598db7cdf7042$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['cvt '] = (0, $8fb09b0f473d61a0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.glyf = (0, $7707bdf21a3d89cc$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['CFF '] = (0, $f717432b360040c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables['CFF2'] = (0, $f717432b360040c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.VORG = (0, $8cb7ae73ed7aa7d8$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.EBLC = (0, $035bb95c0cdb1f6d$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.CBLC = $5825c04ce8f7102d$var$tables.EBLC; +$5825c04ce8f7102d$var$tables.sbix = (0, $73d13900b55a3c0c$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.COLR = (0, $97f6b8be3a347a8f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.CPAL = (0, $16ca60ecbdee30ea$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.BASE = (0, $7327e41706f9d5c7$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GDEF = (0, $7e48bbe9e5345664$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GPOS = (0, $b687332511a4da75$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.GSUB = (0, $99ccad60b96f92fb$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.JSTF = (0, $573d5042c76c4940$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.HVAR = (0, $a5875b80d6087f61$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.DSIG = (0, $4423bc1ac09bbbd1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.gasp = (0, $7b50e3f8d83263de$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.hdmx = (0, $7bf92ec372cd2307$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.kern = (0, $a3f544bcf76542d1$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.LTSH = (0, $86687befb45925d0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.PCLT = (0, $91429006e51e0fe8$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.VDMX = (0, $627850fc9deed59a$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.vhea = (0, $65c33f5f068fc77f$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.vmtx = (0, $597d739523b65bb3$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.avar = (0, $35aa0c87d9c3d3a0$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.bsln = (0, $3a5ca96d3e3aaf20$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.feat = (0, $8d4241d96b2b0589$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.fvar = (0, $a79cd5132b1cf476$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.gvar = (0, $3f36f1a5e6989457$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.just = (0, $0bd8fe7a6d1d9fb4$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.morx = (0, $ef40c6dc80fd50a2$export$2e2bcd8739ae039); +$5825c04ce8f7102d$var$tables.opbd = (0, $ab24dea08b58a7cc$export$2e2bcd8739ae039); + + +let $df50e1efe10a1247$var$TableEntry = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + checkSum: $elh9A$restructure.uint32, + offset: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, 'void', { + type: 'global' + }), + length: $elh9A$restructure.uint32 +}); +let $df50e1efe10a1247$var$Directory = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + numTables: $elh9A$restructure.uint16, + searchRange: $elh9A$restructure.uint16, + entrySelector: $elh9A$restructure.uint16, + rangeShift: $elh9A$restructure.uint16, + tables: new $elh9A$restructure.Array($df50e1efe10a1247$var$TableEntry, 'numTables') +}); +$df50e1efe10a1247$var$Directory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +$df50e1efe10a1247$var$Directory.preEncode = function() { + if (!Array.isArray(this.tables)) { + let tables = []; + for(let tag in this.tables){ + let table = this.tables[tag]; + if (table) tables.push({ + tag: tag, + checkSum: 0, + offset: new $elh9A$restructure.VoidPointer((0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag], table), + length: (0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag].size(table) + }); + } + this.tables = tables; + } + this.tag = 'true'; + this.numTables = this.tables.length; + let maxExponentFor2 = Math.floor(Math.log(this.numTables) / Math.LN2); + let maxPowerOf2 = Math.pow(2, maxExponentFor2); + this.searchRange = maxPowerOf2 * 16; + this.entrySelector = Math.log(maxPowerOf2) / Math.LN2; + this.rangeShift = this.numTables * 16 - this.searchRange; +}; +var $df50e1efe10a1247$export$2e2bcd8739ae039 = $df50e1efe10a1247$var$Directory; + + + + +function $66a5b9fb5318558a$export$2e0ae67339d5f1ac(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while(min <= max){ + let mid = min + max >> 1; + let res = cmp(arr[mid]); + if (res < 0) max = mid - 1; + else if (res > 0) min = mid + 1; + else return mid; + } + return -1; +} +function $66a5b9fb5318558a$export$d02631cccf789723(index, end) { + let range = []; + while(index < end)range.push(index++); + return range; +} +const $66a5b9fb5318558a$export$3d28c1996ced1f14 = new TextDecoder('ascii'); +// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license. +const $66a5b9fb5318558a$var$CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const $66a5b9fb5318558a$var$LOOKUP = new Uint8Array(256); +for(let i = 0; i < $66a5b9fb5318558a$var$CHARS.length; i++)$66a5b9fb5318558a$var$LOOKUP[$66a5b9fb5318558a$var$CHARS.charCodeAt(i)] = i; +function $66a5b9fb5318558a$export$94fdf11bafc8de6b(base64) { + let bufferLength = base64.length * 0.75; + if (base64[base64.length - 1] === '=') { + bufferLength--; + if (base64[base64.length - 2] === '=') bufferLength--; + } + let bytes = new Uint8Array(bufferLength); + let p = 0; + for(let i = 0, len = base64.length; i < len; i += 4){ + let encoded1 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i)]; + let encoded2 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 1)]; + let encoded3 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 2)]; + let encoded4 = $66a5b9fb5318558a$var$LOOKUP[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4; + bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; + bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return bytes; +} + + + + +class $0d6e160064c86e50$export$2e2bcd8739ae039 { + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs)for (let cmap of cmapTable.tables){ + if (cmap.platformID === platformID && cmap.encodingID === encodingID) return cmap.table; + } + return null; + } + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) codepoint = this.encoding.get(codepoint) || codepoint; + else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) return gid; + } + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return cmap.codeMap.get(codepoint) || 0; + case 4: + { + let min = 0; + let max = cmap.segCount - 1; + while(min <= max){ + let mid = min + max >> 1; + if (codepoint < cmap.startCode.get(mid)) max = mid - 1; + else if (codepoint > cmap.endCode.get(mid)) min = mid + 1; + else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + if (rangeOffset === 0) gid = codepoint + cmap.idDelta.get(mid); + else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) gid += cmap.idDelta.get(mid); + } + return gid & 0xffff; + } + } + return 0; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + case 12: + case 13: + { + let min = 0; + let max = cmap.nGroups - 1; + while(min <= max){ + let mid = min + max >> 1; + let group = cmap.groups.get(mid); + if (codepoint < group.startCharCode) max = mid - 1; + else if (codepoint > group.endCharCode) min = mid + 1; + else { + if (cmap.version === 12) return group.glyphID + (codepoint - group.startCharCode); + else return group.glyphID; + } + } + return 0; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) return 0; + let selectors = this.uvs.varSelectors.toArray(); + let i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(selectors, (x)=>variationSelector - x.varSelector); + let sel = selectors[i]; + if (i !== -1 && sel.defaultUVS) i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(sel.defaultUVS, (x)=>codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? 1 : 0); + if (i !== -1 && sel.nonDefaultUVS) { + i = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(sel.nonDefaultUVS, (x)=>codepoint - x.unicodeValue); + if (i !== -1) return sel.nonDefaultUVS[i].glyphID; + } + return 0; + } + getCharacterSet() { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return (0, $66a5b9fb5318558a$export$d02631cccf789723)(0, cmap.codeMap.length); + case 4: + { + let res = []; + let endCodes = cmap.endCode.toArray(); + for(let i = 0; i < endCodes.length; i++){ + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(start, tail)); + } + return res; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return (0, $66a5b9fb5318558a$export$d02631cccf789723)(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + case 12: + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + { + let res = []; + for(let i = 0; i < 256; i++)if (cmap.codeMap.get(i) === gid) res.push(i); + return res; + } + case 4: + { + let res = []; + for(let i = 0; i < cmap.segCount; i++){ + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + for(var c = start; c <= end; c++){ + let g = 0; + if (rangeOffset === 0) g = c + delta; + else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) g += delta; + } + if (g === gid) res.push(c); + } + } + return res; + } + case 12: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) res.push(group.startCharCode + (gid - group.glyphID)); + return res; + } + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid === group.glyphID) res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + constructor(cmapTable){ + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [ + 3, + 10 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + // 16-bit subtables + [ + 3, + 1 + ], + [ + 0, + 3 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ]); + // If not unicode cmap was found, take the first table with a supported encoding. + if (!this.cmap) for (let cmap of cmapTable.tables){ + let encoding = (0, $e2613b812f052cbe$export$badc544e0651b6b1)(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + let mapping = (0, $e2613b812f052cbe$export$1dceb3c14ed68bee)(encoding); + if (mapping) { + this.cmap = cmap.table; + this.encoding = mapping; + } + } + if (!this.cmap) throw new Error("Could not find a supported cmap table"); + this.uvs = this.findSubtable(cmapTable, [ + [ + 0, + 5 + ] + ]); + if (this.uvs && this.uvs.version !== 14) this.uvs = null; + } +} +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0d6e160064c86e50$export$2e2bcd8739ae039.prototype, "getCharacterSet", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0d6e160064c86e50$export$2e2bcd8739ae039.prototype, "codePointsForGlyph", null); + + + +class $4646d52c2a559cdb$export$2e2bcd8739ae039 { + process(glyphs, positions) { + for(let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++){ + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + getKerning(left, right) { + let res = 0; + for (let table of this.kern.tables){ + if (table.coverage.crossStream) continue; + switch(table.version){ + case 0: + if (!table.coverage.horizontal) continue; + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) continue; + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + let val = 0; + let s = table.subtable; + switch(table.format){ + case 0: + let pairIdx = (0, $66a5b9fb5318558a$export$2e0ae67339d5f1ac)(s.pairs, function(pair) { + return left - pair.left || right - pair.right; + }); + if (pairIdx >= 0) val = s.pairs[pairIdx].value; + break; + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + else leftOffset = s.array.off; + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) return 0; + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) res = val; + else res += val; + } + return res; + } + constructor(font){ + this.kern = font.kern; + } +} + + + +class $a57a26817cd35108$export$2e2bcd8739ae039 { + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for(let index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.isMark) clusterEnd = index; + else { + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + clusterStart = clusterEnd = index; + } + } + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + return positions; + } + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) // LTR. TODO: RTL support. + baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length; + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + // position each of the mark glyphs relative to the base glyph + for(let index = clusterStart + 1; index <= clusterEnd; index++){ + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + // x positioning + switch(combiningClass){ + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + default: + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + // y positioning + switch(combiningClass){ + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') baseBox.minY += yGap; + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') baseBox.maxY += yGap; + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + return; + } + getCombiningClass(codePoint) { + let combiningClass = (0, $elh9A$unicodeproperties.getCombiningClass)(codePoint); + // Thai / Lao need some per-character work + if ((codePoint & -256) === 0x0e00) { + if (combiningClass === 'Not_Reordered') switch(codePoint){ + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + case 0x0ebc: + return 'Below'; + } + else if (codePoint === 0x0e3a) return 'Below_Right'; + } + switch(combiningClass){ + // Hebrew + case 'CCC10': + case 'CCC11': + case 'CCC12': + case 'CCC13': + case 'CCC14': + case 'CCC15': + case 'CCC16': + case 'CCC17': + case 'CCC18': + case 'CCC20': + case 'CCC22': + return 'Below'; + case 'CCC23': + return 'Attached_Above'; + case 'CCC24': + return 'Above_Right'; + case 'CCC25': + case 'CCC19': + return 'Above_Left'; + case 'CCC26': + return 'Above'; + case 'CCC21': + break; + // Arabic and Syriac + case 'CCC27': + case 'CCC28': + case 'CCC30': + case 'CCC31': + case 'CCC33': + case 'CCC34': + case 'CCC35': + case 'CCC36': + return 'Above'; + case 'CCC29': + case 'CCC32': + return 'Below'; + // Thai + case 'CCC103': + return 'Below_Right'; + case 'CCC107': + return 'Above_Right'; + // Lao + case 'CCC118': + return 'Below'; + case 'CCC122': + return 'Above'; + // Tibetan + case 'CCC129': + case 'CCC132': + return 'Below'; + case 'CCC130': + return 'Above'; + } + return combiningClass; + } + constructor(font){ + this.font = font; + } +} + + +/** + * Represents a glyph bounding box + */ class $0e2da1c4ce69e8ad$export$2e2bcd8739ae039 { + /** + * The width of the bounding box + * @type {number} + */ get width() { + return this.maxX - this.minX; + } + /** + * The height of the bounding box + * @type {number} + */ get height() { + return this.maxY - this.minY; + } + addPoint(x, y) { + if (Math.abs(x) !== Infinity) { + if (x < this.minX) this.minX = x; + if (x > this.maxX) this.maxX = x; + } + if (Math.abs(y) !== Infinity) { + if (y < this.minY) this.minY = y; + if (y > this.maxY) this.maxY = y; + } + } + copy() { + return new $0e2da1c4ce69e8ad$export$2e2bcd8739ae039(this.minX, this.minY, this.maxX, this.maxY); + } + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity){ + /** + * The minimum X position in the bounding box + * @type {number} + */ this.minX = minX; + /** + * The minimum Y position in the bounding box + * @type {number} + */ this.minY = minY; + /** + * The maxmimum X position in the bounding box + * @type {number} + */ this.maxX = maxX; + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ this.maxY = maxY; + } +} + + + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const $e38a1a895f6aeb54$var$UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: [ + 'bng2', + 'beng' + ], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: [ + 'dev2', + 'deva' + ], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: [ + 'gjr2', + 'gujr' + ], + Gurmukhi: [ + 'gur2', + 'guru' + ], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: [ + 'knd2', + 'knda' + ], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: [ + 'mlm2', + 'mlym' + ], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: [ + 'mym2', + 'mymr' + ], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: [ + 'ory2', + 'orya' + ], + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: [ + 'tml2', + 'taml' + ], + Tai_Viet: 'tavt', + Telugu: [ + 'tel2', + 'telu' + ], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; +const $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS = {}; +for(let script in $e38a1a895f6aeb54$var$UNICODE_SCRIPTS){ + let tag = $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + if (Array.isArray(tag)) for (let t of tag)$e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[t] = script; + else $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[tag] = script; +} +function $e38a1a895f6aeb54$export$b32f0b5f69d65e51(script) { + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; +} +function $e38a1a895f6aeb54$export$ce50e82f12a827a4(tag) { + return $e38a1a895f6aeb54$var$OPENTYPE_SCRIPTS[tag]; +} +function $e38a1a895f6aeb54$export$e5cb25e204fb8450(string) { + let len = string.length; + let idx = 0; + while(idx < len){ + let code = string.charCodeAt(idx++); + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + let script = (0, $elh9A$unicodeproperties.getScript)(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + } + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS.Unknown; +} +function $e38a1a895f6aeb54$export$16fab0757cfc223d(codePoints) { + for(let i = 0; i < codePoints.length; i++){ + let codePoint = codePoints[i]; + let script = (0, $elh9A$unicodeproperties.getScript)(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS[script]; + } + return $e38a1a895f6aeb54$var$UNICODE_SCRIPTS.Unknown; +} +// The scripts in this map are written from right to left +const $e38a1a895f6aeb54$var$RTL = { + arab: true, + hebr: true, + syrc: true, + thaa: true, + cprt: true, + khar: true, + phnx: true, + 'nko ': true, + lydi: true, + avst: true, + armi: true, + phli: true, + prti: true, + sarb: true, + orkh: true, + samr: true, + mand: true, + merc: true, + mero: true, + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, + mend: true, + nbat: true, + narb: true, + palm: true, + phlp: true // Psalter Pahlavi +}; +function $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script) { + if ($e38a1a895f6aeb54$var$RTL[script]) return 'rtl'; + return 'ltr'; +} + + +class $b19c79ec7a94fa39$export$2e2bcd8739ae039 { + /** + * The total advance width of the run. + * @type {number} + */ get advanceWidth() { + let width = 0; + for (let position of this.positions)width += position.xAdvance; + return width; + } + /** + * The total advance height of the run. + * @type {number} + */ get advanceHeight() { + let height = 0; + for (let position of this.positions)height += position.yAdvance; + return height; + } + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ get bbox() { + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + let x = 0; + let y = 0; + for(let index = 0; index < this.glyphs.length; index++){ + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + x += p.xAdvance; + y += p.yAdvance; + } + return bbox; + } + constructor(glyphs, features, script, language, direction){ + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ this.glyphs = glyphs; + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ this.positions = null; + /** + * The script that was requested for shaping. This was either passed in or detected automatically. + * @type {string} + */ this.script = script; + /** + * The language requested for shaping, as passed in. If `null`, the default language for the + * script was used. + * @type {string} + */ this.language = language || null; + /** + * The direction requested for shaping, as passed in (either ltr or rtl). + * If `null`, the default direction of the script is used. + * @type {string} + */ this.direction = direction || $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script); + /** + * The features requested during shaping. This is a combination of user + * specified features and features chosen by the shaper. + * @type {object} + */ this.features = {}; + // Convert features to an object + if (Array.isArray(features)) for (let tag of features)this.features[tag] = true; + else if (typeof features === 'object') this.features = features; + } +} + + +/** + * Represents positioning information for a glyph in a GlyphRun. + */ class $9195cf1266c12ea5$export$2e2bcd8739ae039 { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0){ + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ this.xAdvance = xAdvance; + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ this.yAdvance = yAdvance; + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ this.xOffset = xOffset; + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ this.yOffset = yOffset; + } +} + + + +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const $2b7f887ebcb5888a$var$features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; +const $2b7f887ebcb5888a$var$feature = (name, selector)=>[ + $2b7f887ebcb5888a$var$features[name].code, + $2b7f887ebcb5888a$var$features[name][selector] + ]; +const $2b7f887ebcb5888a$var$OTMapping = { + rlig: $2b7f887ebcb5888a$var$feature('ligatures', 'requiredLigatures'), + clig: $2b7f887ebcb5888a$var$feature('ligatures', 'contextualLigatures'), + dlig: $2b7f887ebcb5888a$var$feature('ligatures', 'rareLigatures'), + hlig: $2b7f887ebcb5888a$var$feature('ligatures', 'historicalLigatures'), + liga: $2b7f887ebcb5888a$var$feature('ligatures', 'commonLigatures'), + hist: $2b7f887ebcb5888a$var$feature('ligatures', 'historicalLigatures'), + smcp: $2b7f887ebcb5888a$var$feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: $2b7f887ebcb5888a$var$feature('lowerCase', 'lowerCasePetiteCaps'), + frac: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + dnom: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + numr: $2b7f887ebcb5888a$var$feature('fractions', 'diagonalFractions'), + afrc: $2b7f887ebcb5888a$var$feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + case: $2b7f887ebcb5888a$var$feature('caseSensitiveLayout', 'caseSensitiveLayout'), + ccmp: $2b7f887ebcb5888a$var$feature('unicodeDecomposition', 'canonicalComposition'), + cpct: $2b7f887ebcb5888a$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + valt: $2b7f887ebcb5888a$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'swashAlternates'), + cswh: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'contextualSwashAlternates'), + curs: $2b7f887ebcb5888a$var$feature('cursiveConnection', 'cursive'), + c2pc: $2b7f887ebcb5888a$var$feature('upperCase', 'upperCasePetiteCaps'), + c2sc: $2b7f887ebcb5888a$var$feature('upperCase', 'upperCaseSmallCaps'), + init: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordInitialSwashes'), + fin2: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + medi: $2b7f887ebcb5888a$var$feature('smartSwash', 'nonFinalSwashes'), + med2: $2b7f887ebcb5888a$var$feature('smartSwash', 'nonFinalSwashes'), + fin3: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + fina: $2b7f887ebcb5888a$var$feature('smartSwash', 'wordFinalSwashes'), + pkna: $2b7f887ebcb5888a$var$feature('kanaSpacing', 'proportionalKana'), + half: $2b7f887ebcb5888a$var$feature('textSpacing', 'halfWidthText'), + halt: $2b7f887ebcb5888a$var$feature('textSpacing', 'altHalfWidthText'), + hkna: $2b7f887ebcb5888a$var$feature('alternateKana', 'alternateHorizKana'), + vkna: $2b7f887ebcb5888a$var$feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + ital: $2b7f887ebcb5888a$var$feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: $2b7f887ebcb5888a$var$feature('numberCase', 'upperCaseNumbers'), + onum: $2b7f887ebcb5888a$var$feature('numberCase', 'lowerCaseNumbers'), + mgrk: $2b7f887ebcb5888a$var$feature('mathematicalExtras', 'mathematicalGreek'), + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + calt: $2b7f887ebcb5888a$var$feature('contextualAlternates', 'contextualAlternates'), + vrt2: $2b7f887ebcb5888a$var$feature('verticalSubstitution', 'substituteVerticalForms'), + vert: $2b7f887ebcb5888a$var$feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: $2b7f887ebcb5888a$var$feature('numberSpacing', 'monospacedNumbers'), + pnum: $2b7f887ebcb5888a$var$feature('numberSpacing', 'proportionalNumbers'), + sups: $2b7f887ebcb5888a$var$feature('verticalPosition', 'superiors'), + subs: $2b7f887ebcb5888a$var$feature('verticalPosition', 'inferiors'), + ordn: $2b7f887ebcb5888a$var$feature('verticalPosition', 'ordinals'), + pwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'proportionalText'), + hwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'halfWidthText'), + qwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'quarterWidthText'), + twid: $2b7f887ebcb5888a$var$feature('textSpacing', 'thirdWidthText'), + fwid: $2b7f887ebcb5888a$var$feature('textSpacing', 'proportionalText'), + palt: $2b7f887ebcb5888a$var$feature('textSpacing', 'altProportionalText'), + trad: $2b7f887ebcb5888a$var$feature('characterShape', 'traditionalCharacters'), + smpl: $2b7f887ebcb5888a$var$feature('characterShape', 'simplifiedCharacters'), + jp78: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1978Characters'), + jp83: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1983Characters'), + jp90: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS1990Characters'), + jp04: $2b7f887ebcb5888a$var$feature('characterShape', 'JIS2004Characters'), + expt: $2b7f887ebcb5888a$var$feature('characterShape', 'expertCharacters'), + hojo: $2b7f887ebcb5888a$var$feature('characterShape', 'hojoCharacters'), + nlck: $2b7f887ebcb5888a$var$feature('characterShape', 'NLCCharacters'), + tnam: $2b7f887ebcb5888a$var$feature('characterShape', 'traditionalNamesCharacters'), + ruby: $2b7f887ebcb5888a$var$feature('rubyKana', 'rubyKana'), + titl: $2b7f887ebcb5888a$var$feature('styleOptions', 'titlingCaps'), + zero: $2b7f887ebcb5888a$var$feature('typographicExtras', 'slashedZero'), + ss01: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: $2b7f887ebcb5888a$var$feature('stylisticAlternatives', 'stylisticAltTwenty') +}; +// salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose +// Add cv01-cv99 features +for(let i = 1; i <= 99; i++)$2b7f887ebcb5888a$var$OTMapping[`cv${`00${i}`.slice(-2)}`] = [ + $2b7f887ebcb5888a$var$features.characterAlternatives.code, + i +]; +// create inverse mapping +let $2b7f887ebcb5888a$var$AATMapping = {}; +for(let ot in $2b7f887ebcb5888a$var$OTMapping){ + let aat = $2b7f887ebcb5888a$var$OTMapping[ot]; + if ($2b7f887ebcb5888a$var$AATMapping[aat[0]] == null) $2b7f887ebcb5888a$var$AATMapping[aat[0]] = {}; + $2b7f887ebcb5888a$var$AATMapping[aat[0]][aat[1]] = ot; +} +function $2b7f887ebcb5888a$export$b813f7d2a1677c16(features) { + let res = {}; + for(let k in features){ + let r; + if (r = $2b7f887ebcb5888a$var$OTMapping[k]) { + if (res[r[0]] == null) res[r[0]] = {}; + res[r[0]][r[1]] = features[k]; + } + } + return res; +} +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function $2b7f887ebcb5888a$var$mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) var typeCode = $2b7f887ebcb5888a$var$features[type] && $2b7f887ebcb5888a$var$features[type].code; + else var typeCode = type; + if (isNaN(setting)) var settingCode = $2b7f887ebcb5888a$var$features[type] && $2b7f887ebcb5888a$var$features[type][setting]; + else var settingCode = setting; + return [ + typeCode, + settingCode + ]; +} +function $2b7f887ebcb5888a$export$bd6df347a4f391c4(features) { + let res = {}; + if (Array.isArray(features)) for(let k = 0; k < features.length; k++){ + let r; + let f = $2b7f887ebcb5888a$var$mapFeatureStrings(features[k]); + if (r = $2b7f887ebcb5888a$var$AATMapping[f[0]] && $2b7f887ebcb5888a$var$AATMapping[f[0]][f[1]]) res[r] = true; + } + else if (typeof features === 'object') for(let type in features){ + let feature = features[type]; + for(let setting in feature){ + let r; + let f = $2b7f887ebcb5888a$var$mapFeatureStrings([ + type, + setting + ]); + if (feature[setting] && (r = $2b7f887ebcb5888a$var$AATMapping[f[0]] && $2b7f887ebcb5888a$var$AATMapping[f[0]][f[1]])) res[r] = true; + } + } + return Object.keys(res); +} + + + + + + + +class $f3d63ae925545400$export$2e2bcd8739ae039 { + lookup(glyph) { + switch(this.table.version){ + case 0: + return this.table.values.getItem(glyph); + case 2: + case 4: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.firstGlyph === 0xffff) return null; + if (glyph < seg.firstGlyph) max = mid - 1; + else if (glyph > seg.lastGlyph) min = mid + 1; + else { + if (this.table.version === 2) return seg.value; + else return seg.values[glyph - seg.firstGlyph]; + } + } + return null; + } + case 6: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.glyph === 0xffff) return null; + if (glyph < seg.glyph) max = mid - 1; + else if (glyph > seg.glyph) min = mid + 1; + else return seg.value; + } + return null; + } + case 8: + return this.table.values[glyph - this.table.firstGlyph]; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + glyphsForValue(classValue) { + let res = []; + switch(this.table.version){ + case 2: + case 4: + for (let segment of this.table.segments)if (this.table.version === 2 && segment.value === classValue) res.push(...(0, $66a5b9fb5318558a$export$d02631cccf789723)(segment.firstGlyph, segment.lastGlyph + 1)); + else { + for(let index = 0; index < segment.values.length; index++)if (segment.values[index] === classValue) res.push(segment.firstGlyph + index); + } + break; + case 6: + for (let segment of this.table.segments)if (segment.value === classValue) res.push(segment.glyph); + break; + case 8: + for(let i = 0; i < this.table.values.length; i++)if (this.table.values[i] === classValue) res.push(this.table.firstGlyph + i); + break; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + return res; + } + constructor(table){ + this.table = table; + } +} +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $f3d63ae925545400$export$2e2bcd8739ae039.prototype, "glyphsForValue", null); + + +const $860c6347bb941b91$var$START_OF_TEXT_STATE = 0; +const $860c6347bb941b91$var$START_OF_LINE_STATE = 1; +const $860c6347bb941b91$var$END_OF_TEXT_CLASS = 0; +const $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS = 1; +const $860c6347bb941b91$var$DELETED_GLYPH_CLASS = 2; +const $860c6347bb941b91$var$END_OF_LINE_CLASS = 3; +const $860c6347bb941b91$var$DONT_ADVANCE = 0x4000; +class $860c6347bb941b91$export$2e2bcd8739ae039 { + process(glyphs, reverse, processEntry) { + let currentState = $860c6347bb941b91$var$START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + while(dir === 1 && index <= glyphs.length || dir === -1 && index >= -1){ + let glyph = null; + let classCode = $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + if (index === glyphs.length || index === -1) classCode = $860c6347bb941b91$var$END_OF_TEXT_CLASS; + else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) classCode = $860c6347bb941b91$var$DELETED_GLYPH_CLASS; + else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) classCode = $860c6347bb941b91$var$OUT_OF_BOUNDS_CLASS; + } + } + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + if (classCode !== $860c6347bb941b91$var$END_OF_TEXT_CLASS && classCode !== $860c6347bb941b91$var$DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & $860c6347bb941b91$var$DONT_ADVANCE); + } + currentState = entry.newState; + if (shouldAdvance) index += dir; + } + return glyphs; + } + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) return; + visited.add(state); + let { nClasses: nClasses, stateArray: stateArray, entryTable: entryTable } = this.stateTable; + let row = stateArray.getItem(state); + // Skip predefined classes + for(let classCode = 4; classCode < nClasses; classCode++){ + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)){ + if (opts.enter) opts.enter(glyph, entry); + if (entry.newState !== 0) this.traverse(opts, entry.newState, visited); + if (opts.exit) opts.exit(glyph, entry); + } + } + } + constructor(stateTable){ + this.stateTable = stateTable; + this.lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(stateTable.classTable); + } +} + + + + +// indic replacement flags +const $99be642f82069918$var$MARK_FIRST = 0x8000; +const $99be642f82069918$var$MARK_LAST = 0x2000; +const $99be642f82069918$var$VERB = 0x000F; +// contextual substitution and glyph insertion flag +const $99be642f82069918$var$SET_MARK = 0x8000; +// ligature entry flags +const $99be642f82069918$var$SET_COMPONENT = 0x8000; +const $99be642f82069918$var$PERFORM_ACTION = 0x2000; +// ligature action masks +const $99be642f82069918$var$LAST_MASK = 0x80000000; +const $99be642f82069918$var$STORE_MASK = 0x40000000; +const $99be642f82069918$var$OFFSET_MASK = 0x3FFFFFFF; +const $99be642f82069918$var$VERTICAL_ONLY = 0x800000; +const $99be642f82069918$var$REVERSE_DIRECTION = 0x400000; +const $99be642f82069918$var$HORIZONTAL_AND_VERTICAL = 0x200000; +// glyph insertion flags +const $99be642f82069918$var$CURRENT_IS_KASHIDA_LIKE = 0x2000; +const $99be642f82069918$var$MARKED_IS_KASHIDA_LIKE = 0x1000; +const $99be642f82069918$var$CURRENT_INSERT_BEFORE = 0x0800; +const $99be642f82069918$var$MARKED_INSERT_BEFORE = 0x0400; +const $99be642f82069918$var$CURRENT_INSERT_COUNT = 0x03E0; +const $99be642f82069918$var$MARKED_INSERT_COUNT = 0x001F; +class $99be642f82069918$export$2e2bcd8739ae039 { + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:boolean}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + // enable/disable the requested features + for (let feature of chain.features){ + let f; + if (f = features[feature.featureType]) { + if (f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } else if (f[feature.featureSetting] === false) { + flags |= ~feature.disableFlags; + flags &= ~feature.enableFlags; + } + } + } + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.processSubtable(subtable, glyphs); + } + // remove deleted glyphs + let index = glyphs.length - 1; + while(index >= 0){ + if (glyphs[index].id === 0xffff) glyphs.splice(index, 1); + index--; + } + return glyphs; + } + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let reverse = !!(this.subtable.coverage & $99be642f82069918$var$REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + getStateMachine(subtable) { + return new (0, $860c6347bb941b91$export$2e2bcd8739ae039)(subtable.table.stateTable); + } + getProcessor() { + switch(this.subtable.type){ + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + processIndicRearragement(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$MARK_FIRST) this.firstGlyph = index; + if (entry.flags & $99be642f82069918$var$MARK_LAST) this.lastGlyph = index; + $99be642f82069918$var$reorderGlyphs(this.glyphs, entry.flags & $99be642f82069918$var$VERB, this.firstGlyph, this.lastGlyph); + } + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.flags & $99be642f82069918$var$SET_MARK) this.markedGlyph = index; + } + processLigature(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$SET_COMPONENT) this.ligatureStack.push(index); + if (entry.flags & $99be642f82069918$var$PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + while(!last){ + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + let action = actions.getItem(actionIndex++); + last = !!(action & $99be642f82069918$var$LAST_MASK); + let store = !!(action & $99be642f82069918$var$STORE_MASK); + let offset = (action & $99be642f82069918$var$OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + let component = components.getItem(offset); + ligatureIndex += component; + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new (0, $f3d63ae925545400$export$2e2bcd8739ae039)(subtable.table.lookupTable); + for(index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while(count--){ + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + if (!isBefore) glyphIndex++; + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & $99be642f82069918$var$SET_MARK) this.markedIndex = index; + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & $99be642f82069918$var$MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $99be642f82069918$var$MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & $99be642f82069918$var$CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $99be642f82069918$var$CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains)for (let feature of chain.features)features.push([ + feature.featureType, + feature.featureSetting + ]); + return features; + } + generateInputs(gid) { + if (!this.inputCache) this.generateInputCache(); + return this.inputCache[gid] || []; + } + generateInputCache() { + this.inputCache = {}; + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.generateInputsForSubtable(subtable); + } + } + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) return; + let reverse = !!(subtable.coverage & $99be642f82069918$var$REVERSE_DIRECTION); + if (reverse) throw new Error('Reverse subtable, not supported.'); + this.subtable = subtable; + this.ligatureStack = []; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let input = []; + let stack = []; + this.glyphs = []; + stateMachine.traverse({ + enter: (glyph, entry)=>{ + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for(let i = 0; i < glyphs.length && count <= 1; i++)if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + if (count === 1) { + let result = input.map((g)=>g.id); + let cache = this.inputCache[found]; + if (cache) cache.push(result); + else this.inputCache[found] = [ + result + ]; + } + }, + exit: ()=>{ + ({ glyphs: this.glyphs, ligatureStack: this.ligatureStack } = stack.pop()); + input.pop(); + } + }); + } + constructor(font){ + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } +} +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $99be642f82069918$export$2e2bcd8739ae039.prototype, "getStateMachine", null); +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function $99be642f82069918$var$swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) end.reverse(); + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) start.reverse(); + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} +function $99be642f82069918$var$reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch(verb){ + case 0: + return glyphs; + case 1: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 0 + ]); + case 2: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 1 + ]); + case 3: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 1 + ]); + case 4: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ]); + case 5: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ], true, false); + case 6: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ]); + case 7: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ], false, true); + case 8: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ]); + case 9: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ], false, true); + case 10: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ]); + case 11: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ], true, false); + case 12: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ]); + case 13: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, false); + case 14: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], false, true); + case 15: + return $99be642f82069918$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, true); + default: + throw new Error(`Unknown verb: ${verb}`); + } +} + + +class $860fcbd64bc12fbc$export$2e2bcd8739ae039 { + substitute(glyphRun) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + if (glyphRun.direction === 'rtl') glyphRun.glyphs.reverse(); + this.morxProcessor.process(glyphRun.glyphs, $2b7f887ebcb5888a$export$b813f7d2a1677c16(glyphRun.features)); + } + getAvailableFeatures(script, language) { + return $2b7f887ebcb5888a$export$bd6df347a4f391c4(this.morxProcessor.getSupportedFeatures()); + } + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + for (let glyphs of glyphStrings)this._addStrings(glyphs, 0, result, ''); + return result; + } + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + for (let codePoint of codePoints){ + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) this._addStrings(glyphs, index + 1, strings, s); + else strings.add(s); + } + } + constructor(font){ + this.font = font; + this.morxProcessor = new (0, $99be642f82069918$export$2e2bcd8739ae039)(font); + this.fallbackPosition = false; + } +} + + + +class $d7e93cca3cf8ce8a$export$2e2bcd8739ae039 { + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ _addFeatures(features, global) { + let stageIndex = this.stages.length - 1; + let stage = this.stages[stageIndex]; + for (let feature of features)if (this.allFeatures[feature] == null) { + stage.push(feature); + this.allFeatures[feature] = stageIndex; + if (global) this.globalFeatures[feature] = true; + } + } + /** + * Add features to the last stage + */ add(arg, global = true) { + if (this.stages.length === 0) this.stages.push([]); + if (typeof arg === 'string') arg = [ + arg + ]; + if (Array.isArray(arg)) this._addFeatures(arg, global); + else if (typeof arg === 'object') { + this._addFeatures(arg.global || [], true); + this._addFeatures(arg.local || [], false); + } else throw new Error("Unsupported argument to ShapingPlan#add"); + } + /** + * Add a new stage + */ addStage(arg, global) { + if (typeof arg === 'function') this.stages.push(arg, []); + else { + this.stages.push([]); + this.add(arg, global); + } + } + setFeatureOverrides(features) { + if (Array.isArray(features)) this.add(features); + else if (typeof features === 'object') for(let tag in features){ + if (features[tag]) this.add(tag); + else if (this.allFeatures[tag] != null) { + let stage = this.stages[this.allFeatures[tag]]; + stage.splice(stage.indexOf(tag), 1); + delete this.allFeatures[tag]; + delete this.globalFeatures[tag]; + } + } + } + /** + * Assigns the global features to the given glyphs + */ assignGlobalFeatures(glyphs) { + for (let glyph of glyphs)for(let feature in this.globalFeatures)glyph.features[feature] = true; + } + /** + * Executes the planned stages using the given OTProcessor + */ process(processor, glyphs, positions) { + for (let stage of this.stages){ + if (typeof stage === 'function') { + if (!positions) stage(this.font, glyphs, this); + } else if (stage.length > 0) processor.applyFeatures(stage, glyphs, positions); + } + } + constructor(font, script, direction){ + this.font = font; + this.script = script; + this.direction = direction; + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } +} + + + + +const $d28fb665ee343afc$var$VARIATION_FEATURES = [ + 'rvrn' +]; +const $d28fb665ee343afc$var$COMMON_FEATURES = [ + 'ccmp', + 'locl', + 'rlig', + 'mark', + 'mkmk' +]; +const $d28fb665ee343afc$var$FRACTIONAL_FEATURES = [ + 'frac', + 'numr', + 'dnom' +]; +const $d28fb665ee343afc$var$HORIZONTAL_FEATURES = [ + 'calt', + 'clig', + 'liga', + 'rclt', + 'curs', + 'kern' +]; +const $d28fb665ee343afc$var$VERTICAL_FEATURES = [ + 'vert' +]; +const $d28fb665ee343afc$var$DIRECTIONAL_FEATURES = { + ltr: [ + 'ltra', + 'ltrm' + ], + rtl: [ + 'rtla', + 'rtlm' + ] +}; +class $d28fb665ee343afc$export$2e2bcd8739ae039 { + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + static planPreprocessing(plan) { + plan.add({ + global: [ + ...$d28fb665ee343afc$var$VARIATION_FEATURES, + ...$d28fb665ee343afc$var$DIRECTIONAL_FEATURES[plan.direction] + ], + local: $d28fb665ee343afc$var$FRACTIONAL_FEATURES + }); + } + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + static planPostprocessing(plan, userFeatures) { + plan.add([ + ...$d28fb665ee343afc$var$COMMON_FEATURES, + ...$d28fb665ee343afc$var$HORIZONTAL_FEATURES + ]); + plan.setFeatureOverrides(userFeatures); + } + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + for(let i = 0; i < glyphs.length; i++){ + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { + let start = i; + let end = i + 1; + // Apply numerator + while(start > 0 && (0, $elh9A$unicodeproperties.isDigit)(glyphs[start - 1].codePoints[0])){ + glyphs[start - 1].features.numr = true; + glyphs[start - 1].features.frac = true; + start--; + } + // Apply denominator + while(end < glyphs.length && (0, $elh9A$unicodeproperties.isDigit)(glyphs[end].codePoints[0])){ + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } + } + } +} +(0, $elh9A$swchelperscjs_define_propertycjs._)($d28fb665ee343afc$export$2e2bcd8739ae039, "zeroMarkWidths", 'AFTER_GPOS'); + + + + + + +const $17ba6019f27bfcf9$var$trie = new (0, ($parcel$interopDefault($elh9A$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==")); +const $17ba6019f27bfcf9$var$FEATURES = [ + 'isol', + 'fina', + 'fin2', + 'fin3', + 'medi', + 'med2', + 'init' +]; +const $17ba6019f27bfcf9$var$ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; +const $17ba6019f27bfcf9$var$ISOL = 'isol'; +const $17ba6019f27bfcf9$var$FINA = 'fina'; +const $17ba6019f27bfcf9$var$FIN2 = 'fin2'; +const $17ba6019f27bfcf9$var$FIN3 = 'fin3'; +const $17ba6019f27bfcf9$var$MEDI = 'medi'; +const $17ba6019f27bfcf9$var$MED2 = 'med2'; +const $17ba6019f27bfcf9$var$INIT = 'init'; +const $17ba6019f27bfcf9$var$NONE = null; +// Each entry is [prevAction, curAction, nextState] +const $17ba6019f27bfcf9$var$STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 2: prev was D/L in ISOL form, willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 1 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 3 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 4 + ], + [ + $17ba6019f27bfcf9$var$INIT, + $17ba6019f27bfcf9$var$FINA, + 6 + ] + ], + // State 3: prev was D in FINA form, willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 1 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 3 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 4 + ], + [ + $17ba6019f27bfcf9$var$MEDI, + $17ba6019f27bfcf9$var$FINA, + 6 + ] + ], + // State 4: prev was FINA ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$MED2, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$FIN2, + 5 + ], + [ + $17ba6019f27bfcf9$var$ISOL, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ], + // State 6: prev was DALATH/RISH, not willing to join. + [ + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$NONE, + 0 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 1 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 2 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$FIN3, + 5 + ], + [ + $17ba6019f27bfcf9$var$NONE, + $17ba6019f27bfcf9$var$ISOL, + 6 + ] + ] +]; +class $17ba6019f27bfcf9$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ccmp', + 'locl' + ]); + for(let i = 0; i < $17ba6019f27bfcf9$var$FEATURES.length; i++){ + let feature = $17ba6019f27bfcf9$var$FEATURES[i]; + plan.addStage(feature, false); + } + plan.addStage('mset'); + } + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + let prev = -1; + let state = 0; + let actions = []; + // Apply the state machine to map glyphs to features + for(let i = 0; i < glyphs.length; i++){ + let curAction, prevAction; + var glyph = glyphs[i]; + let type = $17ba6019f27bfcf9$var$getShapingClass(glyph.codePoints[0]); + if (type === $17ba6019f27bfcf9$var$ShapingClasses.Transparent) { + actions[i] = $17ba6019f27bfcf9$var$NONE; + continue; + } + [prevAction, curAction, state] = $17ba6019f27bfcf9$var$STATE_TABLE[state][type]; + if (prevAction !== $17ba6019f27bfcf9$var$NONE && prev !== -1) actions[prev] = prevAction; + actions[i] = curAction; + prev = i; + } + // Apply the chosen features to their respective glyphs + for(let index = 0; index < glyphs.length; index++){ + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) glyph.features[feature] = true; + } + } +} +function $17ba6019f27bfcf9$var$getShapingClass(codePoint) { + let res = $17ba6019f27bfcf9$var$trie.get(codePoint); + if (res) return res - 1; + let category = (0, $elh9A$unicodeproperties.getCategory)(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') return $17ba6019f27bfcf9$var$ShapingClasses.Transparent; + return $17ba6019f27bfcf9$var$ShapingClasses.Non_Joining; +} + + + + + +class $d6368085223f631e$export$2e2bcd8739ae039 { + reset(options = {}, index = 0) { + this.options = options; + this.flags = options.flags || {}; + this.markAttachmentType = options.markAttachmentType || 0; + this.index = index; + } + get cur() { + return this.glyphs[this.index] || null; + } + shouldIgnore(glyph) { + return this.flags.ignoreMarks && glyph.isMark || this.flags.ignoreBaseGlyphs && glyph.isBase || this.flags.ignoreLigatures && glyph.isLigature || this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType; + } + move(dir) { + this.index += dir; + while(0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index]))this.index += dir; + if (0 > this.index || this.index >= this.glyphs.length) return null; + return this.glyphs[this.index]; + } + next() { + return this.move(1); + } + prev() { + return this.move(-1); + } + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while(count--)this.move(dir); + return this.glyphs[this.index]; + } + constructor(glyphs, options){ + this.glyphs = glyphs; + this.reset(options); + } +} + + + +const $7b226e6bbeadedeb$var$DEFAULT_SCRIPTS = [ + 'DFLT', + 'dflt', + 'latn' +]; +class $7b226e6bbeadedeb$export$2e2bcd8739ae039 { + findScript(script) { + if (this.table.scriptList == null) return null; + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script)for (let entry of this.table.scriptList){ + if (entry.tag === s) return entry; + } + return null; + } + selectScript(script, language, direction) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (!entry) entry = this.findScript($7b226e6bbeadedeb$var$DEFAULT_SCRIPTS); + if (!entry) return this.scriptTag; + this.scriptTag = entry.tag; + this.script = entry.script; + this.language = null; + this.languageTag = null; + changed = true; + } + if (!direction || direction !== this.direction) this.direction = direction || $e38a1a895f6aeb54$export$9fddb9d0dd7d8a54(script); + if (language && language.length < 4) language += ' '.repeat(4 - language.length); + if (!language || language !== this.languageTag) { + this.language = null; + for (let lang of this.script.langSysRecords)if (lang.tag === language) { + this.language = lang.langSys; + this.languageTag = lang.tag; + break; + } + if (!this.language) { + this.language = this.script.defaultLangSys; + this.languageTag = null; + } + changed = true; + } + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) for (let featureIndex of this.language.featureIndexes){ + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + return this.scriptTag; + } + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures){ + let feature = this.features[tag]; + if (!feature) continue; + for (let lookupIndex of feature.lookupListIndexes){ + if (exclude && exclude.indexOf(lookupIndex) !== -1) continue; + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + lookups.sort((a, b)=>a.index - b.index); + return lookups; + } + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) return null; + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions){ + if (substitution.featureIndex === featureIndex) return substitution.alternateFeatureTable; + } + return null; + } + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) return -1; + let records = variations.featureVariationRecords; + for(let i = 0; i < records.length; i++){ + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) return i; + } + return -1; + } + variationConditionsMatch(conditions, coords) { + return conditions.every((condition)=>{ + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new (0, $d6368085223f631e$export$2e2bcd8739ae039)(glyphs); + for (let { feature: feature, lookup: lookup } of lookups){ + this.currentFeature = feature; + this.glyphIterator.reset(lookup.flags); + while(this.glyphIterator.index < glyphs.length){ + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + for (let table of lookup.subTables){ + let res = this.applyLookup(lookup.lookupType, table); + if (res) break; + } + this.glyphIterator.next(); + } + } + } + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + applyLookupList(lookupRecords) { + let options = this.glyphIterator.options; + let glyphIndex = this.glyphIterator.index; + for (let lookupRecord of lookupRecords){ + // Reset flags and find glyph index for this lookup record + this.glyphIterator.reset(options, glyphIndex); + this.glyphIterator.increment(lookupRecord.sequenceIndex); + // Get the lookup and setup flags for subtables + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); + // Apply lookup subtables until one matches + for (let table of lookup.subTables){ + if (this.applyLookup(lookup.lookupType, table)) break; + } + } + this.glyphIterator.reset(options, glyphIndex); + return true; + } + coverageIndex(coverage, glyph) { + if (glyph == null) glyph = this.glyphIterator.cur.id; + switch(coverage.version){ + case 1: + return coverage.glyphs.indexOf(glyph); + case 2: + for (let range of coverage.rangeRecords){ + if (range.start <= glyph && glyph <= range.end) return range.startCoverageIndex + glyph - range.start; + } + break; + } + return -1; + } + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + while(idx < sequence.length && glyph && fn(sequence[idx], glyph)){ + if (matched) matched.push(this.glyphIterator.index); + idx++; + glyph = this.glyphIterator.next(); + } + this.glyphIterator.index = pos; + if (idx < sequence.length) return false; + return matched || true; + } + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>component === glyph.id); + } + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>{ + // If the current feature doesn't apply to this glyph, + if (!(this.currentFeature in glyph.features)) return false; + return component === glyph.id; + }, []); + } + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph)=>this.coverageIndex(coverage, glyph.id) >= 0); + } + getClassID(glyph, classDef) { + switch(classDef.version){ + case 1: + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) return classDef.classValueArray[i]; + break; + case 2: + for (let range of classDef.classRangeRecord){ + if (range.start <= glyph && glyph <= range.end) return range.class; + } + break; + } + return 0; + } + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph)=>classID === this.getClassID(glyph.id, classDef)); + } + applyContext(table) { + let index, set; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + set = table.ruleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(1, rule.input)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) return false; + set = table.classSet[index]; + for (let rule of set){ + if (this.classSequenceMatches(1, rule.classes, table.classDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + applyChainingContext(table) { + let index; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let set = table.chainRuleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) return false; + for (let rule of rules){ + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, rule.input, table.inputClassDef) && this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + constructor(font, table){ + this.font = font; + this.table = table; + this.script = null; + this.scriptTag = null; + this.language = null; + this.languageTag = null; + this.features = {}; + this.lookups = {}; + // Setup variation substitutions + this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; + // initialize to default script + language + this.selectScript(); + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + this.currentFeature = null; + } +} + + +class $f22bb23c9fd478d8$export$2e2bcd8739ae039 { + get id() { + return this._id; + } + set id(id) { + this._id = id; + this.substituted = true; + let GDEF = this._font.GDEF; + if (GDEF && GDEF.glyphClassDef) { + // TODO: clean this up + let classID = (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.glyphClassDef); + this.isBase = classID === 1; + this.isLigature = classID === 2; + this.isMark = classID === 3; + this.markAttachmentType = GDEF.markAttachClassDef ? (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.markAttachClassDef) : 0; + } else { + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $elh9A$unicodeproperties.isMark)); + this.isBase = !this.isMark; + this.isLigature = this.codePoints.length > 1; + this.markAttachmentType = 0; + } + } + copy() { + return new $f22bb23c9fd478d8$export$2e2bcd8739ae039(this._font, this.id, this.codePoints, this.features); + } + constructor(font, id, codePoints = [], features){ + this._font = font; + this.codePoints = codePoints; + this.id = id; + this.features = {}; + if (Array.isArray(features)) for(let i = 0; i < features.length; i++){ + let feature = features[i]; + this.features[feature] = true; + } + else if (typeof features === 'object') Object.assign(this.features, features); + this.ligatureID = null; + this.ligatureComponent = null; + this.isLigated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + this.isMultiplied = false; + } +} + + +class $fa1d9fd80dd7279e$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ljmo', + 'vjmo', + 'tjmo' + ], false); + } + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while(i < glyphs.length){ + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = $fa1d9fd80dd7279e$var$getType(code); + [action, state] = $fa1d9fd80dd7279e$var$STATE_TABLE[state][type]; + switch(action){ + case $fa1d9fd80dd7279e$var$DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) i = $fa1d9fd80dd7279e$var$decompose(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = $fa1d9fd80dd7279e$var$compose(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + $fa1d9fd80dd7279e$var$reorderToneMark(glyphs, i, plan.font); + break; + case $fa1d9fd80dd7279e$var$INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = $fa1d9fd80dd7279e$var$insertDottedCircle(glyphs, i, plan.font); + break; + } + i++; + } + } +} +(0, $elh9A$swchelperscjs_define_propertycjs._)($fa1d9fd80dd7279e$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +const $fa1d9fd80dd7279e$var$HANGUL_BASE = 0xac00; +const $fa1d9fd80dd7279e$var$HANGUL_END = 0xd7a4; +const $fa1d9fd80dd7279e$var$HANGUL_COUNT = $fa1d9fd80dd7279e$var$HANGUL_END - $fa1d9fd80dd7279e$var$HANGUL_BASE + 1; +const $fa1d9fd80dd7279e$var$L_BASE = 0x1100; // lead +const $fa1d9fd80dd7279e$var$V_BASE = 0x1161; // vowel +const $fa1d9fd80dd7279e$var$T_BASE = 0x11a7; // trail +const $fa1d9fd80dd7279e$var$L_COUNT = 19; +const $fa1d9fd80dd7279e$var$V_COUNT = 21; +const $fa1d9fd80dd7279e$var$T_COUNT = 28; +const $fa1d9fd80dd7279e$var$L_END = $fa1d9fd80dd7279e$var$L_BASE + $fa1d9fd80dd7279e$var$L_COUNT - 1; +const $fa1d9fd80dd7279e$var$V_END = $fa1d9fd80dd7279e$var$V_BASE + $fa1d9fd80dd7279e$var$V_COUNT - 1; +const $fa1d9fd80dd7279e$var$T_END = $fa1d9fd80dd7279e$var$T_BASE + $fa1d9fd80dd7279e$var$T_COUNT - 1; +const $fa1d9fd80dd7279e$var$DOTTED_CIRCLE = 0x25cc; +const $fa1d9fd80dd7279e$var$isL = (code)=>0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const $fa1d9fd80dd7279e$var$isV = (code)=>0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const $fa1d9fd80dd7279e$var$isT = (code)=>0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const $fa1d9fd80dd7279e$var$isTone = (code)=>0x302e <= code && code <= 0x302f; +const $fa1d9fd80dd7279e$var$isLVT = (code)=>$fa1d9fd80dd7279e$var$HANGUL_BASE <= code && code <= $fa1d9fd80dd7279e$var$HANGUL_END; +const $fa1d9fd80dd7279e$var$isLV = (code)=>code - $fa1d9fd80dd7279e$var$HANGUL_BASE < $fa1d9fd80dd7279e$var$HANGUL_COUNT && (code - $fa1d9fd80dd7279e$var$HANGUL_BASE) % $fa1d9fd80dd7279e$var$T_COUNT === 0; +const $fa1d9fd80dd7279e$var$isCombiningL = (code)=>$fa1d9fd80dd7279e$var$L_BASE <= code && code <= $fa1d9fd80dd7279e$var$L_END; +const $fa1d9fd80dd7279e$var$isCombiningV = (code)=>$fa1d9fd80dd7279e$var$V_BASE <= code && code <= $fa1d9fd80dd7279e$var$V_END; +const $fa1d9fd80dd7279e$var$isCombiningT = (code)=>$fa1d9fd80dd7279e$var$T_BASE + 1 && 1 <= code && code <= $fa1d9fd80dd7279e$var$T_END; +// Character categories +const $fa1d9fd80dd7279e$var$X = 0; // Other character +const $fa1d9fd80dd7279e$var$L = 1; // Leading consonant +const $fa1d9fd80dd7279e$var$V = 2; // Medial vowel +const $fa1d9fd80dd7279e$var$T = 3; // Trailing consonant +const $fa1d9fd80dd7279e$var$LV = 4; // Composed syllable +const $fa1d9fd80dd7279e$var$LVT = 5; // Composed syllable +const $fa1d9fd80dd7279e$var$M = 6; // Tone mark +// This function classifies a character using the above categories. +function $fa1d9fd80dd7279e$var$getType(code) { + if ($fa1d9fd80dd7279e$var$isL(code)) return $fa1d9fd80dd7279e$var$L; + if ($fa1d9fd80dd7279e$var$isV(code)) return $fa1d9fd80dd7279e$var$V; + if ($fa1d9fd80dd7279e$var$isT(code)) return $fa1d9fd80dd7279e$var$T; + if ($fa1d9fd80dd7279e$var$isLV(code)) return $fa1d9fd80dd7279e$var$LV; + if ($fa1d9fd80dd7279e$var$isLVT(code)) return $fa1d9fd80dd7279e$var$LVT; + if ($fa1d9fd80dd7279e$var$isTone(code)) return $fa1d9fd80dd7279e$var$M; + return $fa1d9fd80dd7279e$var$X; +} +// State machine actions +const $fa1d9fd80dd7279e$var$NO_ACTION = 0; +const $fa1d9fd80dd7279e$var$DECOMPOSE = 1; +const $fa1d9fd80dd7279e$var$COMPOSE = 2; +const $fa1d9fd80dd7279e$var$TONE_MARK = 4; +const $fa1d9fd80dd7279e$var$INVALID = 5; +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const $fa1d9fd80dd7279e$var$STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$INVALID, + 0 + ] + ], + // State 1: + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$COMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$INVALID, + 0 + ] + ], + // State 2: or + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$COMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$TONE_MARK, + 0 + ] + ], + // State 3: or + [ + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 1 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$NO_ACTION, + 0 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 2 + ], + [ + $fa1d9fd80dd7279e$var$DECOMPOSE, + 3 + ], + [ + $fa1d9fd80dd7279e$var$TONE_MARK, + 0 + ] + ] +]; +function $fa1d9fd80dd7279e$var$getGlyph(font, code, features) { + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, font.glyphForCodePoint(code).id, [ + code + ], features); +} +function $fa1d9fd80dd7279e$var$decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let s = code - $fa1d9fd80dd7279e$var$HANGUL_BASE; + let t = $fa1d9fd80dd7279e$var$T_BASE + s % $fa1d9fd80dd7279e$var$T_COUNT; + s = s / $fa1d9fd80dd7279e$var$T_COUNT | 0; + let l = $fa1d9fd80dd7279e$var$L_BASE + s / $fa1d9fd80dd7279e$var$V_COUNT | 0; + let v = $fa1d9fd80dd7279e$var$V_BASE + s % $fa1d9fd80dd7279e$var$V_COUNT; + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== $fa1d9fd80dd7279e$var$T_BASE && !font.hasGlyphForCodePoint(t)) return i; + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = $fa1d9fd80dd7279e$var$getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + let vjmo = $fa1d9fd80dd7279e$var$getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + let insert = [ + ljmo, + vjmo + ]; + if (t > $fa1d9fd80dd7279e$var$T_BASE) { + let tjmo = $fa1d9fd80dd7279e$var$getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} +function $fa1d9fd80dd7279e$var$compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = $fa1d9fd80dd7279e$var$getType(code); + let prev = glyphs[i - 1].codePoints[0]; + let prevType = $fa1d9fd80dd7279e$var$getType(prev); + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === $fa1d9fd80dd7279e$var$LV && type === $fa1d9fd80dd7279e$var$T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === $fa1d9fd80dd7279e$var$V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + // Make sure L and V are combining characters + if ($fa1d9fd80dd7279e$var$isCombiningL(l) && $fa1d9fd80dd7279e$var$isCombiningV(v)) lv = $fa1d9fd80dd7279e$var$HANGUL_BASE + ((l - $fa1d9fd80dd7279e$var$L_BASE) * $fa1d9fd80dd7279e$var$V_COUNT + (v - $fa1d9fd80dd7279e$var$V_BASE)) * $fa1d9fd80dd7279e$var$T_COUNT; + } + let t = tjmo && tjmo.codePoints[0] || $fa1d9fd80dd7279e$var$T_BASE; + if (lv != null && (t === $fa1d9fd80dd7279e$var$T_BASE || $fa1d9fd80dd7279e$var$isCombiningT(t))) { + let s = lv + (t - $fa1d9fd80dd7279e$var$T_BASE); + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === $fa1d9fd80dd7279e$var$V ? 3 : 2; + glyphs.splice(i - del + 1, del, $fa1d9fd80dd7279e$var$getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) ljmo.features.ljmo = true; + if (vjmo) vjmo.features.vjmo = true; + if (tjmo) tjmo.features.tjmo = true; + if (prevType === $fa1d9fd80dd7279e$var$LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + $fa1d9fd80dd7279e$var$decompose(glyphs, i - 1, font); + return i + 1; + } + return i; +} +function $fa1d9fd80dd7279e$var$getLength(code) { + switch($fa1d9fd80dd7279e$var$getType(code)){ + case $fa1d9fd80dd7279e$var$LV: + case $fa1d9fd80dd7279e$var$LVT: + return 1; + case $fa1d9fd80dd7279e$var$V: + return 2; + case $fa1d9fd80dd7279e$var$T: + return 3; + } +} +function $fa1d9fd80dd7279e$var$reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) return; + let prev = glyphs[i - 1].codePoints[0]; + let len = $fa1d9fd80dd7279e$var$getLength(prev); + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} +function $fa1d9fd80dd7279e$var$insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + if (font.hasGlyphForCodePoint($fa1d9fd80dd7279e$var$DOTTED_CIRCLE)) { + let dottedCircle = $fa1d9fd80dd7279e$var$getGlyph(font, $fa1d9fd80dd7279e$var$DOTTED_CIRCLE, glyph.features); + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + return i; +} + + + + + + + + + +var $d22b56f2cf15e5ba$exports = {}; +$d22b56f2cf15e5ba$exports = JSON.parse("{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}"); + + +var $79781f8c452881c2$exports = {}; +$79781f8c452881c2$exports = JSON.parse("{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16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0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}"); + + +// Cateories used in the OpenType spec: +// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx +const $79e3b6f2c331d0bf$export$a513ea61a7bee91c = { + X: 1, + C: 2, + V: 4, + N: 8, + H: 16, + ZWNJ: 32, + ZWJ: 64, + M: 128, + SM: 256, + VD: 512, + A: 1024, + Placeholder: 2048, + Dotted_Circle: 4096, + RS: 8192, + Coeng: 16384, + Repha: 32768, + Ra: 65536, + CM: 131072, + Symbol: 262144 // Avagraha, etc that take marks (SM,A,VD). +}; +const $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0 = { + Start: 1, + Ra_To_Become_Reph: 2, + Pre_M: 4, + Pre_C: 8, + Base_C: 16, + After_Main: 32, + Above_C: 64, + Before_Sub: 128, + Below_C: 256, + After_Sub: 512, + Before_Post: 1024, + Post_C: 2048, + After_Post: 4096, + Final_C: 8192, + SMVD: 16384, + End: 32768 +}; +const $79e3b6f2c331d0bf$export$8519deaa7de2b07 = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.C | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Ra | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.CM | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.V | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Placeholder | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Dotted_Circle; +const $79e3b6f2c331d0bf$export$bbcd928767338e0d = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.ZWJ | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.ZWNJ; +const $79e3b6f2c331d0bf$export$ca9599b2a300afc = $79e3b6f2c331d0bf$export$a513ea61a7bee91c.H | $79e3b6f2c331d0bf$export$a513ea61a7bee91c.Coeng; +const $79e3b6f2c331d0bf$export$e99d119da76a0fc5 = { + Default: { + hasOldSpec: false, + virama: 0, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Devanagari: { + hasOldSpec: true, + virama: 0x094D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Bengali: { + hasOldSpec: true, + virama: 0x09CD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gurmukhi: { + hasOldSpec: true, + virama: 0x0A4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gujarati: { + hasOldSpec: true, + virama: 0x0ACD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Oriya: { + hasOldSpec: true, + virama: 0x0B4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Tamil: { + hasOldSpec: true, + virama: 0x0BCD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Telugu: { + hasOldSpec: true, + virama: 0x0C4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Explicit', + blwfMode: 'Post_Only' + }, + Kannada: { + hasOldSpec: true, + virama: 0x0CCD, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Post_Only' + }, + Malayalam: { + hasOldSpec: true, + virama: 0x0D4D, + basePos: 'Last', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Log_Repha', + blwfMode: 'Pre_And_Post' + }, + // Handled by UniversalShaper + // Sinhala: { + // hasOldSpec: false, + // virama: 0x0DCA, + // basePos: 'Last_Sinhala', + // rephPos: POSITIONS.After_Main, + // rephMode: 'Explicit', + // blwfMode: 'Pre_And_Post' + // }, + Khmer: { + hasOldSpec: false, + virama: 0x17D2, + basePos: 'First', + rephPos: $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0.Ra_To_Become_Reph, + rephMode: 'Vis_Repha', + blwfMode: 'Pre_And_Post' + } +}; +const $79e3b6f2c331d0bf$export$f647c9cfdd77d95a = { + // Khmer + 0x17BE: [ + 0x17C1, + 0x17BE + ], + 0x17BF: [ + 0x17C1, + 0x17BF + ], + 0x17C0: [ + 0x17C1, + 0x17C0 + ], + 0x17C4: [ + 0x17C1, + 0x17C4 + ], + 0x17C5: [ + 0x17C1, + 0x17C5 + ] +}; + + + +const { decompositions: $d203e6b9523d0071$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports))); +const $d203e6b9523d0071$var$trie = new (0, ($parcel$interopDefault($elh9A$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt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T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=")); +const $d203e6b9523d0071$var$stateMachine = new (0, ($parcel$interopDefault($elh9A$dfa)))((0, (/*@__PURE__*/$parcel$interopDefault($d22b56f2cf15e5ba$exports)))); +class $d203e6b9523d0071$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($d203e6b9523d0071$var$setupSyllables); + plan.addStage([ + 'locl', + 'ccmp' + ]); + plan.addStage($d203e6b9523d0071$var$initialReordering); + plan.addStage('nukt'); + plan.addStage('akhn'); + plan.addStage('rphf', false); + plan.addStage('rkrf'); + plan.addStage('pref', false); + plan.addStage('blwf', false); + plan.addStage('abvf', false); + plan.addStage('half', false); + plan.addStage('pstf', false); + plan.addStage('vatu'); + plan.addStage('cjct'); + plan.addStage('cfar', false); + plan.addStage($d203e6b9523d0071$var$finalReordering); + plan.addStage({ + local: [ + 'init' + ], + global: [ + 'pres', + 'abvs', + 'blws', + 'psts', + 'haln', + 'dist', + 'abvm', + 'blwm', + 'calt', + 'clig' + ] + }); + // Setup the indic config for the selected script + plan.unicodeScript = $e38a1a895f6aeb54$export$ce50e82f12a827a4(plan.script); + plan.indicConfig = (0, $79e3b6f2c331d0bf$export$e99d119da76a0fc5)[plan.unicodeScript] || (0, $79e3b6f2c331d0bf$export$e99d119da76a0fc5).Default; + plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; + // TODO: turn off kern (Khmer) and liga features. + } + static assignFeatures(plan, glyphs) { + // Decompose split matras + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + let d = (0, $79e3b6f2c331d0bf$export$f647c9cfdd77d95a)[codepoint] || $d203e6b9523d0071$var$decompositions[codepoint]; + if (d) { + let decomposed = d.map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $elh9A$swchelperscjs_define_propertycjs._)($d203e6b9523d0071$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +function $d203e6b9523d0071$var$indicCategory(glyph) { + return $d203e6b9523d0071$var$trie.get(glyph.codePoints[0]) >> 8; +} +function $d203e6b9523d0071$var$indicPosition(glyph) { + return 1 << ($d203e6b9523d0071$var$trie.get(glyph.codePoints[0]) & 0xff); +} +class $d203e6b9523d0071$var$IndicInfo { + constructor(category, position, syllableType, syllable){ + this.category = category; + this.position = position; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $d203e6b9523d0071$var$setupSyllables(font, glyphs) { + let syllable = 0; + let last = 0; + for (let [start, end, tags] of $d203e6b9523d0071$var$stateMachine.match(glyphs.map($d203e6b9523d0071$var$indicCategory))){ + if (start > last) { + ++syllable; + for(let i = last; i < start; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).X, (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo(1 << $d203e6b9523d0071$var$indicCategory(glyphs[i]), $d203e6b9523d0071$var$indicPosition(glyphs[i]), tags[0], syllable); + last = end + 1; + } + if (last < glyphs.length) { + ++syllable; + for(let i = last; i < glyphs.length; i++)glyphs[i].shaperInfo = new $d203e6b9523d0071$var$IndicInfo((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).X, (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } +} +function $d203e6b9523d0071$var$isConsonant(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$8519deaa7de2b07); +} +function $d203e6b9523d0071$var$isJoiner(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$bbcd928767338e0d); +} +function $d203e6b9523d0071$var$isHalantOrCoeng(glyph) { + return glyph.shaperInfo.category & (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc); +} +function $d203e6b9523d0071$var$wouldSubstitute(glyphs, feature) { + for (let glyph of glyphs)glyph.features = { + [feature]: true + }; + let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor; + GSUB.applyFeatures([ + feature + ], glyphs); + return glyphs.length === 1; +} +function $d203e6b9523d0071$var$consonantPosition(font, consonant, virama) { + let glyphs = [ + virama, + consonant, + virama + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'blwf') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'blwf')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C; + else if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'pstf') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'pstf')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C; + else if ($d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(0, 2), 'pref') || $d203e6b9523d0071$var$wouldSubstitute(glyphs.slice(1, 3), 'pref')) return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C; + return (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; +} +function $d203e6b9523d0071$var$initialReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + let virama = font.glyphForCodePoint(indicConfig.virama).id; + if (virama) { + let info = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, virama, [ + indicConfig.virama + ]); + for(let i = 0; i < glyphs.length; i++)if (glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) glyphs[i].shaperInfo.position = $d203e6b9523d0071$var$consonantPosition(font, glyphs[i].copy(), info); + } + for(let start = 0, end = $d203e6b9523d0071$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $d203e6b9523d0071$var$nextSyllable(glyphs, start)){ + let { category: category, syllableType: syllableType } = glyphs[start].shaperInfo; + if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') continue; + if (syllableType === 'broken_cluster' && dottedCircle) { + let g = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = new $d203e6b9523d0071$var$IndicInfo(1 << $d203e6b9523d0071$var$indicCategory(g), $d203e6b9523d0071$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable); + // Insert after possible Repha. + let i = start; + while(i < end && glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha)i++; + glyphs.splice(i++, 0, g); + end++; + } + // 1. Find base consonant: + // + // The shaping engine finds the base consonant of the syllable, using the + // following algorithm: starting from the end of the syllable, move backwards + // until a consonant is found that does not have a below-base or post-base + // form (post-base forms have to follow below-base forms), or that is not a + // pre-base reordering Ra, or arrive at the first consonant. The consonant + // stopped at will be the base. + let base = end; + let limit = start; + let hasReph = false; + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + if (indicConfig.rephPos !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === 'Implicit' && !$d203e6b9523d0071$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ)) { + // See if it matches the 'rphf' feature. + let g = [ + glyphs[start].copy(), + glyphs[start + 1].copy(), + glyphs[start + 2].copy() + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(g.slice(0, 2), 'rphf') || indicConfig.rephMode === 'Explicit' && $d203e6b9523d0071$var$wouldSubstitute(g, 'rphf')) { + limit += 2; + while(limit < end && $d203e6b9523d0071$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha) { + limit++; + while(limit < end && $d203e6b9523d0071$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + switch(indicConfig.basePos){ + case 'Last': + { + // starting from the end of the syllable, move backwards + let i = end; + let seenBelow = false; + do { + let info = glyphs[--i].shaperInfo; + // until a consonant is found + if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) { + // that does not have a below-base or post-base form + // (post-base forms have to follow below-base forms), + if (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C && (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C || seenBelow)) { + base = i; + break; + } + // or that is not a pre-base reordering Ra, + // + // IMPLEMENTATION NOTES: + // + // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped + // by the logic above already. + // + // or arrive at the first consonant. The consonant stopped at will + // be the base. + if (info.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C) seenBelow = true; + base = i; + } else if (start < i && info.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ && glyphs[i - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) break; + }while (i > limit); + break; + } + case 'First': + // The first consonant is always the base. + base = start; + // Mark all subsequent consonants as below. + for(let i = base + 1; i < end; i++)if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) glyphs[i].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C; + } + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + // + // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ) + if (hasReph && base === start && limit - base <= 2) hasReph = false; + // 2. Decompose and reorder Matras: + // + // Each matra and any syllable modifier sign in the cluster are moved to the + // appropriate position relative to the consonant(s) in the cluster. The + // shaping engine decomposes two- or three-part matras into their constituent + // parts before any repositioning. Matra characters are classified by which + // consonant in a conjunct they have affinity for and are reordered to the + // following positions: + // + // o Before first half form in the syllable + // o After subjoined consonants + // o After post-form consonant + // o After main consonant (for above marks) + // + // IMPLEMENTATION NOTES: + // + // The normalize() routine has already decomposed matras for us, so we don't + // need to worry about that. + // 3. Reorder marks to canonical order: + // + // Adjacent nukta and halant or nukta and vedic sign are always repositioned + // if necessary, so that the nukta is first. + // + // IMPLEMENTATION NOTES: + // + // We don't need to do this: the normalize() routine already did this for us. + // Reorder characters + for(let i = start; i < base; i++){ + let info = glyphs[i].shaperInfo; + info.position = Math.min((0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_C, info.position); + } + if (base < end) glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; + // Mark final consonants. A final consonant is one appearing after a matra, + // like in Khmer. + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + for(let j = i + 1; j < end; j++)if ($d203e6b9523d0071$var$isConsonant(glyphs[j])) { + glyphs[j].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Final_C; + break; + } + break; + } + // Handle beginning Ra + if (hasReph) glyphs[start].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; + // For old-style Indic script tags, move the first post-base Halant after + // last consonant. + // + // Reports suggest that in some scripts Uniscribe does this only if there + // is *not* a Halant after last consonant already (eg. Kannada), while it + // does it unconditionally in other scripts (eg. Malayalam). We don't + // currently know about other scripts, so we single out Malayalam for now. + // + // Kannada test case: + // U+0C9A,U+0CCD,U+0C9A,U+0CCD + // With some versions of Lohit Kannada. + // https://bugs.freedesktop.org/show_bug.cgi?id=59118 + // + // Malayalam test case: + // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + // With lohit-ttf-20121122/Lohit-Malayalam.ttf + if (plan.isOldSpec) { + let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam'; + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) { + let j; + for(j = end - 1; j > i; j--){ + if ($d203e6b9523d0071$var$isConsonant(glyphs[j]) || disallowDoubleHalants && glyphs[j].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H) break; + } + if (glyphs[j].shaperInfo.category !== (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && j > i) { + // Move Halant to after last consonant. + let t = glyphs[i]; + glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i)); + glyphs[j] = t; + } + break; + } + } + // Attach misc marks to previous char to move with them. + let lastPos = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Start; + for(let i = start; i < end; i++){ + let info = glyphs[i].shaperInfo; + if (info.category & ((0, $79e3b6f2c331d0bf$export$bbcd928767338e0d) | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).N | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).RS | (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).CM | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc) & info.category)) { + info.position = lastPos; + if (info.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && info.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + // Uniscribe doesn't move the Halant with Left Matra. + // TEST: U+092B,U+093F,U+094DE + // We follow. This is important for the Sinhala + // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + // where U+0DD9 is a left matra and U+0DCA is the virama. + // We don't want to move the virama with the left matra. + // TEST: U+0D9A,U+0DDA + for(let j = i; j > start; j--)if (glyphs[j - 1].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + info.position = glyphs[j - 1].shaperInfo.position; + break; + } + } + } else if (info.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD) lastPos = info.position; + } + // For post-base consonants let them own anything before them + // since the last consonant or matra. + let last = base; + for(let i = base + 1; i < end; i++){ + if ($d203e6b9523d0071$var$isConsonant(glyphs[i])) { + for(let j = last + 1; j < i; j++)if (glyphs[j].shaperInfo.position < (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD) glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position; + last = i; + } else if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) last = i; + } + let arr = glyphs.slice(start, end); + arr.sort((a, b)=>a.shaperInfo.position - b.shaperInfo.position); + glyphs.splice(start, arr.length, ...arr); + // Find base again + for(let i = start; i < end; i++)if (glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) { + base = i; + break; + } + // Setup features now + // Reph + for(let i = start; i < end && glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; i++)glyphs[i].features.rphf = true; + // Pre-base + let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post'; + for(let i = start; i < base; i++){ + glyphs[i].features.half = true; + if (blwf) glyphs[i].features.blwf = true; + } + // Post-base + for(let i = base + 1; i < end; i++){ + glyphs[i].features.abvf = true; + glyphs[i].features.pstf = true; + glyphs[i].features.blwf = true; + } + if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') { + // Old-spec eye-lash Ra needs special handling. From the + // spec: + // + // "The feature 'below-base form' is applied to consonants + // having below-base forms and following the base consonant. + // The exception is vattu, which may appear below half forms + // as well as below the base glyph. The feature 'below-base + // form' will be applied to all such occurrences of Ra as well." + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+0915 + // with Sanskrit 2003 font. + // + // However, note that Ra,Halant,ZWJ is the correct way to + // request eyelash form of Ra, so we wouldbn't inhibit it + // in that sequence. + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915 + for(let i = start; i + 1 < base; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Ra && glyphs[i + 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).H && (i + 1 === base || glyphs[i + 2].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ)) { + glyphs[i].features.blwf = true; + glyphs[i + 1].features.blwf = true; + } + } + let prefLen = 2; + if (features.pref && base + prefLen < end) // Find a Halant,Ra sequence and mark it for pre-base reordering processing. + for(let i = base + 1; i + prefLen - 1 < end; i++){ + let g = [ + glyphs[i].copy(), + glyphs[i + 1].copy() + ]; + if ($d203e6b9523d0071$var$wouldSubstitute(g, 'pref')) { + for(let j = 0; j < prefLen; j++)glyphs[i++].features.pref = true; + // Mark the subsequent stuff with 'cfar'. Used in Khmer. + // Read the feature spec. + // This allows distinguishing the following cases with MS Khmer fonts: + // U+1784,U+17D2,U+179A,U+17D2,U+1782 + // U+1784,U+17D2,U+1782,U+17D2,U+179A + if (features.cfar) for(; i < end; i++)glyphs[i].features.cfar = true; + break; + } + } + // Apply ZWJ/ZWNJ effects + for(let i = start + 1; i < end; i++)if ($d203e6b9523d0071$var$isJoiner(glyphs[i])) { + let nonJoiner = glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWNJ; + let j = i; + do { + j--; + // ZWJ/ZWNJ should disable CJCT. They do that by simply + // being there, since we don't skip them for the CJCT + // feature (ie. F_MANUAL_ZWJ) + // A ZWNJ disables HALF. + if (nonJoiner) delete glyphs[j].features.half; + }while (j > start && !$d203e6b9523d0071$var$isConsonant(glyphs[j])); + } + } +} +function $d203e6b9523d0071$var$finalReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + for(let start = 0, end = $d203e6b9523d0071$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $d203e6b9523d0071$var$nextSyllable(glyphs, start)){ + // 4. Final reordering: + // + // After the localized forms and basic shaping forms GSUB features have been + // applied (see below), the shaping engine performs some final glyph + // reordering before applying all the remaining font features to the entire + // cluster. + let tryPref = !!features.pref; + // Find base again + let base = start; + for(; base < end; base++)if (glyphs[base].shaperInfo.position >= (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) { + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) { + // Ok, this was a 'pref' candidate but didn't form any. + // Base is around here... + base = i; + while(base < end && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[base]))base++; + glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).BASE_C; + tryPref = false; + } + break; + } + } + // For Malayalam, skip over unformed below- (but NOT post-) forms. + if (plan.unicodeScript === 'Malayalam') for(let i = base + 1; i < end; i++){ + while(i < end && $d203e6b9523d0071$var$isJoiner(glyphs[i]))i++; + if (i === end || !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[i])) break; + i++; // Skip halant. + while(i < end && $d203e6b9523d0071$var$isJoiner(glyphs[i]))i++; + if (i < end && $d203e6b9523d0071$var$isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Below_C) { + base = i; + glyphs[base].shaperInfo.position = (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C; + } + } + if (start < base && glyphs[base].shaperInfo.position > (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Base_C) base--; + break; + } + if (base === end && start < base && glyphs[base - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).ZWJ) base--; + if (base < end) while(start < base && glyphs[base].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).N | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc)))base--; + // o Reorder matras: + // + // If a pre-base matra character had been reordered before applying basic + // features, the glyph can be moved closer to the main consonant based on + // whether half-forms had been formed. Actual position for the matra is + // defined as “after last standalone halant glyph, after initial matra + // position and before the main consonant”. If ZWJ or ZWNJ follow this + // halant, position is moved after it. + // + if (start + 1 < end && start < base) { + // If we lost track of base, alas, position before last thingy. + let newPos = base === end ? base - 2 : base - 1; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc))))newPos--; + // If we found no Halant we are done. + // Otherwise only proceed if the Halant does + // not belong to the Matra itself! + if ($d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) // If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos + 1 < end && $d203e6b9523d0071$var$isJoiner(glyphs[newPos + 1])) newPos++; + } else newPos = start; // No move. + } + if (start < newPos && glyphs[newPos].shaperInfo.position !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + // Now go see if there's actually any matras... + for(let i = newPos; i > start; i--)if (glyphs[i - 1].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M) { + let oldPos = i - 1; + if (oldPos < base && base <= newPos) base--; + let tmp = glyphs[oldPos]; + glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos)); + glyphs[newPos] = tmp; + newPos--; + } + } + } + // o Reorder reph: + // + // Reph’s original position is always at the beginning of the syllable, + // (i.e. it is not reordered at the character reordering stage). However, + // it will be reordered according to the basic-forms shaping results. + // Possible positions for reph, depending on the script, are; after main, + // before post-base consonant forms, and after post-base consonant forms. + // Two cases: + // + // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then + // we should only move it if the sequence ligated to the repha form. + // + // - If repha is encoded separately and in the logical position, we should only + // move it if it did NOT ligate. If it ligated, it's probably the font trying + // to make it work without the reordering. + if (start + 1 < end && glyphs[start].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && glyphs[start].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).Repha !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)) { + let newRephPos; + let rephPos = indicConfig.rephPos; + let found = false; + // 1. If reph should be positioned after post-base consonant forms, + // proceed to step 5. + if (rephPos !== (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Post) { + // 2. If the reph repositioning class is not after post-base: target + // position is after the first explicit halant glyph between the + // first post-reph consonant and last main consonant. If ZWJ or ZWNJ + // are following this halant, position is moved after it. If such + // position is found, this is the target position. Otherwise, + // proceed to the next step. + // + // Note: in old-implementation fonts, where classifications were + // fixed in shaping engine, there was no case where reph position + // will be found on this step. + newRephPos = start + 1; + while(newRephPos < base && !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $d203e6b9523d0071$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + // 3. If reph should be repositioned after the main consonant: find the + // first consonant not ligated with main, or find the first + // consonant that is not a potential pre-base reordering Ra. + if (!found && rephPos === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Main) { + newRephPos = base; + while(newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Main)newRephPos++; + found = newRephPos < end; + } + // 4. If reph should be positioned before post-base consonant, find + // first post-base classified consonant not ligated with main. If no + // consonant is found, the target position should be before the + // first matra, syllable modifier sign or vedic sign. + // + // This is our take on what step 4 is trying to say (and failing, BADLY). + if (!found && rephPos === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Sub) { + newRephPos = base; + while(newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & ((0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Post_C | (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).After_Post | (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD)))newRephPos++; + found = newRephPos < end; + } + } + // 5. If no consonant is found in steps 3 or 4, move reph to a position + // immediately before the first post-base matra, syllable modifier + // sign or vedic sign that has a reordering class after the intended + // reph position. For example, if the reordering position for reph + // is post-main, it will skip above-base matras that also have a + // post-main position. + if (!found) { + // Copied from step 2. + newRephPos = start + 1; + while(newRephPos < base && !$d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $d203e6b9523d0071$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + } + // 6. Otherwise, reorder reph to the end of the syllable. + if (!found) { + newRephPos = end - 1; + while(newRephPos > start && glyphs[newRephPos].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).SMVD)newRephPos--; + // If the Reph is to be ending up after a Matra,Halant sequence, + // position it before that Halant so it can interact with the Matra. + // However, if it's a plain Consonant,Halant we shouldn't do that. + // Uniscribe doesn't do this. + // TEST: U+0930,U+094D,U+0915,U+094B,U+094D + if ($d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newRephPos])) { + for(let i = base + 1; i < newRephPos; i++)if (glyphs[i].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) newRephPos--; + } + } + let reph = glyphs[start]; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start)); + glyphs[newRephPos] = reph; + if (start < base && base <= newRephPos) base--; + } + // o Reorder pre-base reordering consonants: + // + // If a pre-base reordering consonant is found, reorder it according to + // the following rules: + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + // 1. Only reorder a glyph produced by substitution during application + // of the feature. (Note that a font may shape a Ra consonant with + // the feature generally but block it in certain contexts.) + // Note: We just check that something got substituted. We don't check that + // the feature actually did it... + // + // Reorder pref only if it ligated. + if (glyphs[i].isLigated && !glyphs[i].isMultiplied) { + // 2. Try to find a target position the same way as for pre-base matra. + // If it is found, reorder pre-base consonant glyph. + // + // 3. If position is not found, reorder immediately before main + // consonant. + let newPos = base; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos - 1].shaperInfo.category & ((0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M | (0, $79e3b6f2c331d0bf$export$ca9599b2a300afc))))newPos--; + // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a + // split matra, it should be reordered to *before* the left part of such matra. + if (newPos > start && glyphs[newPos - 1].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + let oldPos = i; + for(let j = base + 1; j < oldPos; j++)if (glyphs[j].shaperInfo.category === (0, $79e3b6f2c331d0bf$export$a513ea61a7bee91c).M) { + newPos--; + break; + } + } + } + if (newPos > start && $d203e6b9523d0071$var$isHalantOrCoeng(glyphs[newPos - 1])) // -> If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos < end && $d203e6b9523d0071$var$isJoiner(glyphs[newPos])) newPos++; + } + let oldPos = i; + let tmp = glyphs[oldPos]; + glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos)); + glyphs[newPos] = tmp; + if (newPos <= base && base < oldPos) base++; + } + break; + } + } + // Apply 'init' to the Left Matra if it's a word start. + if (glyphs[start].shaperInfo.position === (0, $79e3b6f2c331d0bf$export$1a1f61c9c4dd9df0).Pre_M && (!start || !/Cf|Mn/.test((0, $elh9A$unicodeproperties.getCategory)(glyphs[start - 1].codePoints[0])))) glyphs[start].features.init = true; + } +} +function $d203e6b9523d0071$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + + + + + + + + + +const { categories: $9b772791ccede8a5$var$categories, decompositions: $9b772791ccede8a5$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports))); +const $9b772791ccede8a5$var$trie = new (0, ($parcel$interopDefault($elh9A$unicodetrie)))((0, $66a5b9fb5318558a$export$94fdf11bafc8de6b)("AAACAAAAAAAQugAAAQUO+vHtnHuMX0UVx2d3u/t7bXe7FlqgvB+mpQhFmhikMRAg0ZQmakMU+cPWBzZisEGNjUpoiIYCEgmGUGOEGqOVNPUZUGNA+QNIBU2KREEFFSMBUYRISMXE+B3vnPzOzp553tcWfif5ZO5jnufMzJ2ZO/eumlDqFLAWnAMuBBvBZnC5uXZeBe4WsA1sBzs8/naCXcL1G8GtYDfYA74NvgfuAfcZHmT+fwEeBb8DTwvxPQWeAavACyZvq8z9VYxXwCGglijVBcvACnA8eCM4E6wHG8BF4BLwbvA+8AHwUbAd7AA7wS5wC9gN7gR7wX5wN7gXPAAeBr8Gvwd/Ac+CF8EhoCaV6oBZsBKcAE4FZ0wWeV8P9zxwoTnfCHczuBxsAdvAx8Gnzf1r4X4B3AxuA1+bHJb9m5PzdVGW/Yjv+xXHyfmxFfd9OH8Q/Ar8Bjw1WZT3GfACeAX8N5CfqSmlZsAKsGqqCH8K3DXgbHCuuXYB3HeAd4HLpgrdarbi+EPgY+CT4HPg8ybMTcb9MtyvghtYut/A+b4pf95+ELgfw08Qx/3gADgInjDl0veehPtX8A/wsrn2KtzxDuogWNoJx38k/BzXKeI8Ee5qcBZYD9aZtDbg+AwT19uMX83F7JizCdcvBZdZ97c6/BMfMWmfzfTm88/95aLj+DDSvApcDXZ04uPfaen3TMHPLvi5BezuFPVtD4t/qUcfe3FvP7gb3Ouwo9T+H+gMy/UIjh8DfwBPm7T08d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wHtPc9a97p/k8bt0hpbW0j1Svr2m+7Rd98qIQ1pvSF273dKOjHYNmk6fd8/JX3tWIddblBqoU5p7zrZKnd9TppjVq0DSitWqkwz12b2exb7vwjaRvS/TFd/S+8AYvIo+Suri5TwvvZRdV1IQevQ1/8SA+UeH5eto7n/X1Oe86ptaafl8kPjcF7P7W93eD9d5n+oSvn7fFe7I/G9q1IBfylSR71N6fft94ZU18hOXKR+JqUO8f4+5dvLsmWlMQb/Vov+CUDlpTGUndeQlG3fdZWdRPoPgl3mmDlsLnaey/4X3tVuU+o6L3/Pym+qlLV/jk6rlBRd8394hZ6JdnuqIv2ykOh3pfq96Wkq/E8qu2xl88/tOJ4R3tfmpbGi3c5T859bzqr7MbsN03iI5itUNj5eaEKWqIX/KJCQ/iFWNZMmHXs8ovWk53JzFq5vPul6zDjLV36pX7bzvNzB0YlQOZephWtRS5T7eeSq8030R77/HvC1d7tN83Zt9yltrDdwSR0XxsZd5l+MvvvU1/M9jSnj+Nh6FPJbBld/w6XHXH5MZeXrOfS/65g9RTl1JCa8chzX2RZ9/3lXSh4/VqWfEBNq4b82Ytp6m+9Qqxir1jX+rfPdT1vvsWhM6bPbmON6E1LnPCZW7L0qqXswmtqf0MQelZj4myrzYtzvIYmURlvtqapyx+gzRfd0XPfahVSOquMoG+dibBdl46iyfdbV1qvUW9m8+KTudMvkzZe/pqTJ+pWTflX5zw1fVfox6ZTVc8hvHflOSb+OuG1JsZ0kufXAJf8D")); +const $9b772791ccede8a5$var$stateMachine = new (0, ($parcel$interopDefault($elh9A$dfa)))((0, (/*@__PURE__*/$parcel$interopDefault($79781f8c452881c2$exports)))); +class $9b772791ccede8a5$export$2e2bcd8739ae039 extends (0, $d28fb665ee343afc$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($9b772791ccede8a5$var$setupSyllables); + // Default glyph pre-processing group + plan.addStage([ + 'locl', + 'ccmp', + 'nukt', + 'akhn' + ]); + // Reordering group + plan.addStage($9b772791ccede8a5$var$clearSubstitutionFlags); + plan.addStage([ + 'rphf' + ], false); + plan.addStage($9b772791ccede8a5$var$recordRphf); + plan.addStage($9b772791ccede8a5$var$clearSubstitutionFlags); + plan.addStage([ + 'pref' + ]); + plan.addStage($9b772791ccede8a5$var$recordPref); + // Orthographic unit shaping group + plan.addStage([ + 'rkrf', + 'abvf', + 'blwf', + 'half', + 'pstf', + 'vatu', + 'cjct' + ]); + plan.addStage($9b772791ccede8a5$var$reorder); + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + // Standard topographic presentation and positional feature application + plan.addStage([ + 'abvs', + 'blws', + 'pres', + 'psts', + 'dist', + 'abvm', + 'blwm' + ]); + } + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + if ($9b772791ccede8a5$var$decompositions[codepoint]) { + let decomposed = $9b772791ccede8a5$var$decompositions[codepoint].map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $elh9A$swchelperscjs_define_propertycjs._)($9b772791ccede8a5$export$2e2bcd8739ae039, "zeroMarkWidths", 'BEFORE_GPOS'); +function $9b772791ccede8a5$var$useCategory(glyph) { + return $9b772791ccede8a5$var$trie.get(glyph.codePoints[0]); +} +class $9b772791ccede8a5$var$USEInfo { + constructor(category, syllableType, syllable){ + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $9b772791ccede8a5$var$setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of $9b772791ccede8a5$var$stateMachine.match(glyphs.map($9b772791ccede8a5$var$useCategory))){ + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $9b772791ccede8a5$var$USEInfo($9b772791ccede8a5$var$categories[$9b772791ccede8a5$var$useCategory(glyphs[i])], tags[0], syllable); + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for(let i = start; i < start + limit; i++)glyphs[i].features.rphf = true; + } +} +function $9b772791ccede8a5$var$clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs)glyph.substituted = false; +} +function $9b772791ccede8a5$var$recordRphf(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted && glyph.features.rphf) // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; +} +function $9b772791ccede8a5$var$recordPref(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted) // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; +} +function $9b772791ccede8a5$var$reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + for(let start = 0, end = $9b772791ccede8a5$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $9b772791ccede8a5$var$nextSyllable(glyphs, start)){ + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') continue; + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = info; + // Insert after possible Repha. + for(i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + // Move things forward. + if (info.category === 'R' && end - start > 1) // Got a repha. Reorder it to after first base, before first halant. + for(i = start + 1; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($9b772791ccede8a5$var$isBase(info) || $9b772791ccede8a5$var$isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if ($9b772791ccede8a5$var$isHalant(glyphs[i])) i--; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + // Move things back. + for(i = start, j = end; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($9b772791ccede8a5$var$isBase(info) || $9b772791ccede8a5$var$isHalant(glyphs[i])) // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = $9b772791ccede8a5$var$isHalant(glyphs[i]) ? i + 1 : i; + else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } +} +function $9b772791ccede8a5$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} +function $9b772791ccede8a5$var$isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} +function $9b772791ccede8a5$var$isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} + + +const $fdb4471fc82bc2c2$var$SHAPERS = { + arab: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mong: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + syrc: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + 'nko ': (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + phag: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mand: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + mani: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + phlp: (0, $17ba6019f27bfcf9$export$2e2bcd8739ae039), + hang: (0, $fa1d9fd80dd7279e$export$2e2bcd8739ae039), + bng2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + beng: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + dev2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + deva: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gjr2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gujr: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + guru: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + gur2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + knda: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + knd2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + mlm2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + mlym: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + ory2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + orya: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + taml: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + tml2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + telu: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + tel2: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + khmr: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + bali: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + batk: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + brah: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + bugi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + buhd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + cakm: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + cham: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + dupl: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + egyp: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + gran: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + hano: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + java: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + kthi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + kali: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + khar: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + khoj: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sind: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + lepc: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + limb: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + mahj: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + modi: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + saur: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + shrd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sidd: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sinh: (0, $d203e6b9523d0071$export$2e2bcd8739ae039), + sund: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + sylo: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tglg: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tagb: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tale: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + lana: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tavt: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + takr: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tibt: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tfng: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + tirh: (0, $9b772791ccede8a5$export$2e2bcd8739ae039), + latn: (0, $d28fb665ee343afc$export$2e2bcd8739ae039), + DFLT: (0, $d28fb665ee343afc$export$2e2bcd8739ae039 // Default + ) +}; +function $fdb4471fc82bc2c2$export$7877a478dd30fd3d(script) { + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script){ + let shaper = $fdb4471fc82bc2c2$var$SHAPERS[s]; + if (shaper) return shaper; + } + return 0, $d28fb665ee343afc$export$2e2bcd8739ae039; +} + + + + + +class $86bc1883359e094a$export$2e2bcd8739ae039 extends (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039) { + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let glyph = this.glyphIterator.cur; + switch(table.version){ + case 1: + glyph.id = glyph.id + table.deltaGlyphID & 0xffff; + break; + case 2: + glyph.id = table.substitute.get(index); + break; + } + return true; + } + case 2: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + if (sequence.length === 0) { + // If the sequence length is zero, delete the glyph. + // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it. + this.glyphs.splice(this.glyphIterator.index, 1); + return true; + } + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i)=>{ + let glyph = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + glyph.isMultiplied = true; + return glyph; + }); + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + return false; + } + case 3: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + return false; + } + case 4: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + for (let ligature of table.ligatureSets.get(index)){ + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) continue; + let curGlyph = this.glyphIterator.cur; + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched)characters.push(...this.glyphs[index].codePoints); + // Create the replacement ligature glyph + let ligatureGlyph = new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for(let i = 0; i < matched.length && isMarkLigature; i++)isMarkLigature = this.glyphs[matched[i]].isMark; + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched){ + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) idx = matchIndex; + else while(idx < matchIndex){ + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) for(let i = idx; i < this.glyphs.length; i++){ + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else break; + } + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for(let i = matched.length - 1; i >= 0; i--)this.glyphs.splice(matched[i], 1); + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + return false; + } + case 5: + return this.applyContext(table); + case 6: + return this.applyChainingContext(table); + case 7: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} + + + +class $79ea6270f0a90256$export$2e2bcd8739ae039 extends (0, $7b226e6bbeadedeb$export$2e2bcd8739ae039) { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) position.xAdvance += value.xAdvance; + if (value.yAdvance != null) position.yAdvance += value.yAdvance; + if (value.xPlacement != null) position.xOffset += value.xPlacement; + if (value.yPlacement != null) position.yOffset += value.yPlacement; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (value.xPlaDevice) position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b); + if (value.yPlaDevice) position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b); + if (value.xAdvDevice) position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b); + if (value.yAdvDevice) position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b); + } + // TODO: device tables + } + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + this.applyPositionValue(0, table.value); + break; + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + return true; + } + case 2: + { + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) return false; + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + let set = table.pairSets.get(index); + for (let pair of set)if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + return false; + case 2: + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) return false; + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + case 3: + { + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) return false; + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) return false; + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) return false; + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + let d; + switch(this.direction){ + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + return true; + } + case 4: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)); + if (baseGlyphIndex < 0) return false; + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) return false; + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 5: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + if (baseGlyphIndex < 0) return false; + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) return false; + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent > 0 ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1; + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 6: + { + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) return false; + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) return false; + let cur = this.glyphIterator.cur; + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) good = true; + else if (cur.ligatureComponent === prev.ligatureComponent) good = true; + } else // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if (cur.ligatureID && !cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) good = true; + if (!good) return false; + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) return false; + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + case 7: + return this.applyContext(table); + case 8: + return this.applyChainingContext(table); + case 9: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + getAnchor(anchor) { + // TODO: contour point, device tables + let x = anchor.xCoordinate; + let y = anchor.yCoordinate; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (anchor.xDeviceTable) x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b); + if (anchor.yDeviceTable) y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b); + } + return { + x: x, + y: y + }; + } + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + for(var i = 0; i < this.glyphs.length; i++)this.fixCursiveAttachment(i); + this.fixMarkAttachment(); + } + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + fixMarkAttachment() { + for(let i = 0; i < this.glyphs.length; i++){ + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + if (this.direction === 'ltr') for(let k = j; k < i; k++){ + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + else for(let k = j + 1; k < i + 1; k++){ + this.positions[i].xOffset += this.positions[k].xAdvance; + this.positions[i].yOffset += this.positions[k].yAdvance; + } + } + } + } +} + + +class $b2f26a32cb9ab2fa$export$2e2bcd8739ae039 { + setup(glyphRun) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphRun.glyphs.map((glyph)=>new (0, $f22bb23c9fd478d8$export$2e2bcd8739ae039)(this.font, glyph.id, [ + ...glyph.codePoints + ])); + // Select a script based on what is available in GSUB/GPOS. + let script = null; + if (this.GPOSProcessor) script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + if (this.GSUBProcessor) script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = $fdb4471fc82bc2c2$export$7877a478dd30fd3d(script); + this.plan = new (0, $d7e93cca3cf8ce8a$export$2e2bcd8739ae039)(this.font, script, glyphRun.direction); + this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); + // Assign chosen features to output glyph run + for(let key in this.plan.allFeatures)glyphRun.features[key] = true; + } + substitute(glyphRun) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + // Map glyph infos back to normal Glyph objects + glyphRun.glyphs = this.glyphInfos.map((glyphInfo)=>this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + } + position(glyphRun) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') this.zeroMarkAdvances(glyphRun.positions); + if (this.GPOSProcessor) this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions); + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') this.zeroMarkAdvances(glyphRun.positions); + // Reverse the glyphs and positions if the script is right-to-left + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + glyphRun.positions.reverse(); + } + return this.GPOSProcessor && this.GPOSProcessor.features; + } + zeroMarkAdvances(positions) { + for(let i = 0; i < this.glyphInfos.length; i++)if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + getAvailableFeatures(script, language) { + let features = []; + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + return features; + } + constructor(font){ + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + this.fallbackPosition = true; + if (font.GSUB) this.GSUBProcessor = new (0, $86bc1883359e094a$export$2e2bcd8739ae039)(font, font.GSUB); + if (font.GPOS) this.GPOSProcessor = new (0, $79ea6270f0a90256$export$2e2bcd8739ae039)(font, font.GPOS); + } +} + + +class $9d641258c9d7180d$export$2e2bcd8739ae039 { + layout(string, features, script, language, direction) { + // Make the features parameter optional + if (typeof features === 'string') { + direction = language; + language = script; + script = features; + features = []; + } + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) script = $e38a1a895f6aeb54$export$e5cb25e204fb8450(string); + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string)codePoints.push(...glyph.codePoints); + script = $e38a1a895f6aeb54$export$16fab0757cfc223d(codePoints); + } + var glyphs = string; + } + let glyphRun = new (0, $b19c79ec7a94fa39$export$2e2bcd8739ae039)(glyphs, features, script, language, direction); + // Return early if there are no glyphs + if (glyphs.length === 0) { + glyphRun.positions = []; + return glyphRun; + } + // Setup the advanced layout engine + if (this.engine && this.engine.setup) this.engine.setup(glyphRun); + // Substitute and position the glyphs + this.substitute(glyphRun); + this.position(glyphRun); + this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) this.engine.cleanup(); + return glyphRun; + } + substitute(glyphRun) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) this.engine.substitute(glyphRun); + } + position(glyphRun) { + // Get initial glyph positions + glyphRun.positions = glyphRun.glyphs.map((glyph)=>new (0, $9195cf1266c12ea5$export$2e2bcd8739ae039)(glyph.advanceWidth)); + let positioned = null; + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) positioned = this.engine.position(glyphRun); + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned && (!this.engine || this.engine.fallbackPosition)) { + if (!this.unicodeLayoutEngine) this.unicodeLayoutEngine = new (0, $a57a26817cd35108$export$2e2bcd8739ae039)(this.font); + this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions); + } + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) { + if (!this.kernProcessor) this.kernProcessor = new (0, $4646d52c2a559cdb$export$2e2bcd8739ae039)(this.font); + this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions); + glyphRun.features.kern = true; + } + } + hideDefaultIgnorables(glyphs, positions) { + let space = this.font.glyphForCodePoint(0x20); + for(let i = 0; i < glyphs.length; i++)if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) { + glyphs[i] = space; + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + isDefaultIgnorable(ch) { + // From DerivedCoreProperties.txt in the Unicode database, + // minus U+115F, U+1160, U+3164 and U+FFA0, which is what + // Harfbuzz and Uniscribe do. + let plane = ch >> 16; + if (plane === 0) // BMP + switch(ch >> 8){ + case 0x00: + return ch === 0x00AD; + case 0x03: + return ch === 0x034F; + case 0x06: + return ch === 0x061C; + case 0x17: + return 0x17B4 <= ch && ch <= 0x17B5; + case 0x18: + return 0x180B <= ch && ch <= 0x180E; + case 0x20: + return 0x200B <= ch && ch <= 0x200F || 0x202A <= ch && ch <= 0x202E || 0x2060 <= ch && ch <= 0x206F; + case 0xFE: + return 0xFE00 <= ch && ch <= 0xFE0F || ch === 0xFEFF; + case 0xFF: + return 0xFFF0 <= ch && ch <= 0xFFF8; + default: + return false; + } + else // Other planes + switch(plane){ + case 0x01: + return 0x1BCA0 <= ch && ch <= 0x1BCA3 || 0x1D173 <= ch && ch <= 0x1D17A; + case 0x0E: + return 0xE0000 <= ch && ch <= 0xE0FFF; + default: + return false; + } + } + getAvailableFeatures(script, language) { + let features = []; + if (this.engine) features.push(...this.engine.getAvailableFeatures(script, language)); + if (this.font.kern && features.indexOf('kern') === -1) features.push('kern'); + return features; + } + stringsForGlyph(gid) { + let result = new Set; + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints)result.add(String.fromCodePoint(codePoint)); + if (this.engine && this.engine.stringsForGlyph) for (let string of this.engine.stringsForGlyph(gid))result.add(string); + return Array.from(result); + } + constructor(font){ + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) this.engine = new (0, $860fcbd64bc12fbc$export$2e2bcd8739ae039)(this.font); + else if (this.font.GSUB || this.font.GPOS) this.engine = new (0, $b2f26a32cb9ab2fa$export$2e2bcd8739ae039)(this.font); + } +} + + + + + + +const $67ee4828d81adb28$var$SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; +class $67ee4828d81adb28$export$2e2bcd8739ae039 { + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ toFunction() { + return (ctx)=>{ + this.commands.forEach((c)=>{ + return ctx[c.command].apply(ctx, c.args); + }); + }; + } + /** + * Converts the path to an SVG path data string + * @return {string} + */ toSVG() { + let cmds = this.commands.map((c)=>{ + let args = c.args.map((arg)=>Math.round(arg * 100) / 100); + return `${$67ee4828d81adb28$var$SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + return cmds.join(''); + } + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ get cbox() { + if (!this._cbox) { + let cbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + for (let command of this.commands)for(let i = 0; i < command.args.length; i += 2)cbox.addPoint(command.args[i], command.args[i + 1]); + this._cbox = Object.freeze(cbox); + } + return this._cbox; + } + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ get bbox() { + if (this._bbox) return this._bbox; + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + let cx = 0, cy = 0; + let f = (t)=>Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; + for (let c of this.commands)switch(c.command){ + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + var p0 = [ + cx, + cy + ]; + var p1 = [ + cp1x, + cp1y + ]; + var p2 = [ + cp2x, + cp2y + ]; + var p3 = [ + p3x, + p3y + ]; + for(var i = 0; i <= 1; i++){ + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + if (a === 0) { + if (b === 0) continue; + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) bbox.addPoint(f(t), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t)); + } + continue; + } + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) continue; + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) bbox.addPoint(f(t1), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t1)); + } + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) bbox.addPoint(f(t2), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t2)); + } + } + cx = p3x; + cy = p3y; + break; + } + return this._bbox = Object.freeze(bbox); + } + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ mapPoints(fn) { + let path = new $67ee4828d81adb28$export$2e2bcd8739ae039; + for (let c of this.commands){ + let args = []; + for(let i = 0; i < c.args.length; i += 2){ + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + path[c.command](...args); + } + return path; + } + /** + * Transforms the path by the given matrix. + */ transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y)=>{ + const tx = m0 * x + m2 * y + m4; + const ty = m1 * x + m3 * y + m5; + return [ + tx, + ty + ]; + }); + } + /** + * Translates the path by the given offset. + */ translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + /** + * Rotates the path by the given angle (in radians). + */ rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + /** + * Scales the path. + */ scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } + constructor(){ + this.commands = []; + this._bbox = null; + this._cbox = null; + } +} +for (let command of [ + 'moveTo', + 'lineTo', + 'quadraticCurveTo', + 'bezierCurveTo', + 'closePath' +])$67ee4828d81adb28$export$2e2bcd8739ae039.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command: command, + args: args + }); + return this; +}; + + + +var $85e16e40023cfb0f$export$2e2bcd8739ae039 = [ + '.notdef', + '.null', + 'nonmarkingreturn', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quotesingle', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'grave', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'Adieresis', + 'Aring', + 'Ccedilla', + 'Eacute', + 'Ntilde', + 'Odieresis', + 'Udieresis', + 'aacute', + 'agrave', + 'acircumflex', + 'adieresis', + 'atilde', + 'aring', + 'ccedilla', + 'eacute', + 'egrave', + 'ecircumflex', + 'edieresis', + 'iacute', + 'igrave', + 'icircumflex', + 'idieresis', + 'ntilde', + 'oacute', + 'ograve', + 'ocircumflex', + 'odieresis', + 'otilde', + 'uacute', + 'ugrave', + 'ucircumflex', + 'udieresis', + 'dagger', + 'degree', + 'cent', + 'sterling', + 'section', + 'bullet', + 'paragraph', + 'germandbls', + 'registered', + 'copyright', + 'trademark', + 'acute', + 'dieresis', + 'notequal', + 'AE', + 'Oslash', + 'infinity', + 'plusminus', + 'lessequal', + 'greaterequal', + 'yen', + 'mu', + 'partialdiff', + 'summation', + 'product', + 'pi', + 'integral', + 'ordfeminine', + 'ordmasculine', + 'Omega', + 'ae', + 'oslash', + 'questiondown', + 'exclamdown', + 'logicalnot', + 'radical', + 'florin', + 'approxequal', + 'Delta', + 'guillemotleft', + 'guillemotright', + 'ellipsis', + 'nonbreakingspace', + 'Agrave', + 'Atilde', + 'Otilde', + 'OE', + 'oe', + 'endash', + 'emdash', + 'quotedblleft', + 'quotedblright', + 'quoteleft', + 'quoteright', + 'divide', + 'lozenge', + 'ydieresis', + 'Ydieresis', + 'fraction', + 'currency', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'daggerdbl', + 'periodcentered', + 'quotesinglbase', + 'quotedblbase', + 'perthousand', + 'Acircumflex', + 'Ecircumflex', + 'Aacute', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Oacute', + 'Ocircumflex', + 'apple', + 'Ograve', + 'Uacute', + 'Ucircumflex', + 'Ugrave', + 'dotlessi', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'Lslash', + 'lslash', + 'Scaron', + 'scaron', + 'Zcaron', + 'zcaron', + 'brokenbar', + 'Eth', + 'eth', + 'Yacute', + 'yacute', + 'Thorn', + 'thorn', + 'minus', + 'multiply', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'onehalf', + 'onequarter', + 'threequarters', + 'franc', + 'Gbreve', + 'gbreve', + 'Idotaccent', + 'Scedilla', + 'scedilla', + 'Cacute', + 'cacute', + 'Ccaron', + 'ccaron', + 'dcroat' +]; + + +class $0e4f52d7996e478b$export$2e2bcd8739ae039 { + _getPath() { + return new (0, $67ee4828d81adb28$export$2e2bcd8739ae039)(); + } + _getCBox() { + return this.path.cbox; + } + _getBBox() { + return this.path.bbox; + } + _getTableMetrics(table) { + if (this.id < table.metrics.length) return table.metrics.get(this.id); + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + return res; + } + _getMetrics(cbox) { + if (this._metrics) return this._metrics; + let { advance: advanceWidth, bearing: leftBearing } = this._getTableMetrics(this._font.hmtx); + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) var { advance: advanceHeight, bearing: topBearing } = this._getTableMetrics(this._font.vmtx); + else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) ({ cbox: cbox } = this); + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + } else { + let { hhea: hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + if (this._font._variationProcessor && this._font.HVAR) advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + return this._metrics = { + advanceWidth: advanceWidth, + advanceHeight: advanceHeight, + leftBearing: leftBearing, + topBearing: topBearing + }; + } + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ get cbox() { + return this._getCBox(); + } + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ get bbox() { + return this._getBBox(); + } + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + /** + * The glyph's advance width. + * @type {number} + */ get advanceWidth() { + return this._getMetrics().advanceWidth; + } + /** + * The glyph's advance height. + * @type {number} + */ get advanceHeight() { + return this._getMetrics().advanceHeight; + } + get ligatureCaretPositions() {} + _getName() { + let { post: post } = this._font; + if (!post) return null; + switch(post.version){ + case 1: + return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[this.id]; + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < (0, $85e16e40023cfb0f$export$2e2bcd8739ae039).length) return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[id]; + return post.names[id - (0, $85e16e40023cfb0f$export$2e2bcd8739ae039).length]; + case 2.5: + return (0, $85e16e40023cfb0f$export$2e2bcd8739ae039)[this.id + post.offsets[this.id]]; + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + /** + * The glyph's name + * @type {string} + */ get name() { + return this._getName(); + } + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ render(ctx, size) { + ctx.save(); + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + ctx.restore(); + } + constructor(id, codePoints, font){ + /** + * The glyph id in the font + * @type {number} + */ this.id = id; + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ this.codePoints = codePoints; + this._font = font; + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $elh9A$unicodeproperties.isMark)); + this.isLigature = this.codePoints.length > 1; + } +} +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "cbox", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "path", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "advanceWidth", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "advanceHeight", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0e4f52d7996e478b$export$2e2bcd8739ae039.prototype, "name", null); + + + + + +// The header for both simple and composite glyphs +let $f680320fa07ef53d$var$GlyfHeader = new $elh9A$restructure.Struct({ + numberOfContours: $elh9A$restructure.int16, + xMin: $elh9A$restructure.int16, + yMin: $elh9A$restructure.int16, + xMax: $elh9A$restructure.int16, + yMax: $elh9A$restructure.int16 +}); +// Flags for simple glyphs +const $f680320fa07ef53d$var$ON_CURVE = 1; +const $f680320fa07ef53d$var$X_SHORT_VECTOR = 2; +const $f680320fa07ef53d$var$Y_SHORT_VECTOR = 4; +const $f680320fa07ef53d$var$REPEAT = 8; +const $f680320fa07ef53d$var$SAME_X = 16; +const $f680320fa07ef53d$var$SAME_Y = 32; +// Flags for composite glyphs +const $f680320fa07ef53d$var$ARG_1_AND_2_ARE_WORDS = 1; +const $f680320fa07ef53d$var$ARGS_ARE_XY_VALUES = 2; +const $f680320fa07ef53d$var$ROUND_XY_TO_GRID = 4; +const $f680320fa07ef53d$var$WE_HAVE_A_SCALE = 8; +const $f680320fa07ef53d$var$MORE_COMPONENTS = 32; +const $f680320fa07ef53d$var$WE_HAVE_AN_X_AND_Y_SCALE = 64; +const $f680320fa07ef53d$var$WE_HAVE_A_TWO_BY_TWO = 128; +const $f680320fa07ef53d$var$WE_HAVE_INSTRUCTIONS = 256; +const $f680320fa07ef53d$var$USE_MY_METRICS = 512; +const $f680320fa07ef53d$var$OVERLAP_COMPOUND = 1024; +const $f680320fa07ef53d$var$SCALED_COMPONENT_OFFSET = 2048; +const $f680320fa07ef53d$var$UNSCALED_COMPONENT_OFFSET = 4096; +class $f680320fa07ef53d$export$baf26146a414f24a { + copy() { + return new $f680320fa07ef53d$export$baf26146a414f24a(this.onCurve, this.endContour, this.x, this.y); + } + constructor(onCurve, endContour, x = 0, y = 0){ + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } +} +// Represents a component in a composite glyph +class $f680320fa07ef53d$var$Component { + constructor(glyphID, dx, dy){ + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} +class $f680320fa07ef53d$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) return this.path.cbox; + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = $f680320fa07ef53d$var$GlyfHeader.decode(stream); + let cbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039)(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) val = -val; + val += prev; + } else if (same) var val = prev; + else var val = prev + stream.readInt16BE(); + return val; + } + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) return null; + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + let glyph = $f680320fa07ef53d$var$GlyfHeader.decode(stream); + if (glyph.numberOfContours > 0) this._decodeSimple(glyph, stream); + else if (glyph.numberOfContours < 0) this._decodeComposite(glyph, stream, startPos); + return glyph; + } + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + let endPtsOfContours = new $elh9A$restructure.Array($elh9A$restructure.uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new $elh9A$restructure.Array($elh9A$restructure.uint8, $elh9A$restructure.uint16).decode(stream); + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + while(flags.length < numCoords){ + var flag = stream.readUInt8(); + flags.push(flag); + // check for repeat flag + if (flag & $f680320fa07ef53d$var$REPEAT) { + let count = stream.readUInt8(); + for(let j = 0; j < count; j++)flags.push(flag); + } + } + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + let point = new $f680320fa07ef53d$export$baf26146a414f24a(!!(flag & $f680320fa07ef53d$var$ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + let px = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & $f680320fa07ef53d$var$X_SHORT_VECTOR, flag & $f680320fa07ef53d$var$SAME_X); + } + let py = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & $f680320fa07ef53d$var$Y_SHORT_VECTOR, flag & $f680320fa07ef53d$var$SAME_Y); + } + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + return; + } + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = $f680320fa07ef53d$var$MORE_COMPONENTS; + while(flags & $f680320fa07ef53d$var$MORE_COMPONENTS){ + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) haveInstructions = (flags & $f680320fa07ef53d$var$WE_HAVE_INSTRUCTIONS) !== 0; + if (flags & $f680320fa07ef53d$var$ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + var component = new $f680320fa07ef53d$var$Component(glyphID, dx, dy); + component.pos = gPos; + if (flags & $f680320fa07ef53d$var$WE_HAVE_A_SCALE) // fixed number with 14 bits of fraction + component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + else if (flags & $f680320fa07ef53d$var$WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & $f680320fa07ef53d$var$WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } + glyph.components.push(component); + } + if (this._font._variationProcessor) { + let points = []; + for(let j = 0; j < glyph.components.length; j++){ + var component = glyph.components[j]; + points.push(new $f680320fa07ef53d$export$baf26146a414f24a(true, true, component.dx, component.dy)); + } + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + for(let i = 0; i < points.length; i++){ + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + return haveInstructions; + } + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) this._metrics = (0, $0e4f52d7996e478b$export$2e2bcd8739ae039).prototype._getMetrics.call(this, cbox); + let { advanceWidth: advanceWidth, advanceHeight: advanceHeight, leftBearing: leftBearing, topBearing: topBearing } = this._metrics; + return [ + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing, 0), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing), + new $f680320fa07ef53d$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) return []; + let points = []; + if (glyph.numberOfContours < 0) // resolve composite glyphs + for (let component of glyph.components){ + let contours = this._font.getGlyph(component.glyphID)._getContours(); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + for(let j = 0; j < contour.length; j++){ + let point = contour[j]; + let x = point.x * component.scaleX + point.y * component.scale01 + component.dx; + let y = point.y * component.scaleY + point.x * component.scale10 + component.dy; + points.push(new $f680320fa07ef53d$export$baf26146a414f24a(point.onCurve, point.endContour, x, y)); + } + } + } + else points = glyph.points || []; + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + let contours = []; + let cur = []; + for(let k = 0; k < points.length; k++){ + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + return contours; + } + _getMetrics() { + if (this._metrics) return this._metrics; + let cbox = this._getCBox(true); + super._getMetrics(cbox); + if (this._font._variationProcessor && !this._font.HVAR) // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + return this._metrics; + } + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new (0, $67ee4828d81adb28$export$2e2bcd8739ae039); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + else // Start at the middle if both the first and last points are off curve + firstPt = new $f680320fa07ef53d$export$baf26146a414f24a(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + var curvePt = firstPt; + } + path.moveTo(firstPt.x, firstPt.y); + for(let j = start; j < contour.length; j++){ + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + if (prevPt.onCurve && pt.onCurve) path.lineTo(pt.x, pt.y); + else if (prevPt.onCurve && !pt.onCurve) var curvePt = pt; + else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + } else throw new Error("Unknown TTF path state"); + } + // Connect the first and last points + if (curvePt) path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + path.closePath(); + } + return path; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'TTF'); + } +} + + + + + +class $7ee0705195f3b047$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + _getName() { + if (this._font.CFF2) return super._getName(); + return this._font['CFF '].getGlyphName(this.id); + } + bias(s) { + if (s.length < 1240) return 107; + else if (s.length < 33900) return 1131; + else return 32768; + } + _getPath() { + let cff = this._font.CFF2 || this._font['CFF ']; + let { stream: stream } = cff; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + let path = new (0, $67ee4828d81adb28$export$2e2bcd8739ae039); + let stack = []; + let trans = []; + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + let privateDict = cff.privateDictForGlyph(this.id) || {}; + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + function checkWidth() { + if (width == null) width = stack.shift() + privateDict.nominalWidthX; + } + function parseStems() { + if (stack.length % 2 !== 0) checkWidth(); + nStems += stack.length >> 1; + return stack.length = 0; + } + function moveTo(x, y) { + if (open) path.closePath(); + path.moveTo(x, y); + open = true; + } + let parse = function() { + while(stream.pos < end){ + let op = stream.readUInt8(); + if (op < 32) { + let index, subr, phase; + let c1x, c1y, c2x, c2y, c3x, c3y; + let c4x, c4y, c5x, c5y, c6x, c6y; + let pts; + switch(op){ + case 1: + case 3: + case 18: + case 23: + parseStems(); + break; + case 4: + if (stack.length > 1) checkWidth(); + y += stack.shift(); + moveTo(x, y); + break; + case 5: + while(stack.length >= 2){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + case 6: + case 7: + phase = op === 6; + while(stack.length >= 1){ + if (phase) x += stack.shift(); + else y += stack.shift(); + path.lineTo(x, y); + phase = !phase; + } + break; + case 8: + while(stack.length > 0){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 10: + index = stack.pop() + subrsBias; + subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 11: + if (cff.version >= 2) break; + return; + case 14: + if (cff.version >= 2) break; + if (stack.length > 0) checkWidth(); + if (open) { + path.closePath(); + open = false; + } + break; + case 15: + if (cff.version < 2) throw new Error('vsindex operator not supported in CFF v1'); + vsindex = stack.pop(); + break; + case 16: + { + if (cff.version < 2) throw new Error('blend operator not supported in CFF v1'); + if (!variationProcessor) throw new Error('blend operator in non-variation font'); + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + for(let i = 0; i < numBlends; i++){ + let sum = stack[base + i]; + for(let j = 0; j < blendVector.length; j++)sum += blendVector[j] * stack[delta++]; + stack[base + i] = sum; + } + while(numOperands--)stack.pop(); + break; + } + case 19: + case 20: + parseStems(); + stream.pos += nStems + 7 >> 3; + break; + case 21: + if (stack.length > 2) checkWidth(); + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + case 22: + if (stack.length > 1) checkWidth(); + x += stack.shift(); + moveTo(x, y); + break; + case 24: + while(stack.length >= 8){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + case 25: + while(stack.length >= 8){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + case 26: + if (stack.length % 2) x += stack.shift(); + while(stack.length >= 4){ + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 27: + if (stack.length % 2) y += stack.shift(); + while(stack.length >= 4){ + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 28: + stack.push(stream.readInt16BE()); + break; + case 29: + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 30: + case 31: + phase = op === 31; + while(stack.length >= 4){ + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + case 12: + op = stream.readUInt8(); + switch(op){ + case 3: + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + case 4: + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + case 5: + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + case 9: + a = stack.pop(); + stack.push(Math.abs(a)); + break; + case 10: + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + case 11: + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + case 12: + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + case 14: + a = stack.pop(); + stack.push(-a); + break; + case 15: + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + case 18: + stack.pop(); + break; + case 20: + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + case 21: + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + case 22: + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + case 23: + stack.push(Math.random()); + break; + case 24: + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + case 26: + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + case 27: + a = stack.pop(); + stack.push(a, a); + break; + case 28: + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + case 29: + idx = stack.pop(); + if (idx < 0) idx = 0; + else if (idx > stack.length - 1) idx = stack.length - 1; + stack.push(stack[idx]); + break; + case 30: + let n = stack.pop(); + let j = stack.pop(); + if (j >= 0) while(j > 0){ + var t = stack[n - 1]; + for(let i = n - 2; i >= 0; i--)stack[i + 1] = stack[i]; + stack[0] = t; + j--; + } + else while(j < 0){ + var t = stack[0]; + for(let i = 0; i <= n; i++)stack[i] = stack[i + 1]; + stack[n - 1] = t; + j++; + } + break; + case 34: + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y; + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 35: + pts = []; + for(let i = 0; i <= 5; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + case 36: + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 37: + let startx = x; + let starty = y; + pts = []; + for(let i = 0; i <= 4; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + if (Math.abs(x - startx) > Math.abs(y - starty)) { + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + default: + throw new Error(`Unknown op: ${op}`); + } + } else if (op < 247) stack.push(op - 139); + else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else stack.push(stream.readInt32BE() / 65536); + } + }; + parse(); + if (open) path.closePath(); + return path; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'CFF'); + } +} + + + + + +let $55855d6d316b015e$var$SBIXImage = new $elh9A$restructure.Struct({ + originX: $elh9A$restructure.uint16, + originY: $elh9A$restructure.uint16, + type: new $elh9A$restructure.String(4), + data: new $elh9A$restructure.Buffer((t)=>t.parent.buflen - t._currentOffset) +}); +class $55855d6d316b015e$export$2e2bcd8739ae039 extends (0, $f680320fa07ef53d$export$2e2bcd8739ae039) { + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ getImageForSize(size) { + for(let i = 0; i < this._font.sbix.imageTables.length; i++){ + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) break; + } + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + if (start === end) return null; + this._font.stream.pos = start; + return $55855d6d316b015e$var$SBIXImage.decode(this._font.stream, { + buflen: end - start + }); + } + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, { + height: size, + x: img.originX, + y: (this.bbox.minY - img.originY) * scale + }); + } + if (this._font.sbix.flags.renderOutlines) super.render(ctx, size); + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'SBIX'); + } +} + + + + + +class $42d9dbd2de9ee2d8$var$COLRLayer { + constructor(glyph, color){ + this.glyph = glyph; + this.color = color; + } +} +class $42d9dbd2de9ee2d8$export$2e2bcd8739ae039 extends (0, $0e4f52d7996e478b$export$2e2bcd8739ae039) { + _getBBox() { + let bbox = new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039); + for(let i = 0; i < this.layers.length; i++){ + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + return bbox; + } + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + while(low <= high){ + let mid = low + high >> 1; + var rec = colr.baseGlyphRecord[mid]; + if (this.id < rec.gid) high = mid - 1; + else if (this.id > rec.gid) low = mid + 1; + else { + var baseLayer = rec; + break; + } + } + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + return [ + new $42d9dbd2de9ee2d8$var$COLRLayer(g, color) + ]; + } + // otherwise, return an array of all the layers + let layers = []; + for(let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++){ + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new $42d9dbd2de9ee2d8$var$COLRLayer(g, color)); + } + return layers; + } + render(ctx, size) { + for (let { glyph: glyph, color: color } of this.layers){ + ctx.fillColor([ + color.red, + color.green, + color.blue + ], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + return; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'COLR'); + } +} + + +const $7586bb9ea67c41d8$var$TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const $7586bb9ea67c41d8$var$TUPLE_COUNT_MASK = 0x0fff; +const $7586bb9ea67c41d8$var$EMBEDDED_TUPLE_COORD = 0x8000; +const $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE = 0x4000; +const $7586bb9ea67c41d8$var$PRIVATE_POINT_NUMBERS = 0x2000; +const $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK = 0x0fff; +const $7586bb9ea67c41d8$var$POINTS_ARE_WORDS = 0x80; +const $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK = 0x7f; +const $7586bb9ea67c41d8$var$DELTAS_ARE_ZERO = 0x80; +const $7586bb9ea67c41d8$var$DELTAS_ARE_WORDS = 0x40; +const $7586bb9ea67c41d8$var$DELTA_RUN_COUNT_MASK = 0x3f; +class $7586bb9ea67c41d8$export$2e2bcd8739ae039 { + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for(var i = 0; i < this.font.fvar.axis.length; i++){ + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + else normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) for(var i = 0; i < this.font.avar.segment.length; i++){ + let segment = this.font.avar.segment[i]; + for(let j = 0; j < segment.correspondence.length; j++){ + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / (pair.fromCoord - prev.fromCoord + Number.EPSILON) + prev.toCoord; + break; + } + } + } + return normalized; + } + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) return; + let { gvar: gvar } = this.font; + if (gid >= gvar.glyphCount) return; + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) return; + // Read the gvar data for this glyph + let { stream: stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) return; + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + if (tupleCount & $7586bb9ea67c41d8$var$TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + let origPoints = glyphPoints.map((pt)=>pt.copy()); + tupleCount &= $7586bb9ea67c41d8$var$TUPLE_COUNT_MASK; + for(let i = 0; i < tupleCount; i++){ + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + if (tupleIndex & $7586bb9ea67c41d8$var$EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for(let a = 0; a < gvar.axisCount; a++)tupleCoords.push(stream.readInt16BE() / 16384); + } else { + if ((tupleIndex & $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK) >= gvar.globalCoordCount) throw new Error('Invalid gvar table'); + var tupleCoords = gvar.globalCoords[tupleIndex & $7586bb9ea67c41d8$var$TUPLE_INDEX_MASK]; + } + if (tupleIndex & $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE) { + var startCoords = []; + for(let a = 0; a < gvar.axisCount; a++)startCoords.push(stream.readInt16BE() / 16384); + var endCoords = []; + for(let a = 0; a < gvar.axisCount; a++)endCoords.push(stream.readInt16BE() / 16384); + } + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + var here = stream.pos; + stream.pos = offsetToData; + if (tupleIndex & $7586bb9ea67c41d8$var$PRIVATE_POINT_NUMBERS) var points = this.decodePoints(); + else var points = sharedPoints; + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + if (points.length === 0) for(let i = 0; i < glyphPoints.length; i++){ + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + else { + let outPoints = origPoints.map((pt)=>pt.copy()); + let hasDelta = glyphPoints.map(()=>false); + for(let i = 0; i < points.length; i++){ + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + point.x += xDeltas[i] * factor; + point.y += yDeltas[i] * factor; + } + } + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + for(let i = 0; i < glyphPoints.length; i++){ + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX); + glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY); + } + } + offsetToData += tupleDataSize; + stream.pos = here; + } + } + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + if (count & $7586bb9ea67c41d8$var$POINTS_ARE_WORDS) count = (count & $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $7586bb9ea67c41d8$var$POINT_RUN_COUNT_MASK) + 1; + let fn = run & $7586bb9ea67c41d8$var$POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + for(let j = 0; j < runCount && i < count; j++){ + point += fn.call(stream); + points[i++] = point; + } + } + return points; + } + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $7586bb9ea67c41d8$var$DELTA_RUN_COUNT_MASK) + 1; + if (run & $7586bb9ea67c41d8$var$DELTAS_ARE_ZERO) i += runCount; + else { + let fn = run & $7586bb9ea67c41d8$var$DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for(let j = 0; j < runCount && i < count; j++)deltas[i++] = fn.call(stream); + } + } + return deltas; + } + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar: gvar } = this.font; + let factor = 1; + for(let i = 0; i < gvar.axisCount; i++){ + if (tupleCoords[i] === 0) continue; + if (normalized[i] === 0) return 0; + if ((tupleIndex & $7586bb9ea67c41d8$var$INTERMEDIATE_TUPLE) === 0) { + if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) return 0; + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) return 0; + else if (normalized[i] < tupleCoords[i]) factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + else factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + return factor; + } + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) return; + let point = 0; + while(point < points.length){ + let firstPoint = point; + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while(!pt.endContour)pt = points[++endPoint]; + // find the first point that has a delta + while(point <= endPoint && !hasDelta[point])point++; + if (point > endPoint) continue; + let firstDelta = point; + let curDelta = point; + point++; + while(point <= endPoint){ + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + point++; + } + // shift contour if we only have a single delta + if (curDelta === firstDelta) this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + if (firstDelta > 0) this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + point = endPoint + 1; + } + } + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) return; + let iterable = [ + 'x', + 'y' + ]; + for(let i = 0; i < iterable.length; i++){ + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + for(let p = p1; p <= p2; p++){ + let out = inPoints[p][k]; + if (out <= in1) out += out1 - in1; + else if (out >= in2) out += out2 - in2; + else out = out1 + (out - in1) * scale; + outPoints[p][k] = out; + } + } + } + } + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + if (deltaX === 0 && deltaY === 0) return; + for(let p = p1; p <= p2; p++)if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) idx = table.advanceWidthMapping.mapCount - 1; + let entryFormat = table.advanceWidthMapping.entryFormat; + ({ outerIndex: outerIndex, innerIndex: innerIndex } = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + return this.getDelta(table.itemVariationStore, outerIndex, innerIndex); + } + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getDelta(itemStore, outerIndex, innerIndex) { + if (outerIndex >= itemStore.itemVariationData.length) return 0; + let varData = itemStore.itemVariationData[outerIndex]; + if (innerIndex >= varData.deltaSets.length) return 0; + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + for(let master = 0; master < varData.regionIndexCount; master++)netAdjustment += deltaSet.deltas[master] * blendVector[master]; + return netAdjustment; + } + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) return this.blendVectors.get(varData); + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + // outer loop steps through master designs to be blended + for(let master = 0; master < varData.regionIndexCount; master++){ + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + // inner loop steps through axes in this region + for(let j = 0; j < axes.length; j++){ + let axis = axes[j]; + let axisScalar; + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) axisScalar = 1; + else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) axisScalar = 1; + else if (axis.peakCoord === 0) axisScalar = 1; + else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) axisScalar = 0; + else { + if (normalizedCoords[j] === axis.peakCoord) axisScalar = 1; + else if (normalizedCoords[j] < axis.peakCoord) axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.startCoord + Number.EPSILON); + else axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + // take product of all the axis scalars + scalar *= axisScalar; + } + blendVector[master] = scalar; + } + this.blendVectors.set(varData, blendVector); + return blendVector; + } + constructor(font, coords){ + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } +} + + + + +const $a8ac370803cb82cf$var$resolved = Promise.resolve(); +class $a8ac370803cb82cf$export$2e2bcd8739ae039 { + includeGlyph(glyph) { + if (typeof glyph === 'object') glyph = glyph.id; + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + return this.mapping[glyph]; + } + constructor(font){ + this.font = font; + this.glyphs = []; + this.mapping = {}; + // always include the missing glyph + this.includeGlyph(0); + } +} + + + + + +// Flags for simple glyphs +const $2784eedf0b35a048$var$ON_CURVE = 1; +const $2784eedf0b35a048$var$X_SHORT_VECTOR = 2; +const $2784eedf0b35a048$var$Y_SHORT_VECTOR = 4; +const $2784eedf0b35a048$var$REPEAT = 8; +const $2784eedf0b35a048$var$SAME_X = 16; +const $2784eedf0b35a048$var$SAME_Y = 32; +class $2784eedf0b35a048$var$Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + static encode(stream, value) { + if (value >= 0 && value <= 255) stream.writeUInt8(value); + else stream.writeInt16BE(value); + } +} +let $2784eedf0b35a048$var$Glyf = new $elh9A$restructure.Struct({ + numberOfContours: $elh9A$restructure.int16, + xMin: $elh9A$restructure.int16, + yMin: $elh9A$restructure.int16, + xMax: $elh9A$restructure.int16, + yMax: $elh9A$restructure.int16, + endPtsOfContours: new $elh9A$restructure.Array($elh9A$restructure.uint16, 'numberOfContours'), + instructions: new $elh9A$restructure.Array($elh9A$restructure.uint8, $elh9A$restructure.uint16), + flags: new $elh9A$restructure.Array($elh9A$restructure.uint8, 0), + xPoints: new $elh9A$restructure.Array($2784eedf0b35a048$var$Point, 0), + yPoints: new $elh9A$restructure.Array($2784eedf0b35a048$var$Point, 0) +}); +class $2784eedf0b35a048$export$2e2bcd8739ae039 { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + for(let i = 0; i < path.commands.length; i++){ + let c = path.commands[i]; + for(let j = 0; j < c.args.length; j += 2){ + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + if (x === midX && y === midY) continue; + } + } + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) flag |= $2784eedf0b35a048$var$ON_CURVE; + flag = this._encodePoint(x, lastX, xPoints, flag, $2784eedf0b35a048$var$X_SHORT_VECTOR, $2784eedf0b35a048$var$SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, $2784eedf0b35a048$var$Y_SHORT_VECTOR, $2784eedf0b35a048$var$SAME_Y); + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= $2784eedf0b35a048$var$REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + flags.push(flag); + lastFlag = flag; + } + lastX = x; + lastY = y; + pointCount++; + } + if (c.command === 'closePath') endPtsOfContours.push(pointCount - 1); + } + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') endPtsOfContours.push(pointCount - 1); + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + let size = $2784eedf0b35a048$var$Glyf.size(glyf); + let tail = 4 - size % 4; + let stream = new $elh9A$restructure.EncodeStream(size + tail); + $2784eedf0b35a048$var$Glyf.encode(stream, glyf); + // Align to 4-byte length + if (tail !== 0) stream.fill(0, tail); + return stream.buffer; + } + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + if (value === last) flag |= sameFlag; + else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) diff = -diff; + else flag |= sameFlag; + } + points.push(diff); + } + return flag; + } +} + + +class $fe042f4b88f46896$export$2e2bcd8739ae039 extends (0, $a8ac370803cb82cf$export$2e2bcd8739ae039) { + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + let buffer = stream.readBuffer(nextOffset - curOffset); + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Uint8Array(buffer); + let view = new DataView(buffer.buffer); + for (let component of glyf.components){ + gid = this.includeGlyph(component.glyphID); + view.setUint16(component.pos, gid); + } + } else if (glyf && this.font._variationProcessor) // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + this.offset += buffer.length; + return this.glyf.length - 1; + } + encode() { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [], + version: this.font.loca.version + }; + this.hmtx = { + metrics: [], + bearings: [] + }; + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while(i < this.glyphs.length)this._addGlyph(this.glyphs[i++]); + let maxp = (0, ($parcel$interopDefault($elh9A$clone)))(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + this.loca.offsets.push(this.offset); + let head = (0, ($parcel$interopDefault($elh9A$clone)))(this.font.head); + head.indexToLocFormat = this.loca.version; + let hhea = (0, ($parcel$interopDefault($elh9A$clone)))(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + // TODO: subset prep, cvt, fpgm? + return (0, $df50e1efe10a1247$export$2e2bcd8739ae039).toBuffer({ + tables: { + head: head, + hhea: hhea, + loca: this.loca, + maxp: maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + } + }); + } + constructor(font){ + super(font); + this.glyphEncoder = new (0, $2784eedf0b35a048$export$2e2bcd8739ae039); + } +} + + + + + + +class $ec40f80c07a4e08a$export$2e2bcd8739ae039 extends (0, $a8ac370803cb82cf$export$2e2bcd8739ae039) { + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + for (let gid of this.glyphs){ + this.charstrings.push(this.cff.getCharString(gid)); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedGsubrs)gsubrs[subr] = true; + } + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + subsetSubrs(subrs, used) { + let res = []; + for(let i = 0; i < subrs.length; i++){ + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else res.push(new Uint8Array([ + 11 + ])); // return + } + return res; + } + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + let used_fds = {}; + let used_subrs = []; + let fd_select = {}; + for (let gid of this.glyphs){ + let fd = this.cff.fdForGlyph(gid); + if (fd == null) continue; + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + fd_select[fd] = topDict.FDArray.length - 1; + } + used_fds[fd] = true; + topDict.FDSelect.fds.push(fd_select[fd]); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[fd_select[fd]][subr] = true; + } + for(let i = 0; i < topDict.FDArray.length; i++){ + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + return; + } + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs){ + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[subr] = true; + } + let privateDict = Object.assign({}, this.cff.topDict.Private); + if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + topDict.FDArray = [ + { + Private: privateDict + } + ]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [ + { + first: 0, + fd: 0 + } + ], + sentinel: this.charstrings.length + }; + } + addString(string) { + if (!string) return null; + if (!this.strings) this.strings = []; + this.strings.push(string); + return (0, $860d3574d7fa3a51$export$2e2bcd8739ae039).length + this.strings.length - 1; + } + encode() { + this.subsetCharstrings(); + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [ + { + first: 1, + nLeft: this.charstrings.length - 2 + } + ] + }; + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + for (let key of [ + 'version', + 'Notice', + 'Copyright', + 'FullName', + 'FamilyName', + 'Weight', + 'PostScript', + 'BaseFontName', + 'FontName' + ])topDict[key] = this.addString(this.cff.string(topDict[key])); + topDict.ROS = [ + this.addString('Adobe'), + this.addString('Identity'), + 0 + ]; + topDict.CIDCount = this.charstrings.length; + if (this.cff.isCIDFont) this.subsetFontdict(topDict); + else this.createCIDFontdict(topDict); + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: 4, + header: this.cff.header, + nameIndex: [ + this.cff.postscriptName + ], + topDictIndex: [ + topDict + ], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + return (0, $5b547cf9e5da519b$export$2e2bcd8739ae039).toBuffer(top); + } + constructor(font){ + super(font); + this.cff = this.font['CFF ']; + if (!this.cff) throw new Error('Not a CFF Font'); + } +} + + + + +class $0a8ef2660a6ce4b6$export$2e2bcd8739ae039 { + static probe(buffer) { + let format = (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + setDefaultLanguage(lang = null) { + this.defaultLanguage = lang; + } + _getTable(table) { + if (!(table.tag in this._tables)) try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if ($59aa4ed98453e1d4$export$bd5c5d8b8dcafd78) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + return this._tables[table.tag]; + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + return null; + } + _decodeDirectory() { + return this.directory = (0, $df50e1efe10a1247$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _decodeTable(table) { + let pos = this.stream.pos; + let stream = this._getTableStream(table.tag); + let result = (0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[table.tag].decode(stream, this, table.length); + this.stream.pos = pos; + return result; + } + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ getName(key, lang = this.defaultLanguage || $59aa4ed98453e1d4$export$42940898df819940) { + let record = this.name && this.name.records[key]; + if (record) // Attempt to retrieve the entry, depending on which translation is available: + return record[lang] || record[this.defaultLanguage] || record[$59aa4ed98453e1d4$export$42940898df819940] || record['en'] || record[Object.keys(record)[0]] // Seriously, ANY language would be fine + || null; + return null; + } + /** + * The unique PostScript name for this font, e.g. "Helvetica-Bold" + * @type {string} + */ get postscriptName() { + return this.getName('postscriptName'); + } + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ get fullName() { + return this.getName('fullName'); + } + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ get familyName() { + return this.getName('fontFamily'); + } + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ get subfamilyName() { + return this.getName('fontSubfamily'); + } + /** + * The font's copyright information + * @type {string} + */ get copyright() { + return this.getName('copyright'); + } + /** + * The font's version number + * @type {string} + */ get version() { + return this.getName('version'); + } + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ get ascent() { + return this.hhea.ascent; + } + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ get descent() { + return this.hhea.descent; + } + /** + * The amount of space that should be included between lines + * @type {number} + */ get lineGap() { + return this.hhea.lineGap; + } + /** + * The offset from the normal underline position that should be used + * @type {number} + */ get underlinePosition() { + return this.post.underlinePosition; + } + /** + * The weight of the underline that should be used + * @type {number} + */ get underlineThickness() { + return this.post.underlineThickness; + } + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ get italicAngle() { + return this.post.italicAngle; + } + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + /** + * The number of glyphs in the font. + * @type {number} + */ get numGlyphs() { + return this.maxp.numGlyphs; + } + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ get unitsPerEm() { + return this.head.unitsPerEm; + } + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ get bbox() { + return Object.freeze(new (0, $0e2da1c4ce69e8ad$export$2e2bcd8739ae039)(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + get _cmapProcessor() { + return new (0, $0d6e160064c86e50$export$2e2bcd8739ae039)(this.cmap); + } + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [ + codePoint + ]); + } + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + while(idx <= len){ + let code = 0; + let nextState = 0; + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0; + } else idx++; + if (state === 0 && nextState === 1) // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [ + last, + code + ])); + else if (state === 0 && nextState === 0) // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + last = code; + state = nextState; + } + return glyphs; + } + get _layoutEngine() { + return new (0, $9d641258c9d7180d$export$2e2bcd8739ae039)(this); + } + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @param {string} [direction] + * @return {GlyphRun} + */ layout(string, userFeatures, script, language, direction) { + return this._layoutEngine.layout(string, userFeatures, script, language, direction); + } + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + getAvailableFeatures(script, language) { + return this._layoutEngine.getAvailableFeatures(script, language); + } + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) this._glyphs[glyph] = new (0, $f680320fa07ef53d$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) this._glyphs[glyph] = new (0, $7ee0705195f3b047$export$2e2bcd8739ae039)(glyph, characters, this); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) this._glyphs[glyph] = new (0, $55855d6d316b015e$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables.COLR && this.directory.tables.CPAL) this._glyphs[glyph] = new (0, $42d9dbd2de9ee2d8$export$2e2bcd8739ae039)(glyph, characters, this); + else this._getBaseGlyph(glyph, characters); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a Subset for this font. + * @return {Subset} + */ createSubset() { + if (this.directory.tables['CFF ']) return new (0, $ec40f80c07a4e08a$export$2e2bcd8739ae039)(this); + return new (0, $fe042f4b88f46896$export$2e2bcd8739ae039)(this); + } + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ get variationAxes() { + let res = {}; + if (!this.fvar) return res; + for (let axis of this.fvar.axis)res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + return res; + } + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ get namedVariations() { + let res = {}; + if (!this.fvar) return res; + for (let instance of this.fvar.instance){ + let settings = {}; + for(let i = 0; i < this.fvar.axis.length; i++){ + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + res[instance.name.en] = settings; + } + return res; + } + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ getVariation(settings) { + if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + if (typeof settings === 'string') settings = this.namedVariations[settings]; + if (typeof settings !== 'object') throw new Error('Variation settings must be either a variation name or settings object.'); + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i)=>{ + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + else return axis.defaultValue; + }); + let stream = new $elh9A$restructure.DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + let font = new $0a8ef2660a6ce4b6$export$2e2bcd8739ae039(stream, coords); + font._tables = this._tables; + return font; + } + get _variationProcessor() { + if (!this.fvar) return null; + let variationCoords = this.variationCoords; + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) return null; + if (!variationCoords) variationCoords = this.fvar.axis.map((axis)=>axis.defaultValue); + return new (0, $7586bb9ea67c41d8$export$2e2bcd8739ae039)(this, variationCoords); + } + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } + constructor(stream, variationCoords = null){ + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'TTF'); + this.defaultLanguage = null; + this.stream = stream; + this.variationCoords = variationCoords; + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + // define properties for each table to lazily parse + for(let tag in this.directory.tables){ + let table = this.directory.tables[tag]; + if ((0, $5825c04ce8f7102d$export$2e2bcd8739ae039)[tag] && table.length > 0) Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } +} +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_cmapProcessor", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "characterSet", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_layoutEngine", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "variationAxes", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "namedVariations", null); +(0, $elh9A$swchelperscjs_ts_decoratecjs._)([ + (0, $3bda6911913b43f0$export$69a3209f1a06c04d) +], $0a8ef2660a6ce4b6$export$2e2bcd8739ae039.prototype, "_variationProcessor", null); + + + + + + +let $89f72d2d7c9afc0d$var$WOFFDirectoryEntry = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + offset: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, 'void', { + type: 'global' + }), + compLength: $elh9A$restructure.uint32, + length: $elh9A$restructure.uint32, + origChecksum: $elh9A$restructure.uint32 +}); +let $89f72d2d7c9afc0d$var$WOFFDirectory = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + flavor: $elh9A$restructure.uint32, + length: $elh9A$restructure.uint32, + numTables: $elh9A$restructure.uint16, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + totalSfntSize: $elh9A$restructure.uint32, + majorVersion: $elh9A$restructure.uint16, + minorVersion: $elh9A$restructure.uint16, + metaOffset: $elh9A$restructure.uint32, + metaLength: $elh9A$restructure.uint32, + metaOrigLength: $elh9A$restructure.uint32, + privOffset: $elh9A$restructure.uint32, + privLength: $elh9A$restructure.uint32, + tables: new $elh9A$restructure.Array($89f72d2d7c9afc0d$var$WOFFDirectoryEntry, 'numTables') +}); +$89f72d2d7c9afc0d$var$WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +var $89f72d2d7c9afc0d$export$2e2bcd8739ae039 = $89f72d2d7c9afc0d$var$WOFFDirectory; + + + + + + +class $8a0a49baaf5d834d$export$2e2bcd8739ae039 extends (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOFF'; + } + _decodeDirectory() { + this.directory = (0, $89f72d2d7c9afc0d$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Uint8Array(table.length); + let buf = (0, ($parcel$interopDefault($elh9A$tinyinflate)))(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new $elh9A$restructure.DecodeStream(buf); + } else return this.stream; + } + return null; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF'); + } +} + + + + + + + + + +class $44b9edca0e403d6d$export$2e2bcd8739ae039 extends (0, $f680320fa07ef53d$export$2e2bcd8739ae039) { + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + _getCBox() { + return this.path.bbox; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF2'); + } +} + + + +const $2f0bfd9a5c1d7b58$var$Base128 = { + decode (stream) { + let result = 0; + let iterable = [ + 0, + 1, + 2, + 3, + 4 + ]; + for(let j = 0; j < iterable.length; j++){ + let i = iterable[j]; + let code = stream.readUInt8(); + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) throw new Error('Overflow'); + result = result << 7 | code & 0x7f; + if ((code & 0x80) === 0) return result; + } + throw new Error('Bad base 128 number'); + } +}; +let $2f0bfd9a5c1d7b58$var$knownTags = [ + 'cmap', + 'head', + 'hhea', + 'hmtx', + 'maxp', + 'name', + 'OS/2', + 'post', + 'cvt ', + 'fpgm', + 'glyf', + 'loca', + 'prep', + 'CFF ', + 'VORG', + 'EBDT', + 'EBLC', + 'gasp', + 'hdmx', + 'kern', + 'LTSH', + 'PCLT', + 'VDMX', + 'vhea', + 'vmtx', + 'BASE', + 'GDEF', + 'GPOS', + 'GSUB', + 'EBSC', + 'JSTF', + 'MATH', + 'CBDT', + 'CBLC', + 'COLR', + 'CPAL', + 'SVG ', + 'sbix', + 'acnt', + 'avar', + 'bdat', + 'bloc', + 'bsln', + 'cvar', + 'fdsc', + 'feat', + 'fmtx', + 'fvar', + 'gvar', + 'hsty', + 'just', + 'lcar', + 'mort', + 'morx', + 'opbd', + 'prop', + 'trak', + 'Zapf', + 'Silf', + 'Glat', + 'Gloc', + 'Feat', + 'Sill' +]; +let $2f0bfd9a5c1d7b58$var$WOFF2DirectoryEntry = new $elh9A$restructure.Struct({ + flags: $elh9A$restructure.uint8, + customTag: new $elh9A$restructure.Optional(new $elh9A$restructure.String(4), (t)=>(t.flags & 0x3f) === 0x3f), + tag: (t)=>t.customTag || $2f0bfd9a5c1d7b58$var$knownTags[t.flags & 0x3f], + length: $2f0bfd9a5c1d7b58$var$Base128, + transformVersion: (t)=>t.flags >>> 6 & 0x03, + transformed: (t)=>t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new $elh9A$restructure.Optional($2f0bfd9a5c1d7b58$var$Base128, (t)=>t.transformed) +}); +let $2f0bfd9a5c1d7b58$var$WOFF2Directory = new $elh9A$restructure.Struct({ + tag: new $elh9A$restructure.String(4), + flavor: $elh9A$restructure.uint32, + length: $elh9A$restructure.uint32, + numTables: $elh9A$restructure.uint16, + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint16), + totalSfntSize: $elh9A$restructure.uint32, + totalCompressedSize: $elh9A$restructure.uint32, + majorVersion: $elh9A$restructure.uint16, + minorVersion: $elh9A$restructure.uint16, + metaOffset: $elh9A$restructure.uint32, + metaLength: $elh9A$restructure.uint32, + metaOrigLength: $elh9A$restructure.uint32, + privOffset: $elh9A$restructure.uint32, + privLength: $elh9A$restructure.uint32, + tables: new $elh9A$restructure.Array($2f0bfd9a5c1d7b58$var$WOFF2DirectoryEntry, 'numTables') +}); +$2f0bfd9a5c1d7b58$var$WOFF2Directory.process = function() { + let tables = {}; + for(let i = 0; i < this.tables.length; i++){ + let table = this.tables[i]; + tables[table.tag] = table; + } + return this.tables = tables; +}; +var $2f0bfd9a5c1d7b58$export$2e2bcd8739ae039 = $2f0bfd9a5c1d7b58$var$WOFF2Directory; + + + +class $333fb94547d9fb5c$export$2e2bcd8739ae039 extends (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOF2'; + } + _decodeDirectory() { + this.directory = (0, $2f0bfd9a5c1d7b58$export$2e2bcd8739ae039).decode(this.stream); + this._dataPos = this.stream.pos; + } + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + let decompressedSize = 0; + for(let tag in this.directory.tables){ + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length; + } + let decompressed = (0, ($parcel$interopDefault($elh9A$brotlidecompressjs)))(buffer, decompressedSize); + if (!decompressed) throw new Error('Error decoding compressed data in WOFF2'); + this.stream = new $elh9A$restructure.DecodeStream(decompressed); + this._decompressed = true; + } + } + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) this._transformGlyfTable(); + return this._glyphs[glyph] = new (0, $44b9edca0e403d6d$export$2e2bcd8739ae039)(glyph, characters, this); + } else return super._getBaseGlyph(glyph, characters); + } + } + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = $333fb94547d9fb5c$var$GlyfTable.decode(this.stream); + let glyphs = []; + for(let index = 0; index < table.numGlyphs; index++){ + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + if (nContours > 0) { + let nPoints = []; + let totalPoints = 0; + for(let i = 0; i < nContours; i++){ + let r = $333fb94547d9fb5c$var$read255UInt16(table.nPoints); + totalPoints += r; + nPoints.push(totalPoints); + } + glyph.points = $333fb94547d9fb5c$var$decodeTriplet(table.flags, table.glyphs, totalPoints); + for(let i = 0; i < nContours; i++)glyph.points[nPoints[i] - 1].endContour = true; + var instructionSize = $333fb94547d9fb5c$var$read255UInt16(table.glyphs); + } else if (nContours < 0) { + let haveInstructions = (0, $f680320fa07ef53d$export$2e2bcd8739ae039).prototype._decodeComposite.call({ + _font: this + }, glyph, table.composites); + if (haveInstructions) var instructionSize = $333fb94547d9fb5c$var$read255UInt16(table.glyphs); + } + glyphs.push(glyph); + } + this._transformedGlyphs = glyphs; + } + constructor(...args){ + super(...args); + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'WOFF2'); + } +} +// Special class that accepts a length and returns a sub-stream for that data +class $333fb94547d9fb5c$var$Substream { + decode(stream, parent) { + return new $elh9A$restructure.DecodeStream(this._buf.decode(stream, parent)); + } + constructor(length){ + this.length = length; + this._buf = new $elh9A$restructure.Buffer(length); + } +} +// This struct represents the entire glyf table +let $333fb94547d9fb5c$var$GlyfTable = new $elh9A$restructure.Struct({ + version: $elh9A$restructure.uint32, + numGlyphs: $elh9A$restructure.uint16, + indexFormat: $elh9A$restructure.uint16, + nContourStreamSize: $elh9A$restructure.uint32, + nPointsStreamSize: $elh9A$restructure.uint32, + flagStreamSize: $elh9A$restructure.uint32, + glyphStreamSize: $elh9A$restructure.uint32, + compositeStreamSize: $elh9A$restructure.uint32, + bboxStreamSize: $elh9A$restructure.uint32, + instructionStreamSize: $elh9A$restructure.uint32, + nContours: new $333fb94547d9fb5c$var$Substream('nContourStreamSize'), + nPoints: new $333fb94547d9fb5c$var$Substream('nPointsStreamSize'), + flags: new $333fb94547d9fb5c$var$Substream('flagStreamSize'), + glyphs: new $333fb94547d9fb5c$var$Substream('glyphStreamSize'), + composites: new $333fb94547d9fb5c$var$Substream('compositeStreamSize'), + bboxes: new $333fb94547d9fb5c$var$Substream('bboxStreamSize'), + instructions: new $333fb94547d9fb5c$var$Substream('instructionStreamSize') +}); +const $333fb94547d9fb5c$var$WORD_CODE = 253; +const $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE2 = 254; +const $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE1 = 255; +const $333fb94547d9fb5c$var$LOWEST_U_CODE = 253; +function $333fb94547d9fb5c$var$read255UInt16(stream) { + let code = stream.readUInt8(); + if (code === $333fb94547d9fb5c$var$WORD_CODE) return stream.readUInt16BE(); + if (code === $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE1) return stream.readUInt8() + $333fb94547d9fb5c$var$LOWEST_U_CODE; + if (code === $333fb94547d9fb5c$var$ONE_MORE_BYTE_CODE2) return stream.readUInt8() + $333fb94547d9fb5c$var$LOWEST_U_CODE * 2; + return code; +} +function $333fb94547d9fb5c$var$withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} +function $333fb94547d9fb5c$var$decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + for(let i = 0; i < nPoints; i++){ + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + if (flag < 10) { + dx = 0; + dy = $333fb94547d9fb5c$var$withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + } else if (flag < 20) { + dx = $333fb94547d9fb5c$var$withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8()); + dy = 0; + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = $333fb94547d9fb5c$var$withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + } else if (flag < 120) { + var b0 = flag - 84; + dx = $333fb94547d9fb5c$var$withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8()); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8()); + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = $333fb94547d9fb5c$var$withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + } else { + dx = $333fb94547d9fb5c$var$withSign(flag, glyphs.readUInt16BE()); + dy = $333fb94547d9fb5c$var$withSign(flag >> 1, glyphs.readUInt16BE()); + } + x += dx; + y += dy; + res.push(new (0, $f680320fa07ef53d$export$baf26146a414f24a)(onCurve, false, x, y)); + } + return res; +} + + + + + + + + +let $e0b2de9958441c02$var$TTCHeader = new $elh9A$restructure.VersionedStruct($elh9A$restructure.uint32, { + 0x00010000: { + numFonts: $elh9A$restructure.uint32, + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint32, 'numFonts') + }, + 0x00020000: { + numFonts: $elh9A$restructure.uint32, + offsets: new $elh9A$restructure.Array($elh9A$restructure.uint32, 'numFonts'), + dsigTag: $elh9A$restructure.uint32, + dsigLength: $elh9A$restructure.uint32, + dsigOffset: $elh9A$restructure.uint32 + } +}); +class $e0b2de9958441c02$export$2e2bcd8739ae039 { + static probe(buffer) { + return (0, $66a5b9fb5318558a$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'ttcf'; + } + getFont(name) { + for (let offset of this.header.offsets){ + let stream = new $elh9A$restructure.DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let offset of this.header.offsets){ + let stream = new $elh9A$restructure.DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'TTC'); + this.stream = stream; + if (stream.readString(4) !== 'ttcf') throw new Error('Not a TrueType collection'); + this.header = $e0b2de9958441c02$var$TTCHeader.decode(stream); + } +} + + + + + +let $d0fe640dc6c78783$var$DFontName = new $elh9A$restructure.String($elh9A$restructure.uint8); +let $d0fe640dc6c78783$var$DFontData = new $elh9A$restructure.Struct({ + len: $elh9A$restructure.uint32, + buf: new $elh9A$restructure.Buffer('len') +}); +let $d0fe640dc6c78783$var$Ref = new $elh9A$restructure.Struct({ + id: $elh9A$restructure.uint16, + nameOffset: $elh9A$restructure.int16, + attr: $elh9A$restructure.uint8, + dataOffset: $elh9A$restructure.uint24, + handle: $elh9A$restructure.uint32 +}); +let $d0fe640dc6c78783$var$Type = new $elh9A$restructure.Struct({ + name: new $elh9A$restructure.String(4), + maxTypeIndex: $elh9A$restructure.uint16, + refList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, new $elh9A$restructure.Array($d0fe640dc6c78783$var$Ref, (t)=>t.maxTypeIndex + 1), { + type: 'parent' + }) +}); +let $d0fe640dc6c78783$var$TypeList = new $elh9A$restructure.Struct({ + length: $elh9A$restructure.uint16, + types: new $elh9A$restructure.Array($d0fe640dc6c78783$var$Type, (t)=>t.length + 1) +}); +let $d0fe640dc6c78783$var$DFontMap = new $elh9A$restructure.Struct({ + reserved: new $elh9A$restructure.Reserved($elh9A$restructure.uint8, 24), + typeList: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, $d0fe640dc6c78783$var$TypeList), + nameListOffset: new $elh9A$restructure.Pointer($elh9A$restructure.uint16, 'void') +}); +let $d0fe640dc6c78783$var$DFontHeader = new $elh9A$restructure.Struct({ + dataOffset: $elh9A$restructure.uint32, + map: new $elh9A$restructure.Pointer($elh9A$restructure.uint32, $d0fe640dc6c78783$var$DFontMap), + dataLength: $elh9A$restructure.uint32, + mapLength: $elh9A$restructure.uint32 +}); +class $d0fe640dc6c78783$export$2e2bcd8739ae039 { + static probe(buffer) { + let stream = new $elh9A$restructure.DecodeStream(buffer); + try { + var header = $d0fe640dc6c78783$var$DFontHeader.decode(stream); + } catch (e) { + return false; + } + for (let type of header.map.typeList.types){ + if (type.name === 'sfnt') return true; + } + return false; + } + getFont(name) { + if (!this.sfnt) return null; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $elh9A$restructure.DecodeStream(this.stream.buffer.slice(pos)); + let font = new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $elh9A$restructure.DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new (0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $elh9A$swchelperscjs_define_propertycjs._)(this, "type", 'DFont'); + this.stream = stream; + this.header = $d0fe640dc6c78783$var$DFontHeader.decode(this.stream); + for (let type of this.header.map.typeList.types){ + for (let ref of type.refList)if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = $d0fe640dc6c78783$var$DFontName.decode(this.stream); + } else ref.name = null; + if (type.name === 'sfnt') this.sfnt = type; + } + } +} + + +// Register font formats +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $0a8ef2660a6ce4b6$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $8a0a49baaf5d834d$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $333fb94547d9fb5c$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $e0b2de9958441c02$export$2e2bcd8739ae039)); +(0, $59aa4ed98453e1d4$export$36b2f24e97d43be)((0, $d0fe640dc6c78783$export$2e2bcd8739ae039)); +$parcel$exportWildcard(module.exports, $59aa4ed98453e1d4$exports); +$parcel$exportWildcard(module.exports, $f39726ff40304956$exports); + + +//# sourceMappingURL=main.cjs.map diff --git a/node_modules/fontkit/dist/main.cjs.map b/node_modules/fontkit/dist/main.cjs.map new file mode 100644 index 0000000..295a54c --- /dev/null +++ b/node_modules/fontkit/dist/main.cjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEO,IAAI,4CAAY;AAEvB,IAAI,gCAAU,EAAE;AACT,SAAS,yCAAe,MAAM;IACnC,8BAAQ,IAAI,CAAC;AACf;AAEO,SAAS,0CAAO,MAAM,EAAE,cAAc;IAC3C,IAAK,IAAI,IAAI,GAAG,IAAI,8BAAQ,MAAM,EAAE,IAAK;QACvC,IAAI,SAAS,6BAAO,CAAC,EAAE;QACvB,IAAI,OAAO,KAAK,CAAC,SAAS;YACxB,IAAI,OAAO,IAAI,OAAO,IAAI,CAAA,GAAA,+BAAW,EAAE;YACvC,IAAI,gBACF,OAAO,KAAK,OAAO,CAAC;YAGtB,OAAO;QACT;IACF;IAEA,MAAM,IAAI,MAAM;AAClB;AAEO,IAAI,4CAAkB;AACtB,SAAS,0CAAmB,OAAO,IAAI;IAC5C,4CAAkB;AACpB;;;;;;;;;ACzBO,SAAS,0CAAS,QAAQ,EAAE,cAAc;IAC/C,IAAI,SAAS,CAAA,GAAA,mCAAC,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAA,GAAA,yCAAK,EAAE,QAAQ;AACxB;AAEO,eAAe,0CAAK,QAAQ,EAAE,cAAc,EAAE,QAAQ;IAC3D,IAAI,OAAO,mBAAmB,YAAY;QACxC,WAAW;QACX,iBAAiB;IACnB;IAEA,IAAI,SAAS,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AAM,CAAC,KAAK,CAAC;YACzD,MAAM,IAAI,CAAC,IAAI,CAAA,GAAA,wCAAM,EAAE;QACzB;QAEA,OAAO;IACT;IArDA,YAAY,MAAM,CAAE;QApBpB,qDAAA,QAAO;QAqBL,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,MAAM,GAAG,kCAAY,MAAM,CAAC,IAAI,CAAC,MAAM;QAE5C,KAAK,IAAI,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAE;YAC/C,KAAK,IAAI,OAAO,KAAK,OAAO,CAC1B,IAAI,IAAI,UAAU,IAAI,GAAG;gBACvB,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc;gBACjE,IAAI,IAAI,GAAG,gCAAU,MAAM,CAAC,IAAI,CAAC,MAAM;YACzC,OACE,IAAI,IAAI,GAAG;YAIf,IAAI,KAAK,IAAI,KAAK,QAChB,IAAI,CAAC,IAAI,GAAG;QAEhB;IACF;AAoCF;;;A/G5GA,wBAAwB;AACxB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAM;AACrB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAO;AACtB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAQ;AACvB,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAiB;AAChC,CAAA,GAAA,wCAAa,EAAE,CAAA,GAAA,wCAAI","sources":["src/node.js","src/base.js","src/fs.js","src/TTFFont.js","src/decorators.js","src/tables/directory.js","src/tables/index.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/tables/name.js","src/encodings.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFFont.js","src/cff/CFFIndex.js","src/cff/CFFTop.js","src/cff/CFFDict.js","src/cff/CFFOperand.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/variations.js","src/tables/opentype.js","src/tables/VORG.js","src/tables/EBLC.js","src/tables/EBDT.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/bsln.js","src/tables/aat.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/CmapProcessor.js","src/utils.js","src/layout/LayoutEngine.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/layout/GlyphRun.js","src/glyph/BBox.js","src/layout/Script.js","src/layout/GlyphPosition.js","src/aat/AATLayoutEngine.js","src/aat/AATFeatureMap.js","src/aat/AATMorxProcessor.js","src/aat/AATStateMachine.js","src/aat/AATLookupTable.js","src/opentype/OTLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/index.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/shapers/HangulShaper.js","src/opentype/GlyphInfo.js","src/opentype/OTProcessor.js","src/opentype/GlyphIterator.js","src/opentype/shapers/IndicShaper.js","src/opentype/shapers/indic.json","src/opentype/shapers/use.json","src/opentype/shapers/indic-data.js","src/opentype/shapers/UniversalShaper.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/glyph/TTFGlyph.js","src/glyph/Glyph.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/TTFSubset.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/CFFSubset.js","src/WOFFFont.js","src/tables/WOFFDirectory.js","src/WOFF2Font.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/TrueTypeCollection.js","src/DFont.js"],"sourcesContent":["import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base';\nimport { open, openSync } from './fs';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nregisterFormat(TTFFont);\nregisterFormat(WOFFFont);\nregisterFormat(WOFF2Font);\nregisterFormat(TrueTypeCollection);\nregisterFormat(DFont);\n\nexport * from './base';\nexport * from './fs';\n","import {DecodeStream} from 'restructure';\n\nexport let logErrors = false;\n\nlet formats = [];\nexport function registerFormat(format) {\n formats.push(format);\n};\n\nexport function create(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n\nexport let defaultLanguage = 'en';\nexport function setDefaultLanguage(lang = 'en') {\n defaultLanguage = lang;\n};\n","import { create } from './base';\nimport fs from 'fs';\n\nexport function openSync(filename, postscriptName) {\n let buffer = fs.readFileSync(filename);\n return create(buffer, postscriptName);\n}\n\nexport async function open(filename, postscriptName, callback) {\n if (typeof postscriptName === 'function') {\n callback = postscriptName;\n postscriptName = null;\n }\n\n let buffer = await fs.promises.readFile(filename);\n return create(buffer, postscriptName);\n}\n","import * as r from 'restructure';\nimport { cache } from './decorators';\nimport * as fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\nimport { asciiDecoder } from './utils';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n type = 'TTF';\n\n static probe(buffer) {\n let format = asciiDecoder.decode(buffer.slice(0, 4));\n return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n }\n\n constructor(stream, variationCoords = null) {\n this.defaultLanguage = null;\n this.stream = stream;\n this.variationCoords = variationCoords;\n\n this._directoryPos = this.stream.pos;\n this._tables = {};\n this._glyphs = {};\n this._decodeDirectory();\n\n // define properties for each table to lazily parse\n for (let tag in this.directory.tables) {\n let table = this.directory.tables[tag];\n if (tables[tag] && table.length > 0) {\n Object.defineProperty(this, tag, {\n get: this._getTable.bind(this, table)\n });\n }\n }\n }\n\n setDefaultLanguage(lang = null) {\n this.defaultLanguage = lang;\n }\n\n _getTable(table) {\n if (!(table.tag in this._tables)) {\n try {\n this._tables[table.tag] = this._decodeTable(table);\n } catch (e) {\n if (fontkit.logErrors) {\n console.error(`Error decoding table ${table.tag}`);\n console.error(e.stack);\n }\n }\n }\n\n return this._tables[table.tag];\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n return this.stream;\n }\n\n return null;\n }\n\n _decodeDirectory() {\n return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n }\n\n _decodeTable(table) {\n let pos = this.stream.pos;\n\n let stream = this._getTableStream(table.tag);\n let result = tables[table.tag].decode(stream, this, table.length);\n\n this.stream.pos = pos;\n return result;\n }\n\n /**\n * Gets a string from the font's `name` table\n * `lang` is a BCP-47 language code.\n * @return {string}\n */\n getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) {\n let record = this.name && this.name.records[key];\n if (record) {\n // Attempt to retrieve the entry, depending on which translation is available:\n return (\n record[lang]\n || record[this.defaultLanguage]\n || record[fontkit.defaultLanguage]\n || record['en']\n || record[Object.keys(record)[0]] // Seriously, ANY language would be fine\n || null\n );\n }\n\n return null;\n }\n\n /**\n * The unique PostScript name for this font, e.g. \"Helvetica-Bold\"\n * @type {string}\n */\n get postscriptName() {\n return this.getName('postscriptName');\n }\n\n /**\n * The font's full name, e.g. \"Helvetica Bold\"\n * @type {string}\n */\n get fullName() {\n return this.getName('fullName');\n }\n\n /**\n * The font's family name, e.g. \"Helvetica\"\n * @type {string}\n */\n get familyName() {\n return this.getName('fontFamily');\n }\n\n /**\n * The font's sub-family, e.g. \"Bold\".\n * @type {string}\n */\n get subfamilyName() {\n return this.getName('fontSubfamily');\n }\n\n /**\n * The font's copyright information\n * @type {string}\n */\n get copyright() {\n return this.getName('copyright');\n }\n\n /**\n * The font's version number\n * @type {string}\n */\n get version() {\n return this.getName('version');\n }\n\n /**\n * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n * @type {number}\n */\n get ascent() {\n return this.hhea.ascent;\n }\n\n /**\n * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n * @type {number}\n */\n get descent() {\n return this.hhea.descent;\n }\n\n /**\n * The amount of space that should be included between lines\n * @type {number}\n */\n get lineGap() {\n return this.hhea.lineGap;\n }\n\n /**\n * The offset from the normal underline position that should be used\n * @type {number}\n */\n get underlinePosition() {\n return this.post.underlinePosition;\n }\n\n /**\n * The weight of the underline that should be used\n * @type {number}\n */\n get underlineThickness() {\n return this.post.underlineThickness;\n }\n\n /**\n * If this is an italic font, the angle the cursor should be drawn at to match the font design\n * @type {number}\n */\n get italicAngle() {\n return this.post.italicAngle;\n }\n\n /**\n * The height of capital letters above the baseline.\n * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n * @type {number}\n */\n get capHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.capHeight : this.ascent;\n }\n\n /**\n * The height of lower case letters in the font.\n * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n * @type {number}\n */\n get xHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.xHeight : 0;\n }\n\n /**\n * The number of glyphs in the font.\n * @type {number}\n */\n get numGlyphs() {\n return this.maxp.numGlyphs;\n }\n\n /**\n * The size of the font’s internal coordinate grid\n * @type {number}\n */\n get unitsPerEm() {\n return this.head.unitsPerEm;\n }\n\n /**\n * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n }\n\n @cache\n get _cmapProcessor() {\n return new CmapProcessor(this.cmap);\n }\n\n /**\n * An array of all of the unicode code points supported by the font.\n * @type {number[]}\n */\n @cache\n get characterSet() {\n return this._cmapProcessor.getCharacterSet();\n }\n\n /**\n * Returns whether there is glyph in the font for the given unicode code point.\n *\n * @param {number} codePoint\n * @return {boolean}\n */\n hasGlyphForCodePoint(codePoint) {\n return !!this._cmapProcessor.lookup(codePoint);\n }\n\n /**\n * Maps a single unicode code point to a Glyph object.\n * Does not perform any advanced substitutions (there is no context to do so).\n *\n * @param {number} codePoint\n * @return {Glyph}\n */\n glyphForCodePoint(codePoint) {\n return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n }\n\n /**\n * Returns an array of Glyph objects for the given string.\n * This is only a one-to-one mapping from characters to glyphs.\n * For most uses, you should use font.layout (described below), which\n * provides a much more advanced mapping supporting AAT and OpenType shaping.\n *\n * @param {string} string\n * @return {Glyph[]}\n */\n glyphsForString(string) {\n let glyphs = [];\n let len = string.length;\n let idx = 0;\n let last = -1;\n let state = -1;\n\n while (idx <= len) {\n let code = 0;\n let nextState = 0;\n\n if (idx < len) {\n // Decode the next codepoint from UTF 16\n code = string.charCodeAt(idx++);\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n }\n }\n\n // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n } else {\n idx++;\n }\n\n if (state === 0 && nextState === 1) {\n // Variation selector following normal codepoint.\n glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n } else if (state === 0 && nextState === 0) {\n // Normal codepoint following normal codepoint.\n glyphs.push(this.glyphForCodePoint(last));\n }\n\n last = code;\n state = nextState;\n }\n\n return glyphs;\n }\n\n @cache\n get _layoutEngine() {\n return new LayoutEngine(this);\n }\n\n /**\n * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n *\n * @param {string} string\n * @param {string[]} [userFeatures]\n * @param {string} [script]\n * @param {string} [language]\n * @param {string} [direction]\n * @return {GlyphRun}\n */\n layout(string, userFeatures, script, language, direction) {\n return this._layoutEngine.layout(string, userFeatures, script, language, direction);\n }\n\n /**\n * Returns an array of strings that map to the given glyph id.\n * @param {number} gid - glyph id\n */\n stringsForGlyph(gid) {\n return this._layoutEngine.stringsForGlyph(gid);\n }\n\n /**\n * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n * (or mapped AAT tags) supported by the font.\n * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n *\n * @type {string[]}\n */\n get availableFeatures() {\n return this._layoutEngine.getAvailableFeatures();\n }\n\n getAvailableFeatures(script, language) {\n return this._layoutEngine.getAvailableFeatures(script, language);\n }\n\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf) {\n this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a glyph object for the given glyph id.\n * You can pass the array of code points this glyph represents for\n * your use later, and it will be stored in the glyph object.\n *\n * @param {number} glyph\n * @param {number[]} characters\n * @return {Glyph}\n */\n getGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.sbix) {\n this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n } else {\n this._getBaseGlyph(glyph, characters);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a Subset for this font.\n * @return {Subset}\n */\n createSubset() {\n if (this.directory.tables['CFF ']) {\n return new CFFSubset(this);\n }\n\n return new TTFSubset(this);\n }\n\n /**\n * Returns an object describing the available variation axes\n * that this font supports. Keys are setting tags, and values\n * contain the axis name, range, and default value.\n *\n * @type {object}\n */\n @cache\n get variationAxes() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let axis of this.fvar.axis) {\n res[axis.axisTag.trim()] = {\n name: axis.name.en,\n min: axis.minValue,\n default: axis.defaultValue,\n max: axis.maxValue\n };\n }\n\n return res;\n }\n\n /**\n * Returns an object describing the named variation instances\n * that the font designer has specified. Keys are variation names\n * and values are the variation settings for this instance.\n *\n * @type {object}\n */\n @cache\n get namedVariations() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let instance of this.fvar.instance) {\n let settings = {};\n for (let i = 0; i < this.fvar.axis.length; i++) {\n let axis = this.fvar.axis[i];\n settings[axis.axisTag.trim()] = instance.coord[i];\n }\n\n res[instance.name.en] = settings;\n }\n\n return res;\n }\n\n /**\n * Returns a new font with the given variation settings applied.\n * Settings can either be an instance name, or an object containing\n * variation tags as specified by the `variationAxes` property.\n *\n * @param {object} settings\n * @return {TTFFont}\n */\n getVariation(settings) {\n if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n }\n\n if (typeof settings === 'string') {\n settings = this.namedVariations[settings];\n }\n\n if (typeof settings !== 'object') {\n throw new Error('Variation settings must be either a variation name or settings object.');\n }\n\n // normalize the coordinates\n let coords = this.fvar.axis.map((axis, i) => {\n let axisTag = axis.axisTag.trim();\n if (axisTag in settings) {\n return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n } else {\n return axis.defaultValue;\n }\n });\n\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = this._directoryPos;\n\n let font = new TTFFont(stream, coords);\n font._tables = this._tables;\n\n return font;\n }\n\n @cache\n get _variationProcessor() {\n if (!this.fvar) {\n return null;\n }\n\n let variationCoords = this.variationCoords;\n\n // Ignore if no variation coords and not CFF2\n if (!variationCoords && !this.CFF2) {\n return null;\n }\n\n if (!variationCoords) {\n variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n }\n\n return new GlyphVariationProcessor(this, variationCoords);\n }\n\n // Standardized format plugin API\n getFont(name) {\n return this.getVariation(name);\n }\n}\n","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n if (descriptor.get) {\n let get = descriptor.get;\n descriptor.get = function() {\n let value = get.call(this);\n Object.defineProperty(this, key, { value });\n return value;\n };\n } else if (typeof descriptor.value === 'function') {\n let fn = descriptor.value;\n\n return {\n get() {\n let cache = new Map;\n function memoized(...args) {\n let key = args.length > 0 ? args[0] : 'value';\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n let result = fn.apply(this, args);\n cache.set(key, result);\n return result;\n };\n\n Object.defineProperty(this, key, {value: memoized});\n return memoized;\n }\n };\n }\n}\n","import * as r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n tag: new r.String(4),\n checkSum: r.uint32,\n offset: new r.Pointer(r.uint32, 'void', { type: 'global' }),\n length: r.uint32\n});\n\nlet Directory = new r.Struct({\n tag: new r.String(4),\n numTables: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n tables: new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nDirectory.preEncode = function() {\n if (!Array.isArray(this.tables)) {\n let tables = [];\n for (let tag in this.tables) {\n let table = this.tables[tag];\n if (table) {\n tables.push({\n tag: tag,\n checkSum: 0,\n offset: new r.VoidPointer(Tables[tag], table),\n length: Tables[tag].size(table)\n });\n }\n }\n \n this.tables = tables;\n }\n\n this.tag = 'true';\n this.numTables = this.tables.length;\n\n let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2));\n let maxPowerOf2 = Math.pow(2, maxExponentFor2);\n\n this.searchRange = maxPowerOf2 * 16;\n this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;\n this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import * as r from 'restructure';\n\nlet SubHeader = new r.Struct({\n firstCode: r.uint16,\n entryCount: r.uint16,\n idDelta: r.int16,\n idRangeOffset: r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n startCharCode: r.uint32,\n endCharCode: r.uint32,\n glyphID: r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n startUnicodeValue: r.uint24,\n additionalCount: r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n unicodeValue: r.uint24,\n glyphID: r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n varSelector: r.uint24,\n defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n 0: { // Byte encoding\n length: r.uint16, // Total table length in bytes (set to 262 for format 0)\n language: r.uint16, // Language code for this encoding subtable, or zero if language-independent\n codeMap: new r.LazyArray(r.uint8, 256)\n },\n\n 2: { // High-byte mapping (CJK)\n length: r.uint16,\n language: r.uint16,\n subHeaderKeys: new r.Array(r.uint16, 256),\n subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys),\n subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')\n },\n\n 4: { // Segment mapping to delta values\n length: r.uint16, // Total table length in bytes\n language: r.uint16, // Language code\n segCountX2: r.uint16,\n segCount: t => t.segCountX2 >> 1,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n endCode: new r.LazyArray(r.uint16, 'segCount'),\n reservedPad: new r.Reserved(r.uint16), // This value should be zero\n startCode: new r.LazyArray(r.uint16, 'segCount'),\n idDelta: new r.LazyArray(r.int16, 'segCount'),\n idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n },\n\n 6: { // Trimmed table\n length: r.uint16,\n language: r.uint16,\n firstCode: r.uint16,\n entryCount: r.uint16,\n glyphIndices: new r.LazyArray(r.uint16, 'entryCount')\n },\n\n 8: { // mixed 16-bit and 32-bit coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint16,\n is32: new r.LazyArray(r.uint8, 8192),\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 10: { // Trimmed Array\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n firstCode: r.uint32,\n entryCount: r.uint32,\n glyphIndices: new r.LazyArray(r.uint16, 'numChars')\n },\n\n 12: { // Segmented coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 14: { // Unicode Variation Sequences\n length: r.uint32,\n numRecords: r.uint32,\n varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n }\n});\n\nlet CmapEntry = new r.Struct({\n platformID: r.uint16, // Platform identifier\n encodingID: r.uint16, // Platform-specific encoding identifier\n table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n version: r.uint16,\n numSubtables: r.uint16,\n tables: new r.Array(CmapEntry, 'numSubtables')\n});\n","import * as r from 'restructure';\n\n// font header\nexport default new r.Struct({\n version: r.int32, // 0x00010000 (version 1.0)\n revision: r.int32, // set by font manufacturer\n checkSumAdjustment: r.uint32,\n magicNumber: r.uint32, // set to 0x5F0F3CF5\n flags: r.uint16,\n unitsPerEm: r.uint16, // range from 64 to 16384\n created: new r.Array(r.int32, 2),\n modified: new r.Array(r.int32, 2),\n xMin: r.int16, // for all glyph bounding boxes\n yMin: r.int16, // for all glyph bounding boxes\n xMax: r.int16, // for all glyph bounding boxes\n yMax: r.int16, // for all glyph bounding boxes\n macStyle: new r.Bitfield(r.uint16, [\n 'bold', 'italic', 'underline', 'outline',\n 'shadow', 'condensed', 'extended'\n ]),\n lowestRecPPEM: r.uint16, // smallest readable size in pixels\n fontDirectionHint: r.int16,\n indexToLocFormat: r.int16, // 0 for short offsets, 1 for long\n glyphDataFormat: r.int16 // 0 for current format\n});\n","import * as r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n version: r.int32,\n ascent: r.int16, // Distance from baseline of highest ascender\n descent: r.int16, // Distance from baseline of lowest descender\n lineGap: r.int16, // Typographic line gap\n advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table\n minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table\n minRightSideBearing: r.int16, // Minimum right sidebearing value\n xMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n caretSlopeRun: r.int16, // 0 for vertical\n caretOffset: r.int16, // Set to 0 for non-slanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // 0 for current format\n numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table\n});\n","import * as r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n advance: r.uint16,\n bearing: r.int16\n});\n\nexport default new r.Struct({\n metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n version: r.int32,\n numGlyphs: r.uint16, // The number of glyphs in the font\n maxPoints: r.uint16, // Maximum points in a non-composite glyph\n maxContours: r.uint16, // Maximum contours in a non-composite glyph\n maxComponentPoints: r.uint16, // Maximum points in a composite glyph\n maxComponentContours: r.uint16, // Maximum contours in a composite glyph\n maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise\n maxTwilightPoints: r.uint16, // Maximum points used in Z0\n maxStorage: r.uint16, // Number of Storage Area locations\n maxFunctionDefs: r.uint16, // Number of FDEFs\n maxInstructionDefs: r.uint16, // Number of IDEFs\n maxStackElements: r.uint16, // Maximum stack depth\n maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions\n maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph\n maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components\n});\n","import * as r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n platformID: r.uint16,\n encodingID: r.uint16,\n languageID: r.uint16,\n nameID: r.uint16,\n length: r.uint16,\n string: new r.Pointer(r.uint16,\n new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n { type: 'parent', relativeTo: ctx => ctx.parent.stringOffset, allowNull: false }\n )\n});\n\nlet LangTagRecord = new r.Struct({\n length: r.uint16,\n tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: ctx => ctx.stringOffset})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n 0: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count')\n },\n 1: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count'),\n langTagCount: r.uint16,\n langTags: new r.Array(LangTagRecord, 'langTagCount')\n }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n 'copyright',\n 'fontFamily',\n 'fontSubfamily',\n 'uniqueSubfamily',\n 'fullName',\n 'version',\n 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n 'trademark',\n 'manufacturer',\n 'designer',\n 'description',\n 'vendorURL',\n 'designerURL',\n 'license',\n 'licenseURL',\n null, // reserved\n 'preferredFamily',\n 'preferredSubfamily',\n 'compatibleFull',\n 'sampleText',\n 'postscriptCIDFontName',\n 'wwsFamilyName',\n 'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n var records = {};\n for (let record of this.records) {\n // find out what language this is for\n let language = LANGUAGES[record.platformID][record.languageID];\n\n if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n language = this.langTags[record.languageID - 0x8000].tag;\n }\n\n if (language == null) {\n language = record.platformID + '-' + record.languageID;\n }\n\n // if the nameID is >= 256, it is a font feature record (AAT)\n let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n if (records[key] == null) {\n records[key] = {};\n }\n\n let obj = records[key];\n if (record.nameID >= 256) {\n obj = obj[record.nameID] || (obj[record.nameID] = {});\n }\n\n if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n obj[language] = record.string;\n }\n }\n\n this.records = records;\n};\n\nNameTable.preEncode = function() {\n if (Array.isArray(this.records)) return;\n this.version = 0;\n\n let records = [];\n for (let key in this.records) {\n let val = this.records[key];\n if (key === 'fontFeatures') continue;\n\n records.push({\n platformID: 3,\n encodingID: 1,\n languageID: 0x409,\n nameID: NAMES.indexOf(key),\n length: val.en.length * 2,\n string: val.en\n });\n\n if (key === 'postscriptName') {\n records.push({\n platformID: 1,\n encodingID: 0,\n languageID: 0,\n nameID: NAMES.indexOf(key),\n length: val.en.length,\n string: val.en\n });\n }\n }\n\n this.records = records;\n this.count = records.length;\n this.stringOffset = NameTable.size(this, null, false);\n};\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n return MAC_LANGUAGE_ENCODINGS[languageID];\n }\n \n return ENCODINGS[platformID][encodingID];\n}\n\nconst SINGLE_BYTE_ENCODINGS = new Set(['x-mac-roman', 'x-mac-cyrillic', 'iso-8859-6', 'iso-8859-8']);\nconst MAC_ENCODINGS = {\n 'x-mac-croatian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',\n 'x-mac-gaelic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',\n 'x-mac-greek': 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\\u00AD',\n 'x-mac-icelandic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-inuit': 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',\n 'x-mac-ce': 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',\n 'x-mac-romanian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-turkish': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'\n};\n\nconst encodingCache = new Map();\n\nexport function getEncodingMapping(encoding) {\n let cached = encodingCache.get(encoding);\n if (cached) {\n return cached;\n }\n\n // These encodings aren't supported by TextDecoder.\n let mapping = MAC_ENCODINGS[encoding];\n if (mapping) {\n let res = new Map();\n for (let i = 0; i < mapping.length; i++) {\n res.set(mapping.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n\n // Only single byte encodings can be mapped 1:1.\n if (SINGLE_BYTE_ENCODINGS.has(encoding)) {\n // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings.\n // Use this to create a mapping of code points.\n let decoder = new TextDecoder(encoding);\n let mapping = new Uint8Array(0x80);\n for (let i = 0; i < 0x80; i++) {\n mapping[i] = 0x80 + i;\n }\n\n let res = new Map();\n let s = decoder.decode(mapping);\n for (let i = 0; i < 0x80; i++) {\n res.set(s.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n // unicode\n ['utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be'],\n \n // macintosh\n // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n // 0\tRoman 17\tMalayalam\n // 1\tJapanese\t 18\tSinhalese\n // 2\tTraditional Chinese\t 19\tBurmese\n // 3\tKorean\t 20\tKhmer\n // 4\tArabic\t 21\tThai\n // 5\tHebrew\t 22\tLaotian\n // 6\tGreek\t 23\tGeorgian\n // 7\tRussian\t 24\tArmenian\n // 8\tRSymbol\t 25\tSimplified Chinese\n // 9\tDevanagari\t 26\tTibetan\n // 10\tGurmukhi\t 27\tMongolian\n // 11\tGujarati\t 28\tGeez\n // 12\tOriya\t 29\tSlavic\n // 13\tBengali\t 30\tVietnamese\n // 14\tTamil\t 31\tSindhi\n // 15\tTelugu\t 32\t(Uninterpreted)\n // 16\tKannada\n ['x-mac-roman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n 'x-mac-greek', 'x-mac-cyrillic', 'x-mac-symbol', 'x-mac-devanagari', 'x-mac-gurmukhi', 'x-mac-gujarati',\n 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n 'Burmese', 'Khmer', 'iso-8859-11', 'Laotian', 'Georgian', 'Armenian', 'gbk', \n 'Tibetan', 'Mongolian', 'Geez', 'x-mac-ce', 'Vietnamese', 'Sindhi'],\n \n // ISO (deprecated)\n ['ascii', null, 'iso-8859-1'],\n \n // windows\n // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n ['symbol', 'utf-16be', 'shift-jis', 'gb18030', 'big5', 'euc-kr', 'johab', null, null, null, 'utf-16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n 15: 'x-mac-icelandic',\n 17: 'x-mac-turkish',\n 18: 'x-mac-croatian',\n 24: 'x-mac-ce',\n 25: 'x-mac-ce',\n 26: 'x-mac-ce',\n 27: 'x-mac-ce',\n 28: 'x-mac-ce',\n 30: 'x-mac-icelandic',\n 37: 'x-mac-romanian',\n 38: 'x-mac-ce',\n 39: 'x-mac-ce',\n 40: 'x-mac-ce',\n 143: 'x-mac-inuit',\n 146: 'x-mac-gaelic'\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n // unicode\n [],\n \n { // macintosh\n 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw',\n 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn',\n 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny',\n 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg',\n 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo',\n 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy',\n 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu',\n 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca',\n 8: 'pt', 38: 'cz', 68: 'as', 131: 'la',\n 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu',\n 10: 'he', 40: 'si', 70: 'pa', 133: 'gn',\n 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay',\n 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt',\n 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug',\n 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz',\n 15: 'is', 45: 'uk', 75: 'te', 138: 'jv',\n 16: 'mt', 46: 'be', 76: 'si', 139: 'su',\n 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl',\n 18: 'hr', 48: 'kk', 78: 'km', 141: 'af',\n 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br',\n 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu',\n 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd',\n 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv',\n 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga',\n 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to',\n 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton',\n 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl',\n 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az',\n 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn',\n 29: 'se', 59: 'ps', 89: 'sw',\n },\n \n // ISO (deprecated)\n [],\n \n { // windows \n 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', \n 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', \n 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', \n 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', \n 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', \n 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', \n 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', \n 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', \n 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', \n 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', \n 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', \n 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', \n 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', \n 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', \n 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', \n 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', \n 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', \n 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', \n 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', \n 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', \n 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', \n 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', \n 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', \n 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', \n 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', \n 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', \n 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', \n 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', \n 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', \n 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', \n 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', \n 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', \n 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', \n 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', \n 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', \n 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', \n 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', \n 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', \n 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', \n 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', \n 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', \n 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', \n 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', \n 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', \n 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', \n 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', \n 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', \n 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', \n 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', \n 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', \n 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', \n 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', \n }\n];\n","import * as r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n header: {\n xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space\n usWeightClass: r.uint16, // visual weight of stroke in glyphs\n usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio)\n fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n null, 'noEmbedding', 'viewOnly', 'editable', null,\n null, null, null, 'noSubsetting', 'bitmapOnly'\n ]),\n ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts\n ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts\n ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts\n ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts\n ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts\n ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts\n ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts\n ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts\n yStrikeoutSize: r.int16, // width of the strikeout stroke\n yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline\n sFamilyClass: r.int16, // classification of font-family design\n panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface\n ulCharRange: new r.Array(r.uint32, 4),\n vendorID: new r.String(4), // four character identifier for the font vendor\n fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font\n 'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n ]),\n usFirstCharIndex: r.uint16, // The minimum Unicode index in this font\n usLastCharIndex: r.uint16 // The maximum Unicode index in this font\n },\n\n // The Apple version of this table ends here, but the Microsoft one continues on...\n 0: {},\n\n 1: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2)\n },\n\n 2: {\n // these should be common with version 1 somehow\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16\n },\n\n 5: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16,\n\n usLowerOpticalPointSize: r.uint16,\n usUpperOpticalPointSize: r.uint16\n }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import * as r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n header: { // these fields exist at the top of all versions\n italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline\n underlineThickness: r.int16, // Suggested values for the underline thickness\n isFixedPitch: r.uint32, // Whether the font is monospaced\n minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n },\n\n 1: {}, // version 1 has no additional fields\n\n 2: {\n numberOfGlyphs: r.uint16,\n glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n names: new r.Array(new r.String(r.uint8))\n },\n\n 2.5: {\n numberOfGlyphs: r.uint16,\n offsets: new r.Array(r.uint8, 'numberOfGlyphs')\n },\n\n 3: {}, // version 3 has no additional fields\n\n 4: {\n map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n }\n});\n","import * as r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n controlValues: new r.Array(r.int16)\n});\n","import * as r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n instructions: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n 0: {\n offsets: new r.Array(r.uint16)\n },\n 1: {\n offsets: new r.Array(r.uint32)\n }\n});\n\nloca.process = function() {\n if (this.version === 0 && !this._processed) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] <<= 1;\n }\n this._processed = true;\n }\n};\n\nloca.preEncode = function() {\n if (this.version === 0 && this._processed !== false) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] >>>= 1;\n }\n this._processed = false;\n }\n};\n\nexport default loca;\n","import * as r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n controlValueProgram: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import * as r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n constructor(stream) {\n this.stream = stream;\n this.decode();\n }\n\n static decode(stream) {\n return new CFFFont(stream);\n }\n\n decode() {\n let start = this.stream.pos;\n let top = CFFTop.decode(this.stream);\n for (let key in top) {\n let val = top[key];\n this[key] = val;\n }\n\n if (this.version < 2) {\n if (this.topDictIndex.length !== 1) {\n throw new Error(\"Only a single font is allowed in CFF\");\n }\n\n this.topDict = this.topDictIndex[0];\n }\n\n this.isCIDFont = this.topDict.ROS != null;\n return this;\n }\n\n string(sid) {\n if (this.version >= 2) {\n return null;\n }\n\n if (sid < standardStrings.length) {\n return standardStrings[sid];\n }\n\n return this.stringIndex[sid - standardStrings.length];\n }\n\n get postscriptName() {\n if (this.version < 2) {\n return this.nameIndex[0];\n }\n\n return null;\n }\n\n get fullName() {\n return this.string(this.topDict.FullName);\n }\n\n get familyName() {\n return this.string(this.topDict.FamilyName);\n }\n\n getCharString(glyph) {\n this.stream.pos = this.topDict.CharStrings[glyph].offset;\n return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n }\n\n getGlyphName(gid) {\n // CFF2 glyph names are in the post table.\n if (this.version >= 2) {\n return null;\n }\n\n // CID-keyed fonts don't have glyph names\n if (this.isCIDFont) {\n return null;\n }\n\n let { charset } = this.topDict;\n if (Array.isArray(charset)) {\n return charset[gid];\n }\n\n if (gid === 0) {\n return '.notdef';\n }\n\n gid -= 1;\n\n switch (charset.version) {\n case 0:\n return this.string(charset.glyphs[gid]);\n\n case 1:\n case 2:\n for (let i = 0; i < charset.ranges.length; i++) {\n let range = charset.ranges[i];\n if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n return this.string(range.first + (gid - range.offset));\n }\n }\n break;\n }\n\n return null;\n }\n\n fdForGlyph(gid) {\n if (!this.topDict.FDSelect) {\n return null;\n }\n\n switch (this.topDict.FDSelect.version) {\n case 0:\n return this.topDict.FDSelect.fds[gid];\n\n case 3:\n case 4:\n let { ranges } = this.topDict.FDSelect;\n let low = 0;\n let high = ranges.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n\n if (gid < ranges[mid].first) {\n high = mid - 1;\n } else if (mid < high && gid >= ranges[mid + 1].first) {\n low = mid + 1;\n } else {\n return ranges[mid].fd;\n }\n }\n default:\n throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n }\n }\n\n privateDictForGlyph(gid) {\n if (this.topDict.FDSelect) {\n let fd = this.fdForGlyph(gid);\n if (this.topDict.FDArray[fd]) {\n return this.topDict.FDArray[fd].Private;\n }\n\n return null;\n }\n\n if (this.version < 2) {\n return this.topDict.Private;\n }\n\n return this.topDict.FDArray[0].Private;\n }\n}\n\nexport default CFFFont;\n","import * as r from 'restructure';\n\nexport default class CFFIndex {\n constructor(type) {\n this.type = type;\n }\n\n getCFFVersion(ctx) {\n while (ctx && !ctx.hdrSize) {\n ctx = ctx.parent;\n }\n\n return ctx ? ctx.version : -1;\n }\n\n decode(stream, parent) {\n let version = this.getCFFVersion(parent);\n let count = version >= 2\n ? stream.readUInt32BE()\n : stream.readUInt16BE();\n\n if (count === 0) {\n return [];\n }\n\n let offSize = stream.readUInt8();\n let offsetType;\n if (offSize === 1) {\n offsetType = r.uint8;\n } else if (offSize === 2) {\n offsetType = r.uint16;\n } else if (offSize === 3) {\n offsetType = r.uint24;\n } else if (offSize === 4) {\n offsetType = r.uint32;\n } else {\n throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n }\n\n let ret = [];\n let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n let start = offsetType.decode(stream);\n for (let i = 0; i < count; i++) {\n let end = offsetType.decode(stream);\n\n if (this.type != null) {\n let pos = stream.pos;\n stream.pos = startPos + start;\n\n parent.length = end - start;\n ret.push(this.type.decode(stream, parent));\n stream.pos = pos;\n } else {\n ret.push({\n offset: startPos + start,\n length: end - start\n });\n }\n\n start = end;\n }\n\n stream.pos = startPos + start;\n return ret;\n }\n\n size(arr, parent) {\n let size = 2;\n if (arr.length === 0) {\n return size;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let offset = 1;\n for (let i = 0; i < arr.length; i++) {\n let item = arr[i];\n offset += type.size(item, parent);\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n size += 1 + offsetType.size() * (arr.length + 1);\n size += offset - 1;\n\n return size;\n }\n\n encode(stream, arr, parent) {\n stream.writeUInt16BE(arr.length);\n if (arr.length === 0) {\n return;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let sizes = [];\n let offset = 1;\n for (let item of arr) {\n let s = type.size(item, parent);\n sizes.push(s);\n offset += s;\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n // write offset size\n stream.writeUInt8(offsetType.size());\n\n // write elements\n offset = 1;\n offsetType.encode(stream, offset);\n\n for (let size of sizes) {\n offset += size;\n offsetType.encode(stream, offset);\n }\n\n for (let item of arr) {\n type.encode(stream, item, parent);\n }\n\n return;\n }\n}\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n constructor(predefinedOps, type) {\n this.predefinedOps = predefinedOps;\n this.type = type;\n }\n\n decode(stream, parent, operands) {\n if (this.predefinedOps[operands[0]]) {\n return this.predefinedOps[operands[0]];\n }\n\n return this.type.decode(stream, parent, operands);\n }\n\n size(value, ctx) {\n return this.type.size(value, ctx);\n }\n\n encode(stream, value, ctx) {\n let index = this.predefinedOps.indexOf(value);\n if (index !== -1) {\n return index;\n }\n\n return this.type.encode(stream, value, ctx);\n }\n}\n\nclass CFFEncodingVersion extends r.Number {\n constructor() {\n super('UInt8');\n }\n\n decode(stream) {\n return r.uint8.decode(stream) & 0x7f;\n }\n}\n\nlet Range1 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n 0: {\n nCodes: r.uint8,\n codes: new r.Array(r.uint8, 'nCodes')\n },\n\n 1: {\n nRanges: r.uint8,\n ranges: new r.Array(Range1, 'nRanges')\n }\n\n // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n decode(stream, parent) {\n let length = resolveLength(this.length, stream, parent);\n let count = 0;\n let res = [];\n while (count < length) {\n let range = this.type.decode(stream, parent);\n range.offset = count;\n count += range.nLeft + 1;\n res.push(range);\n }\n\n return res;\n }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n 0: {\n glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n },\n\n 1: {\n ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n },\n\n 2: {\n ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n first: r.uint16,\n fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n first: r.uint32,\n fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n 0: {\n fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n },\n\n 3: {\n nRanges: r.uint16,\n ranges: new r.Array(FDRange3, 'nRanges'),\n sentinel: r.uint16\n },\n\n 4: {\n nRanges: r.uint32,\n ranges: new r.Array(FDRange4, 'nRanges'),\n sentinel: r.uint32\n }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n decode(stream, parent, operands) {\n parent.length = operands[0];\n return ptr.decode(stream, parent, [operands[1]]);\n }\n\n size(dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n }\n\n encode(stream, dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n }\n}\n\nlet FontDict = new CFFDict([\n // key name type(s) default\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 38], 'FontName', 'sid', null],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [[12, 5], 'PaintType', 'number', 0],\n]);\n\nlet CFFTopDict = new CFFDict([\n // key name type(s) default\n [[12, 30], 'ROS', ['sid', 'sid', 'number'], null],\n\n [0, 'version', 'sid', null],\n [1, 'Notice', 'sid', null],\n [[12, 0], 'Copyright', 'sid', null],\n [2, 'FullName', 'sid', null],\n [3, 'FamilyName', 'sid', null],\n [4, 'Weight', 'sid', null],\n [[12, 1], 'isFixedPitch', 'boolean', false],\n [[12, 2], 'ItalicAngle', 'number', 0],\n [[12, 3], 'UnderlinePosition', 'number', -100],\n [[12, 4], 'UnderlineThickness', 'number', 50],\n [[12, 5], 'PaintType', 'number', 0],\n [[12, 6], 'CharstringType', 'number', 2],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [13, 'UniqueID', 'number', null],\n [5, 'FontBBox', 'array', [0, 0, 0, 0]],\n [[12, 8], 'StrokeWidth', 'number', 0],\n [14, 'XUID', 'array', null],\n [15, 'charset', CFFCharset, ISOAdobeCharset],\n [16, 'Encoding', CFFEncoding, StandardEncoding],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 20], 'SyntheticBase', 'number', null],\n [[12, 21], 'PostScript', 'sid', null],\n [[12, 22], 'BaseFontName', 'sid', null],\n [[12, 23], 'BaseFontBlend', 'delta', null],\n\n // CID font specific\n [[12, 31], 'CIDFontVersion', 'number', 0],\n [[12, 32], 'CIDFontRevision', 'number', 0],\n [[12, 33], 'CIDFontType', 'number', 0],\n [[12, 34], 'CIDCount', 'number', 8720],\n [[12, 35], 'UIDBase', 'number', null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet VariationStore = new r.Struct({\n length: r.uint16,\n itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [24, 'vstore', new CFFPointer(VariationStore), null],\n [25, 'maxstack', 'number', 193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n 1: {\n hdrSize: r.uint8,\n offSize: r.uint8,\n nameIndex: new CFFIndex(new r.String('length')),\n topDictIndex: new CFFIndex(CFFTopDict),\n stringIndex: new CFFIndex(new r.String('length')),\n globalSubrIndex: new CFFIndex\n },\n\n 2: {\n hdrSize: r.uint8,\n length: r.uint16,\n topDict: CFF2TopDict,\n globalSubrIndex: new CFFIndex\n }\n});\n\nexport default CFFTop;\n","import isEqual from 'fast-deep-equal';\nimport * as r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure';\n\nexport default class CFFDict {\n constructor(ops = []) {\n this.ops = ops;\n this.fields = {};\n for (let field of ops) {\n let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n this.fields[key] = field;\n }\n }\n\n decodeOperands(type, stream, ret, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n } else if (type.decode != null) {\n return type.decode(stream, ret, operands);\n } else {\n switch (type) {\n case 'number':\n case 'offset':\n case 'sid':\n return operands[0];\n case 'boolean':\n return !!operands[0];\n default:\n return operands;\n }\n }\n }\n\n encodeOperands(type, stream, ctx, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n } else if (type.encode != null) {\n return type.encode(stream, operands, ctx);\n } else if (typeof operands === 'number') {\n return [operands];\n } else if (typeof operands === 'boolean') {\n return [+operands];\n } else if (Array.isArray(operands)) {\n return operands;\n } else {\n return [operands];\n }\n }\n\n decode(stream, parent) {\n let end = stream.pos + parent.length;\n let ret = {};\n let operands = [];\n\n // define hidden properties\n Object.defineProperties(ret, {\n parent: { value: parent },\n _startOffset: { value: stream.pos }\n });\n\n // fill in defaults\n for (let key in this.fields) {\n let field = this.fields[key];\n ret[field[1]] = field[3];\n }\n\n while (stream.pos < end) {\n let b = stream.readUInt8();\n if (b < 28) {\n if (b === 12) {\n b = (b << 8) | stream.readUInt8();\n }\n\n let field = this.fields[b];\n if (!field) {\n throw new Error(`Unknown operator ${b}`);\n }\n\n let val = this.decodeOperands(field[2], stream, ret, operands);\n if (val != null) {\n if (val instanceof PropertyDescriptor) {\n Object.defineProperty(ret, field[1], val);\n } else {\n ret[field[1]] = val;\n }\n }\n\n operands = [];\n } else {\n operands.push(CFFOperand.decode(stream, b));\n }\n }\n\n return ret;\n }\n\n size(dict, parent, includePointers = true) {\n let ctx = {\n parent,\n val: dict,\n pointerSize: 0,\n startOffset: parent.startOffset || 0\n };\n\n let len = 0;\n\n for (let k in this.fields) {\n let field = this.fields[k];\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], null, ctx, val);\n for (let op of operands) {\n len += CFFOperand.size(op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n len += key.length;\n }\n\n if (includePointers) {\n len += ctx.pointerSize;\n }\n\n return len;\n }\n\n encode(stream, dict, parent) {\n let ctx = {\n pointers: [],\n startOffset: stream.pos,\n parent,\n val: dict,\n pointerSize: 0\n };\n\n ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n for (let field of this.ops) {\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], stream, ctx, val);\n for (let op of operands) {\n CFFOperand.encode(stream, op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n for (let op of key) {\n stream.writeUInt8(op);\n }\n }\n\n let i = 0;\n while (i < ctx.pointers.length) {\n let ptr = ctx.pointers[i++];\n ptr.type.encode(stream, ptr.val, ptr.parent);\n }\n\n return;\n }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n '.': 10,\n 'E': 11,\n 'E-': 12,\n '-': 14\n};\n\nexport default class CFFOperand {\n static decode(stream, value) {\n if (32 <= value && value <= 246) {\n return value - 139;\n }\n\n if (247 <= value && value <= 250) {\n return (value - 247) * 256 + stream.readUInt8() + 108;\n }\n\n if (251 <= value && value <= 254) {\n return -(value - 251) * 256 - stream.readUInt8() - 108;\n }\n\n if (value === 28) {\n return stream.readInt16BE();\n }\n\n if (value === 29) {\n return stream.readInt32BE();\n }\n\n if (value === 30) {\n let str = '';\n while (true) {\n let b = stream.readUInt8();\n\n let n1 = b >> 4;\n if (n1 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n1];\n\n let n2 = b & 15;\n if (n2 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n2];\n }\n\n return parseFloat(str);\n }\n\n return null;\n }\n\n static size(value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, set to 32768\n if (value.forceLarge) {\n value = 32768;\n }\n\n if ((value | 0) !== value) { // floating point\n let str = '' + value;\n return 1 + Math.ceil((str.length + 1) / 2);\n\n } else if (-107 <= value && value <= 107) {\n return 1;\n\n } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n return 2;\n\n } else if (-32768 <= value && value <= 32767) {\n return 3;\n\n } else {\n return 5;\n }\n }\n\n static encode(stream, value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, save the old value and set to 32768\n let val = Number(value);\n\n if (value.forceLarge) {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n\n } else if ((val | 0) !== val) { // floating point\n stream.writeUInt8(30);\n\n let str = '' + val;\n for (let i = 0; i < str.length; i += 2) {\n let c1 = str[i];\n let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n if (i === str.length - 1) {\n var n2 = FLOAT_EOF;\n } else {\n let c2 = str[i + 1];\n var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n }\n\n stream.writeUInt8((n1 << 4) | (n2 & 15));\n }\n\n if (n2 !== FLOAT_EOF) {\n return stream.writeUInt8((FLOAT_EOF << 4));\n }\n\n } else if (-107 <= val && val <= 107) {\n return stream.writeUInt8(val + 139);\n\n } else if (108 <= val && val <= 1131) {\n val -= 108;\n stream.writeUInt8((val >> 8) + 247);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-1131 <= val && val <= -108) {\n val = -val - 108;\n stream.writeUInt8((val >> 8) + 251);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-32768 <= val && val <= 32767) {\n stream.writeUInt8(28);\n return stream.writeInt16BE(val);\n\n } else {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n }\n }\n}\n","import * as r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n constructor(type, options = {}) {\n if (options.type == null) {\n options.type = 'global';\n }\n\n super(null, type, options);\n }\n\n decode(stream, parent, operands) {\n this.offsetType = {\n decode: () => operands[0]\n };\n\n return super.decode(stream, parent, operands);\n }\n\n encode(stream, value, ctx) {\n if (!stream) {\n // compute the size (so ctx.pointerSize is correct)\n this.offsetType = {\n size: () => 0\n };\n\n this.size(value, ctx);\n return [new Ptr(0)];\n }\n\n let ptr = null;\n this.offsetType = {\n encode: (stream, val) => ptr = val\n };\n\n super.encode(stream, value, ctx);\n return [new Ptr(ptr)];\n }\n}\n\nclass Ptr {\n constructor(val) {\n this.val = val;\n this.forceLarge = true;\n }\n\n valueOf() {\n return this.val;\n }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n static decode(stream, parent, operands) {\n let numBlends = operands.pop();\n\n // TODO: actually blend. For now just consume the deltas\n // since we don't use any of the values anyway.\n while (operands.length > numBlends) {\n operands.pop();\n }\n }\n}\n\nexport default new CFFDict([\n // key name type default\n [6, 'BlueValues', 'delta', null],\n [7, 'OtherBlues', 'delta', null],\n [8, 'FamilyBlues', 'delta', null],\n [9, 'FamilyOtherBlues', 'delta', null],\n [[12, 9], 'BlueScale', 'number', 0.039625],\n [[12, 10], 'BlueShift', 'number', 7],\n [[12, 11], 'BlueFuzz', 'number', 1],\n [10, 'StdHW', 'number', null],\n [11, 'StdVW', 'number', null],\n [[12, 12], 'StemSnapH', 'delta', null],\n [[12, 13], 'StemSnapV', 'delta', null],\n [[12, 14], 'ForceBold', 'boolean', false],\n [[12, 17], 'LanguageGroup', 'number', 0],\n [[12, 18], 'ExpansionFactor', 'number', 0.06],\n [[12, 19], 'initialRandomSeed', 'number', 0],\n [20, 'defaultWidthX', 'number', 0],\n [21, 'nominalWidthX', 'number', 0],\n [22, 'vsindex', 'number', 0],\n [23, 'blend', CFFBlendOp, null],\n [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n 'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n 'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n 'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior'\n];\n","import {Feature} from './opentype';\nimport * as r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n startCoord: F2DOT14,\n peakCoord: F2DOT14,\n endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n axisCount: r.uint16,\n regionCount: r.uint16,\n variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n itemCount: r.uint16,\n shortDeltaCount: r.uint16,\n regionIndexCount: r.uint16,\n regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n format: r.uint16,\n variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n variationDataCount: r.uint16,\n itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n 1: {\n axisIndex: r.uint16,\n axisIndex: r.uint16,\n filterRangeMinValue: F2DOT14,\n filterRangeMaxValue: F2DOT14\n }\n});\n\nlet ConditionSet = new r.Struct({\n conditionCount: r.uint16,\n conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n featureIndex: r.uint16,\n alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n version: r.fixed32,\n substitutionCount: r.uint16,\n substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n featureVariationRecordCount: r.uint32,\n featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import * as r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n reserved: new r.Reserved(r.uint16),\n reqFeatureIndex: r.uint16,\n featureCount: r.uint16,\n featureIndexes: new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n tag: new r.String(4),\n langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n count: r.uint16,\n langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nlet FeatureParams = new r.Struct({\n version: r.uint16, // should be set to 0 according OT spec\n nameID: r.uint16, //OT spec: UI Name ID or uiLabelNameId\n});\n\nexport let Feature = new r.Struct({\n featureParams: new r.Pointer(r.uint16, FeatureParams),\n lookupCount: r.uint16,\n lookupListIndexes: new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n tag: new r.String(4),\n feature: new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Struct({\n markAttachmentType: r.uint8,\n flags: new r.Bitfield(r.uint8, [\n 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n 'ignoreMarks', 'useMarkFilteringSet'\n ])\n});\n\nexport function LookupList(SubTable) {\n let Lookup = new r.Struct({\n lookupType: r.uint16,\n flags: LookupFlags,\n subTableCount: r.uint16,\n subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n markFilteringSet: new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet)\n });\n\n return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n 1: {\n glyphCount: r.uint16,\n glyphs: new r.Array(r.uint16, 'glyphCount')\n },\n 2: {\n rangeCount: r.uint16,\n rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n class: r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n 1: { // Class array\n startGlyph: r.uint16,\n glyphCount: r.uint16,\n classValueArray: new r.Array(r.uint16, 'glyphCount')\n },\n 2: { // Class ranges\n classRangeCount: r.uint16,\n classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex\n b: r.uint16, // endSize for Device, innerIndex for VariationIndex\n deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n sequenceIndex: r.uint16,\n lookupListIndex: r.uint16\n});\n\nlet Rule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n input: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n classes: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context\n coverage: new r.Pointer(r.uint16, Coverage),\n ruleSetCount: r.uint16,\n ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n },\n 2: { // Class-based context\n coverage: new r.Pointer(r.uint16, Coverage),\n classDef: new r.Pointer(r.uint16, ClassDef),\n classSetCnt: r.uint16,\n classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n },\n 3: {\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n backtrackGlyphCount: r.uint16,\n backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n input: new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n lookaheadGlyphCount: r.uint16,\n lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context glyph substitution\n coverage: new r.Pointer(r.uint16, Coverage),\n chainCount: r.uint16,\n chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 2: { // Class-based chaining context\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackClassDef: new r.Pointer(r.uint16, ClassDef),\n inputClassDef: new r.Pointer(r.uint16, ClassDef),\n lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),\n chainCount: r.uint16,\n chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 3: { // Coverage-based chaining context\n backtrackGlyphCount: r.uint16,\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n","import * as r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n glyphIndex: r.uint16,\n vertOriginY: r.int16\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n defaultVertOriginY: r.int16,\n numVertOriginYMetrics: r.uint16,\n metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import * as r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n ascender: r.int8,\n descender: r.int8,\n widthMax: r.uint8,\n caretSlopeNumerator: r.int8,\n caretSlopeDenominator: r.int8,\n caretOffset: r.int8,\n minOriginSB: r.int8,\n minAdvanceSB: r.int8,\n maxBeforeBL: r.int8,\n minAfterBL: r.int8,\n pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n glyphCode: r.uint16,\n offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n header: {\n imageFormat: r.uint16,\n imageDataOffset: r.uint32\n },\n\n 1: {\n offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 2: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics\n },\n\n 3: {\n offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 4: {\n numGlyphs: r.uint32,\n glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n },\n\n 5: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics,\n numGlyphs: r.uint32,\n glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n }\n});\n\nlet IndexSubtableArray = new r.Struct({\n firstGlyphIndex: r.uint16,\n lastGlyphIndex: r.uint16,\n subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n indexTablesSize: r.uint32,\n numberOfIndexSubTables: r.uint32,\n colorRef: r.uint32,\n hori: SBitLineMetrics,\n vert: SBitLineMetrics,\n startGlyphIndex: r.uint16,\n endGlyphIndex: r.uint16,\n ppemX: r.uint8,\n ppemY: r.uint8,\n bitDepth: r.uint8,\n flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n version: r.uint32, // 0x00020000\n numSizes: r.uint32,\n sizes: new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import * as r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n horiBearingX: r.int8,\n horiBearingY: r.int8,\n horiAdvance: r.uint8,\n vertBearingX: r.int8,\n vertBearingY: r.int8,\n vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n bearingX: r.int8,\n bearingY: r.int8,\n advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n glyph: r.uint16,\n xOffset: r.int8,\n yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n 1: {\n metrics: SmallMetrics,\n data: ByteAligned\n },\n\n 2: {\n metrics: SmallMetrics,\n data: BitAligned\n },\n\n // format 3 is deprecated\n // format 4 is not supported by Microsoft\n\n 5: {\n data: BitAligned\n },\n\n 6: {\n metrics: BigMetrics,\n data: ByteAligned\n },\n\n 7: {\n metrics: BigMetrics,\n data: BitAligned\n },\n\n 8: {\n metrics: SmallMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 9: {\n metrics: BigMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 17: {\n metrics: SmallMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 18: {\n metrics: BigMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 19: {\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n }\n});\n\n","import * as r from 'restructure';\n\nlet ImageTable = new r.Struct({\n ppem: r.uint16,\n resolution: r.uint16,\n imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n version: r.uint16,\n flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n numImgTables: r.uint32,\n imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import * as r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).\n paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must\n}); // be less than numPaletteEntries in the CPAL table, except for\n // the special case noted below. Each palette entry is 16 bits.\n // A palette index of 0xFFFF is a special case indicating that\n // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only\n // and is not rendered for color.\n firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n // There will be numLayers consecutive entries for this base glyph.\n numLayers: r.uint16\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numBaseGlyphRecords: r.uint16,\n baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n numLayerRecords: r.uint16\n});\n","import * as r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n blue: r.uint8,\n green: r.uint8,\n red: r.uint8,\n alpha: r.uint8\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n header: {\n numPaletteEntries: r.uint16,\n numPalettes: r.uint16,\n numColorRecords: r.uint16,\n colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n colorRecordIndices: new r.Array(r.uint16, 'numPalettes'),\n },\n 0: {},\n 1: {\n offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),\n offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),\n offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16 // X or Y value, in design units\n },\n\n 2: { // Design units plus contour point\n coordinate: r.int16, // X or Y value, in design units\n referenceGlyph: r.uint16, // GlyphID of control glyph\n baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16, // X or Y value, in design units\n deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value\n }\n});\n\nlet BaseValues = new r.Struct({\n defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList\n baseCoordCount: r.uint16,\n baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList\n minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL\n});\n\nlet MinMax = new r.Struct({\n minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n featMinMaxCount: r.uint16, // May be 0\n featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n tag: new r.String(4), // 4-byte language system identification tag\n minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL\n defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL\n baseLangSysCount: r.uint16, // May be 0\n baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n tag: new r.String(4), // 4-byte script identification tag\n script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL\n baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL\n vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL\n },\n\n 0x00010000: {},\n 0x00010001: {\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16\n },\n\n 2: { // Contour point\n caretValuePoint: r.uint16\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16,\n deviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n ligGlyphCount: r.uint16,\n ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n markSetTableFormat: r.uint16,\n markSetCount: r.uint16,\n coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n glyphClassDef: new r.Pointer(r.uint16, ClassDef),\n attachList: new r.Pointer(r.uint16, AttachList),\n ligCaretList: new r.Pointer(r.uint16, LigCaretList),\n markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n },\n\n 0x00010000: {},\n 0x00010002: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)\n },\n 0x00010003: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n 'xPlacement', 'yPlacement',\n 'xAdvance', 'yAdvance',\n 'xPlaDevice', 'yPlaDevice',\n 'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n xPlacement: r.int16,\n yPlacement: r.int16,\n xAdvance: r.int16,\n yAdvance: r.int16,\n xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel })\n};\n\nclass ValueRecord {\n constructor(key = 'valueFormat') {\n this.key = key;\n }\n\n buildStruct(parent) {\n let struct = parent;\n while (!struct[this.key] && struct.parent) {\n struct = struct.parent;\n }\n\n if (!struct[this.key]) return;\n\n let fields = {};\n fields.rel = () => struct._startOffset;\n\n let format = struct[this.key];\n for (let key in format) {\n if (format[key]) {\n fields[key] = types[key];\n }\n }\n\n return new r.Struct(fields);\n }\n\n size(val, ctx) {\n return this.buildStruct(ctx).size(val, ctx);\n }\n\n decode(stream, parent) {\n let res = this.buildStruct(parent).decode(stream, parent);\n delete res.rel;\n return res;\n }\n}\n\nlet PairValueRecord = new r.Struct({\n secondGlyph: r.uint16,\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n xCoordinate: r.int16,\n yCoordinate: r.int16\n },\n\n 2: { // Design units plus contour point\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n anchorPoint: r.uint16\n },\n\n 3: { // Design units plus Device tables\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n xDeviceTable: new r.Pointer(r.uint16, Device),\n yDeviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet EntryExitRecord = new r.Struct({\n entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n class: r.uint16,\n markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n 1: { // Single positioning value\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n value: new ValueRecord()\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n valueCount: r.uint16,\n values: new r.LazyArray(new ValueRecord(), 'valueCount')\n }\n }),\n\n 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n 1: { // Adjustments for glyph pairs\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n pairSetCount: r.uint16,\n pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n },\n\n 2: { // Class pair adjustment\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n classDef1: new r.Pointer(r.uint16, ClassDef),\n classDef2: new r.Pointer(r.uint16, ClassDef),\n class1Count: r.uint16,\n class2Count: r.uint16,\n classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n }\n }),\n\n 3: { // Cursive Attachment Positioning\n format: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n entryExitCount: r.uint16,\n entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')\n },\n\n 4: { // MarkToBase Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n baseCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n baseArray: new r.Pointer(r.uint16, BaseArray)\n },\n\n 5: { // MarkToLigature Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n ligatureCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n ligatureArray: new r.Pointer(r.uint16, LigatureArray)\n },\n\n 6: { // MarkToMark Attachment Positioning\n format: r.uint16,\n mark1Coverage: new r.Pointer(r.uint16, Coverage),\n mark2Coverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n mark1Array: new r.Pointer(r.uint16, MarkArray),\n mark2Array: new r.Pointer(r.uint16, BaseArray)\n },\n\n 7: Context, // Contextual positioning\n 8: ChainingContext, // Chaining contextual positioning\n\n 9: { // Extension Positioning\n posFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 9\n extension: new r.Pointer(r.uint32, null)\n }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n glyph: r.uint16,\n compCount: r.uint16,\n components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, {// Single Substitution\n 1: {\n coverage: new r.Pointer(r.uint16, Coverage),\n deltaGlyphID: r.int16\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n substitute: new r.LazyArray(r.uint16, 'glyphCount')\n }\n }),\n\n 2: { // Multiple Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n },\n\n 3: { // Alternate Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n },\n\n 4: { // Ligature Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n },\n\n 5: Context, // Contextual Substitution\n 6: ChainingContext, // Chaining Contextual Substitution\n\n 7: { // Extension Substitution\n substFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 7\n extension: new r.Pointer(r.uint32, null)\n },\n\n 8: { // Reverse Chaining Contextual Single Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n glyphCount: r.uint16,\n substitutes: new r.Array(r.uint16, 'glyphCount')\n }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n","import * as r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n tag: new r.String(4),\n jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n langSysCount: r.uint16,\n langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n version: r.uint32, // should be 0x00010000\n scriptCount: r.uint16,\n scriptList: new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport { ItemVariationStore } from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n constructor(size) {\n this._size = size;\n }\n\n decode(stream, parent) {\n switch (this.size(0, parent)) {\n case 1: return stream.readUInt8();\n case 2: return stream.readUInt16BE();\n case 3: return stream.readUInt24BE();\n case 4: return stream.readUInt32BE();\n }\n }\n\n size(val, parent) {\n return resolveLength(this._size, null, parent);\n }\n}\n\nlet MapDataEntry = new r.Struct({\n entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n entryFormat: r.uint16,\n mapCount: r.uint16,\n mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import * as r from 'restructure';\n\nlet Signature = new r.Struct({\n format: r.uint32,\n length: r.uint32,\n offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n reserved: new r.Reserved(r.uint16, 2),\n cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature\n signature: new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n ulVersion: r.uint32, // Version number of the DSIG table (0x00000001)\n usNumSigs: r.uint16, // Number of signatures in the table\n usFlag: r.uint16, // Permission flags\n signatures: new r.Array(Signature, 'usNumSigs'),\n signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import * as r from 'restructure';\n\nlet GaspRange = new r.Struct({\n rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem\n rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n 'grayscale', 'gridfit',\n 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType\n ])\n});\n\nexport default new r.Struct({\n version: r.uint16, // set to 0\n numRanges: r.uint16,\n gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import * as r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n pixelSize: r.uint8,\n maximumWidth: r.uint8,\n widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n version: r.uint16,\n numRecords: r.int16,\n sizeDeviceRecord: r.int32,\n records: new r.Array(DeviceRecord, 'numRecords')\n});\n","import * as r from 'restructure';\n\nlet KernPair = new r.Struct({\n left: r.uint16,\n right: r.uint16,\n value: r.int16\n});\n\nlet ClassTable = new r.Struct({\n firstGlyph: r.uint16,\n nGlyphs: r.uint16,\n offsets: new r.Array(r.uint16, 'nGlyphs'),\n max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n off: t => t._startOffset - t.parent.parent._startOffset,\n len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n 0: {\n nPairs: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n pairs: new r.Array(KernPair, 'nPairs')\n },\n\n 2: {\n rowWidth: r.uint16,\n leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n },\n\n 3: {\n glyphCount: r.uint16,\n kernValueCount: r.uint8,\n leftClassCount: r.uint8,\n rightClassCount: r.uint8,\n flags: r.uint8,\n kernValue: new r.Array(r.int16, 'kernValueCount'),\n leftClass: new r.Array(r.uint8, 'glyphCount'),\n rightClass: new r.Array(r.uint8, 'glyphCount'),\n kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n 0: { // Microsoft uses this format\n subVersion: r.uint16, // Microsoft has an extra sub-table version number\n length: r.uint16, // Length of the subtable, in bytes\n format: r.uint8, // Format of subtable\n coverage: new r.Bitfield(r.uint8, [\n 'horizontal', // 1 if table has horizontal data, 0 if vertical\n 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text\n 'override' // If set to 1 the value in this table replaces the accumulated value\n ]),\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n },\n 1: { // Apple uses this format\n length: r.uint32,\n coverage: new r.Bitfield(r.uint8, [\n null, null, null, null, null,\n 'variation', // Set if table has variation kerning values\n 'crossStream', // Set if table has cross-stream kerning values\n 'vertical' // Set if table has vertical kerning values\n ]),\n format: r.uint8,\n tupleIndex: r.uint16,\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n 0: { // Microsoft Version\n nTables: r.uint16,\n tables: new r.Array(KernTable, 'nTables')\n },\n\n 1: { // Apple Version\n reserved: new r.Reserved(r.uint16), // the other half of the version number\n nTables: r.uint32,\n tables: new r.Array(KernTable, 'nTables')\n }\n});\n","import * as r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n version: r.uint16,\n numGlyphs: r.uint16,\n yPels: new r.Array(r.uint8, 'numGlyphs')\n});\n","import * as r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n version: r.uint16,\n fontNumber: r.uint32,\n pitch: r.uint16,\n xHeight: r.uint16,\n style: r.uint16,\n typeFamily: r.uint16,\n capHeight: r.uint16,\n symbolSet: r.uint16,\n typeface: new r.String(16),\n characterComplement: new r.String(8),\n fileName: new r.String(6),\n strokeWeight: new r.String(1),\n widthType: new r.String(1),\n serifStyle: r.uint8,\n reserved: new r.Reserved(r.uint8)\n});\n","import * as r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n bCharSet: r.uint8, // Character set\n xRatio: r.uint8, // Value to use for x-Ratio\n yStartRatio: r.uint8, // Starting y-Ratio value\n yEndRatio: r.uint8 // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n yPelHeight: r.uint16, // yPelHeight to which values apply\n yMax: r.int16, // Maximum value (in pels) for this yPelHeight\n yMin: r.int16 // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n recs: r.uint16, // Number of height records in this group\n startsz: r.uint8, // Starting yPelHeight\n endsz: r.uint8, // Ending yPelHeight\n entries: new r.Array(vTable, 'recs') // The VDMX records\n});\n\nexport default new r.Struct({\n version: r.uint16, // Version number (0 or 1)\n numRecs: r.uint16, // Number of VDMX groups present\n numRatios: r.uint16, // Number of aspect ratio groupings\n ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges\n offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range\n groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings\n});\n","import * as r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n version: r.uint16, // Version number of the Vertical Header Table\n ascent: r.int16, // The vertical typographic ascender for this font\n descent: r.int16, // The vertical typographic descender for this font\n lineGap: r.int16, // The vertical typographic line gap for this font\n advanceHeightMax: r.int16, // The maximum advance height measurement found in the font\n minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font\n minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font\n yMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Caret slope (rise/run)\n caretSlopeRun: r.int16,\n caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // Set to 0\n numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table\n});\n","import * as r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n advance: r.uint16, // The advance height of the glyph\n bearing: r.int16 // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n fromCoord: shortFrac,\n toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n pairCount: r.uint16,\n correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n axisCount: r.uint32,\n segment: new r.Array(Segment, 'axisCount')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n 0: { // Distance-based, no mapping\n deltas: new r.Array(r.int16, 32)\n },\n\n 1: { // Distance-based, with mapping\n deltas: new r.Array(r.int16, 32),\n mappingData: new LookupTable(r.uint16)\n },\n\n 2: { // Control point-based, no mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32)\n },\n\n 3: { // Control point-based, with mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32),\n mappingData: new LookupTable(r.uint16)\n }\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n defaultBaseline: r.uint16,\n subtable: BslnSubtable\n});\n","import * as r from 'restructure';\n\nclass UnboundedArrayAccessor {\n constructor(type, stream, parent) {\n this.type = type;\n this.stream = stream;\n this.parent = parent;\n this.base = this.stream.pos;\n this._items = [];\n }\n\n getItem(index) {\n if (this._items[index] == null) {\n let pos = this.stream.pos;\n this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n this._items[index] = this.type.decode(this.stream, this.parent);\n this.stream.pos = pos;\n }\n\n return this._items[index];\n }\n\n inspect() {\n return `[UnboundedArray ${this.type.constructor.name}]`;\n }\n}\n\nexport class UnboundedArray extends r.Array {\n constructor(type) {\n super(type, 0);\n }\n\n decode(stream, parent) {\n return new UnboundedArrayAccessor(this.type, stream, parent);\n }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n // Helper class that makes internal structures invisible to pointers\n class Shadow {\n constructor(type) {\n this.type = type;\n }\n\n decode(stream, ctx) {\n ctx = ctx.parent.parent;\n return this.type.decode(stream, ctx);\n }\n\n size(val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.size(val, ctx);\n }\n\n encode(stream, val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.encode(stream, val, ctx);\n }\n }\n\n ValueType = new Shadow(ValueType);\n\n let BinarySearchHeader = new r.Struct({\n unitSize: r.uint16,\n nUnits: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16\n });\n\n let LookupSegmentSingle = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n value: ValueType\n });\n\n let LookupSegmentArray = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n });\n\n let LookupSingle = new r.Struct({\n glyph: r.uint16,\n value: ValueType\n });\n\n return new r.VersionedStruct(r.uint16, {\n 0: {\n values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n },\n 2: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n },\n 4: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n },\n 6: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n },\n 8: {\n firstGlyph: r.uint16,\n count: r.uint16,\n values: new r.Array(ValueType, 'count')\n }\n });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n let entry = Object.assign({\n newState: r.uint16,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n let StateHeader = new r.Struct({\n nClasses: r.uint32,\n classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n stateArray: new r.Pointer(r.uint32, StateArray),\n entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n });\n\n return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n let ClassLookupTable = new r.Struct({\n version() { return 8; }, // simulate LookupTable\n firstGlyph: r.uint16,\n values: new r.Array(r.uint8, r.uint16)\n });\n\n let entry = Object.assign({\n newStateOffset: r.uint16,\n // convert offset to stateArray index\n newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n let StateHeader1 = new r.Struct({\n nClasses: r.uint16,\n classTable: new r.Pointer(r.uint16, ClassLookupTable),\n stateArray: new r.Pointer(r.uint16, StateArray),\n entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n });\n\n return StateHeader1;\n}\n","import * as r from 'restructure';\n\nlet Setting = new r.Struct({\n setting: r.uint16,\n nameIndex: r.int16,\n name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n feature: r.uint16,\n nSettings: r.uint16,\n settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n featureFlags: new r.Bitfield(r.uint8, [\n null, null, null, null, null, null,\n 'hasDefault', 'exclusive'\n ]),\n defaultSetting: r.uint8,\n nameIndex: r.int16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n featureNameCount: r.uint16,\n reserved1: new r.Reserved(r.uint16),\n reserved2: new r.Reserved(r.uint32),\n featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import * as r from 'restructure';\n\nlet Axis = new r.Struct({\n axisTag: new r.String(4),\n minValue: r.fixed32,\n defaultValue: r.fixed32,\n maxValue: r.fixed32,\n flags: r.uint16,\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n flags: r.uint16,\n coord: new r.Array(r.fixed32, t => t.parent.axisCount),\n postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0)\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n offsetToData: r.uint16,\n countSizePairs: r.uint16,\n axisCount: r.uint16,\n axisSize: r.uint16,\n instanceCount: r.uint16,\n instanceSize: r.uint16,\n axis: new r.Array(Axis, 'axisCount'),\n instance: new r.Array(Instance, 'instanceCount')\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n static decode(stream, parent) {\n // In short format, offsets are multiplied by 2.\n // This doesn't seem to be documented by Apple, but it\n // is implemented this way in Freetype.\n return parent.flags\n ? stream.readUInt32BE()\n : stream.readUInt16BE() * 2;\n }\n}\n\nlet gvar = new r.Struct({\n version: r.uint16,\n reserved: new r.Reserved(r.uint16),\n axisCount: r.uint16,\n globalCoordCount: r.uint16,\n globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n glyphCount: r.uint16,\n flags: r.uint16,\n offsetToData: r.uint32,\n offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: ctx => ctx.offsetToData, allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import * as r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n length: r.uint16,\n coverage: r.uint16,\n subFeatureFlags: r.uint32,\n stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n justClass: r.uint32,\n beforeGrowLimit: r.fixed32,\n beforeShrinkLimit: r.fixed32,\n afterGrowLimit: r.fixed32,\n afterShrinkLimit: r.fixed32,\n growFlags: r.uint16,\n shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n 0: { // Decomposition action\n lowerLimit: r.fixed32,\n upperLimit: r.fixed32,\n order: r.uint16,\n glyphs: new r.Array(r.uint16, r.uint16)\n },\n\n 1: { // Unconditional add glyph action\n addGlyph: r.uint16\n },\n\n 2: { // Conditional add glyph action\n substThreshold: r.fixed32,\n addGlyph: r.uint16,\n substGlyph: r.uint16\n },\n\n 3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n 4: { // Ductile glyph action (not supported by CoreText)\n variationAxis: r.uint32,\n minimumLimit: r.fixed32,\n noStretchValue: r.fixed32,\n maximumLimit: r.fixed32\n },\n\n 5: { // Repeated add glyph action\n flags: r.uint16,\n glyph: r.uint16\n }\n});\n\nlet Action = new r.Struct({\n actionClass: r.uint16,\n actionType: r.uint16,\n actionLength: r.uint32,\n actionData: ActionData,\n padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n wdcOffset: r.uint16,\n postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: ctx => ctx.wdcOffset }))\n});\n\nexport default new r.Struct({\n version: r.uint32,\n format: r.uint16,\n horizontal: new r.Pointer(r.uint16, JustificationTable),\n vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import * as r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n action: r.uint16\n};\n\nlet ContextualData = {\n markIndex: r.uint16,\n currentIndex: r.uint16\n};\n\nlet InsertionData = {\n currentInsertIndex: r.uint16,\n markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n 0: { // Indic Rearrangement Subtable\n stateTable: new StateTable\n },\n\n 1: { // Contextual Glyph Substitution Subtable\n stateTable: new StateTable(ContextualData),\n substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n },\n\n 2: { // Ligature subtable\n stateTable: new StateTable(LigatureData),\n ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n },\n\n 4: { // Non-contextual Glyph Substitution Subtable\n lookupTable: new LookupTable\n },\n\n 5: { // Glyph Insertion Subtable\n stateTable: new StateTable(InsertionData),\n insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n }\n});\n\nlet Subtable = new r.Struct({\n length: r.uint32,\n coverage: r.uint24,\n type: r.uint8,\n subFeatureFlags: r.uint32,\n table: SubtableData,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n featureType: r.uint16,\n featureSetting: r.uint16,\n enableFlags: r.uint32,\n disableFlags: r.uint32\n});\n\nlet MorxChain = new r.Struct({\n defaultFlags: r.uint32,\n chainLength: r.uint32,\n nFeatureEntries: r.uint32,\n nSubtables: r.uint32,\n features: new r.Array(FeatureEntry, 'nFeatureEntries'),\n subtables: new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n version: r.uint16,\n unused: new r.Reserved(r.uint16),\n nChains: r.uint32,\n chains: new r.Array(MorxChain, 'nChains')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n left: r.int16,\n top: r.int16,\n right: r.int16,\n bottom: r.int16\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n lookupTable: new LookupTable(OpticalBounds)\n});\n","import { binarySearch } from './utils';\nimport { encodingExists, getEncoding, getEncodingMapping } from './encodings';\nimport { cache } from './decorators';\nimport { range } from './utils';\n\nexport default class CmapProcessor {\n constructor(cmapTable) {\n // Attempt to find a Unicode cmap first\n this.encoding = null;\n this.cmap = this.findSubtable(cmapTable, [\n // 32-bit subtables\n [3, 10],\n [0, 6],\n [0, 4],\n\n // 16-bit subtables\n [3, 1],\n [0, 3],\n [0, 2],\n [0, 1],\n [0, 0]\n ]);\n\n // If not unicode cmap was found, take the first table with a supported encoding.\n if (!this.cmap) {\n for (let cmap of cmapTable.tables) {\n let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n let mapping = getEncodingMapping(encoding);\n if (mapping) {\n this.cmap = cmap.table;\n this.encoding = mapping;\n }\n }\n }\n\n if (!this.cmap) {\n throw new Error(\"Could not find a supported cmap table\");\n }\n\n this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n if (this.uvs && this.uvs.version !== 14) {\n this.uvs = null;\n }\n }\n\n findSubtable(cmapTable, pairs) {\n for (let [platformID, encodingID] of pairs) {\n for (let cmap of cmapTable.tables) {\n if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n return cmap.table;\n }\n }\n }\n\n return null;\n }\n\n lookup(codepoint, variationSelector) {\n // If there is no Unicode cmap in this font, we need to re-encode\n // the codepoint in the encoding that the cmap supports.\n if (this.encoding) {\n codepoint = this.encoding.get(codepoint) || codepoint;\n\n // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n } else if (variationSelector) {\n let gid = this.getVariationSelector(codepoint, variationSelector);\n if (gid) {\n return gid;\n }\n }\n\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return cmap.codeMap.get(codepoint) || 0;\n\n case 4: {\n let min = 0;\n let max = cmap.segCount - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n\n if (codepoint < cmap.startCode.get(mid)) {\n max = mid - 1;\n } else if (codepoint > cmap.endCode.get(mid)) {\n min = mid + 1;\n } else {\n let rangeOffset = cmap.idRangeOffset.get(mid);\n let gid;\n\n if (rangeOffset === 0) {\n gid = codepoint + cmap.idDelta.get(mid);\n } else {\n let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n gid = cmap.glyphIndexArray.get(index) || 0;\n if (gid !== 0) {\n gid += cmap.idDelta.get(mid);\n }\n }\n\n return gid & 0xffff;\n }\n }\n\n return 0;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n case 12:\n case 13: {\n let min = 0;\n let max = cmap.nGroups - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let group = cmap.groups.get(mid);\n\n if (codepoint < group.startCharCode) {\n max = mid - 1;\n } else if (codepoint > group.endCharCode) {\n min = mid + 1;\n } else {\n if (cmap.version === 12) {\n return group.glyphID + (codepoint - group.startCharCode);\n } else {\n return group.glyphID;\n }\n }\n }\n\n return 0;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n getVariationSelector(codepoint, variationSelector) {\n if (!this.uvs) {\n return 0;\n }\n\n let selectors = this.uvs.varSelectors.toArray();\n let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n let sel = selectors[i];\n\n if (i !== -1 && sel.defaultUVS) {\n i = binarySearch(sel.defaultUVS, x =>\n codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n );\n }\n\n if (i !== -1 && sel.nonDefaultUVS) {\n i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n if (i !== -1) {\n return sel.nonDefaultUVS[i].glyphID;\n }\n }\n\n return 0;\n }\n\n @cache\n getCharacterSet() {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return range(0, cmap.codeMap.length);\n\n case 4: {\n let res = [];\n let endCodes = cmap.endCode.toArray();\n for (let i = 0; i < endCodes.length; i++) {\n let tail = endCodes[i] + 1;\n let start = cmap.startCode.get(i);\n res.push(...range(start, tail));\n }\n\n return res;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n case 12:\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n\n return res;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n @cache\n codePointsForGlyph(gid) {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0: {\n let res = [];\n for (let i = 0; i < 256; i++) {\n if (cmap.codeMap.get(i) === gid) {\n res.push(i);\n }\n }\n\n return res;\n }\n\n case 4: {\n let res = [];\n for (let i = 0; i < cmap.segCount; i++) {\n let end = cmap.endCode.get(i);\n let start = cmap.startCode.get(i);\n let rangeOffset = cmap.idRangeOffset.get(i);\n let delta = cmap.idDelta.get(i);\n\n for (var c = start; c <= end; c++) {\n let g = 0;\n if (rangeOffset === 0) {\n g = c + delta;\n } else {\n let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n g = cmap.glyphIndexArray.get(index) || 0;\n if (g !== 0) {\n g += delta;\n }\n }\n\n if (g === gid) {\n res.push(c);\n }\n }\n }\n\n return res;\n }\n\n case 12: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n res.push(group.startCharCode + (gid - group.glyphID));\n }\n }\n\n return res;\n }\n\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid === group.glyphID) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n }\n\n return res;\n }\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n}\n","export function binarySearch(arr, cmp) {\n let min = 0;\n let max = arr.length - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let res = cmp(arr[mid]);\n\n if (res < 0) {\n max = mid - 1;\n } else if (res > 0) {\n min = mid + 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n}\n\nexport function range(index, end) {\n let range = [];\n while (index < end) {\n range.push(index++);\n }\n return range;\n}\n\nexport const asciiDecoder = new TextDecoder('ascii');\n\n// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license.\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst LOOKUP = new Uint8Array(256);\nfor (let i = 0; i < CHARS.length; i++) {\n LOOKUP[CHARS.charCodeAt(i)] = i;\n}\n\nexport function decodeBase64(base64) {\n let bufferLength = base64.length * 0.75;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n let bytes = new Uint8Array(bufferLength);\n let p = 0;\n\n for (let i = 0, len = base64.length; i < len; i += 4) {\n let encoded1 = LOOKUP[base64.charCodeAt(i)];\n let encoded2 = LOOKUP[base64.charCodeAt(i + 1)];\n let encoded3 = LOOKUP[base64.charCodeAt(i + 2)];\n let 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 bytes;\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n constructor(font) {\n this.font = font;\n this.unicodeLayoutEngine = null;\n this.kernProcessor = null;\n\n // Choose an advanced layout engine. We try the AAT morx table first since more\n // scripts are currently supported because the shaping logic is built into the font.\n if (this.font.morx) {\n this.engine = new AATLayoutEngine(this.font);\n\n } else if (this.font.GSUB || this.font.GPOS) {\n this.engine = new OTLayoutEngine(this.font);\n }\n }\n\n layout(string, features, script, language, direction) {\n // Make the features parameter optional\n if (typeof features === 'string') {\n direction = language;\n language = script;\n script = features;\n features = [];\n }\n\n // Map string to glyphs if needed\n if (typeof string === 'string') {\n // Attempt to detect the script from the string if not provided.\n if (script == null) {\n script = Script.forString(string);\n }\n\n var glyphs = this.font.glyphsForString(string);\n } else {\n // Attempt to detect the script from the glyph code points if not provided.\n if (script == null) {\n let codePoints = [];\n for (let glyph of string) {\n codePoints.push(...glyph.codePoints);\n }\n\n script = Script.forCodePoints(codePoints);\n }\n\n var glyphs = string;\n }\n\n let glyphRun = new GlyphRun(glyphs, features, script, language, direction);\n\n // Return early if there are no glyphs\n if (glyphs.length === 0) {\n glyphRun.positions = [];\n return glyphRun;\n }\n\n // Setup the advanced layout engine\n if (this.engine && this.engine.setup) {\n this.engine.setup(glyphRun);\n }\n\n // Substitute and position the glyphs\n this.substitute(glyphRun);\n this.position(glyphRun);\n\n this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions);\n\n // Let the layout engine clean up any state it might have\n if (this.engine && this.engine.cleanup) {\n this.engine.cleanup();\n }\n\n return glyphRun;\n }\n\n substitute(glyphRun) {\n // Call the advanced layout engine to make substitutions\n if (this.engine && this.engine.substitute) {\n this.engine.substitute(glyphRun);\n }\n }\n\n position(glyphRun) {\n // Get initial glyph positions\n glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n let positioned = null;\n\n // Call the advanced layout engine. Returns the features applied.\n if (this.engine && this.engine.position) {\n positioned = this.engine.position(glyphRun);\n }\n\n // if there is no GPOS table, use unicode properties to position marks.\n if (!positioned && (!this.engine || this.engine.fallbackPosition)) {\n if (!this.unicodeLayoutEngine) {\n this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n }\n\n this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);\n }\n\n // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {\n if (!this.kernProcessor) {\n this.kernProcessor = new KernProcessor(this.font);\n }\n\n this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);\n glyphRun.features.kern = true;\n }\n }\n\n hideDefaultIgnorables(glyphs, positions) {\n let space = this.font.glyphForCodePoint(0x20);\n for (let i = 0; i < glyphs.length; i++) {\n if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {\n glyphs[i] = space;\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n isDefaultIgnorable(ch) {\n // From DerivedCoreProperties.txt in the Unicode database,\n // minus U+115F, U+1160, U+3164 and U+FFA0, which is what\n // Harfbuzz and Uniscribe do.\n let plane = ch >> 16;\n if (plane === 0) {\n // BMP\n switch (ch >> 8) {\n \tcase 0x00: return ch === 0x00AD;\n \tcase 0x03: return ch === 0x034F;\n \tcase 0x06: return ch === 0x061C;\n \tcase 0x17: return 0x17B4 <= ch && ch <= 0x17B5;\n \tcase 0x18: return 0x180B <= ch && ch <= 0x180E;\n \tcase 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F);\n \tcase 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF;\n \tcase 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8;\n \tdefault: return false;\n }\n } else {\n // Other planes\n switch (plane) {\n \tcase 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A);\n \tcase 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF;\n \tdefault: return false;\n }\n }\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.engine) {\n features.push(...this.engine.getAvailableFeatures(script, language));\n }\n\n if (this.font.kern && features.indexOf('kern') === -1) {\n features.push('kern');\n }\n\n return features;\n }\n\n stringsForGlyph(gid) {\n let result = new Set;\n\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n for (let codePoint of codePoints) {\n result.add(String.fromCodePoint(codePoint));\n }\n\n if (this.engine && this.engine.stringsForGlyph) {\n for (let string of this.engine.stringsForGlyph(gid)) {\n result.add(string);\n }\n }\n\n return Array.from(result);\n }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n constructor(font) {\n this.kern = font.kern;\n }\n\n process(glyphs, positions) {\n for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n let left = glyphs[glyphIndex].id;\n let right = glyphs[glyphIndex + 1].id;\n positions[glyphIndex].xAdvance += this.getKerning(left, right);\n }\n }\n\n getKerning(left, right) {\n let res = 0;\n\n for (let table of this.kern.tables) {\n if (table.coverage.crossStream) {\n continue;\n }\n\n switch (table.version) {\n case 0:\n if (!table.coverage.horizontal) {\n continue;\n }\n\n break;\n case 1:\n if (table.coverage.vertical || table.coverage.variation) {\n continue;\n }\n\n break;\n default:\n throw new Error(`Unsupported kerning table version ${table.version}`);\n }\n\n let val = 0;\n let s = table.subtable;\n switch (table.format) {\n case 0:\n let pairIdx = binarySearch(s.pairs, function (pair) {\n return (left - pair.left) || (right - pair.right);\n });\n\n if (pairIdx >= 0) {\n val = s.pairs[pairIdx].value;\n }\n\n break;\n\n case 2:\n let leftOffset = 0, rightOffset = 0;\n if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n } else {\n leftOffset = s.array.off;\n }\n\n if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n }\n\n let index = (leftOffset + rightOffset - s.array.off) / 2;\n val = s.array.values.get(index);\n break;\n\n case 3:\n if (left >= s.glyphCount || right >= s.glyphCount) {\n return 0;\n }\n\n val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n break;\n\n default:\n throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n }\n\n // Microsoft supports the override flag, which resets the result\n // Otherwise, the sum of the results from all subtables is returned\n if (table.coverage.override) {\n res = val;\n } else {\n res += val;\n }\n }\n\n return res;\n }\n}\n","import {getCombiningClass} from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n constructor(font) {\n this.font = font;\n }\n\n positionGlyphs(glyphs, positions) {\n // find each base + mark cluster, and position the marks relative to the base\n let clusterStart = 0;\n let clusterEnd = 0;\n for (let index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.isMark) { // TODO: handle ligatures\n clusterEnd = index;\n } else {\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n clusterStart = clusterEnd = index;\n }\n }\n\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n return positions;\n }\n\n positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n let base = glyphs[clusterStart];\n let baseBox = base.cbox.copy();\n\n // adjust bounding box for ligature glyphs\n if (base.codePoints.length > 1) {\n // LTR. TODO: RTL support.\n baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n }\n\n let xOffset = -positions[clusterStart].xAdvance;\n let yOffset = 0;\n let yGap = this.font.unitsPerEm / 16;\n\n // position each of the mark glyphs relative to the base glyph\n for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n let mark = glyphs[index];\n let markBox = mark.cbox;\n let position = positions[index];\n\n let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n if (combiningClass !== 'Not_Reordered') {\n position.xOffset = position.yOffset = 0;\n\n // x positioning\n switch (combiningClass) {\n case 'Double_Above':\n case 'Double_Below':\n // LTR. TODO: RTL support.\n position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n break;\n\n case 'Attached_Below_Left':\n case 'Below_Left':\n case 'Above_Left':\n // left align\n position.xOffset += baseBox.minX - markBox.minX;\n break;\n\n case 'Attached_Above_Right':\n case 'Below_Right':\n case 'Above_Right':\n // right align\n position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n break;\n\n default: // Attached_Below, Attached_Above, Below, Above, other\n // center align\n position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n }\n\n // y positioning\n switch (combiningClass) {\n case 'Double_Below':\n case 'Below_Left':\n case 'Below':\n case 'Below_Right':\n case 'Attached_Below_Left':\n case 'Attached_Below':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n baseBox.minY += yGap;\n }\n\n position.yOffset = -baseBox.minY - markBox.maxY;\n baseBox.minY += markBox.height;\n break;\n\n case 'Double_Above':\n case 'Above_Left':\n case 'Above':\n case 'Above_Right':\n case 'Attached_Above':\n case 'Attached_Above_Right':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n baseBox.maxY += yGap;\n }\n\n position.yOffset = baseBox.maxY - markBox.minY;\n baseBox.maxY += markBox.height;\n break;\n }\n\n position.xAdvance = position.yAdvance = 0;\n position.xOffset += xOffset;\n position.yOffset += yOffset;\n\n } else {\n xOffset -= position.xAdvance;\n yOffset -= position.yAdvance;\n }\n }\n\n return;\n }\n\n getCombiningClass(codePoint) {\n let combiningClass = getCombiningClass(codePoint);\n\n // Thai / Lao need some per-character work\n if ((codePoint & ~0xff) === 0x0e00) {\n if (combiningClass === 'Not_Reordered') {\n switch (codePoint) {\n case 0x0e31:\n case 0x0e34:\n case 0x0e35:\n case 0x0e36:\n case 0x0e37:\n case 0x0e47:\n case 0x0e4c:\n case 0x0e3d:\n case 0x0e4e:\n return 'Above_Right';\n\n case 0x0eb1:\n case 0x0eb4:\n case 0x0eb5:\n case 0x0eb6:\n case 0x0eb7:\n case 0x0ebb:\n case 0x0ecc:\n case 0x0ecd:\n return 'Above';\n\n case 0x0ebc:\n return 'Below';\n }\n } else if (codePoint === 0x0e3a) { // virama\n return 'Below_Right';\n }\n }\n\n switch (combiningClass) {\n // Hebrew\n\n case 'CCC10': // sheva\n case 'CCC11': // hataf segol\n case 'CCC12': // hataf patah\n case 'CCC13': // hataf qamats\n case 'CCC14': // hiriq\n case 'CCC15': // tsere\n case 'CCC16': // segol\n case 'CCC17': // patah\n case 'CCC18': // qamats\n case 'CCC20': // qubuts\n case 'CCC22': // meteg\n return 'Below';\n\n case 'CCC23': // rafe\n return 'Attached_Above';\n\n case 'CCC24': // shin dot\n return 'Above_Right';\n\n case 'CCC25': // sin dot\n case 'CCC19': // holam\n return 'Above_Left';\n\n case 'CCC26': // point varika\n return 'Above';\n\n case 'CCC21': // dagesh\n break;\n\n // Arabic and Syriac\n\n case 'CCC27': // fathatan\n case 'CCC28': // dammatan\n case 'CCC30': // fatha\n case 'CCC31': // damma\n case 'CCC33': // shadda\n case 'CCC34': // sukun\n case 'CCC35': // superscript alef\n case 'CCC36': // superscript alaph\n return 'Above';\n\n case 'CCC29': // kasratan\n case 'CCC32': // kasra\n return 'Below';\n\n // Thai\n\n case 'CCC103': // sara u / sara uu\n return 'Below_Right';\n\n case 'CCC107': // mai\n return 'Above_Right';\n\n // Lao\n\n case 'CCC118': // sign u / sign uu\n return 'Below';\n\n case 'CCC122': // mai\n return 'Above';\n\n // Tibetan\n\n case 'CCC129': // sign aa\n case 'CCC132': // sign u\n return 'Below';\n\n case 'CCC130': // sign i\n return 'Above';\n }\n\n return combiningClass;\n }\n}\n","import BBox from '../glyph/BBox';\nimport * as Script from '../layout/Script';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n constructor(glyphs, features, script, language, direction) {\n /**\n * An array of Glyph objects in the run\n * @type {Glyph[]}\n */\n this.glyphs = glyphs;\n\n /**\n * An array of GlyphPosition objects for each glyph in the run\n * @type {GlyphPosition[]}\n */\n this.positions = null;\n\n /**\n * The script that was requested for shaping. This was either passed in or detected automatically.\n * @type {string}\n */\n this.script = script;\n\n /**\n * The language requested for shaping, as passed in. If `null`, the default language for the\n * script was used.\n * @type {string}\n */\n this.language = language || null;\n\n /**\n * The direction requested for shaping, as passed in (either ltr or rtl).\n * If `null`, the default direction of the script is used.\n * @type {string}\n */\n this.direction = direction || Script.direction(script);\n\n /**\n * The features requested during shaping. This is a combination of user\n * specified features and features chosen by the shaper.\n * @type {object}\n */\n this.features = {};\n\n // Convert features to an object\n if (Array.isArray(features)) {\n for (let tag of features) {\n this.features[tag] = true;\n }\n } else if (typeof features === 'object') {\n this.features = features;\n }\n }\n\n /**\n * The total advance width of the run.\n * @type {number}\n */\n get advanceWidth() {\n let width = 0;\n for (let position of this.positions) {\n width += position.xAdvance;\n }\n\n return width;\n }\n\n /**\n * The total advance height of the run.\n * @type {number}\n */\n get advanceHeight() {\n let height = 0;\n for (let position of this.positions) {\n height += position.yAdvance;\n }\n\n return height;\n }\n\n /**\n * The bounding box containing all glyphs in the run.\n * @type {BBox}\n */\n get bbox() {\n let bbox = new BBox;\n\n let x = 0;\n let y = 0;\n for (let index = 0; index < this.glyphs.length; index++) {\n let glyph = this.glyphs[index];\n let p = this.positions[index];\n let b = glyph.bbox;\n\n bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n x += p.xAdvance;\n y += p.yAdvance;\n }\n\n return bbox;\n }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n /**\n * The minimum X position in the bounding box\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * The minimum Y position in the bounding box\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * The maxmimum X position in the bounding box\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * The maxmimum Y position in the bounding box\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * The width of the bounding box\n * @type {number}\n */\n get width() {\n return this.maxX - this.minX;\n }\n\n /**\n * The height of the bounding box\n * @type {number}\n */\n get height() {\n return this.maxY - this.minY;\n }\n\n addPoint(x, y) {\n if (Math.abs(x) !== Infinity) {\n if (x < this.minX) {\n this.minX = x;\n }\n\n if (x > this.maxX) {\n this.maxX = x;\n }\n }\n\n if (Math.abs(y) !== Infinity) {\n if (y < this.minY) {\n this.minY = y;\n }\n\n if (y > this.maxY) {\n this.maxY = y;\n }\n }\n }\n\n copy() {\n return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n }\n}\n","import {getScript} from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n Caucasian_Albanian: 'aghb',\n Arabic: 'arab',\n Imperial_Aramaic: 'armi',\n Armenian: 'armn',\n Avestan: 'avst',\n Balinese: 'bali',\n Bamum: 'bamu',\n Bassa_Vah: 'bass',\n Batak: 'batk',\n Bengali: ['bng2', 'beng'],\n Bopomofo: 'bopo',\n Brahmi: 'brah',\n Braille: 'brai',\n Buginese: 'bugi',\n Buhid: 'buhd',\n Chakma: 'cakm',\n Canadian_Aboriginal: 'cans',\n Carian: 'cari',\n Cham: 'cham',\n Cherokee: 'cher',\n Coptic: 'copt',\n Cypriot: 'cprt',\n Cyrillic: 'cyrl',\n Devanagari: ['dev2', 'deva'],\n Deseret: 'dsrt',\n Duployan: 'dupl',\n Egyptian_Hieroglyphs: 'egyp',\n Elbasan: 'elba',\n Ethiopic: 'ethi',\n Georgian: 'geor',\n Glagolitic: 'glag',\n Gothic: 'goth',\n Grantha: 'gran',\n Greek: 'grek',\n Gujarati: ['gjr2', 'gujr'],\n Gurmukhi: ['gur2', 'guru'],\n Hangul: 'hang',\n Han: 'hani',\n Hanunoo: 'hano',\n Hebrew: 'hebr',\n Hiragana: 'hira',\n Pahawh_Hmong: 'hmng',\n Katakana_Or_Hiragana: 'hrkt',\n Old_Italic: 'ital',\n Javanese: 'java',\n Kayah_Li: 'kali',\n Katakana: 'kana',\n Kharoshthi: 'khar',\n Khmer: 'khmr',\n Khojki: 'khoj',\n Kannada: ['knd2', 'knda'],\n Kaithi: 'kthi',\n Tai_Tham: 'lana',\n Lao: 'lao ',\n Latin: 'latn',\n Lepcha: 'lepc',\n Limbu: 'limb',\n Linear_A: 'lina',\n Linear_B: 'linb',\n Lisu: 'lisu',\n Lycian: 'lyci',\n Lydian: 'lydi',\n Mahajani: 'mahj',\n Mandaic: 'mand',\n Manichaean: 'mani',\n Mende_Kikakui: 'mend',\n Meroitic_Cursive: 'merc',\n Meroitic_Hieroglyphs: 'mero',\n Malayalam: ['mlm2', 'mlym'],\n Modi: 'modi',\n Mongolian: 'mong',\n Mro: 'mroo',\n Meetei_Mayek: 'mtei',\n Myanmar: ['mym2', 'mymr'],\n Old_North_Arabian: 'narb',\n Nabataean: 'nbat',\n Nko: 'nko ',\n Ogham: 'ogam',\n Ol_Chiki: 'olck',\n Old_Turkic: 'orkh',\n Oriya: ['ory2', 'orya'],\n Osmanya: 'osma',\n Palmyrene: 'palm',\n Pau_Cin_Hau: 'pauc',\n Old_Permic: 'perm',\n Phags_Pa: 'phag',\n Inscriptional_Pahlavi: 'phli',\n Psalter_Pahlavi: 'phlp',\n Phoenician: 'phnx',\n Miao: 'plrd',\n Inscriptional_Parthian: 'prti',\n Rejang: 'rjng',\n Runic: 'runr',\n Samaritan: 'samr',\n Old_South_Arabian: 'sarb',\n Saurashtra: 'saur',\n Shavian: 'shaw',\n Sharada: 'shrd',\n Siddham: 'sidd',\n Khudawadi: 'sind',\n Sinhala: 'sinh',\n Sora_Sompeng: 'sora',\n Sundanese: 'sund',\n Syloti_Nagri: 'sylo',\n Syriac: 'syrc',\n Tagbanwa: 'tagb',\n Takri: 'takr',\n Tai_Le: 'tale',\n New_Tai_Lue: 'talu',\n Tamil: ['tml2', 'taml'],\n Tai_Viet: 'tavt',\n Telugu: ['tel2', 'telu'],\n Tifinagh: 'tfng',\n Tagalog: 'tglg',\n Thaana: 'thaa',\n Thai: 'thai',\n Tibetan: 'tibt',\n Tirhuta: 'tirh',\n Ugaritic: 'ugar',\n Vai: 'vai ',\n Warang_Citi: 'wara',\n Old_Persian: 'xpeo',\n Cuneiform: 'xsux',\n Yi: 'yi ',\n Inherited: 'zinh',\n Common: 'zyyy',\n Unknown: 'zzzz'\n};\n\nconst OPENTYPE_SCRIPTS = {};\nfor (let script in UNICODE_SCRIPTS) {\n let tag = UNICODE_SCRIPTS[script];\n if (Array.isArray(tag)) {\n for (let t of tag) {\n OPENTYPE_SCRIPTS[t] = script;\n }\n } else {\n OPENTYPE_SCRIPTS[tag] = script;\n }\n}\n\nexport function fromUnicode(script) {\n return UNICODE_SCRIPTS[script];\n}\n\nexport function fromOpenType(tag) {\n return OPENTYPE_SCRIPTS[tag];\n}\n\nexport function forString(string) {\n let len = string.length;\n let idx = 0;\n while (idx < len) {\n let code = string.charCodeAt(idx++);\n\n // Check if this is a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n\n // Check if this is a low surrogate\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n }\n }\n\n let script = getScript(code);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n let codePoint = codePoints[i];\n let script = getScript(codePoint);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n arab: true, // Arabic\n hebr: true, // Hebrew\n syrc: true, // Syriac\n thaa: true, // Thaana\n cprt: true, // Cypriot Syllabary\n khar: true, // Kharosthi\n phnx: true, // Phoenician\n 'nko ': true, // N'Ko\n lydi: true, // Lydian\n avst: true, // Avestan\n armi: true, // Imperial Aramaic\n phli: true, // Inscriptional Pahlavi\n prti: true, // Inscriptional Parthian\n sarb: true, // Old South Arabian\n orkh: true, // Old Turkic, Orkhon Runic\n samr: true, // Samaritan\n mand: true, // Mandaic, Mandaean\n merc: true, // Meroitic Cursive\n mero: true, // Meroitic Hieroglyphs\n\n // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n mani: true, // Manichaean\n mend: true, // Mende Kikakui\n nbat: true, // Nabataean\n narb: true, // Old North Arabian\n palm: true, // Palmyrene\n phlp: true // Psalter Pahlavi\n};\n\nexport function direction(script) {\n if (RTL[script]) {\n return 'rtl';\n }\n\n return 'ltr';\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n /**\n * The amount to move the virtual pen in the X direction after rendering this glyph.\n * @type {number}\n */\n this.xAdvance = xAdvance;\n\n /**\n * The amount to move the virtual pen in the Y direction after rendering this glyph.\n * @type {number}\n */\n this.yAdvance = yAdvance;\n\n /**\n * The offset from the pen position in the X direction at which to render this glyph.\n * @type {number}\n */\n this.xOffset = xOffset;\n\n /**\n * The offset from the pen position in the Y direction at which to render this glyph.\n * @type {number}\n */\n this.yOffset = yOffset;\n }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n constructor(font) {\n this.font = font;\n this.morxProcessor = new AATMorxProcessor(font);\n this.fallbackPosition = false;\n }\n\n substitute(glyphRun) {\n // AAT expects the glyphs to be in visual order prior to morx processing,\n // so reverse the glyphs if the script is right-to-left.\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n }\n\n this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features));\n }\n\n getAvailableFeatures(script, language) {\n return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n }\n\n stringsForGlyph(gid) {\n let glyphStrings = this.morxProcessor.generateInputs(gid);\n let result = new Set;\n\n for (let glyphs of glyphStrings) {\n this._addStrings(glyphs, 0, result, '');\n }\n\n return result;\n }\n\n _addStrings(glyphs, index, strings, string) {\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n for (let codePoint of codePoints) {\n let s = string + String.fromCodePoint(codePoint);\n if (index < glyphs.length - 1) {\n this._addStrings(glyphs, index + 1, strings, s);\n } else {\n strings.add(s);\n }\n }\n }\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n allTypographicFeatures: {\n code: 0,\n exclusive: false,\n allTypeFeatures: 0\n },\n ligatures: {\n code: 1,\n exclusive: false,\n requiredLigatures: 0,\n commonLigatures: 2,\n rareLigatures: 4,\n // logos: 6\n rebusPictures: 8,\n diphthongLigatures: 10,\n squaredLigatures: 12,\n abbrevSquaredLigatures: 14,\n symbolLigatures: 16,\n contextualLigatures: 18,\n historicalLigatures: 20\n },\n cursiveConnection: {\n code: 2,\n exclusive: true,\n unconnected: 0,\n partiallyConnected: 1,\n cursive: 2\n },\n letterCase: {\n code: 3,\n exclusive: true\n },\n // upperAndLowerCase: 0 # deprecated\n // allCaps: 1 # deprecated\n // allLowerCase: 2 # deprecated\n // smallCaps: 3 # deprecated\n // initialCaps: 4 # deprecated\n // initialCapsAndSmallCaps: 5 # deprecated\n verticalSubstitution: {\n code: 4,\n exclusive: false,\n substituteVerticalForms: 0\n },\n linguisticRearrangement: {\n code: 5,\n exclusive: false,\n linguisticRearrangement: 0\n },\n numberSpacing: {\n code: 6,\n exclusive: true,\n monospacedNumbers: 0,\n proportionalNumbers: 1,\n thirdWidthNumbers: 2,\n quarterWidthNumbers: 3\n },\n smartSwash: {\n code: 8,\n exclusive: false,\n wordInitialSwashes: 0,\n wordFinalSwashes: 2,\n // lineInitialSwashes: 4\n // lineFinalSwashes: 6\n nonFinalSwashes: 8\n },\n diacritics: {\n code: 9,\n exclusive: true,\n showDiacritics: 0,\n hideDiacritics: 1,\n decomposeDiacritics: 2\n },\n verticalPosition: {\n code: 10,\n exclusive: true,\n normalPosition: 0,\n superiors: 1,\n inferiors: 2,\n ordinals: 3,\n scientificInferiors: 4\n },\n fractions: {\n code: 11,\n exclusive: true,\n noFractions: 0,\n verticalFractions: 1,\n diagonalFractions: 2\n },\n overlappingCharacters: {\n code: 13,\n exclusive: false,\n preventOverlap: 0\n },\n typographicExtras: {\n code: 14,\n exclusive: false,\n // hyphensToEmDash: 0\n // hyphenToEnDash: 2\n slashedZero: 4\n },\n // formInterrobang: 6\n // smartQuotes: 8\n // periodsToEllipsis: 10\n mathematicalExtras: {\n code: 15,\n exclusive: false,\n // hyphenToMinus: 0\n // asteristoMultiply: 2\n // slashToDivide: 4\n // inequalityLigatures: 6\n // exponents: 8\n mathematicalGreek: 10\n },\n ornamentSets: {\n code: 16,\n exclusive: true,\n noOrnaments: 0,\n dingbats: 1,\n piCharacters: 2,\n fleurons: 3,\n decorativeBorders: 4,\n internationalSymbols: 5,\n mathSymbols: 6\n },\n characterAlternatives: {\n code: 17,\n exclusive: true,\n noAlternates: 0\n },\n // user defined options\n designComplexity: {\n code: 18,\n exclusive: true,\n designLevel1: 0,\n designLevel2: 1,\n designLevel3: 2,\n designLevel4: 3,\n designLevel5: 4\n },\n styleOptions: {\n code: 19,\n exclusive: true,\n noStyleOptions: 0,\n displayText: 1,\n engravedText: 2,\n illuminatedCaps: 3,\n titlingCaps: 4,\n tallCaps: 5\n },\n characterShape: {\n code: 20,\n exclusive: true,\n traditionalCharacters: 0,\n simplifiedCharacters: 1,\n JIS1978Characters: 2,\n JIS1983Characters: 3,\n JIS1990Characters: 4,\n traditionalAltOne: 5,\n traditionalAltTwo: 6,\n traditionalAltThree: 7,\n traditionalAltFour: 8,\n traditionalAltFive: 9,\n expertCharacters: 10,\n JIS2004Characters: 11,\n hojoCharacters: 12,\n NLCCharacters: 13,\n traditionalNamesCharacters: 14\n },\n numberCase: {\n code: 21,\n exclusive: true,\n lowerCaseNumbers: 0,\n upperCaseNumbers: 1\n },\n textSpacing: {\n code: 22,\n exclusive: true,\n proportionalText: 0,\n monospacedText: 1,\n halfWidthText: 2,\n thirdWidthText: 3,\n quarterWidthText: 4,\n altProportionalText: 5,\n altHalfWidthText: 6\n },\n transliteration: {\n code: 23,\n exclusive: true,\n noTransliteration: 0\n },\n // hanjaToHangul: 1\n // hiraganaToKatakana: 2\n // katakanaToHiragana: 3\n // kanaToRomanization: 4\n // romanizationToHiragana: 5\n // romanizationToKatakana: 6\n // hanjaToHangulAltOne: 7\n // hanjaToHangulAltTwo: 8\n // hanjaToHangulAltThree: 9\n annotation: {\n code: 24,\n exclusive: true,\n noAnnotation: 0,\n boxAnnotation: 1,\n roundedBoxAnnotation: 2,\n circleAnnotation: 3,\n invertedCircleAnnotation: 4,\n parenthesisAnnotation: 5,\n periodAnnotation: 6,\n romanNumeralAnnotation: 7,\n diamondAnnotation: 8,\n invertedBoxAnnotation: 9,\n invertedRoundedBoxAnnotation: 10\n },\n kanaSpacing: {\n code: 25,\n exclusive: true,\n fullWidthKana: 0,\n proportionalKana: 1\n },\n ideographicSpacing: {\n code: 26,\n exclusive: true,\n fullWidthIdeographs: 0,\n proportionalIdeographs: 1,\n halfWidthIdeographs: 2\n },\n unicodeDecomposition: {\n code: 27,\n exclusive: false,\n canonicalComposition: 0,\n compatibilityComposition: 2,\n transcodingComposition: 4\n },\n rubyKana: {\n code: 28,\n exclusive: false,\n // noRubyKana: 0 # deprecated - use rubyKanaOff instead\n // rubyKana: 1 # deprecated - use rubyKanaOn instead\n rubyKana: 2\n },\n CJKSymbolAlternatives: {\n code: 29,\n exclusive: true,\n noCJKSymbolAlternatives: 0,\n CJKSymbolAltOne: 1,\n CJKSymbolAltTwo: 2,\n CJKSymbolAltThree: 3,\n CJKSymbolAltFour: 4,\n CJKSymbolAltFive: 5\n },\n ideographicAlternatives: {\n code: 30,\n exclusive: true,\n noIdeographicAlternatives: 0,\n ideographicAltOne: 1,\n ideographicAltTwo: 2,\n ideographicAltThree: 3,\n ideographicAltFour: 4,\n ideographicAltFive: 5\n },\n CJKVerticalRomanPlacement: {\n code: 31,\n exclusive: true,\n CJKVerticalRomanCentered: 0,\n CJKVerticalRomanHBaseline: 1\n },\n italicCJKRoman: {\n code: 32,\n exclusive: false,\n // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead\n // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead\n CJKItalicRoman: 2\n },\n caseSensitiveLayout: {\n code: 33,\n exclusive: false,\n caseSensitiveLayout: 0,\n caseSensitiveSpacing: 2\n },\n alternateKana: {\n code: 34,\n exclusive: false,\n alternateHorizKana: 0,\n alternateVertKana: 2\n },\n stylisticAlternatives: {\n code: 35,\n exclusive: false,\n noStylisticAlternates: 0,\n stylisticAltOne: 2,\n stylisticAltTwo: 4,\n stylisticAltThree: 6,\n stylisticAltFour: 8,\n stylisticAltFive: 10,\n stylisticAltSix: 12,\n stylisticAltSeven: 14,\n stylisticAltEight: 16,\n stylisticAltNine: 18,\n stylisticAltTen: 20,\n stylisticAltEleven: 22,\n stylisticAltTwelve: 24,\n stylisticAltThirteen: 26,\n stylisticAltFourteen: 28,\n stylisticAltFifteen: 30,\n stylisticAltSixteen: 32,\n stylisticAltSeventeen: 34,\n stylisticAltEighteen: 36,\n stylisticAltNineteen: 38,\n stylisticAltTwenty: 40\n },\n contextualAlternates: {\n code: 36,\n exclusive: false,\n contextualAlternates: 0,\n swashAlternates: 2,\n contextualSwashAlternates: 4\n },\n lowerCase: {\n code: 37,\n exclusive: true,\n defaultLowerCase: 0,\n lowerCaseSmallCaps: 1,\n lowerCasePetiteCaps: 2\n },\n upperCase: {\n code: 38,\n exclusive: true,\n defaultUpperCase: 0,\n upperCaseSmallCaps: 1,\n upperCasePetiteCaps: 2\n },\n languageTag: { // indices into ltag table\n code: 39,\n exclusive: true\n },\n CJKRomanSpacing: {\n code: 103,\n exclusive: true,\n halfWidthCJKRoman: 0,\n proportionalCJKRoman: 1,\n defaultCJKRoman: 2,\n fullWidthCJKRoman: 3\n }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n rlig: feature('ligatures', 'requiredLigatures'),\n clig: feature('ligatures', 'contextualLigatures'),\n dlig: feature('ligatures', 'rareLigatures'),\n hlig: feature('ligatures', 'historicalLigatures'),\n liga: feature('ligatures', 'commonLigatures'),\n hist: feature('ligatures', 'historicalLigatures'), // ??\n\n smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n frac: feature('fractions', 'diagonalFractions'),\n dnom: feature('fractions', 'diagonalFractions'), // ??\n numr: feature('fractions', 'diagonalFractions'), // ??\n afrc: feature('fractions', 'verticalFractions'),\n // aalt\n // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n // unic, vatu, vhal, vjmo, vpal, vrt2\n // dist -> trak table?\n // kern, vkrn -> kern table\n // lfbd + opbd + rtbd -> opbd table?\n // mark, mkmk -> acnt table?\n // locl -> languageTag + ltag table\n\n case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n swsh: feature('contextualAlternates', 'swashAlternates'),\n cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n curs: feature('cursiveConnection', 'cursive'), // ??\n c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n init: feature('smartSwash', 'wordInitialSwashes'), // ??\n fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n pkna: feature('kanaSpacing', 'proportionalKana'),\n half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n halt: feature('textSpacing', 'altHalfWidthText'),\n\n hkna: feature('alternateKana', 'alternateHorizKana'),\n vkna: feature('alternateKana', 'alternateVertKana'),\n // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n lnum: feature('numberCase', 'upperCaseNumbers'),\n onum: feature('numberCase', 'lowerCaseNumbers'),\n mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n // nalt: not enough info. what type of annotation?\n // ornm: ditto, which ornament style?\n\n calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n tnum: feature('numberSpacing', 'monospacedNumbers'),\n pnum: feature('numberSpacing', 'proportionalNumbers'),\n sups: feature('verticalPosition', 'superiors'),\n subs: feature('verticalPosition', 'inferiors'),\n ordn: feature('verticalPosition', 'ordinals'),\n pwid: feature('textSpacing', 'proportionalText'),\n hwid: feature('textSpacing', 'halfWidthText'),\n qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n fwid: feature('textSpacing', 'proportionalText'), //??\n palt: feature('textSpacing', 'altProportionalText'),\n trad: feature('characterShape', 'traditionalCharacters'),\n smpl: feature('characterShape', 'simplifiedCharacters'),\n jp78: feature('characterShape', 'JIS1978Characters'),\n jp83: feature('characterShape', 'JIS1983Characters'),\n jp90: feature('characterShape', 'JIS1990Characters'),\n jp04: feature('characterShape', 'JIS2004Characters'),\n expt: feature('characterShape', 'expertCharacters'),\n hojo: feature('characterShape', 'hojoCharacters'),\n nlck: feature('characterShape', 'NLCCharacters'),\n tnam: feature('characterShape', 'traditionalNamesCharacters'),\n ruby: feature('rubyKana', 'rubyKana'),\n titl: feature('styleOptions', 'titlingCaps'),\n zero: feature('typographicExtras', 'slashedZero'),\n\n ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n let aat = OTMapping[ot];\n if (AATMapping[aat[0]] == null) {\n AATMapping[aat[0]] = {};\n }\n\n AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n let res = {};\n for (let k in features) {\n let r;\n if (r = OTMapping[k]) {\n if (res[r[0]] == null) {\n res[r[0]] = {};\n }\n\n res[r[0]][r[1]] = features[k];\n }\n }\n\n return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n let [type, setting] = f;\n if (isNaN(type)) {\n var typeCode = features[type] && features[type].code;\n } else {\n var typeCode = type;\n }\n\n if (isNaN(setting)) {\n var settingCode = features[type] && features[type][setting];\n } else {\n var settingCode = setting;\n }\n\n return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n let res = {};\n if (Array.isArray(features)) {\n for (let k = 0; k < features.length; k++) {\n let r;\n let f = mapFeatureStrings(features[k]);\n if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n res[r] = true;\n }\n }\n\n } else if (typeof features === 'object') {\n for (let type in features) {\n let feature = features[type];\n for (let setting in feature) {\n let r;\n let f = mapFeatureStrings([type, setting]);\n if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n res[r] = true;\n }\n }\n }\n }\n\n return Object.keys(res);\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST = 0x2000;\nconst VERB = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK = 0x80000000;\nconst STORE_MASK = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY = 0x800000;\nconst REVERSE_DIRECTION = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE = 0x1000;\nconst CURRENT_INSERT_BEFORE = 0x0800;\nconst MARKED_INSERT_BEFORE = 0x0400;\nconst CURRENT_INSERT_COUNT = 0x03E0;\nconst MARKED_INSERT_COUNT = 0x001F;\n\nexport default class AATMorxProcessor {\n constructor(font) {\n this.processIndicRearragement = this.processIndicRearragement.bind(this);\n this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n this.processLigature = this.processLigature.bind(this);\n this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n this.font = font;\n this.morx = font.morx;\n this.inputCache = null;\n }\n\n // Processes an array of glyphs and applies the specified features\n // Features should be in the form of {featureType:{featureSetting:boolean}}\n process(glyphs, features = {}) {\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n // enable/disable the requested features\n for (let feature of chain.features) {\n let f;\n if (f = features[feature.featureType]) {\n if (f[feature.featureSetting]) {\n flags &= feature.disableFlags;\n flags |= feature.enableFlags;\n } else if (f[feature.featureSetting] === false) {\n flags |= ~feature.disableFlags;\n flags &= ~feature.enableFlags;\n }\n }\n }\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.processSubtable(subtable, glyphs);\n }\n }\n }\n\n // remove deleted glyphs\n let index = glyphs.length - 1;\n while (index >= 0) {\n if (glyphs[index].id === 0xffff) {\n glyphs.splice(index, 1);\n }\n\n index--;\n }\n\n return glyphs;\n }\n\n processSubtable(subtable, glyphs) {\n this.subtable = subtable;\n this.glyphs = glyphs;\n if (this.subtable.type === 4) {\n this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n return;\n }\n\n this.ligatureStack = [];\n this.markedGlyph = null;\n this.firstGlyph = null;\n this.lastGlyph = null;\n this.markedIndex = null;\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n return stateMachine.process(this.glyphs, reverse, process);\n }\n\n @cache\n getStateMachine(subtable) {\n return new AATStateMachine(subtable.table.stateTable);\n }\n\n getProcessor() {\n switch (this.subtable.type) {\n case 0:\n return this.processIndicRearragement;\n case 1:\n return this.processContextualSubstitution;\n case 2:\n return this.processLigature;\n case 4:\n return this.processNoncontextualSubstitutions;\n case 5:\n return this.processGlyphInsertion;\n default:\n throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n }\n }\n\n processIndicRearragement(glyph, entry, index) {\n if (entry.flags & MARK_FIRST) {\n this.firstGlyph = index;\n }\n\n if (entry.flags & MARK_LAST) {\n this.lastGlyph = index;\n }\n\n reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n }\n\n processContextualSubstitution(glyph, entry, index) {\n let subsitutions = this.subtable.table.substitutionTable.items;\n if (entry.markIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.markIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[this.markedGlyph];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.currentIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.currentIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[index];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.flags & SET_MARK) {\n this.markedGlyph = index;\n }\n }\n\n processLigature(glyph, entry, index) {\n if (entry.flags & SET_COMPONENT) {\n this.ligatureStack.push(index);\n }\n\n if (entry.flags & PERFORM_ACTION) {\n let actions = this.subtable.table.ligatureActions;\n let components = this.subtable.table.components;\n let ligatureList = this.subtable.table.ligatureList;\n\n let actionIndex = entry.action;\n let last = false;\n let ligatureIndex = 0;\n let codePoints = [];\n let ligatureGlyphs = [];\n\n while (!last) {\n let componentGlyph = this.ligatureStack.pop();\n codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n let action = actions.getItem(actionIndex++);\n last = !!(action & LAST_MASK);\n let store = !!(action & STORE_MASK);\n let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n offset += this.glyphs[componentGlyph].id;\n\n let component = components.getItem(offset);\n ligatureIndex += component;\n\n if (last || store) {\n let ligatureEntry = ligatureList.getItem(ligatureIndex);\n this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n ligatureGlyphs.push(componentGlyph);\n ligatureIndex = 0;\n codePoints = [];\n } else {\n this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n }\n }\n\n // Put ligature glyph indexes back on the stack\n this.ligatureStack.push(...ligatureGlyphs);\n }\n }\n\n processNoncontextualSubstitutions(subtable, glyphs, index) {\n let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n for (index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.id !== 0xffff) {\n let gid = lookupTable.lookup(glyph.id);\n if (gid) { // 0 means do nothing\n glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n }\n }\n\n _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n let insertions = [];\n while (count--) {\n let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n insertions.push(this.font.getGlyph(gid));\n }\n\n if (!isBefore) {\n glyphIndex++;\n }\n\n this.glyphs.splice(glyphIndex, 0, ...insertions);\n }\n\n processGlyphInsertion(glyph, entry, index) {\n if (entry.flags & SET_MARK) {\n this.markedIndex = index;\n }\n\n if (entry.markedInsertIndex !== 0xffff) {\n let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n }\n\n if (entry.currentInsertIndex !== 0xffff) {\n let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n }\n }\n\n getSupportedFeatures() {\n let features = [];\n for (let chain of this.morx.chains) {\n for (let feature of chain.features) {\n features.push([feature.featureType, feature.featureSetting]);\n }\n }\n\n return features;\n }\n\n generateInputs(gid) {\n if (!this.inputCache) {\n this.generateInputCache();\n }\n\n return this.inputCache[gid] || [];\n }\n\n generateInputCache() {\n this.inputCache = {};\n\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.generateInputsForSubtable(subtable);\n }\n }\n }\n }\n\n generateInputsForSubtable(subtable) {\n // Currently, only supporting ligature subtables.\n if (subtable.type !== 2) {\n return;\n }\n\n let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n if (reverse) {\n throw new Error('Reverse subtable, not supported.');\n }\n\n this.subtable = subtable;\n this.ligatureStack = [];\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let input = [];\n let stack = [];\n this.glyphs = [];\n\n stateMachine.traverse({\n enter: (glyph, entry) => {\n let glyphs = this.glyphs;\n stack.push({\n glyphs: glyphs.slice(),\n ligatureStack: this.ligatureStack.slice()\n });\n\n // Add glyph to input and glyphs to process.\n let g = this.font.getGlyph(glyph);\n input.push(g);\n glyphs.push(input[input.length - 1]);\n\n // Process ligature substitution\n process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n // Add input to result if only one matching (non-deleted) glyph remains.\n let count = 0;\n let found = 0;\n for (let i = 0; i < glyphs.length && count <= 1; i++) {\n if (glyphs[i].id !== 0xffff) {\n count++;\n found = glyphs[i].id;\n }\n }\n\n if (count === 1) {\n let result = input.map(g => g.id);\n let cache = this.inputCache[found];\n if (cache) {\n cache.push(result);\n } else {\n this.inputCache[found] = [result];\n }\n }\n },\n\n exit: () => {\n ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n input.pop();\n }\n });\n }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n if (reverseB) {\n end.reverse();\n }\n\n let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n if (reverseA) {\n start.reverse();\n }\n\n glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n let length = lastGlyph - firstGlyph + 1;\n switch (verb) {\n case 0: // no change\n return glyphs;\n\n case 1: // Ax => xA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n case 2: // xD => Dx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n case 3: // AxD => DxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n case 4: // ABx => xAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n case 5: // ABx => xBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n case 6: // xCD => CDx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n case 7: // xCD => DCx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n case 8: // AxCD => CDxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n case 9: // AxCD => DCxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n case 10: // ABxD => DxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n case 11: // ABxD => DxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n case 12: // ABxCD => CDxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n case 13: // ABxCD => CDxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n case 14: // ABxCD => DCxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n case 15: // ABxCD => DCxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n default:\n throw new Error(`Unknown verb: ${verb}`);\n }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n constructor(stateTable) {\n this.stateTable = stateTable;\n this.lookupTable = new AATLookupTable(stateTable.classTable);\n }\n\n process(glyphs, reverse, processEntry) {\n let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n let index = reverse ? glyphs.length - 1 : 0;\n let dir = reverse ? -1 : 1;\n\n while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n let glyph = null;\n let classCode = OUT_OF_BOUNDS_CLASS;\n let shouldAdvance = true;\n\n if (index === glyphs.length || index === -1) {\n classCode = END_OF_TEXT_CLASS;\n } else {\n glyph = glyphs[index];\n if (glyph.id === 0xffff) { // deleted glyph\n classCode = DELETED_GLYPH_CLASS;\n } else {\n classCode = this.lookupTable.lookup(glyph.id);\n if (classCode == null) {\n classCode = OUT_OF_BOUNDS_CLASS;\n }\n }\n }\n\n let row = this.stateTable.stateArray.getItem(currentState);\n let entryIndex = row[classCode];\n let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {\n processEntry(glyph, entry, index);\n shouldAdvance = !(entry.flags & DONT_ADVANCE);\n }\n\n currentState = entry.newState;\n if (shouldAdvance) {\n index += dir;\n }\n }\n\n return glyphs;\n }\n\n /**\n * Performs a depth-first traversal of the glyph strings\n * represented by the state machine.\n */\n traverse(opts, state = 0, visited = new Set) {\n if (visited.has(state)) {\n return;\n }\n\n visited.add(state);\n\n let {nClasses, stateArray, entryTable} = this.stateTable;\n let row = stateArray.getItem(state);\n\n // Skip predefined classes\n for (let classCode = 4; classCode < nClasses; classCode++) {\n let entryIndex = row[classCode];\n let entry = entryTable.getItem(entryIndex);\n\n // Try all glyphs in the class\n for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n if (opts.enter) {\n opts.enter(glyph, entry);\n }\n\n if (entry.newState !== 0) {\n this.traverse(opts, entry.newState, visited);\n }\n\n if (opts.exit) {\n opts.exit(glyph, entry);\n }\n }\n }\n }\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n constructor(table) {\n this.table = table;\n }\n\n lookup(glyph) {\n switch (this.table.version) {\n case 0: // simple array format\n return this.table.values.getItem(glyph);\n\n case 2: // segment format\n case 4: {\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.firstGlyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.firstGlyph) {\n max = mid - 1;\n } else if (glyph > seg.lastGlyph) {\n min = mid + 1;\n } else {\n if (this.table.version === 2) {\n return seg.value;\n } else {\n return seg.values[glyph - seg.firstGlyph];\n }\n }\n }\n\n return null;\n }\n\n case 6: { // lookup single\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.glyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.glyph) {\n max = mid - 1;\n } else if (glyph > seg.glyph) {\n min = mid + 1;\n } else {\n return seg.value;\n }\n }\n\n return null;\n }\n\n case 8: // lookup trimmed\n return this.table.values[glyph - this.table.firstGlyph];\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n }\n\n @cache\n glyphsForValue(classValue) {\n let res = [];\n\n switch (this.table.version) {\n case 2: // segment format\n case 4: {\n for (let segment of this.table.segments) {\n if ((this.table.version === 2 && segment.value === classValue)) {\n res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n } else {\n for (let index = 0; index < segment.values.length; index++) {\n if (segment.values[index] === classValue) {\n res.push(segment.firstGlyph + index);\n }\n }\n }\n }\n\n break;\n }\n\n case 6: { // lookup single\n for (let segment of this.table.segments) {\n if (segment.value === classValue) {\n res.push(segment.glyph);\n }\n }\n\n break;\n }\n\n case 8: { // lookup trimmed\n for (let i = 0; i < this.table.values.length; i++) {\n if (this.table.values[i] === classValue) {\n res.push(this.table.firstGlyph + i);\n }\n }\n\n break;\n }\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n\n return res;\n }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n constructor(font) {\n this.font = font;\n this.glyphInfos = null;\n this.plan = null;\n this.GSUBProcessor = null;\n this.GPOSProcessor = null;\n this.fallbackPosition = true;\n\n if (font.GSUB) {\n this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n }\n\n if (font.GPOS) {\n this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n }\n }\n\n setup(glyphRun) {\n // Map glyphs to GlyphInfo objects so data can be passed between\n // GSUB and GPOS without mutating the real (shared) Glyph objects.\n this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n // Select a script based on what is available in GSUB/GPOS.\n let script = null;\n if (this.GPOSProcessor) {\n script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n if (this.GSUBProcessor) {\n script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n // Choose a shaper based on the script, and setup a shaping plan.\n // This determines which features to apply to which glyphs.\n this.shaper = Shapers.choose(script);\n this.plan = new ShapingPlan(this.font, script, glyphRun.direction);\n this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features);\n\n // Assign chosen features to output glyph run\n for (let key in this.plan.allFeatures) {\n glyphRun.features[key] = true;\n }\n }\n\n substitute(glyphRun) {\n if (this.GSUBProcessor) {\n this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n // Map glyph infos back to normal Glyph objects\n glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n }\n }\n\n position(glyphRun) {\n if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n if (this.GPOSProcessor) {\n this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);\n }\n\n if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n // Reverse the glyphs and positions if the script is right-to-left\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n glyphRun.positions.reverse();\n }\n\n return this.GPOSProcessor && this.GPOSProcessor.features;\n }\n\n zeroMarkAdvances(positions) {\n for (let i = 0; i < this.glyphInfos.length; i++) {\n if (this.glyphInfos[i].isMark) {\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n cleanup() {\n this.glyphInfos = null;\n this.plan = null;\n this.shaper = null;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.GSUBProcessor) {\n this.GSUBProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GSUBProcessor.features));\n }\n\n if (this.GPOSProcessor) {\n this.GPOSProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GPOSProcessor.features));\n }\n\n return features;\n }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n constructor(font, script, direction) {\n this.font = font;\n this.script = script;\n this.direction = direction;\n this.stages = [];\n this.globalFeatures = {};\n this.allFeatures = {};\n }\n\n /**\n * Adds the given features to the last stage.\n * Ignores features that have already been applied.\n */\n _addFeatures(features, global) {\n let stageIndex = this.stages.length - 1;\n let stage = this.stages[stageIndex];\n for (let feature of features) {\n if (this.allFeatures[feature] == null) {\n stage.push(feature);\n this.allFeatures[feature] = stageIndex;\n\n if (global) {\n this.globalFeatures[feature] = true;\n }\n }\n }\n }\n\n /**\n * Add features to the last stage\n */\n add(arg, global = true) {\n if (this.stages.length === 0) {\n this.stages.push([]);\n }\n\n if (typeof arg === 'string') {\n arg = [arg];\n }\n\n if (Array.isArray(arg)) {\n this._addFeatures(arg, global);\n } else if (typeof arg === 'object') {\n this._addFeatures(arg.global || [], true);\n this._addFeatures(arg.local || [], false);\n } else {\n throw new Error(\"Unsupported argument to ShapingPlan#add\");\n }\n }\n\n /**\n * Add a new stage\n */\n addStage(arg, global) {\n if (typeof arg === 'function') {\n this.stages.push(arg, []);\n } else {\n this.stages.push([]);\n this.add(arg, global);\n }\n }\n\n setFeatureOverrides(features) {\n if (Array.isArray(features)) {\n this.add(features);\n } else if (typeof features === 'object') {\n for (let tag in features) {\n if (features[tag]) {\n this.add(tag);\n } else if (this.allFeatures[tag] != null) {\n let stage = this.stages[this.allFeatures[tag]];\n stage.splice(stage.indexOf(tag), 1);\n delete this.allFeatures[tag];\n delete this.globalFeatures[tag];\n }\n }\n }\n }\n\n /**\n * Assigns the global features to the given glyphs\n */\n assignGlobalFeatures(glyphs) {\n for (let glyph of glyphs) {\n for (let feature in this.globalFeatures) {\n glyph.features[feature] = true;\n }\n }\n }\n\n /**\n * Executes the planned stages using the given OTProcessor\n */\n process(processor, glyphs, positions) {\n for (let stage of this.stages) {\n if (typeof stage === 'function') {\n if (!positions) {\n stage(this.font, glyphs, this);\n }\n\n } else if (stage.length > 0) {\n processor.applyFeatures(stage, glyphs, positions);\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport IndicShaper from './IndicShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n arab: ArabicShaper, // Arabic\n mong: ArabicShaper, // Mongolian\n syrc: ArabicShaper, // Syriac\n 'nko ': ArabicShaper, // N'Ko\n phag: ArabicShaper, // Phags Pa\n mand: ArabicShaper, // Mandaic\n mani: ArabicShaper, // Manichaean\n phlp: ArabicShaper, // Psalter Pahlavi\n\n hang: HangulShaper, // Hangul\n\n bng2: IndicShaper, // Bengali\n beng: IndicShaper, // Bengali\n dev2: IndicShaper, // Devanagari\n deva: IndicShaper, // Devanagari\n gjr2: IndicShaper, // Gujarati\n gujr: IndicShaper, // Gujarati\n guru: IndicShaper, // Gurmukhi\n gur2: IndicShaper, // Gurmukhi\n knda: IndicShaper, // Kannada\n knd2: IndicShaper, // Kannada\n mlm2: IndicShaper, // Malayalam\n mlym: IndicShaper, // Malayalam\n ory2: IndicShaper, // Oriya\n orya: IndicShaper, // Oriya\n taml: IndicShaper, // Tamil\n tml2: IndicShaper, // Tamil\n telu: IndicShaper, // Telugu\n tel2: IndicShaper, // Telugu\n khmr: IndicShaper, // Khmer\n\n bali: UniversalShaper, // Balinese\n batk: UniversalShaper, // Batak\n brah: UniversalShaper, // Brahmi\n bugi: UniversalShaper, // Buginese\n buhd: UniversalShaper, // Buhid\n cakm: UniversalShaper, // Chakma\n cham: UniversalShaper, // Cham\n dupl: UniversalShaper, // Duployan\n egyp: UniversalShaper, // Egyptian Hieroglyphs\n gran: UniversalShaper, // Grantha\n hano: UniversalShaper, // Hanunoo\n java: UniversalShaper, // Javanese\n kthi: UniversalShaper, // Kaithi\n kali: UniversalShaper, // Kayah Li\n khar: UniversalShaper, // Kharoshthi\n khoj: UniversalShaper, // Khojki\n sind: UniversalShaper, // Khudawadi\n lepc: UniversalShaper, // Lepcha\n limb: UniversalShaper, // Limbu\n mahj: UniversalShaper, // Mahajani\n // mand: UniversalShaper, // Mandaic\n // mani: UniversalShaper, // Manichaean\n mtei: UniversalShaper, // Meitei Mayek\n modi: UniversalShaper, // Modi\n // mong: UniversalShaper, // Mongolian\n // 'nko ': UniversalShaper, // N’Ko\n hmng: UniversalShaper, // Pahawh Hmong\n // phag: UniversalShaper, // Phags-pa\n // phlp: UniversalShaper, // Psalter Pahlavi\n rjng: UniversalShaper, // Rejang\n saur: UniversalShaper, // Saurashtra\n shrd: UniversalShaper, // Sharada\n sidd: UniversalShaper, // Siddham\n sinh: IndicShaper, // Sinhala\n sund: UniversalShaper, // Sundanese\n sylo: UniversalShaper, // Syloti Nagri\n tglg: UniversalShaper, // Tagalog\n tagb: UniversalShaper, // Tagbanwa\n tale: UniversalShaper, // Tai Le\n lana: UniversalShaper, // Tai Tham\n tavt: UniversalShaper, // Tai Viet\n takr: UniversalShaper, // Takri\n tibt: UniversalShaper, // Tibetan\n tfng: UniversalShaper, // Tifinagh\n tirh: UniversalShaper, // Tirhuta\n\n latn: DefaultShaper, // Latin\n DFLT: DefaultShaper // Default\n};\n\nexport function choose(script) {\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n let shaper = SHAPERS[s];\n if (shaper) {\n return shaper;\n }\n }\n\n return DefaultShaper;\n}\n","import {isDigit} from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n ltr: ['ltra', 'ltrm'],\n rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n static zeroMarkWidths = 'AFTER_GPOS';\n static plan(plan, glyphs, features) {\n // Plan the features we want to apply\n this.planPreprocessing(plan);\n this.planFeatures(plan);\n this.planPostprocessing(plan, features);\n\n // Assign the global features to all the glyphs\n plan.assignGlobalFeatures(glyphs);\n\n // Assign local features to glyphs\n this.assignFeatures(plan, glyphs);\n }\n\n static planPreprocessing(plan) {\n plan.add({\n global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n local: FRACTIONAL_FEATURES\n });\n }\n\n static planFeatures(plan) {\n // Do nothing by default. Let subclasses override this.\n }\n\n static planPostprocessing(plan, userFeatures) {\n plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]);\n plan.setFeatureOverrides(userFeatures);\n }\n\n static assignFeatures(plan, glyphs) {\n // Enable contextual fractions\n for (let i = 0; i < glyphs.length; i++) {\n let glyph = glyphs[i];\n if (glyph.codePoints[0] === 0x2044) { // fraction slash\n let start = i;\n let end = i + 1;\n\n // Apply numerator\n while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) {\n glyphs[start - 1].features.numr = true;\n glyphs[start - 1].features.frac = true;\n start--;\n }\n\n // Apply denominator\n while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) {\n glyphs[end].features.dnom = true;\n glyphs[end].features.frac = true;\n end++;\n }\n\n // Apply fraction slash\n glyph.features.frac = true;\n i = end - 1;\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport {getCategory} from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\nimport { decodeBase64 } from '../../utils';\n\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/data.trie', 'base64')));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n Non_Joining: 0,\n Left_Joining: 1,\n Right_Joining: 2,\n Dual_Joining: 3,\n Join_Causing: 3,\n ALAPH: 4,\n 'DALATH RISH': 5,\n Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH\n // State 0: prev was U, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ],\n\n // State 1: prev was R or ISOL/ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ],\n\n // State 2: prev was D/L in ISOL form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ],\n\n // State 3: prev was D in FINA form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ],\n\n // State 4: prev was FINA ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ],\n\n // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ],\n\n // State 6: prev was DALATH/RISH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n static planFeatures(plan) {\n plan.add(['ccmp', 'locl']);\n for (let i = 0; i < FEATURES.length; i++) {\n let feature = FEATURES[i];\n plan.addStage(feature, false);\n }\n\n plan.addStage('mset');\n }\n\n static assignFeatures(plan, glyphs) {\n super.assignFeatures(plan, glyphs);\n\n let prev = -1;\n let state = 0;\n let actions = [];\n\n // Apply the state machine to map glyphs to features\n for (let i = 0; i < glyphs.length; i++) {\n let curAction, prevAction;\n var glyph = glyphs[i];\n let type = getShapingClass(glyph.codePoints[0]);\n if (type === ShapingClasses.Transparent) {\n actions[i] = NONE;\n continue;\n }\n\n [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n if (prevAction !== NONE && prev !== -1) {\n actions[prev] = prevAction;\n }\n\n actions[i] = curAction;\n prev = i;\n }\n\n // Apply the chosen features to their respective glyphs\n for (let index = 0; index < glyphs.length; index++) {\n let feature;\n var glyph = glyphs[index];\n if (feature = actions[index]) {\n glyph.features[feature] = true;\n }\n }\n }\n}\n\nfunction getShapingClass(codePoint) {\n let res = trie.get(codePoint);\n if (res) {\n return res - 1;\n }\n\n let category = getCategory(codePoint);\n if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n return ShapingClasses.Transparent;\n }\n\n return ShapingClasses.Non_Joining;\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n * - decompose if unsupported by the font:\n * -> \n * -> \n * -> \n *\n * - compose if supported by the font:\n * -> \n * -> \n * -> \n *\n * - reorder tone marks (S is any valid syllable):\n * -> \n *\n * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n }\n\n static assignFeatures(plan, glyphs) {\n let state = 0;\n let i = 0;\n while (i < glyphs.length) {\n let action;\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n let type = getType(code);\n\n [ action, state ] = STATE_TABLE[state][type];\n\n switch (action) {\n case DECOMPOSE:\n // Decompose the composed syllable if it is not supported by the font.\n if (!plan.font.hasGlyphForCodePoint(code)) {\n i = decompose(glyphs, i, plan.font);\n }\n break;\n\n case COMPOSE:\n // Found a decomposed syllable. Try to compose if supported by the font.\n i = compose(glyphs, i, plan.font);\n break;\n\n case TONE_MARK:\n // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n reorderToneMark(glyphs, i, plan.font);\n break;\n\n case INVALID:\n // Tone mark has no valid syllable to attach to, so insert a dotted circle\n i = insertDottedCircle(glyphs, i, plan.font);\n break;\n }\n\n i++;\n }\n }\n}\n\nconst HANGUL_BASE = 0xac00;\nconst HANGUL_END = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE = 0x1100; // lead\nconst V_BASE = 0x1161; // vowel\nconst T_BASE = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END = L_BASE + L_COUNT - 1;\nconst V_END = V_BASE + V_COUNT - 1;\nconst T_END = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X = 0; // Other character\nconst L = 1; // Leading consonant\nconst V = 2; // Medial vowel\nconst T = 3; // Trailing consonant\nconst LV = 4; // Composed syllable\nconst LVT = 5; // Composed syllable\nconst M = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n if (isL(code)) { return L; }\n if (isV(code)) { return V; }\n if (isT(code)) { return T; }\n if (isLV(code)) { return LV; }\n if (isLVT(code)) { return LVT; }\n if (isTone(code)) { return M; }\n return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE = 2;\nconst TONE_MARK = 4;\nconst INVALID = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n // X L V T LV LVT M\n // State 0: start state\n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 1: \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 2: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n // State 3: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n\n let s = code - HANGUL_BASE;\n let t = T_BASE + s % T_COUNT;\n s = s / T_COUNT | 0;\n let l = L_BASE + s / V_COUNT | 0;\n let v = V_BASE + s % V_COUNT;\n\n // Don't decompose if all of the components are not available\n if (!font.hasGlyphForCodePoint(l) ||\n !font.hasGlyphForCodePoint(v) ||\n (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n return i;\n }\n\n // Replace the current glyph with decomposed L, V, and T glyphs,\n // and apply the proper OpenType features to each component.\n let ljmo = getGlyph(font, l, glyph.features);\n ljmo.features.ljmo = true;\n\n let vjmo = getGlyph(font, v, glyph.features);\n vjmo.features.vjmo = true;\n\n let insert = [ ljmo, vjmo ];\n\n if (t > T_BASE) {\n let tjmo = getGlyph(font, t, glyph.features);\n tjmo.features.tjmo = true;\n insert.push(tjmo);\n }\n\n glyphs.splice(i, 1, ...insert);\n return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n let type = getType(code);\n\n let prev = glyphs[i - 1].codePoints[0];\n let prevType = getType(prev);\n\n // Figure out what type of syllable we're dealing with\n let lv, ljmo, vjmo, tjmo;\n if (prevType === LV && type === T) {\n // \n lv = prev;\n tjmo = glyph;\n } else {\n if (type === V) {\n // \n ljmo = glyphs[i - 1];\n vjmo = glyph;\n } else {\n // \n ljmo = glyphs[i - 2];\n vjmo = glyphs[i - 1];\n tjmo = glyph;\n }\n\n let l = ljmo.codePoints[0];\n let v = vjmo.codePoints[0];\n\n // Make sure L and V are combining characters\n if (isCombiningL(l) && isCombiningV(v)) {\n lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n }\n }\n\n let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n let s = lv + (t - T_BASE);\n\n // Replace with a composed glyph if supported by the font,\n // otherwise apply the proper OpenType features to each component.\n if (font.hasGlyphForCodePoint(s)) {\n let del = prevType === V ? 3 : 2;\n glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n return i - del + 1;\n }\n }\n\n // Didn't compose (either a non-combining component or unsupported by font).\n if (ljmo) { ljmo.features.ljmo = true; }\n if (vjmo) { vjmo.features.vjmo = true; }\n if (tjmo) { tjmo.features.tjmo = true; }\n\n if (prevType === LV) {\n // Sequence was originally , which got combined earlier.\n // Either the T was non-combining, or the LVT glyph wasn't supported.\n // Decompose the glyph again and apply OT features.\n decompose(glyphs, i - 1, font);\n return i + 1;\n }\n\n return i;\n}\n\nfunction getLength(code) {\n switch (getType(code)) {\n case LV:\n case LVT:\n return 1;\n case V:\n return 2;\n case T:\n return 3;\n }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n // Move tone mark to the beginning of the previous syllable, unless it is zero width\n if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n let prev = glyphs[i - 1].codePoints[0];\n let len = getLength(prev);\n\n glyphs.splice(i, 1);\n return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n // If the tone mark is zero width, insert the dotted circle before, otherwise after\n let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n glyphs.splice(idx, 0, dottedCircle);\n i++;\n }\n\n return i;\n}\n","import {isMark} from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n constructor(font, id, codePoints = [], features) {\n this._font = font;\n this.codePoints = codePoints;\n this.id = id;\n\n this.features = {};\n if (Array.isArray(features)) {\n for (let i = 0; i < features.length; i++) {\n let feature = features[i];\n this.features[feature] = true;\n }\n } else if (typeof features === 'object') {\n Object.assign(this.features, features);\n }\n\n this.ligatureID = null;\n this.ligatureComponent = null;\n this.isLigated = false;\n this.cursiveAttachment = null;\n this.markAttachment = null;\n this.shaperInfo = null;\n this.substituted = false;\n this.isMultiplied = false;\n }\n\n get id() {\n return this._id;\n }\n\n set id(id) {\n this._id = id;\n this.substituted = true;\n\n let GDEF = this._font.GDEF;\n if (GDEF && GDEF.glyphClassDef) {\n // TODO: clean this up\n let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);\n this.isBase = classID === 1;\n this.isLigature = classID === 2;\n this.isMark = classID === 3;\n this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;\n } else {\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isBase = !this.isMark;\n this.isLigature = this.codePoints.length > 1;\n this.markAttachmentType = 0;\n }\n }\n\n copy() {\n return new GlyphInfo(this._font, this.id, this.codePoints, this.features);\n }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n constructor(font, table) {\n this.font = font;\n this.table = table;\n\n this.script = null;\n this.scriptTag = null;\n\n this.language = null;\n this.languageTag = null;\n\n this.features = {};\n this.lookups = {};\n\n // Setup variation substitutions\n this.variationsIndex = font._variationProcessor\n ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n : -1;\n\n // initialize to default script + language\n this.selectScript();\n\n // current context (set by applyFeatures)\n this.glyphs = [];\n this.positions = []; // only used by GPOS\n this.ligatureID = 1;\n this.currentFeature = null;\n }\n\n findScript(script) {\n if (this.table.scriptList == null) {\n return null;\n }\n\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n for (let entry of this.table.scriptList) {\n if (entry.tag === s) {\n return entry;\n }\n }\n }\n\n return null;\n }\n\n selectScript(script, language, direction) {\n let changed = false;\n let entry;\n if (!this.script || script !== this.scriptTag) {\n entry = this.findScript(script);\n if (!entry) {\n entry = this.findScript(DEFAULT_SCRIPTS);\n }\n\n if (!entry) {\n return this.scriptTag;\n }\n\n this.scriptTag = entry.tag;\n this.script = entry.script;\n this.language = null;\n this.languageTag = null;\n changed = true;\n }\n\n if (!direction || direction !== this.direction) {\n this.direction = direction || Script.direction(script);\n }\n\n if (language && language.length < 4) {\n language += ' '.repeat(4 - language.length);\n }\n\n if (!language || language !== this.languageTag) {\n this.language = null;\n\n for (let lang of this.script.langSysRecords) {\n if (lang.tag === language) {\n this.language = lang.langSys;\n this.languageTag = lang.tag;\n break;\n }\n }\n\n if (!this.language) {\n this.language = this.script.defaultLangSys;\n this.languageTag = null;\n }\n\n changed = true;\n }\n\n // Build a feature lookup table\n if (changed) {\n this.features = {};\n if (this.language) {\n for (let featureIndex of this.language.featureIndexes) {\n let record = this.table.featureList[featureIndex];\n let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n this.features[record.tag] = substituteFeature || record.feature;\n }\n }\n }\n\n return this.scriptTag;\n }\n\n lookupsForFeatures(userFeatures = [], exclude) {\n let lookups = [];\n for (let tag of userFeatures) {\n let feature = this.features[tag];\n if (!feature) {\n continue;\n }\n\n for (let lookupIndex of feature.lookupListIndexes) {\n if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n continue;\n }\n\n lookups.push({\n feature: tag,\n index: lookupIndex,\n lookup: this.table.lookupList.get(lookupIndex)\n });\n }\n }\n\n lookups.sort((a, b) => a.index - b.index);\n return lookups;\n }\n\n substituteFeatureForVariations(featureIndex) {\n if (this.variationsIndex === -1) {\n return null;\n }\n\n let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n let substitutions = record.featureTableSubstitution.substitutions;\n for (let substitution of substitutions) {\n if (substitution.featureIndex === featureIndex) {\n return substitution.alternateFeatureTable;\n }\n }\n\n return null;\n }\n\n findVariationsIndex(coords) {\n let variations = this.table.featureVariations;\n if (!variations) {\n return -1;\n }\n\n let records = variations.featureVariationRecords;\n for (let i = 0; i < records.length; i++) {\n let conditions = records[i].conditionSet.conditionTable;\n if (this.variationConditionsMatch(conditions, coords)) {\n return i;\n }\n }\n\n return -1;\n }\n\n variationConditionsMatch(conditions, coords) {\n return conditions.every(condition => {\n let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n });\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n let lookups = this.lookupsForFeatures(userFeatures);\n this.applyLookups(lookups, glyphs, advances);\n }\n\n applyLookups(lookups, glyphs, positions) {\n this.glyphs = glyphs;\n this.positions = positions;\n this.glyphIterator = new GlyphIterator(glyphs);\n\n for (let { feature, lookup } of lookups) {\n this.currentFeature = feature;\n this.glyphIterator.reset(lookup.flags);\n\n while (this.glyphIterator.index < glyphs.length) {\n if (!(feature in this.glyphIterator.cur.features)) {\n this.glyphIterator.next();\n continue;\n }\n\n for (let table of lookup.subTables) {\n let res = this.applyLookup(lookup.lookupType, table);\n if (res) {\n break;\n }\n }\n\n this.glyphIterator.next();\n }\n }\n }\n\n applyLookup(lookup, table) {\n throw new Error(\"applyLookup must be implemented by subclasses\");\n }\n\n applyLookupList(lookupRecords) {\n let options = this.glyphIterator.options;\n let glyphIndex = this.glyphIterator.index;\n\n for (let lookupRecord of lookupRecords) {\n // Reset flags and find glyph index for this lookup record\n this.glyphIterator.reset(options, glyphIndex);\n this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n // Get the lookup and setup flags for subtables\n let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n this.glyphIterator.reset(lookup.flags, this.glyphIterator.index);\n\n // Apply lookup subtables until one matches\n for (let table of lookup.subTables) {\n if (this.applyLookup(lookup.lookupType, table)) {\n break;\n }\n }\n }\n\n this.glyphIterator.reset(options, glyphIndex);\n return true;\n }\n\n coverageIndex(coverage, glyph) {\n if (glyph == null) {\n glyph = this.glyphIterator.cur.id;\n }\n\n switch (coverage.version) {\n case 1:\n return coverage.glyphs.indexOf(glyph);\n\n case 2:\n for (let range of coverage.rangeRecords) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.startCoverageIndex + glyph - range.start;\n }\n }\n\n break;\n }\n\n return -1;\n }\n\n match(sequenceIndex, sequence, fn, matched) {\n let pos = this.glyphIterator.index;\n let glyph = this.glyphIterator.increment(sequenceIndex);\n let idx = 0;\n\n while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {\n if (matched) {\n matched.push(this.glyphIterator.index);\n }\n\n idx++;\n glyph = this.glyphIterator.next();\n }\n\n this.glyphIterator.index = pos;\n if (idx < sequence.length) {\n return false;\n }\n\n return matched || true;\n }\n\n sequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id);\n }\n\n sequenceMatchIndices(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => {\n // If the current feature doesn't apply to this glyph,\n if (!(this.currentFeature in glyph.features)) {\n return false;\n }\n\n return component === glyph.id;\n }, []);\n }\n\n coverageSequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n this.coverageIndex(coverage, glyph.id) >= 0\n );\n }\n\n getClassID(glyph, classDef) {\n switch (classDef.version) {\n case 1: // Class array\n let i = glyph - classDef.startGlyph;\n if (i >= 0 && i < classDef.classValueArray.length) {\n return classDef.classValueArray[i];\n }\n\n break;\n\n case 2:\n for (let range of classDef.classRangeRecord) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.class;\n }\n }\n\n break;\n }\n\n return 0;\n }\n\n classSequenceMatches(sequenceIndex, sequence, classDef) {\n return this.match(sequenceIndex, sequence, (classID, glyph) =>\n classID === this.getClassID(glyph.id, classDef)\n );\n }\n\n applyContext(table) {\n let index, set;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n set = table.ruleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(1, rule.input)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n if (index === -1) {\n return false;\n }\n\n set = table.classSet[index];\n for (let rule of set) {\n if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(0, table.coverages)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n\n applyChainingContext(table) {\n let index;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.chainRuleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n && this.sequenceMatches(1, rule.input)\n && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n let rules = table.chainClassSet[index];\n if (!rules) {\n return false;\n }\n\n for (let rule of rules) {\n if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n this.coverageSequenceMatches(0, table.inputCoverage) &&\n this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n}\n","export default class GlyphIterator {\n constructor(glyphs, options) {\n this.glyphs = glyphs;\n this.reset(options);\n }\n\n reset(options = {}, index = 0) {\n this.options = options;\n this.flags = options.flags || {};\n this.markAttachmentType = options.markAttachmentType || 0;\n this.index = index;\n }\n\n get cur() {\n return this.glyphs[this.index] || null;\n }\n\n shouldIgnore(glyph) {\n return (this.flags.ignoreMarks && glyph.isMark) ||\n (this.flags.ignoreBaseGlyphs && glyph.isBase) ||\n (this.flags.ignoreLigatures && glyph.isLigature) ||\n (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType);\n }\n\n move(dir) {\n this.index += dir;\n while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {\n this.index += dir;\n }\n\n if (0 > this.index || this.index >= this.glyphs.length) {\n return null;\n }\n\n return this.glyphs[this.index];\n }\n\n next() {\n return this.move(+1);\n }\n\n prev() {\n return this.move(-1);\n }\n\n peek(count = 1) {\n let idx = this.index;\n let res = this.increment(count);\n this.index = idx;\n return res;\n }\n\n peekIndex(count = 1) {\n let idx = this.index;\n this.increment(count);\n let res = this.index;\n this.index = idx;\n return res;\n }\n\n increment(count = 1) {\n let dir = count < 0 ? -1 : 1;\n count = Math.abs(count);\n while (count--) {\n this.move(dir);\n }\n\n return this.glyphs[this.index];\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport {getCategory} from 'unicode-properties';\nimport * as Script from '../../layout/Script';\nimport GlyphInfo from '../GlyphInfo';\nimport indicMachine from './indic.json';\nimport useData from './use.json';\nimport {\n CATEGORIES,\n POSITIONS,\n CONSONANT_FLAGS,\n JOINER_FLAGS,\n HALANT_OR_COENG_FLAGS, INDIC_CONFIGS,\n INDIC_DECOMPOSITIONS\n} from './indic-data';\nimport { decodeBase64 } from '../../utils';\n\nconst {decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/indic.trie', 'base64')));\nconst stateMachine = new StateMachine(indicMachine);\n\n/**\n * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.\n * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc\n */\nexport default class IndicShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n plan.addStage(['locl', 'ccmp']);\n\n plan.addStage(initialReordering);\n\n plan.addStage('nukt');\n plan.addStage('akhn');\n plan.addStage('rphf', false);\n plan.addStage('rkrf');\n plan.addStage('pref', false);\n plan.addStage('blwf', false);\n plan.addStage('abvf', false);\n plan.addStage('half', false);\n plan.addStage('pstf', false);\n plan.addStage('vatu');\n plan.addStage('cjct');\n plan.addStage('cfar', false);\n\n plan.addStage(finalReordering);\n\n plan.addStage({\n local: ['init'],\n global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']\n });\n\n // Setup the indic config for the selected script\n plan.unicodeScript = Script.fromOpenType(plan.script);\n plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;\n plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';\n\n // TODO: turn off kern (Khmer) and liga features.\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split matras\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];\n if (d) {\n let decomposed = d.map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction indicCategory(glyph) {\n return trie.get(glyph.codePoints[0]) >> 8;\n}\n\nfunction indicPosition(glyph) {\n return 1 << (trie.get(glyph.codePoints[0]) & 0xff);\n}\n\nclass IndicInfo {\n constructor(category, position, syllableType, syllable) {\n this.category = category;\n this.position = position;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n let last = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) {\n if (start > last) {\n ++syllable;\n for (let i = last; i < start; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new IndicInfo(\n 1 << indicCategory(glyphs[i]),\n indicPosition(glyphs[i]),\n tags[0],\n syllable\n );\n }\n\n last = end + 1;\n }\n\n if (last < glyphs.length) {\n ++syllable;\n for (let i = last; i < glyphs.length; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n}\n\nfunction isConsonant(glyph) {\n return glyph.shaperInfo.category & CONSONANT_FLAGS;\n}\n\nfunction isJoiner(glyph) {\n return glyph.shaperInfo.category & JOINER_FLAGS;\n}\n\nfunction isHalantOrCoeng(glyph) {\n return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;\n}\n\nfunction wouldSubstitute(glyphs, feature) {\n for (let glyph of glyphs) {\n glyph.features = {[feature]: true};\n }\n\n let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;\n GSUB.applyFeatures([feature], glyphs);\n\n return glyphs.length === 1;\n}\n\nfunction consonantPosition(font, consonant, virama) {\n let glyphs = [virama, consonant, virama];\n if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {\n return POSITIONS.Below_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {\n return POSITIONS.Post_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {\n return POSITIONS.Post_C;\n }\n\n return POSITIONS.Base_C;\n}\n\nfunction initialReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n let virama = font.glyphForCodePoint(indicConfig.virama).id;\n if (virama) {\n let info = new GlyphInfo(font, virama, [indicConfig.virama]);\n for (let i = 0; i < glyphs.length; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);\n }\n }\n }\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let {category, syllableType} = glyphs[start].shaperInfo;\n\n if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {\n continue;\n }\n\n if (syllableType === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = new IndicInfo(\n 1 << indicCategory(g),\n indicPosition(g),\n glyphs[start].shaperInfo.syllableType,\n glyphs[start].shaperInfo.syllable\n );\n\n // Insert after possible Repha.\n let i = start;\n while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) {\n i++;\n }\n\n glyphs.splice(i++, 0, g);\n end++;\n }\n\n // 1. Find base consonant:\n //\n // The shaping engine finds the base consonant of the syllable, using the\n // following algorithm: starting from the end of the syllable, move backwards\n // until a consonant is found that does not have a below-base or post-base\n // form (post-base forms have to follow below-base forms), or that is not a\n // pre-base reordering Ra, or arrive at the first consonant. The consonant\n // stopped at will be the base.\n\n let base = end;\n let limit = start;\n let hasReph = false;\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph &&\n features.rphf &&\n start + 3 <= end && (\n (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) ||\n (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)\n )\n ) {\n // See if it matches the 'rphf' feature.\n let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];\n if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) {\n limit += 2;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {\n limit++;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n\n switch (indicConfig.basePos) {\n case 'Last': {\n // starting from the end of the syllable, move backwards\n let i = end;\n let seenBelow = false;\n\n do {\n let info = glyphs[--i].shaperInfo;\n\n // until a consonant is found\n if (isConsonant(glyphs[i])) {\n // that does not have a below-base or post-base form\n // (post-base forms have to follow below-base forms),\n if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) {\n base = i;\n break;\n }\n\n // or that is not a pre-base reordering Ra,\n //\n // IMPLEMENTATION NOTES:\n //\n // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped\n // by the logic above already.\n //\n\n // or arrive at the first consonant. The consonant stopped at will\n // be the base.\n if (info.position === POSITIONS.Below_C) {\n seenBelow = true;\n }\n\n base = i;\n } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) {\n // A ZWJ after a Halant stops the base search, and requests an explicit\n // half form.\n // A ZWJ before a Halant, requests a subjoined form instead, and hence\n // search continues. This is particularly important for Bengali\n // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.\n break;\n }\n } while (i > limit);\n break;\n }\n\n case 'First': {\n // The first consonant is always the base.\n base = start;\n\n // Mark all subsequent consonants as below.\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n glyphs[i].shaperInfo.position = POSITIONS.Below_C;\n }\n }\n }\n }\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n //\n // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)\n if (hasReph && base === start && limit - base <= 2) {\n hasReph = false;\n }\n\n // 2. Decompose and reorder Matras:\n //\n // Each matra and any syllable modifier sign in the cluster are moved to the\n // appropriate position relative to the consonant(s) in the cluster. The\n // shaping engine decomposes two- or three-part matras into their constituent\n // parts before any repositioning. Matra characters are classified by which\n // consonant in a conjunct they have affinity for and are reordered to the\n // following positions:\n //\n // o Before first half form in the syllable\n // o After subjoined consonants\n // o After post-form consonant\n // o After main consonant (for above marks)\n //\n // IMPLEMENTATION NOTES:\n //\n // The normalize() routine has already decomposed matras for us, so we don't\n // need to worry about that.\n\n // 3. Reorder marks to canonical order:\n //\n // Adjacent nukta and halant or nukta and vedic sign are always repositioned\n // if necessary, so that the nukta is first.\n //\n // IMPLEMENTATION NOTES:\n //\n // We don't need to do this: the normalize() routine already did this for us.\n\n // Reorder characters\n\n for (let i = start; i < base; i++) {\n let info = glyphs[i].shaperInfo;\n info.position = Math.min(POSITIONS.Pre_C, info.position);\n }\n\n if (base < end) {\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n\n // Mark final consonants. A final consonant is one appearing after a matra,\n // like in Khmer.\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n for (let j = i + 1; j < end; j++) {\n if (isConsonant(glyphs[j])) {\n glyphs[j].shaperInfo.position = POSITIONS.Final_C;\n break;\n }\n }\n break;\n }\n }\n\n // Handle beginning Ra\n if (hasReph) {\n glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;\n }\n\n // For old-style Indic script tags, move the first post-base Halant after\n // last consonant.\n //\n // Reports suggest that in some scripts Uniscribe does this only if there\n // is *not* a Halant after last consonant already (eg. Kannada), while it\n // does it unconditionally in other scripts (eg. Malayalam). We don't\n // currently know about other scripts, so we single out Malayalam for now.\n //\n // Kannada test case:\n // U+0C9A,U+0CCD,U+0C9A,U+0CCD\n // With some versions of Lohit Kannada.\n // https://bugs.freedesktop.org/show_bug.cgi?id=59118\n //\n // Malayalam test case:\n // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D\n // With lohit-ttf-20121122/Lohit-Malayalam.ttf\n if (plan.isOldSpec) {\n let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.H) {\n let j;\n for (j = end - 1; j > i; j--) {\n if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) {\n break;\n }\n }\n\n if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) {\n // Move Halant to after last consonant.\n let t = glyphs[i];\n glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i));\n glyphs[j] = t;\n }\n\n break;\n }\n }\n }\n\n // Attach misc marks to previous char to move with them.\n let lastPos = POSITIONS.Start;\n for (let i = start; i < end; i++) {\n let info = glyphs[i].shaperInfo;\n if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) {\n info.position = lastPos;\n if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) {\n // Uniscribe doesn't move the Halant with Left Matra.\n // TEST: U+092B,U+093F,U+094DE\n // We follow. This is important for the Sinhala\n // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA\n // where U+0DD9 is a left matra and U+0DCA is the virama.\n // We don't want to move the virama with the left matra.\n // TEST: U+0D9A,U+0DDA\n for (let j = i; j > start; j--) {\n if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) {\n info.position = glyphs[j - 1].shaperInfo.position;\n break;\n }\n }\n }\n } else if (info.position !== POSITIONS.SMVD) {\n lastPos = info.position;\n }\n }\n\n // For post-base consonants let them own anything before them\n // since the last consonant or matra.\n let last = base;\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n for (let j = last + 1; j < i; j++) {\n if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) {\n glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position;\n }\n }\n last = i;\n } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n last = i;\n }\n }\n\n let arr = glyphs.slice(start, end);\n arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position);\n glyphs.splice(start, arr.length, ...arr);\n\n // Find base again\n for (let i = start; i < end; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n base = i;\n break;\n }\n }\n\n // Setup features now\n\n // Reph\n for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) {\n glyphs[i].features.rphf = true;\n }\n\n // Pre-base\n let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';\n for (let i = start; i < base; i++) {\n glyphs[i].features.half = true;\n if (blwf) {\n glyphs[i].features.blwf = true;\n }\n }\n\n // Post-base\n for (let i = base + 1; i < end; i++) {\n glyphs[i].features.abvf = true;\n glyphs[i].features.pstf = true;\n glyphs[i].features.blwf = true;\n }\n\n if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {\n // Old-spec eye-lash Ra needs special handling. From the\n // spec:\n //\n // \"The feature 'below-base form' is applied to consonants\n // having below-base forms and following the base consonant.\n // The exception is vattu, which may appear below half forms\n // as well as below the base glyph. The feature 'below-base\n // form' will be applied to all such occurrences of Ra as well.\"\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+0915\n // with Sanskrit 2003 font.\n //\n // However, note that Ra,Halant,ZWJ is the correct way to\n // request eyelash form of Ra, so we wouldbn't inhibit it\n // in that sequence.\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915\n for (let i = start; i + 1 < base; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.Ra &&\n glyphs[i + 1].shaperInfo.category === CATEGORIES.H &&\n (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ)\n ) {\n glyphs[i].features.blwf = true;\n glyphs[i + 1].features.blwf = true;\n }\n }\n }\n\n let prefLen = 2;\n if (features.pref && base + prefLen < end) {\n // Find a Halant,Ra sequence and mark it for pre-base reordering processing.\n for (let i = base + 1; i + prefLen - 1 < end; i++) {\n let g = [glyphs[i].copy(), glyphs[i + 1].copy()];\n if (wouldSubstitute(g, 'pref')) {\n for (let j = 0; j < prefLen; j++) {\n glyphs[i++].features.pref = true;\n }\n\n // Mark the subsequent stuff with 'cfar'. Used in Khmer.\n // Read the feature spec.\n // This allows distinguishing the following cases with MS Khmer fonts:\n // U+1784,U+17D2,U+179A,U+17D2,U+1782\n // U+1784,U+17D2,U+1782,U+17D2,U+179A\n if (features.cfar) {\n for (; i < end; i++) {\n glyphs[i].features.cfar = true;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply ZWJ/ZWNJ effects\n for (let i = start + 1; i < end; i++) {\n if (isJoiner(glyphs[i])) {\n let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ;\n let j = i;\n\n do {\n j--;\n\n // ZWJ/ZWNJ should disable CJCT. They do that by simply\n // being there, since we don't skip them for the CJCT\n // feature (ie. F_MANUAL_ZWJ)\n\n // A ZWNJ disables HALF.\n if (nonJoiner) {\n delete glyphs[j].features.half;\n }\n } while (j > start && !isConsonant(glyphs[j]));\n }\n }\n }\n}\n\nfunction finalReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n // 4. Final reordering:\n //\n // After the localized forms and basic shaping forms GSUB features have been\n // applied (see below), the shaping engine performs some final glyph\n // reordering before applying all the remaining font features to the entire\n // cluster.\n\n let tryPref = !!features.pref;\n\n // Find base again\n let base = start;\n for (; base < end; base++) {\n if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {\n // Ok, this was a 'pref' candidate but didn't form any.\n // Base is around here...\n base = i;\n while (base < end && isHalantOrCoeng(glyphs[base])) {\n base++;\n }\n glyphs[base].shaperInfo.position = POSITIONS.BASE_C;\n tryPref = false;\n }\n break;\n }\n }\n }\n\n // For Malayalam, skip over unformed below- (but NOT post-) forms.\n if (plan.unicodeScript === 'Malayalam') {\n for (let i = base + 1; i < end; i++) {\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i === end || !isHalantOrCoeng(glyphs[i])) {\n break;\n }\n\n i++; // Skip halant.\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) {\n base = i;\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n }\n }\n\n if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {\n base--;\n }\n break;\n }\n }\n\n if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {\n base--;\n }\n\n if (base < end) {\n while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {\n base--;\n }\n }\n\n // o Reorder matras:\n //\n // If a pre-base matra character had been reordered before applying basic\n // features, the glyph can be moved closer to the main consonant based on\n // whether half-forms had been formed. Actual position for the matra is\n // defined as “after last standalone halant glyph, after initial matra\n // position and before the main consonant”. If ZWJ or ZWNJ follow this\n // halant, position is moved after it.\n //\n\n if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters.\n // If we lost track of base, alas, position before last thingy.\n let newPos = base === end ? base - 2 : base - 1;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // If we found no Halant we are done.\n // Otherwise only proceed if the Halant does\n // not belong to the Matra itself!\n if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {\n newPos++;\n }\n } else {\n newPos = start; // No move.\n }\n }\n\n if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // Now go see if there's actually any matras...\n for (let i = newPos; i > start; i--) {\n if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) {\n let oldPos = i - 1;\n if (oldPos < base && base <= newPos) { // Shouldn't actually happen.\n base--;\n }\n\n let tmp = glyphs[oldPos];\n glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos));\n glyphs[newPos] = tmp;\n\n newPos--;\n }\n }\n }\n }\n\n // o Reorder reph:\n //\n // Reph’s original position is always at the beginning of the syllable,\n // (i.e. it is not reordered at the character reordering stage). However,\n // it will be reordered according to the basic-forms shaping results.\n // Possible positions for reph, depending on the script, are; after main,\n // before post-base consonant forms, and after post-base consonant forms.\n\n // Two cases:\n //\n // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then\n // we should only move it if the sequence ligated to the repha form.\n //\n // - If repha is encoded separately and in the logical position, we should only\n // move it if it did NOT ligate. If it ligated, it's probably the font trying\n // to make it work without the reordering.\n if (start + 1 < end &&\n glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph &&\n (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)\n ) {\n let newRephPos;\n let rephPos = indicConfig.rephPos;\n let found = false;\n\n // 1. If reph should be positioned after post-base consonant forms,\n // proceed to step 5.\n if (rephPos !== POSITIONS.After_Post) {\n // 2. If the reph repositioning class is not after post-base: target\n // position is after the first explicit halant glyph between the\n // first post-reph consonant and last main consonant. If ZWJ or ZWNJ\n // are following this halant, position is moved after it. If such\n // position is found, this is the target position. Otherwise,\n // proceed to the next step.\n //\n // Note: in old-implementation fonts, where classifications were\n // fixed in shaping engine, there was no case where reph position\n // will be found on this step.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n\n // 3. If reph should be repositioned after the main consonant: find the\n // first consonant not ligated with main, or find the first\n // consonant that is not a potential pre-base reordering Ra.\n if (!found && rephPos === POSITIONS.After_Main) {\n newRephPos = base;\n while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n\n // 4. If reph should be positioned before post-base consonant, find\n // first post-base classified consonant not ligated with main. If no\n // consonant is found, the target position should be before the\n // first matra, syllable modifier sign or vedic sign.\n //\n // This is our take on what step 4 is trying to say (and failing, BADLY).\n if (!found && rephPos === POSITIONS.After_Sub) {\n newRephPos = base;\n while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n }\n\n // 5. If no consonant is found in steps 3 or 4, move reph to a position\n // immediately before the first post-base matra, syllable modifier\n // sign or vedic sign that has a reordering class after the intended\n // reph position. For example, if the reordering position for reph\n // is post-main, it will skip above-base matras that also have a\n // post-main position.\n if (!found) {\n // Copied from step 2.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n }\n\n // 6. Otherwise, reorder reph to the end of the syllable.\n if (!found) {\n newRephPos = end - 1;\n while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {\n newRephPos--;\n }\n\n // If the Reph is to be ending up after a Matra,Halant sequence,\n // position it before that Halant so it can interact with the Matra.\n // However, if it's a plain Consonant,Halant we shouldn't do that.\n // Uniscribe doesn't do this.\n // TEST: U+0930,U+094D,U+0915,U+094B,U+094D\n if (isHalantOrCoeng(glyphs[newRephPos])) {\n for (let i = base + 1; i < newRephPos; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n newRephPos--;\n }\n }\n }\n }\n\n let reph = glyphs[start];\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start));\n glyphs[newRephPos] = reph;\n\n if (start < base && base <= newRephPos) {\n base--;\n }\n }\n\n // o Reorder pre-base reordering consonants:\n //\n // If a pre-base reordering consonant is found, reorder it according to\n // the following rules:\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n // 1. Only reorder a glyph produced by substitution during application\n // of the feature. (Note that a font may shape a Ra consonant with\n // the feature generally but block it in certain contexts.)\n\n // Note: We just check that something got substituted. We don't check that\n // the feature actually did it...\n //\n // Reorder pref only if it ligated.\n if (glyphs[i].isLigated && !glyphs[i].isMultiplied) {\n // 2. Try to find a target position the same way as for pre-base matra.\n // If it is found, reorder pre-base consonant glyph.\n //\n // 3. If position is not found, reorder immediately before main\n // consonant.\n let newPos = base;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a\n // split matra, it should be reordered to *before* the left part of such matra.\n if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) {\n let oldPos = i;\n for (let j = base + 1; j < oldPos; j++) {\n if (glyphs[j].shaperInfo.category === CATEGORIES.M) {\n newPos--;\n break;\n }\n }\n }\n }\n\n if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) {\n // -> If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos < end && isJoiner(glyphs[newPos])) {\n newPos++;\n }\n }\n\n let oldPos = i;\n let tmp = glyphs[oldPos];\n glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos));\n glyphs[newPos] = tmp;\n\n if (newPos <= base && base < oldPos) {\n base++;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply 'init' to the Left Matra if it's a word start.\n if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) {\n glyphs[start].features.init = true;\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n","{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}","{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}","// Cateories used in the OpenType spec:\n// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx\nexport const CATEGORIES = {\n X: 1 << 0,\n C: 1 << 1,\n V: 1 << 2,\n N: 1 << 3,\n H: 1 << 4,\n ZWNJ: 1 << 5,\n ZWJ: 1 << 6,\n M: 1 << 7,\n SM: 1 << 8,\n VD: 1 << 9,\n A: 1 << 10,\n Placeholder: 1 << 11,\n Dotted_Circle: 1 << 12,\n RS: 1 << 13, // Register Shifter, used in Khmer OT spec.\n Coeng: 1 << 14, // Khmer-style Virama.\n Repha: 1 << 15, // Atomically-encoded logical or visual repha.\n Ra: 1 << 16,\n CM: 1 << 17, // Consonant-Medial.\n Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).\n};\n\n// Visual positions in a syllable from left to right.\nexport const POSITIONS = {\n Start: 1 << 0,\n\n Ra_To_Become_Reph: 1 << 1,\n Pre_M: 1 << 2,\n Pre_C: 1 << 3,\n\n Base_C: 1 << 4,\n After_Main: 1 << 5,\n\n Above_C: 1 << 6,\n\n Before_Sub: 1 << 7,\n Below_C: 1 << 8,\n After_Sub: 1 << 9,\n\n Before_Post: 1 << 10,\n Post_C: 1 << 11,\n After_Post: 1 << 12,\n\n Final_C: 1 << 13,\n SMVD: 1 << 14,\n\n End: 1 << 15\n};\n\nexport const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;\nexport const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;\nexport const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;\n\nexport const INDIC_CONFIGS = {\n Default: {\n hasOldSpec: false,\n virama: 0,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Devanagari: {\n hasOldSpec: true,\n virama: 0x094D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Bengali: {\n hasOldSpec: true,\n virama: 0x09CD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gurmukhi: {\n hasOldSpec: true,\n virama: 0x0A4D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gujarati: {\n hasOldSpec: true,\n virama: 0x0ACD,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Oriya: {\n hasOldSpec: true,\n virama: 0x0B4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Tamil: {\n hasOldSpec: true,\n virama: 0x0BCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Telugu: {\n hasOldSpec: true,\n virama: 0x0C4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Explicit',\n blwfMode: 'Post_Only'\n },\n\n Kannada: {\n hasOldSpec: true,\n virama: 0x0CCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Post_Only'\n },\n\n Malayalam: {\n hasOldSpec: true,\n virama: 0x0D4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Log_Repha',\n blwfMode: 'Pre_And_Post'\n },\n\n // Handled by UniversalShaper\n // Sinhala: {\n // hasOldSpec: false,\n // virama: 0x0DCA,\n // basePos: 'Last_Sinhala',\n // rephPos: POSITIONS.After_Main,\n // rephMode: 'Explicit',\n // blwfMode: 'Pre_And_Post'\n // },\n\n Khmer: {\n hasOldSpec: false,\n virama: 0x17D2,\n basePos: 'First',\n rephPos: POSITIONS.Ra_To_Become_Reph,\n rephMode: 'Vis_Repha',\n blwfMode: 'Pre_And_Post'\n }\n};\n\n// Additional decompositions that aren't in Unicode\nexport const INDIC_DECOMPOSITIONS = {\n // Khmer\n 0x17BE: [0x17C1, 0x17BE],\n 0x17BF: [0x17C1, 0x17BF],\n 0x17C0: [0x17C1, 0x17C0],\n 0x17C4: [0x17C1, 0x17C4],\n 0x17C5: [0x17C1, 0x17C5]\n};\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\nimport { decodeBase64 } from '../../utils';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/use.trie', 'base64')));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n static zeroMarkWidths = 'BEFORE_GPOS';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n // Default glyph pre-processing group\n plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n // Reordering group\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['rphf'], false);\n plan.addStage(recordRphf);\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['pref']);\n plan.addStage(recordPref);\n\n // Orthographic unit shaping group\n plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n plan.addStage(reorder);\n\n // Topographical features\n // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n // Standard topographic presentation and positional feature application\n plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split vowels\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n if (decompositions[codepoint]) {\n let decomposed = decompositions[codepoint].map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction useCategory(glyph) {\n return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n constructor(category, syllableType, syllable) {\n this.category = category;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n }\n\n // Assign rphf feature\n let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n for (let i = start; i < start + limit; i++) {\n glyphs[i].features.rphf = true;\n }\n }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n for (let glyph of glyphs) {\n glyph.substituted = false;\n }\n}\n\nfunction recordRphf(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted && glyph.features.rphf) {\n // Mark a substituted repha.\n glyph.shaperInfo.category = 'R';\n }\n }\n}\n\nfunction recordPref(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted) {\n // Mark a substituted pref as VPre, as they behave the same way.\n glyph.shaperInfo.category = 'VPre';\n }\n }\n}\n\nfunction reorder(font, glyphs) {\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let i, j;\n let info = glyphs[start].shaperInfo;\n let type = info.syllableType;\n\n // Only a few syllable types need reordering.\n if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n continue;\n }\n\n // Insert a dotted circle glyph in broken clusters.\n if (type === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = info;\n\n // Insert after possible Repha.\n for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n glyphs.splice(++i, 0, g);\n end++;\n }\n\n // Move things forward.\n if (info.category === 'R' && end - start > 1) {\n // Got a repha. Reorder it to after first base, before first halant.\n for (i = start + 1; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move before it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n if (isHalant(glyphs[i])) {\n i--;\n }\n\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n break;\n }\n }\n }\n\n // Move things back.\n for (i = start, j = end; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move after it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n j = isHalant(glyphs[i]) ? i + 1 : i;\n } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n }\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n\nfunction isHalant(glyph) {\n return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n return info.category === 'B' || info.category === 'GB';\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let glyph = this.glyphIterator.cur;\n switch (table.version) {\n case 1:\n glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n break;\n\n case 2:\n glyph.id = table.substitute.get(index);\n break;\n }\n\n return true;\n }\n\n case 2: { // Multiple Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let sequence = table.sequences.get(index);\n\n if (sequence.length === 0) {\n // If the sequence length is zero, delete the glyph.\n // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.\n this.glyphs.splice(this.glyphIterator.index, 1);\n return true;\n }\n\n this.glyphIterator.cur.id = sequence[0];\n this.glyphIterator.cur.ligatureComponent = 0;\n\n let features = this.glyphIterator.cur.features;\n let curGlyph = this.glyphIterator.cur;\n let replacement = sequence.slice(1).map((gid, i) => {\n let glyph = new GlyphInfo(this.font, gid, undefined, features);\n glyph.shaperInfo = curGlyph.shaperInfo;\n glyph.isLigated = curGlyph.isLigated;\n glyph.ligatureComponent = i + 1;\n glyph.substituted = true;\n glyph.isMultiplied = true;\n return glyph;\n });\n\n this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n return true;\n }\n\n return false;\n }\n\n case 3: { // Alternate Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let USER_INDEX = 0; // TODO\n this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n return true;\n }\n\n return false;\n }\n\n case 4: { // Ligature Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n for (let ligature of table.ligatureSets.get(index)) {\n let matched = this.sequenceMatchIndices(1, ligature.components);\n if (!matched) {\n continue;\n }\n\n let curGlyph = this.glyphIterator.cur;\n\n // Concatenate all of the characters the new ligature will represent\n let characters = curGlyph.codePoints.slice();\n for (let index of matched) {\n characters.push(...this.glyphs[index].codePoints);\n }\n\n // Create the replacement ligature glyph\n let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n ligatureGlyph.isLigated = true;\n ligatureGlyph.substituted = true;\n\n // From Harfbuzz:\n // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n // the ligature to keep its old ligature id. This will allow it to attach to\n // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature\n // later, we don't want them to lose their ligature id/component, otherwise\n // GPOS will fail to correctly position the mark ligature on top of the\n // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n //\n // - If a ligature is formed of components that some of which are also ligatures\n // themselves, and those ligature components had marks attached to *their*\n // components, we have to attach the marks to the new ligature component\n // positions! Now *that*'s tricky! And these marks may be following the\n // last component of the whole sequence, so we should loop forward looking\n // for them and update them.\n //\n // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature\n // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to\n // the new ligature with a component value of 2.\n //\n // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n let isMarkLigature = curGlyph.isMark;\n for (let i = 0; i < matched.length && isMarkLigature; i++) {\n isMarkLigature = this.glyphs[matched[i]].isMark;\n }\n\n ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n let lastLigID = curGlyph.ligatureID;\n let lastNumComps = curGlyph.codePoints.length;\n let curComps = lastNumComps;\n let idx = this.glyphIterator.index + 1;\n\n // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n // This allows GPOS to attach marks to the correct ligature components.\n for (let matchIndex of matched) {\n // Don't assign new ligature components for mark ligatures (see above)\n if (isMarkLigature) {\n idx = matchIndex;\n } else {\n while (idx < matchIndex) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n this.glyphs[idx].ligatureComponent = ligatureComponent;\n idx++;\n }\n }\n\n lastLigID = this.glyphs[idx].ligatureID;\n lastNumComps = this.glyphs[idx].codePoints.length;\n curComps += lastNumComps;\n idx++; // skip base glyph\n }\n\n // Adjust ligature components for any marks following\n if (lastLigID && !isMarkLigature) {\n for (let i = idx; i < this.glyphs.length; i++) {\n if (this.glyphs[i].ligatureID === lastLigID) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n this.glyphs[i].ligatureComponent = ligatureComponent;\n } else {\n break;\n }\n }\n }\n\n // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n for (let i = matched.length - 1; i >= 0; i--) {\n this.glyphs.splice(matched[i], 1);\n }\n\n this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n return true;\n }\n\n return false;\n }\n\n case 5: // Contextual Substitution\n return this.applyContext(table);\n\n case 6: // Chaining Contextual Substitution\n return this.applyChainingContext(table);\n\n case 7: // Extension Substitution\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n }\n }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n applyPositionValue(sequenceIndex, value) {\n let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n if (value.xAdvance != null) {\n position.xAdvance += value.xAdvance;\n }\n\n if (value.yAdvance != null) {\n position.yAdvance += value.yAdvance;\n }\n\n if (value.xPlacement != null) {\n position.xOffset += value.xPlacement;\n }\n\n if (value.yPlacement != null) {\n position.yOffset += value.yPlacement;\n }\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (value.xPlaDevice) {\n position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);\n }\n\n if (value.yPlaDevice) {\n position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);\n }\n\n if (value.xAdvDevice) {\n position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);\n }\n\n if (value.yAdvDevice) {\n position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);\n }\n }\n\n // TODO: device tables\n }\n\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single positioning value\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1:\n this.applyPositionValue(0, table.value);\n break;\n\n case 2:\n this.applyPositionValue(0, table.values.get(index));\n break;\n }\n\n return true;\n }\n\n case 2: { // Pair Adjustment Positioning\n let nextGlyph = this.glyphIterator.peek();\n if (!nextGlyph) {\n return false;\n }\n\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1: // Adjustments for glyph pairs\n let set = table.pairSets.get(index);\n\n for (let pair of set) {\n if (pair.secondGlyph === nextGlyph.id) {\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n return false;\n\n case 2: // Class pair adjustment\n let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n if (class1 === -1 || class2 === -1) {\n return false;\n }\n\n var pair = table.classRecords.get(class1).get(class2);\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n case 3: { // Cursive Attachment Positioning\n let nextIndex = this.glyphIterator.peekIndex();\n let nextGlyph = this.glyphs[nextIndex];\n if (!nextGlyph) {\n return false;\n }\n\n let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n if (!curRecord || !curRecord.exitAnchor) {\n return false;\n }\n\n let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n if (!nextRecord || !nextRecord.entryAnchor) {\n return false;\n }\n\n let entry = this.getAnchor(nextRecord.entryAnchor);\n let exit = this.getAnchor(curRecord.exitAnchor);\n\n let cur = this.positions[this.glyphIterator.index];\n let next = this.positions[nextIndex];\n let d;\n\n switch (this.direction) {\n case 'ltr':\n cur.xAdvance = exit.x + cur.xOffset;\n\n d = entry.x + next.xOffset;\n next.xAdvance -= d;\n next.xOffset -= d;\n break;\n\n case 'rtl':\n d = exit.x + cur.xOffset;\n cur.xAdvance -= d;\n cur.xOffset -= d;\n next.xAdvance = entry.x + next.xOffset;\n break;\n }\n\n if (this.glyphIterator.flags.rightToLeft) {\n this.glyphIterator.cur.cursiveAttachment = nextIndex;\n cur.yOffset = entry.y - exit.y;\n } else {\n nextGlyph.cursiveAttachment = this.glyphIterator.index;\n cur.yOffset = exit.y - entry.y;\n }\n\n return true;\n }\n\n case 4: { // Mark to base positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0));\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n if (baseIndex === -1) {\n return false;\n }\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 5: { // Mark to ligature positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n if (ligIndex === -1) {\n return false;\n }\n\n let ligAttach = table.ligatureArray[ligIndex];\n let markGlyph = this.glyphIterator.cur;\n let ligGlyph = this.glyphs[baseGlyphIndex];\n let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0)\n ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n : ligGlyph.codePoints.length - 1;\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = ligAttach[compIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 6: { // Mark to mark positioning\n let mark1Index = this.coverageIndex(table.mark1Coverage);\n if (mark1Index === -1) {\n return false;\n }\n\n // get the previous mark to attach to\n let prevIndex = this.glyphIterator.peekIndex(-1);\n let prev = this.glyphs[prevIndex];\n if (!prev || !prev.isMark) {\n return false;\n }\n\n let cur = this.glyphIterator.cur;\n\n // The following logic was borrowed from Harfbuzz\n let good = false;\n if (cur.ligatureID === prev.ligatureID) {\n if (!cur.ligatureID) { // Marks belonging to the same base\n good = true;\n } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n good = true;\n }\n } else {\n // If ligature ids don't match, it may be the case that one of the marks\n // itself is a ligature, in which case match.\n if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n good = true;\n }\n }\n\n if (!good) {\n return false;\n }\n\n let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n if (mark2Index === -1) {\n return false;\n }\n\n let markRecord = table.mark1Array[mark1Index];\n let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, prevIndex);\n return true;\n }\n\n case 7: // Contextual positioning\n return this.applyContext(table);\n\n case 8: // Chaining contextual positioning\n return this.applyChainingContext(table);\n\n case 9: // Extension positioning\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`Unsupported GPOS table: ${lookupType}`);\n }\n }\n\n applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n let baseCoords = this.getAnchor(baseAnchor);\n let markCoords = this.getAnchor(markRecord.markAnchor);\n\n let basePos = this.positions[baseGlyphIndex];\n let markPos = this.positions[this.glyphIterator.index];\n\n markPos.xOffset = baseCoords.x - markCoords.x;\n markPos.yOffset = baseCoords.y - markCoords.y;\n this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n }\n\n getAnchor(anchor) {\n // TODO: contour point, device tables\n let x = anchor.xCoordinate;\n let y = anchor.yCoordinate;\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (anchor.xDeviceTable) {\n x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);\n }\n\n if (anchor.yDeviceTable) {\n y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);\n }\n }\n\n return { x, y };\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n super.applyFeatures(userFeatures, glyphs, advances);\n\n for (var i = 0; i < this.glyphs.length; i++) {\n this.fixCursiveAttachment(i);\n }\n\n this.fixMarkAttachment();\n }\n\n fixCursiveAttachment(i) {\n let glyph = this.glyphs[i];\n if (glyph.cursiveAttachment != null) {\n let j = glyph.cursiveAttachment;\n\n glyph.cursiveAttachment = null;\n this.fixCursiveAttachment(j);\n\n this.positions[i].yOffset += this.positions[j].yOffset;\n }\n }\n\n fixMarkAttachment() {\n for (let i = 0; i < this.glyphs.length; i++) {\n let glyph = this.glyphs[i];\n if (glyph.markAttachment != null) {\n let j = glyph.markAttachment;\n\n this.positions[i].xOffset += this.positions[j].xOffset;\n this.positions[i].yOffset += this.positions[j].yOffset;\n\n if (this.direction === 'ltr') {\n for (let k = j; k < i; k++) {\n this.positions[i].xOffset -= this.positions[k].xAdvance;\n this.positions[i].yOffset -= this.positions[k].yAdvance;\n }\n } else {\n for (let k = j + 1; k < i + 1; k++) {\n this.positions[i].xOffset += this.positions[k].xAdvance;\n this.positions[i].yOffset += this.positions[k].yAdvance;\n }\n }\n }\n }\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport * as r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS = 1 << 0;\nconst ARGS_ARE_XY_VALUES = 1 << 1;\nconst ROUND_XY_TO_GRID = 1 << 2;\nconst WE_HAVE_A_SCALE = 1 << 3;\nconst MORE_COMPONENTS = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS = 1 << 8;\nconst USE_MY_METRICS = 1 << 9;\nconst OVERLAP_COMPOUND = 1 << 10;\nconst SCALED_COMPONENT_OFFSET = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n constructor(onCurve, endContour, x = 0, y = 0) {\n this.onCurve = onCurve;\n this.endContour = endContour;\n this.x = x;\n this.y = y;\n }\n\n copy() {\n return new Point(this.onCurve, this.endContour, this.x, this.y);\n }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n constructor(glyphID, dx, dy) {\n this.glyphID = glyphID;\n this.dx = dx;\n this.dy = dy;\n this.pos = 0;\n this.scaleX = this.scaleY = 1;\n this.scale01 = this.scale10 = 0;\n }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n type = 'TTF';\n\n // Parses just the glyph header and returns the bounding box\n _getCBox(internal) {\n // We need to decode the glyph if variation processing is requested,\n // so it's easier just to recompute the path's cbox after decoding.\n if (this._font._variationProcessor && !internal) {\n return this.path.cbox;\n }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += this._font.loca.offsets[this.id];\n let glyph = GlyfHeader.decode(stream);\n\n let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n return Object.freeze(cbox);\n }\n\n // Parses a single glyph coordinate\n _parseGlyphCoord(stream, prev, short, same) {\n if (short) {\n var val = stream.readUInt8();\n if (!same) {\n val = -val;\n }\n\n val += prev;\n } else {\n if (same) {\n var val = prev;\n } else {\n var val = prev + stream.readInt16BE();\n }\n }\n\n return val;\n }\n\n // Decodes the glyph data into points for simple glyphs,\n // or components for composite glyphs\n _decode() {\n let glyfPos = this._font.loca.offsets[this.id];\n let nextPos = this._font.loca.offsets[this.id + 1];\n\n // Nothing to do if there is no data for this glyph\n if (glyfPos === nextPos) { return null; }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += glyfPos;\n let startPos = stream.pos;\n\n let glyph = GlyfHeader.decode(stream);\n\n if (glyph.numberOfContours > 0) {\n this._decodeSimple(glyph, stream);\n\n } else if (glyph.numberOfContours < 0) {\n this._decodeComposite(glyph, stream, startPos);\n }\n\n return glyph;\n }\n\n _decodeSimple(glyph, stream) {\n // this is a simple glyph\n glyph.points = [];\n\n let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n let flags = [];\n let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n while (flags.length < numCoords) {\n var flag = stream.readUInt8();\n flags.push(flag);\n\n // check for repeat flag\n if (flag & REPEAT) {\n let count = stream.readUInt8();\n for (let j = 0; j < count; j++) {\n flags.push(flag);\n }\n }\n }\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n glyph.points.push(point);\n }\n\n let px = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n }\n\n let py = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n }\n\n if (this._font._variationProcessor) {\n let points = glyph.points.slice();\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.slice(-4);\n }\n\n return;\n }\n\n _decodeComposite(glyph, stream, offset = 0) {\n // this is a composite glyph\n glyph.components = [];\n let haveInstructions = false;\n let flags = MORE_COMPONENTS;\n\n while (flags & MORE_COMPONENTS) {\n flags = stream.readUInt16BE();\n let gPos = stream.pos - offset;\n let glyphID = stream.readUInt16BE();\n if (!haveInstructions) {\n haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n }\n\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n var dx = stream.readInt16BE();\n var dy = stream.readInt16BE();\n } else {\n var dx = stream.readInt8();\n var dy = stream.readInt8();\n }\n\n var component = new Component(glyphID, dx, dy);\n component.pos = gPos;\n\n if (flags & WE_HAVE_A_SCALE) {\n // fixed number with 14 bits of fraction\n component.scaleX =\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n }\n\n glyph.components.push(component);\n }\n\n if (this._font._variationProcessor) {\n let points = [];\n for (let j = 0; j < glyph.components.length; j++) {\n var component = glyph.components[j];\n points.push(new Point(true, true, component.dx, component.dy));\n }\n\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.splice(-4, 4);\n\n for (let i = 0; i < points.length; i++) {\n let point = points[i];\n glyph.components[i].dx = point.x;\n glyph.components[i].dy = point.y;\n }\n }\n\n return haveInstructions;\n }\n\n _getPhantomPoints(glyph) {\n let cbox = this._getCBox(true);\n if (this._metrics == null) {\n this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n }\n\n let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n return [\n new Point(false, true, glyph.xMin - leftBearing, 0),\n new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n new Point(false, true, 0, glyph.yMax + topBearing),\n new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n ];\n }\n\n // Decodes font data, resolves composite glyphs, and returns an array of contours\n _getContours() {\n let glyph = this._decode();\n if (!glyph) {\n return [];\n }\n\n let points = [];\n\n if (glyph.numberOfContours < 0) {\n // resolve composite glyphs\n for (let component of glyph.components) {\n let contours = this._font.getGlyph(component.glyphID)._getContours();\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n for (let j = 0; j < contour.length; j++) {\n let point = contour[j];\n let x = point.x * component.scaleX + point.y * component.scale01 + component.dx;\n let y = point.y * component.scaleY + point.x * component.scale10 + component.dy;\n points.push(new Point(point.onCurve, point.endContour, x, y));\n }\n }\n }\n } else {\n points = glyph.points || [];\n }\n\n // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;\n this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;\n }\n\n let contours = [];\n let cur = [];\n for (let k = 0; k < points.length; k++) {\n var point = points[k];\n cur.push(point);\n if (point.endContour) {\n contours.push(cur);\n cur = [];\n }\n }\n\n return contours;\n }\n\n _getMetrics() {\n if (this._metrics) {\n return this._metrics;\n }\n\n let cbox = this._getCBox(true);\n super._getMetrics(cbox);\n\n if (this._font._variationProcessor && !this._font.HVAR) {\n // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n this.path;\n }\n\n return this._metrics;\n }\n\n // Converts contours to a Path object that can be rendered\n _getPath() {\n let contours = this._getContours();\n let path = new Path;\n\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n let firstPt = contour[0];\n let lastPt = contour[contour.length - 1];\n let start = 0;\n\n if (firstPt.onCurve) {\n // The first point will be consumed by the moveTo command, so skip in the loop\n var curvePt = null;\n start = 1;\n } else {\n if (lastPt.onCurve) {\n // Start at the last point if the first point is off curve and the last point is on curve\n firstPt = lastPt;\n } else {\n // Start at the middle if both the first and last points are off curve\n firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n }\n\n var curvePt = firstPt;\n }\n\n path.moveTo(firstPt.x, firstPt.y);\n\n for (let j = start; j < contour.length; j++) {\n let pt = contour[j];\n let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n if (prevPt.onCurve && pt.onCurve) {\n path.lineTo(pt.x, pt.y);\n\n } else if (prevPt.onCurve && !pt.onCurve) {\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && !pt.onCurve) {\n let midX = (prevPt.x + pt.x) / 2;\n let midY = (prevPt.y + pt.y) / 2;\n path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && pt.onCurve) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n var curvePt = null;\n\n } else {\n throw new Error(\"Unknown TTF path state\");\n }\n }\n\n // Connect the first and last points\n if (curvePt) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n }\n\n path.closePath();\n }\n\n return path;\n }\n}\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport {isMark} from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n constructor(id, codePoints, font) {\n /**\n * The glyph id in the font\n * @type {number}\n */\n this.id = id;\n\n /**\n * An array of unicode code points that are represented by this glyph.\n * There can be multiple code points in the case of ligatures and other glyphs\n * that represent multiple visual characters.\n * @type {number[]}\n */\n this.codePoints = codePoints;\n this._font = font;\n\n // TODO: get this info from GDEF if available\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n\n _getPath() {\n return new Path();\n }\n\n _getCBox() {\n return this.path.cbox;\n }\n\n _getBBox() {\n return this.path.bbox;\n }\n\n _getTableMetrics(table) {\n if (this.id < table.metrics.length) {\n return table.metrics.get(this.id);\n }\n\n let metric = table.metrics.get(table.metrics.length - 1);\n let res = {\n advance: metric ? metric.advance : 0,\n bearing: table.bearings.get(this.id - table.metrics.length) || 0\n };\n\n return res;\n }\n\n _getMetrics(cbox) {\n if (this._metrics) { return this._metrics; }\n\n let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n if (this._font.vmtx) {\n var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n } else {\n let os2;\n if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n if ((os2 = this._font['OS/2']) && os2.version > 0) {\n var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n var topBearing = os2.typoAscender - cbox.maxY;\n\n } else {\n let { hhea } = this._font;\n var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n var topBearing = hhea.ascent - cbox.maxY;\n }\n }\n\n if (this._font._variationProcessor && this._font.HVAR) {\n advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n }\n\n return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n }\n\n /**\n * The glyph’s control box.\n * This is often the same as the bounding box, but is faster to compute.\n * Because of the way bezier curves are defined, some of the control points\n * can be outside of the bounding box. Where `bbox` takes this into account,\n * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n * for a more detailed description.\n *\n * @type {BBox}\n */\n @cache\n get cbox() {\n return this._getCBox();\n }\n\n /**\n * The glyph’s bounding box, i.e. the rectangle that encloses the\n * glyph outline as tightly as possible.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return this._getBBox();\n }\n\n /**\n * A vector Path object representing the glyph outline.\n * @type {Path}\n */\n @cache\n get path() {\n // Cache the path so we only decode it once\n // Decoding is actually performed by subclasses\n return this._getPath();\n }\n\n /**\n * Returns a path scaled to the given font size.\n * @param {number} size\n * @return {Path}\n */\n getScaledPath(size) {\n let scale = 1 / this._font.unitsPerEm * size;\n return this.path.scale(scale);\n }\n\n /**\n * The glyph's advance width.\n * @type {number}\n */\n @cache\n get advanceWidth() {\n return this._getMetrics().advanceWidth;\n }\n\n /**\n * The glyph's advance height.\n * @type {number}\n */\n @cache\n get advanceHeight() {\n return this._getMetrics().advanceHeight;\n }\n\n get ligatureCaretPositions() {}\n\n _getName() {\n let { post } = this._font;\n if (!post) {\n return null;\n }\n\n switch (post.version) {\n case 1:\n return StandardNames[this.id];\n\n case 2:\n let id = post.glyphNameIndex[this.id];\n if (id < StandardNames.length) {\n return StandardNames[id];\n }\n\n return post.names[id - StandardNames.length];\n\n case 2.5:\n return StandardNames[this.id + post.offsets[this.id]];\n\n case 4:\n return String.fromCharCode(post.map[this.id]);\n }\n }\n\n /**\n * The glyph's name\n * @type {string}\n */\n @cache\n get name() {\n return this._getName();\n }\n\n /**\n * Renders the glyph to the given graphics context, at the specified font size.\n * @param {CanvasRenderingContext2d} ctx\n * @param {number} size\n */\n render(ctx, size) {\n ctx.save();\n\n let scale = 1 / this._font.head.unitsPerEm * size;\n ctx.scale(scale, scale);\n\n let fn = this.path.toFunction();\n fn(ctx);\n ctx.fill();\n\n ctx.restore();\n }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n moveTo: 'M',\n lineTo: 'L',\n quadraticCurveTo: 'Q',\n bezierCurveTo: 'C',\n closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n constructor() {\n this.commands = [];\n this._bbox = null;\n this._cbox = null;\n }\n\n /**\n * Compiles the path to a JavaScript function that can be applied with\n * a graphics context in order to render the path.\n * @return {string}\n */\n toFunction() {\n return ctx => {\n this.commands.forEach(c => {\n return ctx[c.command].apply(ctx, c.args)\n })\n };\n }\n\n /**\n * Converts the path to an SVG path data string\n * @return {string}\n */\n toSVG() {\n let cmds = this.commands.map(c => {\n let args = c.args.map(arg => Math.round(arg * 100) / 100);\n return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n });\n\n return cmds.join('');\n }\n\n /**\n * Gets the \"control box\" of a path.\n * This is like the bounding box, but it includes all points including\n * control points of bezier segments and is much faster to compute than\n * the real bounding box.\n * @type {BBox}\n */\n get cbox() {\n if (!this._cbox) {\n let cbox = new BBox;\n for (let command of this.commands) {\n for (let i = 0; i < command.args.length; i += 2) {\n cbox.addPoint(command.args[i], command.args[i + 1]);\n }\n }\n\n this._cbox = Object.freeze(cbox);\n }\n\n return this._cbox;\n }\n\n /**\n * Gets the exact bounding box of the path by evaluating curve segments.\n * Slower to compute than the control box, but more accurate.\n * @type {BBox}\n */\n get bbox() {\n if (this._bbox) {\n return this._bbox;\n }\n\n let bbox = new BBox;\n let cx = 0, cy = 0;\n\n let f = t => (\n Math.pow(1 - t, 3) * p0[i]\n + 3 * Math.pow(1 - t, 2) * t * p1[i]\n + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n + Math.pow(t, 3) * p3[i]\n );\n\n for (let c of this.commands) {\n switch (c.command) {\n case 'moveTo':\n case 'lineTo':\n let [x, y] = c.args;\n bbox.addPoint(x, y);\n cx = x;\n cy = y;\n break;\n\n case 'quadraticCurveTo':\n case 'bezierCurveTo':\n if (c.command === 'quadraticCurveTo') {\n // http://fontforge.org/bezier.html\n var [qp1x, qp1y, p3x, p3y] = c.args;\n var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)\n var cp1y = cy + 2 / 3 * (qp1y - cy);\n var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)\n var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n } else {\n var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n }\n\n // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n bbox.addPoint(p3x, p3y);\n\n var p0 = [cx, cy];\n var p1 = [cp1x, cp1y];\n var p2 = [cp2x, cp2y];\n var p3 = [p3x, p3y];\n\n for (var i = 0; i <= 1; i++) {\n let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n\n if (a === 0) {\n if (b === 0) {\n continue;\n }\n\n let t = -c / b;\n if (0 < t && t < 1) {\n if (i === 0) {\n bbox.addPoint(f(t), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t));\n }\n }\n\n continue;\n }\n\n let b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n continue;\n }\n\n let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t1), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t1));\n }\n }\n\n let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t2), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t2));\n }\n }\n }\n\n cx = p3x;\n cy = p3y;\n break;\n }\n }\n\n return this._bbox = Object.freeze(bbox);\n }\n\n /**\n * Applies a mapping function to each point in the path.\n * @param {function} fn\n * @return {Path}\n */\n mapPoints(fn) {\n let path = new Path;\n\n for (let c of this.commands) {\n let args = [];\n for (let i = 0; i < c.args.length; i += 2) {\n let [x, y] = fn(c.args[i], c.args[i + 1]);\n args.push(x, y);\n }\n\n path[c.command](...args);\n }\n\n return path;\n }\n\n /**\n * Transforms the path by the given matrix.\n */\n transform(m0, m1, m2, m3, m4, m5) {\n return this.mapPoints((x, y) => {\n const tx = m0 * x + m2 * y + m4;\n const ty = m1 * x + m3 * y + m5;\n return [tx, ty];\n });\n }\n\n /**\n * Translates the path by the given offset.\n */\n translate(x, y) {\n return this.transform(1, 0, 0, 1, x, y);\n }\n\n /**\n * Rotates the path by the given angle (in radians).\n */\n rotate(angle) {\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n return this.transform(cos, sin, -sin, cos, 0, 0);\n }\n\n /**\n * Scales the path.\n */\n scale(scaleX, scaleY = scaleX) {\n return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n Path.prototype[command] = function(...args) {\n this._bbox = this._cbox = null;\n this.commands.push({\n command,\n args\n });\n\n return this;\n };\n}\n","export default [\n '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n type = 'CFF';\n\n _getName() {\n if (this._font.CFF2) {\n return super._getName();\n }\n\n return this._font['CFF '].getGlyphName(this.id);\n }\n\n bias(s) {\n if (s.length < 1240) {\n return 107;\n } else if (s.length < 33900) {\n return 1131;\n } else {\n return 32768;\n }\n }\n\n _getPath() {\n let cff = this._font.CFF2 || this._font['CFF '];\n let { stream } = cff;\n let str = cff.topDict.CharStrings[this.id];\n let end = str.offset + str.length;\n stream.pos = str.offset;\n\n let path = new Path;\n let stack = [];\n let trans = [];\n\n let width = null;\n let nStems = 0;\n let x = 0, y = 0;\n let usedGsubrs;\n let usedSubrs;\n let open = false;\n\n this._usedGsubrs = usedGsubrs = {};\n this._usedSubrs = usedSubrs = {};\n\n let gsubrs = cff.globalSubrIndex || [];\n let gsubrsBias = this.bias(gsubrs);\n\n let privateDict = cff.privateDictForGlyph(this.id) || {};\n let subrs = privateDict.Subrs || [];\n let subrsBias = this.bias(subrs);\n\n let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n let vsindex = privateDict.vsindex;\n let variationProcessor = this._font._variationProcessor;\n\n function checkWidth() {\n if (width == null) {\n width = stack.shift() + privateDict.nominalWidthX;\n }\n }\n\n function parseStems() {\n if (stack.length % 2 !== 0) {\n checkWidth();\n }\n\n nStems += stack.length >> 1;\n return stack.length = 0;\n }\n\n function moveTo(x, y) {\n if (open) {\n path.closePath();\n }\n\n path.moveTo(x, y);\n open = true;\n }\n\n let parse = function () {\n while (stream.pos < end) {\n let op = stream.readUInt8();\n if (op < 32) {\n let index, subr, phase;\n let c1x, c1y, c2x, c2y, c3x, c3y;\n let c4x, c4y, c5x, c5y, c6x, c6y;\n let pts;\n\n switch (op) {\n case 1: // hstem\n case 3: // vstem\n case 18: // hstemhm\n case 23: // vstemhm\n parseStems();\n break;\n\n case 4: // vmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 5: // rlineto\n while (stack.length >= 2) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n break;\n\n case 6: // hlineto\n case 7: // vlineto\n phase = op === 6;\n while (stack.length >= 1) {\n if (phase) {\n x += stack.shift();\n } else {\n y += stack.shift();\n }\n\n path.lineTo(x, y);\n phase = !phase;\n }\n break;\n\n case 8: // rrcurveto\n while (stack.length > 0) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 10: // callsubr\n index = stack.pop() + subrsBias;\n subr = subrs[index];\n if (subr) {\n usedSubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 11: // return\n if (cff.version >= 2) {\n break;\n }\n return;\n\n case 14: // endchar\n if (cff.version >= 2) {\n break;\n }\n\n if (stack.length > 0) {\n checkWidth();\n }\n\n if (open) {\n path.closePath();\n open = false;\n }\n break;\n\n case 15: { // vsindex\n if (cff.version < 2) {\n throw new Error('vsindex operator not supported in CFF v1');\n }\n\n vsindex = stack.pop();\n break;\n }\n\n case 16: { // blend\n if (cff.version < 2) {\n throw new Error('blend operator not supported in CFF v1');\n }\n\n if (!variationProcessor) {\n throw new Error('blend operator in non-variation font');\n }\n\n let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n let numBlends = stack.pop();\n let numOperands = numBlends * blendVector.length;\n let delta = stack.length - numOperands;\n let base = delta - numBlends;\n\n for (let i = 0; i < numBlends; i++) {\n let sum = stack[base + i];\n for (let j = 0; j < blendVector.length; j++) {\n sum += blendVector[j] * stack[delta++];\n }\n\n stack[base + i] = sum;\n }\n\n while (numOperands--) {\n stack.pop();\n }\n\n break;\n }\n\n case 19: // hintmask\n case 20: // cntrmask\n parseStems();\n stream.pos += (nStems + 7) >> 3;\n break;\n\n case 21: // rmoveto\n if (stack.length > 2) {\n checkWidth();\n }\n\n x += stack.shift();\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 22: // hmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n x += stack.shift();\n moveTo(x, y);\n break;\n\n case 24: // rcurveline\n while (stack.length >= 8) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n break;\n\n case 25: // rlinecurve\n while (stack.length >= 8) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n break;\n\n case 26: // vvcurveto\n if (stack.length % 2) {\n x += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x;\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 27: // hhcurveto\n if (stack.length % 2) {\n y += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y;\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 28: // shortint\n stack.push(stream.readInt16BE());\n break;\n\n case 29: // callgsubr\n index = stack.pop() + gsubrsBias;\n subr = gsubrs[index];\n if (subr) {\n usedGsubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 30: // vhcurveto\n case 31: // hvcurveto\n phase = op === 31;\n while (stack.length >= 4) {\n if (phase) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n y = c2y + stack.shift();\n x = c2x + (stack.length === 1 ? stack.shift() : 0);\n } else {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + (stack.length === 1 ? stack.shift() : 0);\n }\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n phase = !phase;\n }\n break;\n\n case 12:\n op = stream.readUInt8();\n switch (op) {\n case 3: // and\n let a = stack.pop();\n let b = stack.pop();\n stack.push(a && b ? 1 : 0);\n break;\n\n case 4: // or\n a = stack.pop();\n b = stack.pop();\n stack.push(a || b ? 1 : 0);\n break;\n\n case 5: // not\n a = stack.pop();\n stack.push(a ? 0 : 1);\n break;\n\n case 9: // abs\n a = stack.pop();\n stack.push(Math.abs(a));\n break;\n\n case 10: // add\n a = stack.pop();\n b = stack.pop();\n stack.push(a + b);\n break;\n\n case 11: // sub\n a = stack.pop();\n b = stack.pop();\n stack.push(a - b);\n break;\n\n case 12: // div\n a = stack.pop();\n b = stack.pop();\n stack.push(a / b);\n break;\n\n case 14: // neg\n a = stack.pop();\n stack.push(-a);\n break;\n\n case 15: // eq\n a = stack.pop();\n b = stack.pop();\n stack.push(a === b ? 1 : 0);\n break;\n\n case 18: // drop\n stack.pop();\n break;\n\n case 20: // put\n let val = stack.pop();\n let idx = stack.pop();\n trans[idx] = val;\n break;\n\n case 21: // get\n idx = stack.pop();\n stack.push(trans[idx] || 0);\n break;\n\n case 22: // ifelse\n let s1 = stack.pop();\n let s2 = stack.pop();\n let v1 = stack.pop();\n let v2 = stack.pop();\n stack.push(v1 <= v2 ? s1 : s2);\n break;\n\n case 23: // random\n stack.push(Math.random());\n break;\n\n case 24: // mul\n a = stack.pop();\n b = stack.pop();\n stack.push(a * b);\n break;\n\n case 26: // sqrt\n a = stack.pop();\n stack.push(Math.sqrt(a));\n break;\n\n case 27: // dup\n a = stack.pop();\n stack.push(a, a);\n break;\n\n case 28: // exch\n a = stack.pop();\n b = stack.pop();\n stack.push(b, a);\n break;\n\n case 29: // index\n idx = stack.pop();\n if (idx < 0) {\n idx = 0;\n } else if (idx > stack.length - 1) {\n idx = stack.length - 1;\n }\n\n stack.push(stack[idx]);\n break;\n\n case 30: // roll\n let n = stack.pop();\n let j = stack.pop();\n\n if (j >= 0) {\n while (j > 0) {\n var t = stack[n - 1];\n for (let i = n - 2; i >= 0; i--) {\n stack[i + 1] = stack[i];\n }\n\n stack[0] = t;\n j--;\n }\n } else {\n while (j < 0) {\n var t = stack[0];\n for (let i = 0; i <= n; i++) {\n stack[i] = stack[i + 1];\n }\n\n stack[n - 1] = t;\n j++;\n }\n }\n break;\n\n case 34: // hflex\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y;\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 35: // flex\n pts = [];\n\n for (let i = 0; i <= 5; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n stack.shift(); // fd\n break;\n\n case 36: // hflex1\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y + stack.shift();\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 37: // flex1\n let startx = x;\n let starty = y;\n\n pts = [];\n for (let i = 0; i <= 4; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n x += stack.shift();\n y = starty;\n } else {\n x = startx;\n y += stack.shift();\n }\n\n pts.push(x, y);\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n break;\n\n default:\n throw new Error(`Unknown op: 12 ${op}`);\n }\n break;\n\n default:\n throw new Error(`Unknown op: ${op}`);\n }\n\n } else if (op < 247) {\n stack.push(op - 139);\n } else if (op < 251) {\n var b1 = stream.readUInt8();\n stack.push((op - 247) * 256 + b1 + 108);\n } else if (op < 255) {\n var b1 = stream.readUInt8();\n stack.push(-(op - 251) * 256 - b1 - 108);\n } else {\n stack.push(stream.readInt32BE() / 65536);\n }\n }\n };\n\n parse();\n\n if (open) {\n path.closePath();\n }\n\n return path;\n }\n}\n","import TTFGlyph from './TTFGlyph';\nimport * as r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n originX: r.uint16,\n originY: r.uint16,\n type: new r.String(4),\n data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n type = 'SBIX';\n\n /**\n * Returns an object representing a glyph image at the given point size.\n * The object has a data property with a Buffer containing the actual image data,\n * along with the image type, and origin.\n *\n * @param {number} size\n * @return {object}\n */\n getImageForSize(size) {\n for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n var table = this._font.sbix.imageTables[i];\n if (table.ppem >= size) { break; }\n }\n\n let offsets = table.imageOffsets;\n let start = offsets[this.id];\n let end = offsets[this.id + 1];\n\n if (start === end) {\n return null;\n }\n\n this._font.stream.pos = start;\n return SBIXImage.decode(this._font.stream, {buflen: end - start});\n }\n\n render(ctx, size) {\n let img = this.getImageForSize(size);\n if (img != null) {\n let scale = size / this._font.unitsPerEm;\n ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n }\n\n if (this._font.sbix.flags.renderOutlines) {\n super.render(ctx, size);\n }\n }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n constructor(glyph, color) {\n this.glyph = glyph;\n this.color = color;\n }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n type = 'COLR';\n\n _getBBox() {\n let bbox = new BBox;\n for (let i = 0; i < this.layers.length; i++) {\n let layer = this.layers[i];\n let b = layer.glyph.bbox;\n bbox.addPoint(b.minX, b.minY);\n bbox.addPoint(b.maxX, b.maxY);\n }\n\n return bbox;\n }\n\n /**\n * Returns an array of objects containing the glyph and color for\n * each layer in the composite color glyph.\n * @type {object[]}\n */\n get layers() {\n let cpal = this._font.CPAL;\n let colr = this._font.COLR;\n let low = 0;\n let high = colr.baseGlyphRecord.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n var rec = colr.baseGlyphRecord[mid];\n\n if (this.id < rec.gid) {\n high = mid - 1;\n } else if (this.id > rec.gid) {\n low = mid + 1;\n } else {\n var baseLayer = rec;\n break;\n }\n }\n\n // if base glyph not found in COLR table,\n // default to normal glyph from glyf or CFF\n if (baseLayer == null) {\n var g = this._font._getBaseGlyph(this.id);\n var color = {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 255\n };\n\n return [new COLRLayer(g, color)];\n }\n\n // otherwise, return an array of all the layers\n let layers = [];\n for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n var rec = colr.layerRecords[i];\n var color = cpal.colorRecords[rec.paletteIndex];\n var g = this._font._getBaseGlyph(rec.gid);\n layers.push(new COLRLayer(g, color));\n }\n\n return layers;\n }\n\n render(ctx, size) {\n for (let {glyph, color} of this.layers) {\n ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n glyph.render(ctx, size);\n }\n\n return;\n }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK = 0x0fff;\nconst EMBEDDED_TUPLE_COORD = 0x8000;\nconst INTERMEDIATE_TUPLE = 0x4000;\nconst PRIVATE_POINT_NUMBERS = 0x2000;\nconst TUPLE_INDEX_MASK = 0x0fff;\nconst POINTS_ARE_WORDS = 0x80;\nconst POINT_RUN_COUNT_MASK = 0x7f;\nconst DELTAS_ARE_ZERO = 0x80;\nconst DELTAS_ARE_WORDS = 0x40;\nconst DELTA_RUN_COUNT_MASK = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n constructor(font, coords) {\n this.font = font;\n this.normalizedCoords = this.normalizeCoords(coords);\n this.blendVectors = new Map;\n }\n\n normalizeCoords(coords) {\n // the default mapping is linear along each axis, in two segments:\n // from the minValue to defaultValue, and from defaultValue to maxValue.\n let normalized = [];\n for (var i = 0; i < this.font.fvar.axis.length; i++) {\n let axis = this.font.fvar.axis[i];\n if (coords[i] < axis.defaultValue) {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n } else {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n }\n }\n\n // if there is an avar table, the normalized value is calculated\n // by interpolating between the two nearest mapped values.\n if (this.font.avar) {\n for (var i = 0; i < this.font.avar.segment.length; i++) {\n let segment = this.font.avar.segment[i];\n for (let j = 0; j < segment.correspondence.length; j++) {\n let pair = segment.correspondence[j];\n if (j >= 1 && normalized[i] < pair.fromCoord) {\n let prev = segment.correspondence[j - 1];\n normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n prev.toCoord;\n\n break;\n }\n }\n }\n }\n\n return normalized;\n }\n\n transformPoints(gid, glyphPoints) {\n if (!this.font.fvar || !this.font.gvar) { return; }\n\n let { gvar } = this.font;\n if (gid >= gvar.glyphCount) { return; }\n\n let offset = gvar.offsets[gid];\n if (offset === gvar.offsets[gid + 1]) { return; }\n\n // Read the gvar data for this glyph\n let { stream } = this.font;\n stream.pos = offset;\n if (stream.pos >= stream.length) {\n return;\n }\n\n let tupleCount = stream.readUInt16BE();\n let offsetToData = offset + stream.readUInt16BE();\n\n if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n var here = stream.pos;\n stream.pos = offsetToData;\n var sharedPoints = this.decodePoints();\n offsetToData = stream.pos;\n stream.pos = here;\n }\n\n let origPoints = glyphPoints.map(pt => pt.copy());\n\n tupleCount &= TUPLE_COUNT_MASK;\n for (let i = 0; i < tupleCount; i++) {\n let tupleDataSize = stream.readUInt16BE();\n let tupleIndex = stream.readUInt16BE();\n\n if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n var tupleCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n tupleCoords.push(stream.readInt16BE() / 16384);\n }\n\n } else {\n if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n throw new Error('Invalid gvar table');\n }\n\n var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n }\n\n if (tupleIndex & INTERMEDIATE_TUPLE) {\n var startCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n startCoords.push(stream.readInt16BE() / 16384);\n }\n\n var endCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n endCoords.push(stream.readInt16BE() / 16384);\n }\n }\n\n // Get the factor at which to apply this tuple\n let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n if (factor === 0) {\n offsetToData += tupleDataSize;\n continue;\n }\n\n var here = stream.pos;\n stream.pos = offsetToData;\n\n if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n var points = this.decodePoints();\n } else {\n var points = sharedPoints;\n }\n\n // points.length = 0 means there are deltas for all points\n let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n let xDeltas = this.decodeDeltas(nPoints);\n let yDeltas = this.decodeDeltas(nPoints);\n\n if (points.length === 0) { // all points\n for (let i = 0; i < glyphPoints.length; i++) {\n var point = glyphPoints[i];\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n } else {\n let outPoints = origPoints.map(pt => pt.copy());\n let hasDelta = glyphPoints.map(() => false);\n\n for (let i = 0; i < points.length; i++) {\n let idx = points[i];\n if (idx < glyphPoints.length) {\n let point = outPoints[idx];\n hasDelta[idx] = true;\n\n point.x += xDeltas[i] * factor;\n point.y += yDeltas[i] * factor;\n }\n }\n\n this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n for (let i = 0; i < glyphPoints.length; i++) {\n let deltaX = outPoints[i].x - origPoints[i].x;\n let deltaY = outPoints[i].y - origPoints[i].y;\n\n glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX);\n glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY);\n }\n }\n\n offsetToData += tupleDataSize;\n stream.pos = here;\n }\n }\n\n decodePoints() {\n let stream = this.font.stream;\n let count = stream.readUInt8();\n\n if (count & POINTS_ARE_WORDS) {\n count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n }\n\n let points = new Uint16Array(count);\n let i = 0;\n let point = 0;\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n for (let j = 0; j < runCount && i < count; j++) {\n point += fn.call(stream);\n points[i++] = point;\n }\n }\n\n return points;\n }\n\n decodeDeltas(count) {\n let stream = this.font.stream;\n let i = 0;\n let deltas = new Int16Array(count);\n\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n if (run & DELTAS_ARE_ZERO) {\n i += runCount;\n\n } else {\n let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n for (let j = 0; j < runCount && i < count; j++) {\n deltas[i++] = fn.call(stream);\n }\n }\n }\n\n return deltas;\n }\n\n tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n let normalized = this.normalizedCoords;\n let { gvar } = this.font;\n let factor = 1;\n\n for (let i = 0; i < gvar.axisCount; i++) {\n if (tupleCoords[i] === 0) {\n continue;\n }\n\n if (normalized[i] === 0) {\n return 0;\n }\n\n if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n (normalized[i] > Math.max(0, tupleCoords[i]))) {\n return 0;\n }\n\n factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n } else {\n if ((normalized[i] < startCoords[i]) ||\n (normalized[i] > endCoords[i])) {\n return 0;\n\n } else if (normalized[i] < tupleCoords[i]) {\n factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n } else {\n factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n }\n }\n }\n\n return factor;\n }\n\n // Interpolates points without delta values.\n // Needed for the Ø and Q glyphs in Skia.\n // Algorithm from Freetype.\n interpolateMissingDeltas(points, inPoints, hasDelta) {\n if (points.length === 0) {\n return;\n }\n\n let point = 0;\n while (point < points.length) {\n let firstPoint = point;\n\n // find the end point of the contour\n let endPoint = point;\n let pt = points[endPoint];\n while (!pt.endContour) {\n pt = points[++endPoint];\n }\n\n // find the first point that has a delta\n while (point <= endPoint && !hasDelta[point]) {\n point++;\n }\n\n if (point > endPoint) {\n continue;\n }\n\n let firstDelta = point;\n let curDelta = point;\n point++;\n\n while (point <= endPoint) {\n // find the next point with a delta, and interpolate intermediate points\n if (hasDelta[point]) {\n this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n curDelta = point;\n }\n\n point++;\n }\n\n // shift contour if we only have a single delta\n if (curDelta === firstDelta) {\n this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n } else {\n // otherwise, handle the remaining points at the end and beginning of the contour\n this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n if (firstDelta > 0) {\n this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n }\n }\n\n point = endPoint + 1;\n }\n }\n\n deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n if (p1 > p2) {\n return;\n }\n\n let iterable = ['x', 'y'];\n for (let i = 0; i < iterable.length; i++) {\n let k = iterable[i];\n if (inPoints[ref1][k] > inPoints[ref2][k]) {\n var p = ref1;\n ref1 = ref2;\n ref2 = p;\n }\n\n let in1 = inPoints[ref1][k];\n let in2 = inPoints[ref2][k];\n let out1 = outPoints[ref1][k];\n let out2 = outPoints[ref2][k];\n\n // If the reference points have the same coordinate but different\n // delta, inferred delta is zero. Otherwise interpolate.\n if (in1 !== in2 || out1 === out2) {\n let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n for (let p = p1; p <= p2; p++) {\n let out = inPoints[p][k];\n\n if (out <= in1) {\n out += out1 - in1;\n } else if (out >= in2) {\n out += out2 - in2;\n } else {\n out = out1 + (out - in1) * scale;\n }\n\n outPoints[p][k] = out;\n }\n }\n }\n }\n\n deltaShift(p1, p2, ref, inPoints, outPoints) {\n let deltaX = outPoints[ref].x - inPoints[ref].x;\n let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n for (let p = p1; p <= p2; p++) {\n if (p !== ref) {\n outPoints[p].x += deltaX;\n outPoints[p].y += deltaY;\n }\n }\n }\n\n getAdvanceAdjustment(gid, table) {\n let outerIndex, innerIndex;\n\n if (table.advanceWidthMapping) {\n let idx = gid;\n if (idx >= table.advanceWidthMapping.mapCount) {\n idx = table.advanceWidthMapping.mapCount - 1;\n }\n\n let entryFormat = table.advanceWidthMapping.entryFormat;\n ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n } else {\n outerIndex = 0;\n innerIndex = gid;\n }\n\n return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);\n }\n\n // See pseudo code from `Font Variations Overview'\n // in the OpenType specification.\n getDelta(itemStore, outerIndex, innerIndex) {\n if (outerIndex >= itemStore.itemVariationData.length) {\n return 0;\n }\n\n let varData = itemStore.itemVariationData[outerIndex];\n if (innerIndex >= varData.deltaSets.length) {\n return 0;\n }\n\n let deltaSet = varData.deltaSets[innerIndex];\n let blendVector = this.getBlendVector(itemStore, outerIndex);\n let netAdjustment = 0;\n\n for (let master = 0; master < varData.regionIndexCount; master++) {\n netAdjustment += deltaSet.deltas[master] * blendVector[master];\n }\n\n return netAdjustment;\n }\n\n getBlendVector(itemStore, outerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n if (this.blendVectors.has(varData)) {\n return this.blendVectors.get(varData);\n }\n\n let normalizedCoords = this.normalizedCoords;\n let blendVector = [];\n\n // outer loop steps through master designs to be blended\n for (let master = 0; master < varData.regionIndexCount; master++) {\n let scalar = 1;\n let regionIndex = varData.regionIndexes[master];\n let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n // inner loop steps through axes in this region\n for (let j = 0; j < axes.length; j++) {\n let axis = axes[j];\n let axisScalar;\n\n // compute the scalar contribution of this axis\n // ignore invalid ranges\n if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n axisScalar = 1;\n\n } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n axisScalar = 1;\n\n // peak of 0 means ignore this axis\n } else if (axis.peakCoord === 0) {\n axisScalar = 1;\n\n // ignore this region if coords are out of range\n } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n axisScalar = 0;\n\n // calculate a proportional factor\n } else {\n if (normalizedCoords[j] === axis.peakCoord) {\n axisScalar = 1;\n } else if (normalizedCoords[j] < axis.peakCoord) {\n axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n (axis.peakCoord - axis.startCoord + Number.EPSILON);\n } else {\n axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n (axis.endCoord - axis.peakCoord + Number.EPSILON);\n }\n }\n\n // take product of all the axis scalars\n scalar *= axisScalar;\n }\n\n blendVector[master] = scalar;\n }\n\n this.blendVectors.set(varData, blendVector);\n return blendVector;\n }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n constructor(font) {\n super(font);\n this.glyphEncoder = new TTFGlyphEncoder;\n }\n\n _addGlyph(gid) {\n let glyph = this.font.getGlyph(gid);\n let glyf = glyph._decode();\n\n // get the offset to the glyph from the loca table\n let curOffset = this.font.loca.offsets[gid];\n let nextOffset = this.font.loca.offsets[gid + 1];\n\n let stream = this.font._getTableStream('glyf');\n stream.pos += curOffset;\n\n let buffer = stream.readBuffer(nextOffset - curOffset);\n\n // if it is a compound glyph, include its components\n if (glyf && glyf.numberOfContours < 0) {\n buffer = new Uint8Array(buffer);\n let view = new DataView(buffer.buffer);\n for (let component of glyf.components) {\n gid = this.includeGlyph(component.glyphID);\n view.setUint16(component.pos, gid);\n }\n } else if (glyf && this.font._variationProcessor) {\n // If this is a TrueType variation glyph, re-encode the path\n buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n }\n\n this.glyf.push(buffer);\n this.loca.offsets.push(this.offset);\n\n this.hmtx.metrics.push({\n advance: glyph.advanceWidth,\n bearing: glyph._getMetrics().leftBearing\n });\n\n this.offset += buffer.length;\n return this.glyf.length - 1;\n }\n\n encode() {\n // tables required by PDF spec:\n // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n //\n // additional tables required for standalone fonts:\n // name, cmap, OS/2, post\n\n this.glyf = [];\n this.offset = 0;\n this.loca = {\n offsets: [],\n version: this.font.loca.version\n };\n\n this.hmtx = {\n metrics: [],\n bearings: []\n };\n\n // include all the glyphs\n // not using a for loop because we need to support adding more\n // glyphs to the array as we go, and CoffeeScript caches the length.\n let i = 0;\n while (i < this.glyphs.length) {\n this._addGlyph(this.glyphs[i++]);\n }\n\n let maxp = cloneDeep(this.font.maxp);\n maxp.numGlyphs = this.glyf.length;\n\n this.loca.offsets.push(this.offset);\n\n let head = cloneDeep(this.font.head);\n head.indexToLocFormat = this.loca.version;\n\n let hhea = cloneDeep(this.font.hhea);\n hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n // map = []\n // for index in [0...256]\n // if index < @numGlyphs\n // map[index] = index\n // else\n // map[index] = 0\n //\n // cmapTable =\n // version: 0\n // length: 262\n // language: 0\n // codeMap: map\n //\n // cmap =\n // version: 0\n // numSubtables: 1\n // tables: [\n // platformID: 1\n // encodingID: 0\n // table: cmapTable\n // ]\n\n // TODO: subset prep, cvt, fpgm?\n return Directory.toBuffer({\n tables: {\n head,\n hhea,\n loca: this.loca,\n maxp,\n 'cvt ': this.font['cvt '],\n prep: this.font.prep,\n glyf: this.glyf,\n hmtx: this.hmtx,\n fpgm: this.font.fpgm\n\n // name: clone @font.name\n // 'OS/2': clone @font['OS/2']\n // post: clone @font.post\n // cmap: cmap\n }\n });\n }\n}\n","import * as r from 'restructure';\n\nconst resolved = Promise.resolve();\n\nexport default class Subset {\n constructor(font) {\n this.font = font;\n this.glyphs = [];\n this.mapping = {};\n\n // always include the missing glyph\n this.includeGlyph(0);\n }\n\n includeGlyph(glyph) {\n if (typeof glyph === 'object') {\n glyph = glyph.id;\n }\n\n if (this.mapping[glyph] == null) {\n this.glyphs.push(glyph);\n this.mapping[glyph] = this.glyphs.length - 1;\n }\n\n return this.mapping[glyph];\n }\n}\n","import * as r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\nclass Point {\n static size(val) {\n return val >= 0 && val <= 255 ? 1 : 2;\n }\n \n static encode(stream, value) {\n if (value >= 0 && value <= 255) {\n stream.writeUInt8(value);\n } else {\n stream.writeInt16BE(value);\n }\n }\n}\n\nlet Glyf = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16,\n endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n instructions: new r.Array(r.uint8, r.uint16),\n flags: new r.Array(r.uint8, 0),\n xPoints: new r.Array(Point, 0),\n yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n encodeSimple(path, instructions = []) {\n let endPtsOfContours = [];\n let xPoints = [];\n let yPoints = [];\n let flags = [];\n let same = 0;\n let lastX = 0, lastY = 0, lastFlag = 0;\n let pointCount = 0;\n \n for (let i = 0; i < path.commands.length; i++) {\n let c = path.commands[i];\n \n for (let j = 0; j < c.args.length; j += 2) {\n let x = c.args[j];\n let y = c.args[j + 1];\n let flag = 0;\n \n // If the ending point of a quadratic curve is the midpoint\n // between the control point and the control point of the next\n // quadratic curve, we can omit the ending point.\n if (c.command === 'quadraticCurveTo' && j === 2) {\n let next = path.commands[i + 1];\n if (next && next.command === 'quadraticCurveTo') {\n let midX = (lastX + next.args[0]) / 2;\n let midY = (lastY + next.args[1]) / 2;\n \n if (x === midX && y === midY) {\n continue;\n }\n }\n }\n \n // All points except control points are on curve.\n if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n flag |= ON_CURVE;\n }\n \n flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n \n if (flag === lastFlag && same < 255) {\n flags[flags.length - 1] |= REPEAT;\n same++;\n } else {\n if (same > 0) {\n flags.push(same);\n same = 0;\n }\n \n flags.push(flag);\n lastFlag = flag;\n }\n \n lastX = x;\n lastY = y;\n pointCount++;\n }\n \n if (c.command === 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n }\n\n // Close the path if the last command didn't already\n if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n \n let bbox = path.bbox;\n let glyf = {\n numberOfContours: endPtsOfContours.length,\n xMin: bbox.minX,\n yMin: bbox.minY,\n xMax: bbox.maxX,\n yMax: bbox.maxY,\n endPtsOfContours: endPtsOfContours,\n instructions: instructions,\n flags: flags,\n xPoints: xPoints,\n yPoints: yPoints\n };\n \n let size = Glyf.size(glyf);\n let tail = 4 - (size % 4);\n \n let stream = new r.EncodeStream(size + tail);\n Glyf.encode(stream, glyf);\n \n // Align to 4-byte length\n if (tail !== 0) {\n stream.fill(0, tail);\n }\n \n return stream.buffer;\n }\n \n _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n let diff = value - last;\n \n if (value === last) {\n flag |= sameFlag;\n } else {\n if (-255 <= diff && diff <= 255) {\n flag |= shortFlag;\n if (diff < 0) {\n diff = -diff;\n } else {\n flag |= sameFlag;\n }\n }\n \n points.push(diff);\n }\n \n return flag;\n }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n constructor(font) {\n super(font);\n\n this.cff = this.font['CFF '];\n if (!this.cff) {\n throw new Error('Not a CFF Font');\n }\n }\n\n subsetCharstrings() {\n this.charstrings = [];\n let gsubrs = {};\n\n for (let gid of this.glyphs) {\n this.charstrings.push(this.cff.getCharString(gid));\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedGsubrs) {\n gsubrs[subr] = true;\n }\n }\n\n this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n }\n\n subsetSubrs(subrs, used) {\n let res = [];\n for (let i = 0; i < subrs.length; i++) {\n let subr = subrs[i];\n if (used[i]) {\n this.cff.stream.pos = subr.offset;\n res.push(this.cff.stream.readBuffer(subr.length));\n } else {\n res.push(new Uint8Array([11])); // return\n }\n }\n\n return res;\n }\n\n subsetFontdict(topDict) {\n topDict.FDArray = [];\n topDict.FDSelect = {\n version: 0,\n fds: []\n };\n\n let used_fds = {};\n let used_subrs = [];\n let fd_select = {};\n for (let gid of this.glyphs) {\n let fd = this.cff.fdForGlyph(gid);\n if (fd == null) {\n continue;\n }\n\n if (!used_fds[fd]) {\n topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n used_subrs.push({});\n fd_select[fd] = topDict.FDArray.length - 1;\n }\n\n used_fds[fd] = true;\n topDict.FDSelect.fds.push(fd_select[fd]);\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n for (let subr in glyph._usedSubrs) {\n used_subrs[fd_select[fd]][subr] = true;\n }\n }\n\n for (let i = 0; i < topDict.FDArray.length; i++) {\n let dict = topDict.FDArray[i];\n delete dict.FontName;\n if (dict.Private && dict.Private.Subrs) {\n dict.Private = Object.assign({}, dict.Private);\n dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n }\n }\n\n return;\n }\n\n createCIDFontdict(topDict) {\n let used_subrs = {};\n for (let gid of this.glyphs) {\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedSubrs) {\n used_subrs[subr] = true;\n }\n }\n\n let privateDict = Object.assign({}, this.cff.topDict.Private);\n if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {\n privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n }\n\n topDict.FDArray = [{ Private: privateDict }];\n return topDict.FDSelect = {\n version: 3,\n nRanges: 1,\n ranges: [{ first: 0, fd: 0 }],\n sentinel: this.charstrings.length\n };\n }\n\n addString(string) {\n if (!string) {\n return null;\n }\n\n if (!this.strings) {\n this.strings = [];\n }\n\n this.strings.push(string);\n return standardStrings.length + this.strings.length - 1;\n }\n\n encode() {\n this.subsetCharstrings();\n\n let charset = {\n version: this.charstrings.length > 255 ? 2 : 1,\n ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n };\n\n let topDict = Object.assign({}, this.cff.topDict);\n topDict.Private = null;\n topDict.charset = charset;\n topDict.Encoding = null;\n topDict.CharStrings = this.charstrings;\n\n for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n topDict[key] = this.addString(this.cff.string(topDict[key]));\n }\n\n topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n topDict.CIDCount = this.charstrings.length;\n\n if (this.cff.isCIDFont) {\n this.subsetFontdict(topDict);\n } else {\n this.createCIDFontdict(topDict);\n }\n\n let top = {\n version: 1,\n hdrSize: this.cff.hdrSize,\n offSize: 4,\n header: this.cff.header,\n nameIndex: [this.cff.postscriptName],\n topDictIndex: [topDict],\n stringIndex: this.strings,\n globalSubrIndex: this.gsubrs\n };\n\n return CFFTop.toBuffer(top);\n }\n}\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport * as r from 'restructure';\nimport { asciiDecoder } from './utils';\n\nexport default class WOFFFont extends TTFFont {\n type = 'WOFF';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOFF';\n }\n\n _decodeDirectory() {\n this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n\n if (table.compLength < table.length) {\n this.stream.pos += 2; // skip deflate header\n let outBuffer = new Uint8Array(table.length);\n let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n return new r.DecodeStream(buf);\n } else {\n return this.stream;\n }\n }\n\n return null;\n }\n}\n","import * as r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n tag: new r.String(4),\n offset: new r.Pointer(r.uint32, 'void', {type: 'global'}),\n compLength: r.uint32,\n length: r.uint32,\n origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n tag: new r.String(4), // should be 'wOFF'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import * as r from 'restructure';\nimport brotli from 'brotli/decompress.js';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\nimport { asciiDecoder } from './utils';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n type = 'WOFF2';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOF2';\n }\n\n _decodeDirectory() {\n this.directory = WOFF2Directory.decode(this.stream);\n this._dataPos = this.stream.pos;\n }\n\n _decompress() {\n // decompress data and setup table offsets if we haven't already\n if (!this._decompressed) {\n this.stream.pos = this._dataPos;\n let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n let decompressedSize = 0;\n for (let tag in this.directory.tables) {\n let entry = this.directory.tables[tag];\n entry.offset = decompressedSize;\n decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n }\n\n let decompressed = brotli(buffer, decompressedSize);\n if (!decompressed) {\n throw new Error('Error decoding compressed data in WOFF2');\n }\n\n this.stream = new r.DecodeStream(decompressed);\n this._decompressed = true;\n }\n }\n\n _decodeTable(table) {\n this._decompress();\n return super._decodeTable(table);\n }\n\n // Override this method to get a glyph and return our\n // custom subclass if there is a glyf table.\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n } else {\n return super._getBaseGlyph(glyph, characters);\n }\n }\n }\n\n _transformGlyfTable() {\n this._decompress();\n this.stream.pos = this.directory.tables.glyf.offset;\n let table = GlyfTable.decode(this.stream);\n let glyphs = [];\n\n for (let index = 0; index < table.numGlyphs; index++) {\n let glyph = {};\n let nContours = table.nContours.readInt16BE();\n glyph.numberOfContours = nContours;\n\n if (nContours > 0) { // simple glyph\n let nPoints = [];\n let totalPoints = 0;\n\n for (let i = 0; i < nContours; i++) {\n let r = read255UInt16(table.nPoints);\n totalPoints += r;\n nPoints.push(totalPoints);\n }\n\n glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n for (let i = 0; i < nContours; i++) {\n glyph.points[nPoints[i] - 1].endContour = true;\n }\n\n var instructionSize = read255UInt16(table.glyphs);\n\n } else if (nContours < 0) { // composite glyph\n let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n if (haveInstructions) {\n var instructionSize = read255UInt16(table.glyphs);\n }\n }\n\n glyphs.push(glyph);\n }\n\n this._transformedGlyphs = glyphs;\n }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n constructor(length) {\n this.length = length;\n this._buf = new r.Buffer(length);\n }\n\n decode(stream, parent) {\n return new r.DecodeStream(this._buf.decode(stream, parent));\n }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n version: r.uint32,\n numGlyphs: r.uint16,\n indexFormat: r.uint16,\n nContourStreamSize: r.uint32,\n nPointsStreamSize: r.uint32,\n flagStreamSize: r.uint32,\n glyphStreamSize: r.uint32,\n compositeStreamSize: r.uint32,\n bboxStreamSize: r.uint32,\n instructionStreamSize: r.uint32,\n nContours: new Substream('nContourStreamSize'),\n nPoints: new Substream('nPointsStreamSize'),\n flags: new Substream('flagStreamSize'),\n glyphs: new Substream('glyphStreamSize'),\n composites: new Substream('compositeStreamSize'),\n bboxes: new Substream('bboxStreamSize'),\n instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n let code = stream.readUInt8();\n\n if (code === WORD_CODE) {\n return stream.readUInt16BE();\n }\n\n if (code === ONE_MORE_BYTE_CODE1) {\n return stream.readUInt8() + LOWEST_U_CODE;\n }\n\n if (code === ONE_MORE_BYTE_CODE2) {\n return stream.readUInt8() + LOWEST_U_CODE * 2;\n }\n\n return code;\n}\n\nfunction withSign(flag, baseval) {\n return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n let y;\n let x = y = 0;\n let res = [];\n\n for (let i = 0; i < nPoints; i++) {\n let dx = 0, dy = 0;\n let flag = flags.readUInt8();\n let onCurve = !(flag >> 7);\n flag &= 0x7f;\n\n if (flag < 10) {\n dx = 0;\n dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n } else if (flag < 20) {\n dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n dy = 0;\n\n } else if (flag < 84) {\n var b0 = flag - 20;\n var b1 = glyphs.readUInt8();\n dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n } else if (flag < 120) {\n var b0 = flag - 84;\n dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n } else if (flag < 124) {\n var b1 = glyphs.readUInt8();\n let b2 = glyphs.readUInt8();\n dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n } else {\n dx = withSign(flag, glyphs.readUInt16BE());\n dy = withSign(flag >> 1, glyphs.readUInt16BE());\n }\n\n x += dx;\n y += dy;\n res.push(new Point(onCurve, false, x, y));\n }\n\n return res;\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n type = 'WOFF2';\n\n _decode() {\n // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n return this._font._transformedGlyphs[this.id];\n }\n\n _getCBox() {\n return this.path.bbox;\n }\n}\n","import * as r from 'restructure';\n\nconst Base128 = {\n decode(stream) {\n let result = 0;\n let iterable = [0, 1, 2, 3, 4];\n for (let j = 0; j < iterable.length; j++) {\n let i = iterable[j];\n let code = stream.readUInt8();\n\n // If any of the top seven bits are set then we're about to overflow.\n if (result & 0xe0000000) {\n throw new Error('Overflow');\n }\n\n result = (result << 7) | (code & 0x7f);\n if ((code & 0x80) === 0) {\n return result;\n }\n }\n\n throw new Error('Bad base 128 number');\n }\n};\n\nlet knownTags = [\n 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n flags: r.uint8,\n customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n length: Base128,\n transformVersion: t => (t.flags >>> 6) & 0x03,\n transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n tag: new r.String(4), // should be 'wOF2'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n totalCompressedSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n let tables = {};\n for (let i = 0; i < this.tables.length; i++) {\n let table = this.tables[i];\n tables[table.tag] = table;\n }\n\n return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport { asciiDecoder } from './utils';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n 0x00010000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts')\n },\n 0x00020000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts'),\n dsigTag: r.uint32,\n dsigLength: r.uint32,\n dsigOffset: r.uint32\n }\n});\n\nexport default class TrueTypeCollection {\n type = 'TTC';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'ttcf';\n }\n\n constructor(stream) {\n this.stream = stream;\n if (stream.readString(4) !== 'ttcf') {\n throw new Error('Not a TrueType collection');\n }\n\n this.header = TTCHeader.decode(stream);\n }\n\n getFont(name) {\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n len: r.uint32,\n buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n id: r.uint16,\n nameOffset: r.int16,\n attr: r.uint8,\n dataOffset: r.uint24,\n handle: r.uint32\n});\n\nlet Type = new r.Struct({\n name: new r.String(4),\n maxTypeIndex: r.uint16,\n refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n length: r.uint16,\n types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n reserved: new r.Reserved(r.uint8, 24),\n typeList: new r.Pointer(r.uint16, TypeList),\n nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n dataOffset: r.uint32,\n map: new r.Pointer(r.uint32, DFontMap),\n dataLength: r.uint32,\n mapLength: r.uint32\n});\n\nexport default class DFont {\n type = 'DFont';\n\n static probe(buffer) {\n let stream = new r.DecodeStream(buffer);\n\n try {\n var header = DFontHeader.decode(stream);\n } catch (e) {\n return false;\n }\n\n for (let type of header.map.typeList.types) {\n if (type.name === 'sfnt') {\n return true;\n }\n }\n\n return false;\n }\n\n constructor(stream) {\n this.stream = stream;\n this.header = DFontHeader.decode(this.stream);\n\n for (let type of this.header.map.typeList.types) {\n for (let ref of type.refList) {\n if (ref.nameOffset >= 0) {\n this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n ref.name = DFontName.decode(this.stream);\n } else {\n ref.name = null;\n }\n }\n\n if (type.name === 'sfnt') {\n this.sfnt = type;\n }\n }\n }\n\n getFont(name) {\n if (!this.sfnt) {\n return null;\n }\n\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n"],"names":[],"version":3,"file":"main.cjs.map"} \ No newline at end of file diff --git a/node_modules/fontkit/dist/module.mjs b/node_modules/fontkit/dist/module.mjs new file mode 100644 index 0000000..fde88fc --- /dev/null +++ b/node_modules/fontkit/dist/module.mjs @@ -0,0 +1,13337 @@ +import {DecodeStream as $52ZIf$DecodeStream, Struct as $52ZIf$Struct, String as $52ZIf$String, uint32 as $52ZIf$uint32, Pointer as $52ZIf$Pointer, uint16 as $52ZIf$uint16, Array as $52ZIf$Array, VoidPointer as $52ZIf$VoidPointer, int16 as $52ZIf$int16, uint24 as $52ZIf$uint24, uint8 as $52ZIf$uint8, VersionedStruct as $52ZIf$VersionedStruct, LazyArray as $52ZIf$LazyArray, Reserved as $52ZIf$Reserved, int32 as $52ZIf$int32, Bitfield as $52ZIf$Bitfield, fixed32 as $52ZIf$fixed32, Buffer as $52ZIf$Buffer, Number as $52ZIf$Number, resolveLength as $52ZIf$resolveLength, fixed16 as $52ZIf$fixed16, PropertyDescriptor as $52ZIf$PropertyDescriptor, Fixed as $52ZIf$Fixed, int8 as $52ZIf$int8, Optional as $52ZIf$Optional, EncodeStream as $52ZIf$EncodeStream} from "restructure"; +import $52ZIf$fs from "fs"; +import {_ as $52ZIf$_} from "@swc/helpers/_/_define_property"; +import {_ as $52ZIf$_1} from "@swc/helpers/_/_ts_decorate"; +import $52ZIf$fastdeepequal from "fast-deep-equal"; +import {getCombiningClass as $52ZIf$getCombiningClass, getScript as $52ZIf$getScript, isDigit as $52ZIf$isDigit, getCategory as $52ZIf$getCategory, isMark as $52ZIf$isMark} from "unicode-properties"; +import $52ZIf$unicodetrie from "unicode-trie"; +import $52ZIf$dfa from "dfa"; +import $52ZIf$clone from "clone"; +import $52ZIf$tinyinflate from "tiny-inflate"; +import $52ZIf$brotlidecompressjs from "brotli/decompress.js"; + + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} +var $d636bc798e7178db$exports = {}; + +$parcel$export($d636bc798e7178db$exports, "logErrors", () => $d636bc798e7178db$export$bd5c5d8b8dcafd78); +$parcel$export($d636bc798e7178db$exports, "registerFormat", () => $d636bc798e7178db$export$36b2f24e97d43be); +$parcel$export($d636bc798e7178db$exports, "create", () => $d636bc798e7178db$export$185802fd694ee1f5); +$parcel$export($d636bc798e7178db$exports, "defaultLanguage", () => $d636bc798e7178db$export$42940898df819940); +$parcel$export($d636bc798e7178db$exports, "setDefaultLanguage", () => $d636bc798e7178db$export$5157e7780d44cc36); + +let $d636bc798e7178db$export$bd5c5d8b8dcafd78 = false; +let $d636bc798e7178db$var$formats = []; +function $d636bc798e7178db$export$36b2f24e97d43be(format) { + $d636bc798e7178db$var$formats.push(format); +} +function $d636bc798e7178db$export$185802fd694ee1f5(buffer, postscriptName) { + for(let i = 0; i < $d636bc798e7178db$var$formats.length; i++){ + let format = $d636bc798e7178db$var$formats[i]; + if (format.probe(buffer)) { + let font = new format(new (0, $52ZIf$DecodeStream)(buffer)); + if (postscriptName) return font.getFont(postscriptName); + return font; + } + } + throw new Error('Unknown font format'); +} +let $d636bc798e7178db$export$42940898df819940 = 'en'; +function $d636bc798e7178db$export$5157e7780d44cc36(lang = 'en') { + $d636bc798e7178db$export$42940898df819940 = lang; +} + + +var $b422b1e013cd6010$exports = {}; + +$parcel$export($b422b1e013cd6010$exports, "openSync", () => $b422b1e013cd6010$export$fa5499edb1ab414a); +$parcel$export($b422b1e013cd6010$exports, "open", () => $b422b1e013cd6010$export$3ce6949f20cea765); + + +function $b422b1e013cd6010$export$fa5499edb1ab414a(filename, postscriptName) { + let buffer = (0, $52ZIf$fs).readFileSync(filename); + return (0, $d636bc798e7178db$export$185802fd694ee1f5)(buffer, postscriptName); +} +async function $b422b1e013cd6010$export$3ce6949f20cea765(filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + let buffer = await (0, $52ZIf$fs).promises.readFile(filename); + return (0, $d636bc798e7178db$export$185802fd694ee1f5)(buffer, postscriptName); +} + + + + + +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ function $e71565f2ce09cb6b$export$69a3209f1a06c04d(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { + value: value + }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + return { + get () { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) return cache.get(key); + let result = fn.apply(this, args); + cache.set(key, result); + return result; + } + Object.defineProperty(this, key, { + value: memoized + }); + return memoized; + } + }; + } +} + + + + + +let $26a62205ad06574e$var$SubHeader = new $52ZIf$Struct({ + firstCode: $52ZIf$uint16, + entryCount: $52ZIf$uint16, + idDelta: $52ZIf$int16, + idRangeOffset: $52ZIf$uint16 +}); +let $26a62205ad06574e$var$CmapGroup = new $52ZIf$Struct({ + startCharCode: $52ZIf$uint32, + endCharCode: $52ZIf$uint32, + glyphID: $52ZIf$uint32 +}); +let $26a62205ad06574e$var$UnicodeValueRange = new $52ZIf$Struct({ + startUnicodeValue: $52ZIf$uint24, + additionalCount: $52ZIf$uint8 +}); +let $26a62205ad06574e$var$UVSMapping = new $52ZIf$Struct({ + unicodeValue: $52ZIf$uint24, + glyphID: $52ZIf$uint16 +}); +let $26a62205ad06574e$var$DefaultUVS = new $52ZIf$Array($26a62205ad06574e$var$UnicodeValueRange, $52ZIf$uint32); +let $26a62205ad06574e$var$NonDefaultUVS = new $52ZIf$Array($26a62205ad06574e$var$UVSMapping, $52ZIf$uint32); +let $26a62205ad06574e$var$VarSelectorRecord = new $52ZIf$Struct({ + varSelector: $52ZIf$uint24, + defaultUVS: new $52ZIf$Pointer($52ZIf$uint32, $26a62205ad06574e$var$DefaultUVS, { + type: 'parent' + }), + nonDefaultUVS: new $52ZIf$Pointer($52ZIf$uint32, $26a62205ad06574e$var$NonDefaultUVS, { + type: 'parent' + }) +}); +let $26a62205ad06574e$var$CmapSubtable = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 0: { + length: $52ZIf$uint16, + language: $52ZIf$uint16, + codeMap: new $52ZIf$LazyArray($52ZIf$uint8, 256) + }, + 2: { + length: $52ZIf$uint16, + language: $52ZIf$uint16, + subHeaderKeys: new $52ZIf$Array($52ZIf$uint16, 256), + subHeaderCount: (t)=>Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new $52ZIf$LazyArray($26a62205ad06574e$var$SubHeader, 'subHeaderCount'), + glyphIndexArray: new $52ZIf$LazyArray($52ZIf$uint16, 'subHeaderCount') + }, + 4: { + length: $52ZIf$uint16, + language: $52ZIf$uint16, + segCountX2: $52ZIf$uint16, + segCount: (t)=>t.segCountX2 >> 1, + searchRange: $52ZIf$uint16, + entrySelector: $52ZIf$uint16, + rangeShift: $52ZIf$uint16, + endCode: new $52ZIf$LazyArray($52ZIf$uint16, 'segCount'), + reservedPad: new $52ZIf$Reserved($52ZIf$uint16), + startCode: new $52ZIf$LazyArray($52ZIf$uint16, 'segCount'), + idDelta: new $52ZIf$LazyArray($52ZIf$int16, 'segCount'), + idRangeOffset: new $52ZIf$LazyArray($52ZIf$uint16, 'segCount'), + glyphIndexArray: new $52ZIf$LazyArray($52ZIf$uint16, (t)=>(t.length - t._currentOffset) / 2) + }, + 6: { + length: $52ZIf$uint16, + language: $52ZIf$uint16, + firstCode: $52ZIf$uint16, + entryCount: $52ZIf$uint16, + glyphIndices: new $52ZIf$LazyArray($52ZIf$uint16, 'entryCount') + }, + 8: { + reserved: new $52ZIf$Reserved($52ZIf$uint16), + length: $52ZIf$uint32, + language: $52ZIf$uint16, + is32: new $52ZIf$LazyArray($52ZIf$uint8, 8192), + nGroups: $52ZIf$uint32, + groups: new $52ZIf$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 10: { + reserved: new $52ZIf$Reserved($52ZIf$uint16), + length: $52ZIf$uint32, + language: $52ZIf$uint32, + firstCode: $52ZIf$uint32, + entryCount: $52ZIf$uint32, + glyphIndices: new $52ZIf$LazyArray($52ZIf$uint16, 'numChars') + }, + 12: { + reserved: new $52ZIf$Reserved($52ZIf$uint16), + length: $52ZIf$uint32, + language: $52ZIf$uint32, + nGroups: $52ZIf$uint32, + groups: new $52ZIf$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 13: { + reserved: new $52ZIf$Reserved($52ZIf$uint16), + length: $52ZIf$uint32, + language: $52ZIf$uint32, + nGroups: $52ZIf$uint32, + groups: new $52ZIf$LazyArray($26a62205ad06574e$var$CmapGroup, 'nGroups') + }, + 14: { + length: $52ZIf$uint32, + numRecords: $52ZIf$uint32, + varSelectors: new $52ZIf$LazyArray($26a62205ad06574e$var$VarSelectorRecord, 'numRecords') + } +}); +let $26a62205ad06574e$var$CmapEntry = new $52ZIf$Struct({ + platformID: $52ZIf$uint16, + encodingID: $52ZIf$uint16, + table: new $52ZIf$Pointer($52ZIf$uint32, $26a62205ad06574e$var$CmapSubtable, { + type: 'parent', + lazy: true + }) +}); +var // character to glyph mapping +$26a62205ad06574e$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numSubtables: $52ZIf$uint16, + tables: new $52ZIf$Array($26a62205ad06574e$var$CmapEntry, 'numSubtables') +}); + + + +var // font header +$f2612a29f92ac062$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$int32, + revision: $52ZIf$int32, + checkSumAdjustment: $52ZIf$uint32, + magicNumber: $52ZIf$uint32, + flags: $52ZIf$uint16, + unitsPerEm: $52ZIf$uint16, + created: new $52ZIf$Array($52ZIf$int32, 2), + modified: new $52ZIf$Array($52ZIf$int32, 2), + xMin: $52ZIf$int16, + yMin: $52ZIf$int16, + xMax: $52ZIf$int16, + yMax: $52ZIf$int16, + macStyle: new $52ZIf$Bitfield($52ZIf$uint16, [ + 'bold', + 'italic', + 'underline', + 'outline', + 'shadow', + 'condensed', + 'extended' + ]), + lowestRecPPEM: $52ZIf$uint16, + fontDirectionHint: $52ZIf$int16, + indexToLocFormat: $52ZIf$int16, + glyphDataFormat: $52ZIf$int16 // 0 for current format +}); + + + +var // horizontal header +$2c179dd593583073$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$int32, + ascent: $52ZIf$int16, + descent: $52ZIf$int16, + lineGap: $52ZIf$int16, + advanceWidthMax: $52ZIf$uint16, + minLeftSideBearing: $52ZIf$int16, + minRightSideBearing: $52ZIf$int16, + xMaxExtent: $52ZIf$int16, + caretSlopeRise: $52ZIf$int16, + caretSlopeRun: $52ZIf$int16, + caretOffset: $52ZIf$int16, + reserved: new $52ZIf$Reserved($52ZIf$int16, 4), + metricDataFormat: $52ZIf$int16, + numberOfMetrics: $52ZIf$uint16 // Number of advance widths in 'hmtx' table +}); + + + +let $bdc9060542264b85$var$HmtxEntry = new $52ZIf$Struct({ + advance: $52ZIf$uint16, + bearing: $52ZIf$int16 +}); +var $bdc9060542264b85$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + metrics: new $52ZIf$LazyArray($bdc9060542264b85$var$HmtxEntry, (t)=>t.parent.hhea.numberOfMetrics), + bearings: new $52ZIf$LazyArray($52ZIf$int16, (t)=>t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); + + + +var // maxiumum profile +$dbf51cb3d3fe409d$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$int32, + numGlyphs: $52ZIf$uint16, + maxPoints: $52ZIf$uint16, + maxContours: $52ZIf$uint16, + maxComponentPoints: $52ZIf$uint16, + maxComponentContours: $52ZIf$uint16, + maxZones: $52ZIf$uint16, + maxTwilightPoints: $52ZIf$uint16, + maxStorage: $52ZIf$uint16, + maxFunctionDefs: $52ZIf$uint16, + maxInstructionDefs: $52ZIf$uint16, + maxStackElements: $52ZIf$uint16, + maxSizeOfInstructions: $52ZIf$uint16, + maxComponentElements: $52ZIf$uint16, + maxComponentDepth: $52ZIf$uint16 // Maximum levels of recursion; 1 for simple components +}); + + + +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ function $e449ad78d50845fe$export$badc544e0651b6b1(platformID, encodingID, languageID = 0) { + if (platformID === 1 && $e449ad78d50845fe$export$479e671907f486d1[languageID]) return $e449ad78d50845fe$export$479e671907f486d1[languageID]; + return $e449ad78d50845fe$export$6fef87b7618bdf0b[platformID][encodingID]; +} +const $e449ad78d50845fe$var$SINGLE_BYTE_ENCODINGS = new Set([ + 'x-mac-roman', + 'x-mac-cyrillic', + 'iso-8859-6', + 'iso-8859-8' +]); +const $e449ad78d50845fe$var$MAC_ENCODINGS = { + 'x-mac-croatian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017D\xd8\u221E\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220F\u0161\u222B\xaa\xba\u03A9\u017E\xf8\xbf\xa1\xac\u221A\u0192\u2248\u0106\xab\u010C\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\uF8FF\xa9\u2044\u20AC\u2039\u203A\xc6\xbb\u2013\xb7\u201A\u201E\u2030\xc2\u0107\xc1\u010D\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u03C0\xcb\u02DA\xb8\xca\xe6\u02C7", + 'x-mac-gaelic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1E02\xb1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xe6\xf8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xff\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xb7\u1EF2\u1EF3\u204A\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83", + 'x-mac-greek': "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20AC\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xdf\xae\xa9\u03A3\u03AA\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xac\u039F\u03A1\u2248\u03A4\xab\xbb\u2026 \u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xf7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xad", + 'x-mac-icelandic': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\xd0\xf0\xde\xfe\xfd\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-inuit': "\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xb0\u14A1\u14A5\u14A6\u2022\xb6\u14A7\xae\xa9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026 \u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142", + 'x-mac-ce': "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010C\xe4\u010D\u0106\u0107\xe9\u0179\u017A\u010E\xed\u010F\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011A\u011B\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xac\u221A\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xc1\u0164\u0165\xcd\u017D\u017E\u016A\xd3\xd4\u016B\u016E\xda\u016F\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017B\u0141\u017C\u0122\u02C7", + 'x-mac-romanian': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\u0103\u0219\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\u0131\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7", + 'x-mac-turkish': "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221E\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220F\u03C0\u222B\xaa\xba\u03A9\xe6\xf8\xbf\xa1\xac\u221A\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xf7\u25CA\xff\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xb7\u201A\u201E\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uF8FF\xd2\xda\xdb\xd9\uF8A0\u02C6\u02DC\xaf\u02D8\u02D9\u02DA\xb8\u02DD\u02DB\u02C7" +}; +const $e449ad78d50845fe$var$encodingCache = new Map(); +function $e449ad78d50845fe$export$1dceb3c14ed68bee(encoding) { + let cached = $e449ad78d50845fe$var$encodingCache.get(encoding); + if (cached) return cached; + // These encodings aren't supported by TextDecoder. + let mapping = $e449ad78d50845fe$var$MAC_ENCODINGS[encoding]; + if (mapping) { + let res = new Map(); + for(let i = 0; i < mapping.length; i++)res.set(mapping.charCodeAt(i), 0x80 + i); + $e449ad78d50845fe$var$encodingCache.set(encoding, res); + return res; + } + // Only single byte encodings can be mapped 1:1. + if ($e449ad78d50845fe$var$SINGLE_BYTE_ENCODINGS.has(encoding)) { + // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings. + // Use this to create a mapping of code points. + let decoder = new TextDecoder(encoding); + let mapping = new Uint8Array(0x80); + for(let i = 0; i < 0x80; i++)mapping[i] = 0x80 + i; + let res = new Map(); + let s = decoder.decode(mapping); + for(let i = 0; i < 0x80; i++)res.set(s.charCodeAt(i), 0x80 + i); + $e449ad78d50845fe$var$encodingCache.set(encoding, res); + return res; + } +} +const $e449ad78d50845fe$export$6fef87b7618bdf0b = [ + // unicode + [ + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be', + 'utf-16be' + ], + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + [ + 'x-mac-roman', + 'shift-jis', + 'big5', + 'euc-kr', + 'iso-8859-6', + 'iso-8859-8', + 'x-mac-greek', + 'x-mac-cyrillic', + 'x-mac-symbol', + 'x-mac-devanagari', + 'x-mac-gurmukhi', + 'x-mac-gujarati', + 'Oriya', + 'Bengali', + 'Tamil', + 'Telugu', + 'Kannada', + 'Malayalam', + 'Sinhalese', + 'Burmese', + 'Khmer', + 'iso-8859-11', + 'Laotian', + 'Georgian', + 'Armenian', + 'gbk', + 'Tibetan', + 'Mongolian', + 'Geez', + 'x-mac-ce', + 'Vietnamese', + 'Sindhi' + ], + // ISO (deprecated) + [ + 'ascii', + null, + 'iso-8859-1' + ], + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + [ + 'symbol', + 'utf-16be', + 'shift-jis', + 'gb18030', + 'big5', + 'euc-kr', + 'johab', + null, + null, + null, + 'utf-16be' + ] +]; +const $e449ad78d50845fe$export$479e671907f486d1 = { + 15: 'x-mac-icelandic', + 17: 'x-mac-turkish', + 18: 'x-mac-croatian', + 24: 'x-mac-ce', + 25: 'x-mac-ce', + 26: 'x-mac-ce', + 27: 'x-mac-ce', + 28: 'x-mac-ce', + 30: 'x-mac-icelandic', + 37: 'x-mac-romanian', + 38: 'x-mac-ce', + 39: 'x-mac-ce', + 40: 'x-mac-ce', + 143: 'x-mac-inuit', + 146: 'x-mac-gaelic' +}; +const $e449ad78d50845fe$export$2092376fd002e13 = [ + // unicode + [], + { + 0: 'en', + 30: 'fo', + 60: 'ks', + 90: 'rw', + 1: 'fr', + 31: 'fa', + 61: 'ku', + 91: 'rn', + 2: 'de', + 32: 'ru', + 62: 'sd', + 92: 'ny', + 3: 'it', + 33: 'zh', + 63: 'bo', + 93: 'mg', + 4: 'nl', + 34: 'nl-BE', + 64: 'ne', + 94: 'eo', + 5: 'sv', + 35: 'ga', + 65: 'sa', + 128: 'cy', + 6: 'es', + 36: 'sq', + 66: 'mr', + 129: 'eu', + 7: 'da', + 37: 'ro', + 67: 'bn', + 130: 'ca', + 8: 'pt', + 38: 'cz', + 68: 'as', + 131: 'la', + 9: 'no', + 39: 'sk', + 69: 'gu', + 132: 'qu', + 10: 'he', + 40: 'si', + 70: 'pa', + 133: 'gn', + 11: 'ja', + 41: 'yi', + 71: 'or', + 134: 'ay', + 12: 'ar', + 42: 'sr', + 72: 'ml', + 135: 'tt', + 13: 'fi', + 43: 'mk', + 73: 'kn', + 136: 'ug', + 14: 'el', + 44: 'bg', + 74: 'ta', + 137: 'dz', + 15: 'is', + 45: 'uk', + 75: 'te', + 138: 'jv', + 16: 'mt', + 46: 'be', + 76: 'si', + 139: 'su', + 17: 'tr', + 47: 'uz', + 77: 'my', + 140: 'gl', + 18: 'hr', + 48: 'kk', + 78: 'km', + 141: 'af', + 19: 'zh-Hant', + 49: 'az-Cyrl', + 79: 'lo', + 142: 'br', + 20: 'ur', + 50: 'az-Arab', + 80: 'vi', + 143: 'iu', + 21: 'hi', + 51: 'hy', + 81: 'id', + 144: 'gd', + 22: 'th', + 52: 'ka', + 82: 'tl', + 145: 'gv', + 23: 'ko', + 53: 'mo', + 83: 'ms', + 146: 'ga', + 24: 'lt', + 54: 'ky', + 84: 'ms-Arab', + 147: 'to', + 25: 'pl', + 55: 'tg', + 85: 'am', + 148: 'el-polyton', + 26: 'hu', + 56: 'tk', + 86: 'ti', + 149: 'kl', + 27: 'es', + 57: 'mn-CN', + 87: 'om', + 150: 'az', + 28: 'lv', + 58: 'mn', + 88: 'so', + 151: 'nn', + 29: 'se', + 59: 'ps', + 89: 'sw' + }, + // ISO (deprecated) + [], + { + 0x0436: 'af', + 0x4009: 'en-IN', + 0x0487: 'rw', + 0x0432: 'tn', + 0x041C: 'sq', + 0x1809: 'en-IE', + 0x0441: 'sw', + 0x045B: 'si', + 0x0484: 'gsw', + 0x2009: 'en-JM', + 0x0457: 'kok', + 0x041B: 'sk', + 0x045E: 'am', + 0x4409: 'en-MY', + 0x0412: 'ko', + 0x0424: 'sl', + 0x1401: 'ar-DZ', + 0x1409: 'en-NZ', + 0x0440: 'ky', + 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', + 0x3409: 'en-PH', + 0x0454: 'lo', + 0x400A: 'es-BO', + 0x0C01: 'ar', + 0x4809: 'en-SG', + 0x0426: 'lv', + 0x340A: 'es-CL', + 0x0801: 'ar-IQ', + 0x1C09: 'en-ZA', + 0x0427: 'lt', + 0x240A: 'es-CO', + 0x2C01: 'ar-JO', + 0x2C09: 'en-TT', + 0x082E: 'dsb', + 0x140A: 'es-CR', + 0x3401: 'ar-KW', + 0x0809: 'en-GB', + 0x046E: 'lb', + 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', + 0x0409: 'en', + 0x042F: 'mk', + 0x300A: 'es-EC', + 0x1001: 'ar-LY', + 0x3009: 'en-ZW', + 0x083E: 'ms-BN', + 0x440A: 'es-SV', + 0x1801: 'ary', + 0x0425: 'et', + 0x043E: 'ms', + 0x100A: 'es-GT', + 0x2001: 'ar-OM', + 0x0438: 'fo', + 0x044C: 'ml', + 0x480A: 'es-HN', + 0x4001: 'ar-QA', + 0x0464: 'fil', + 0x043A: 'mt', + 0x080A: 'es-MX', + 0x0401: 'ar-SA', + 0x040B: 'fi', + 0x0481: 'mi', + 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', + 0x080C: 'fr-BE', + 0x047A: 'arn', + 0x180A: 'es-PA', + 0x1C01: 'aeb', + 0x0C0C: 'fr-CA', + 0x044E: 'mr', + 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', + 0x040C: 'fr', + 0x047C: 'moh', + 0x280A: 'es-PE', + 0x2401: 'ar-YE', + 0x140C: 'fr-LU', + 0x0450: 'mn', + 0x500A: 'es-PR', + 0x042B: 'hy', + 0x180C: 'fr-MC', + 0x0850: 'mn-CN', + 0x0C0A: 'es', + 0x044D: 'as', + 0x100C: 'fr-CH', + 0x0461: 'ne', + 0x040A: 'es', + 0x082C: 'az-Cyrl', + 0x0462: 'fy', + 0x0414: 'nb', + 0x540A: 'es-US', + 0x042C: 'az', + 0x0456: 'gl', + 0x0814: 'nn', + 0x380A: 'es-UY', + 0x046D: 'ba', + 0x0437: 'ka', + 0x0482: 'oc', + 0x200A: 'es-VE', + 0x042D: 'eu', + 0x0C07: 'de-AT', + 0x0448: 'or', + 0x081D: 'sv-FI', + 0x0423: 'be', + 0x0407: 'de', + 0x0463: 'ps', + 0x041D: 'sv', + 0x0845: 'bn', + 0x1407: 'de-LI', + 0x0415: 'pl', + 0x045A: 'syr', + 0x0445: 'bn-IN', + 0x1007: 'de-LU', + 0x0416: 'pt', + 0x0428: 'tg', + 0x201A: 'bs-Cyrl', + 0x0807: 'de-CH', + 0x0816: 'pt-PT', + 0x085F: 'tzm', + 0x141A: 'bs', + 0x0408: 'el', + 0x0446: 'pa', + 0x0449: 'ta', + 0x047E: 'br', + 0x046F: 'kl', + 0x046B: 'qu-BO', + 0x0444: 'tt', + 0x0402: 'bg', + 0x0447: 'gu', + 0x086B: 'qu-EC', + 0x044A: 'te', + 0x0403: 'ca', + 0x0468: 'ha', + 0x0C6B: 'qu', + 0x041E: 'th', + 0x0C04: 'zh-HK', + 0x040D: 'he', + 0x0418: 'ro', + 0x0451: 'bo', + 0x1404: 'zh-MO', + 0x0439: 'hi', + 0x0417: 'rm', + 0x041F: 'tr', + 0x0804: 'zh', + 0x040E: 'hu', + 0x0419: 'ru', + 0x0442: 'tk', + 0x1004: 'zh-SG', + 0x040F: 'is', + 0x243B: 'smn', + 0x0480: 'ug', + 0x0404: 'zh-TW', + 0x0470: 'ig', + 0x103B: 'smj-NO', + 0x0422: 'uk', + 0x0483: 'co', + 0x0421: 'id', + 0x143B: 'smj', + 0x042E: 'hsb', + 0x041A: 'hr', + 0x045D: 'iu', + 0x0C3B: 'se-FI', + 0x0420: 'ur', + 0x101A: 'hr-BA', + 0x085D: 'iu-Latn', + 0x043B: 'se', + 0x0843: 'uz-Cyrl', + 0x0405: 'cs', + 0x083C: 'ga', + 0x083B: 'se-SE', + 0x0443: 'uz', + 0x0406: 'da', + 0x0434: 'xh', + 0x203B: 'sms', + 0x042A: 'vi', + 0x048C: 'prs', + 0x0435: 'zu', + 0x183B: 'sma-NO', + 0x0452: 'cy', + 0x0465: 'dv', + 0x0410: 'it', + 0x1C3B: 'sms', + 0x0488: 'wo', + 0x0813: 'nl-BE', + 0x0810: 'it-CH', + 0x044F: 'sa', + 0x0485: 'sah', + 0x0413: 'nl', + 0x0411: 'ja', + 0x1C1A: 'sr-Cyrl-BA', + 0x0478: 'ii', + 0x0C09: 'en-AU', + 0x044B: 'kn', + 0x0C1A: 'sr', + 0x046A: 'yo', + 0x2809: 'en-BZ', + 0x043F: 'kk', + 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', + 0x0453: 'km', + 0x081A: 'sr-Latn', + 0x2409: 'en-029', + 0x0486: 'quc', + 0x046C: 'nso' + } +]; + + +let $2bcf221753ec8e32$var$NameRecord = new $52ZIf$Struct({ + platformID: $52ZIf$uint16, + encodingID: $52ZIf$uint16, + languageID: $52ZIf$uint16, + nameID: $52ZIf$uint16, + length: $52ZIf$uint16, + string: new $52ZIf$Pointer($52ZIf$uint16, new $52ZIf$String('length', (t)=>(0, $e449ad78d50845fe$export$badc544e0651b6b1)(t.platformID, t.encodingID, t.languageID)), { + type: 'parent', + relativeTo: (ctx)=>ctx.parent.stringOffset, + allowNull: false + }) +}); +let $2bcf221753ec8e32$var$LangTagRecord = new $52ZIf$Struct({ + length: $52ZIf$uint16, + tag: new $52ZIf$Pointer($52ZIf$uint16, new $52ZIf$String('length', 'utf16be'), { + type: 'parent', + relativeTo: (ctx)=>ctx.stringOffset + }) +}); +var $2bcf221753ec8e32$var$NameTable = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 0: { + count: $52ZIf$uint16, + stringOffset: $52ZIf$uint16, + records: new $52ZIf$Array($2bcf221753ec8e32$var$NameRecord, 'count') + }, + 1: { + count: $52ZIf$uint16, + stringOffset: $52ZIf$uint16, + records: new $52ZIf$Array($2bcf221753ec8e32$var$NameRecord, 'count'), + langTagCount: $52ZIf$uint16, + langTags: new $52ZIf$Array($2bcf221753ec8e32$var$LangTagRecord, 'langTagCount') + } +}); +var $2bcf221753ec8e32$export$2e2bcd8739ae039 = $2bcf221753ec8e32$var$NameTable; +const $2bcf221753ec8e32$var$NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; +$2bcf221753ec8e32$var$NameTable.process = function(stream) { + var records = {}; + for (let record of this.records){ + // find out what language this is for + let language = (0, $e449ad78d50845fe$export$2092376fd002e13)[record.platformID][record.languageID]; + if (language == null && this.langTags != null && record.languageID >= 0x8000) language = this.langTags[record.languageID - 0x8000].tag; + if (language == null) language = record.platformID + '-' + record.languageID; + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : $2bcf221753ec8e32$var$NAMES[record.nameID] || record.nameID; + if (records[key] == null) records[key] = {}; + let obj = records[key]; + if (record.nameID >= 256) obj = obj[record.nameID] || (obj[record.nameID] = {}); + if (typeof record.string === 'string' || typeof obj[language] !== 'string') obj[language] = record.string; + } + this.records = records; +}; +$2bcf221753ec8e32$var$NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + let records = []; + for(let key in this.records){ + let val = this.records[key]; + if (key === 'fontFeatures') continue; + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: $2bcf221753ec8e32$var$NAMES.indexOf(key), + length: val.en.length * 2, + string: val.en + }); + if (key === 'postscriptName') records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: $2bcf221753ec8e32$var$NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + this.records = records; + this.count = records.length; + this.stringOffset = $2bcf221753ec8e32$var$NameTable.size(this, null, false); +}; + + + +var $84b272aa31b70606$var$OS2 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + header: { + xAvgCharWidth: $52ZIf$int16, + usWeightClass: $52ZIf$uint16, + usWidthClass: $52ZIf$uint16, + fsType: new $52ZIf$Bitfield($52ZIf$uint16, [ + null, + 'noEmbedding', + 'viewOnly', + 'editable', + null, + null, + null, + null, + 'noSubsetting', + 'bitmapOnly' + ]), + ySubscriptXSize: $52ZIf$int16, + ySubscriptYSize: $52ZIf$int16, + ySubscriptXOffset: $52ZIf$int16, + ySubscriptYOffset: $52ZIf$int16, + ySuperscriptXSize: $52ZIf$int16, + ySuperscriptYSize: $52ZIf$int16, + ySuperscriptXOffset: $52ZIf$int16, + ySuperscriptYOffset: $52ZIf$int16, + yStrikeoutSize: $52ZIf$int16, + yStrikeoutPosition: $52ZIf$int16, + sFamilyClass: $52ZIf$int16, + panose: new $52ZIf$Array($52ZIf$uint8, 10), + ulCharRange: new $52ZIf$Array($52ZIf$uint32, 4), + vendorID: new $52ZIf$String(4), + fsSelection: new $52ZIf$Bitfield($52ZIf$uint16, [ + 'italic', + 'underscore', + 'negative', + 'outlined', + 'strikeout', + 'bold', + 'regular', + 'useTypoMetrics', + 'wws', + 'oblique' + ]), + usFirstCharIndex: $52ZIf$uint16, + usLastCharIndex: $52ZIf$uint16 // The maximum Unicode index in this font + }, + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + 1: { + typoAscender: $52ZIf$int16, + typoDescender: $52ZIf$int16, + typoLineGap: $52ZIf$int16, + winAscent: $52ZIf$uint16, + winDescent: $52ZIf$uint16, + codePageRange: new $52ZIf$Array($52ZIf$uint32, 2) + }, + 2: { + // these should be common with version 1 somehow + typoAscender: $52ZIf$int16, + typoDescender: $52ZIf$int16, + typoLineGap: $52ZIf$int16, + winAscent: $52ZIf$uint16, + winDescent: $52ZIf$uint16, + codePageRange: new $52ZIf$Array($52ZIf$uint32, 2), + xHeight: $52ZIf$int16, + capHeight: $52ZIf$int16, + defaultChar: $52ZIf$uint16, + breakChar: $52ZIf$uint16, + maxContent: $52ZIf$uint16 + }, + 5: { + typoAscender: $52ZIf$int16, + typoDescender: $52ZIf$int16, + typoLineGap: $52ZIf$int16, + winAscent: $52ZIf$uint16, + winDescent: $52ZIf$uint16, + codePageRange: new $52ZIf$Array($52ZIf$uint32, 2), + xHeight: $52ZIf$int16, + capHeight: $52ZIf$int16, + defaultChar: $52ZIf$uint16, + breakChar: $52ZIf$uint16, + maxContent: $52ZIf$uint16, + usLowerOpticalPointSize: $52ZIf$uint16, + usUpperOpticalPointSize: $52ZIf$uint16 + } +}); +let $84b272aa31b70606$var$versions = $84b272aa31b70606$var$OS2.versions; +$84b272aa31b70606$var$versions[3] = $84b272aa31b70606$var$versions[4] = $84b272aa31b70606$var$versions[2]; +var $84b272aa31b70606$export$2e2bcd8739ae039 = $84b272aa31b70606$var$OS2; + + + +var // PostScript information +$32d9e2eb9565d93c$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$fixed32, { + header: { + italicAngle: $52ZIf$fixed32, + underlinePosition: $52ZIf$int16, + underlineThickness: $52ZIf$int16, + isFixedPitch: $52ZIf$uint32, + minMemType42: $52ZIf$uint32, + maxMemType42: $52ZIf$uint32, + minMemType1: $52ZIf$uint32, + maxMemType1: $52ZIf$uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + 1: {}, + 2: { + numberOfGlyphs: $52ZIf$uint16, + glyphNameIndex: new $52ZIf$Array($52ZIf$uint16, 'numberOfGlyphs'), + names: new $52ZIf$Array(new $52ZIf$String($52ZIf$uint8)) + }, + 2.5: { + numberOfGlyphs: $52ZIf$uint16, + offsets: new $52ZIf$Array($52ZIf$uint8, 'numberOfGlyphs') + }, + 3: {}, + 4: { + map: new $52ZIf$Array($52ZIf$uint32, (t)=>t.parent.maxp.numGlyphs) + } +}); + + + +var // An array of predefined values accessible by instructions +$5202bd9d9ad8eaac$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + controlValues: new $52ZIf$Array($52ZIf$int16) +}); + + + +var // A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +$5c0f37ca5ffb1850$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + instructions: new $52ZIf$Array($52ZIf$uint8) +}); + + + +let $2b2b260902b1c57e$var$loca = new $52ZIf$VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new $52ZIf$Array($52ZIf$uint16) + }, + 1: { + offsets: new $52ZIf$Array($52ZIf$uint32) + } +}); +$2b2b260902b1c57e$var$loca.process = function() { + if (this.version === 0 && !this._processed) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] <<= 1; + this._processed = true; + } +}; +$2b2b260902b1c57e$var$loca.preEncode = function() { + if (this.version === 0 && this._processed !== false) { + for(let i = 0; i < this.offsets.length; i++)this.offsets[i] >>>= 1; + this._processed = false; + } +}; +var $2b2b260902b1c57e$export$2e2bcd8739ae039 = $2b2b260902b1c57e$var$loca; + + + +var // Set of instructions executed whenever the point size or font transformation change +$7afb878c7bea4f66$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + controlValueProgram: new $52ZIf$Array($52ZIf$uint8) +}); + + + +var // only used for encoding +$6c92b6371bce8bd9$export$2e2bcd8739ae039 = new $52ZIf$Array(new $52ZIf$Buffer); + + + + +class $43e9821ef3717eec$export$2e2bcd8739ae039 { + getCFFVersion(ctx) { + while(ctx && !ctx.hdrSize)ctx = ctx.parent; + return ctx ? ctx.version : -1; + } + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE(); + if (count === 0) return []; + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) offsetType = $52ZIf$uint8; + else if (offSize === 2) offsetType = $52ZIf$uint16; + else if (offSize === 3) offsetType = $52ZIf$uint24; + else if (offSize === 4) offsetType = $52ZIf$uint32; + else throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + let ret = []; + let startPos = stream.pos + (count + 1) * offSize - 1; + let start = offsetType.decode(stream); + for(let i = 0; i < count; i++){ + let end = offsetType.decode(stream); + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else ret.push({ + offset: startPos + start, + length: end - start + }); + start = end; + } + stream.pos = startPos + start; + return ret; + } + size(arr, parent) { + let size = 2; + if (arr.length === 0) return size; + let type = this.type || new $52ZIf$Buffer; + // find maximum offset to detminine offset type + let offset = 1; + for(let i = 0; i < arr.length; i++){ + let item = arr[i]; + offset += type.size(item, parent); + } + let offsetType; + if (offset <= 0xff) offsetType = $52ZIf$uint8; + else if (offset <= 0xffff) offsetType = $52ZIf$uint16; + else if (offset <= 0xffffff) offsetType = $52ZIf$uint24; + else if (offset <= 0xffffffff) offsetType = $52ZIf$uint32; + else throw new Error("Bad offset in CFFIndex"); + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + return size; + } + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) return; + let type = this.type || new $52ZIf$Buffer; + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr){ + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + let offsetType; + if (offset <= 0xff) offsetType = $52ZIf$uint8; + else if (offset <= 0xffff) offsetType = $52ZIf$uint16; + else if (offset <= 0xffffff) offsetType = $52ZIf$uint24; + else if (offset <= 0xffffffff) offsetType = $52ZIf$uint32; + else throw new Error("Bad offset in CFFIndex"); + // write offset size + stream.writeUInt8(offsetType.size()); + // write elements + offset = 1; + offsetType.encode(stream, offset); + for (let size of sizes){ + offset += size; + offsetType.encode(stream, offset); + } + for (let item of arr)type.encode(stream, item, parent); + return; + } + constructor(type){ + this.type = type; + } +} + + + + + +const $c2d28e92708f99da$var$FLOAT_EOF = 0xf; +const $c2d28e92708f99da$var$FLOAT_LOOKUP = [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '.', + 'E', + 'E-', + null, + '-' +]; +const $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; +class $c2d28e92708f99da$export$2e2bcd8739ae039 { + static decode(stream, value) { + if (32 <= value && value <= 246) return value - 139; + if (247 <= value && value <= 250) return (value - 247) * 256 + stream.readUInt8() + 108; + if (251 <= value && value <= 254) return -(value - 251) * 256 - stream.readUInt8() - 108; + if (value === 28) return stream.readInt16BE(); + if (value === 29) return stream.readInt32BE(); + if (value === 30) { + let str = ''; + while(true){ + let b = stream.readUInt8(); + let n1 = b >> 4; + if (n1 === $c2d28e92708f99da$var$FLOAT_EOF) break; + str += $c2d28e92708f99da$var$FLOAT_LOOKUP[n1]; + let n2 = b & 15; + if (n2 === $c2d28e92708f99da$var$FLOAT_EOF) break; + str += $c2d28e92708f99da$var$FLOAT_LOOKUP[n2]; + } + return parseFloat(str); + } + return null; + } + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) value = 32768; + if ((value | 0) !== value) { + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + } else if (-107 <= value && value <= 107) return 1; + else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) return 2; + else if (-32768 <= value && value <= 32767) return 3; + else return 5; + } + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } else if ((val | 0) !== val) { + stream.writeUInt8(30); + let str = '' + val; + for(let i = 0; i < str.length; i += 2){ + let c1 = str[i]; + let n1 = $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP[c1] || +c1; + if (i === str.length - 1) var n2 = $c2d28e92708f99da$var$FLOAT_EOF; + else { + let c2 = str[i + 1]; + var n2 = $c2d28e92708f99da$var$FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + stream.writeUInt8(n1 << 4 | n2 & 15); + } + if (n2 !== $c2d28e92708f99da$var$FLOAT_EOF) return stream.writeUInt8($c2d28e92708f99da$var$FLOAT_EOF << 4); + } else if (-107 <= val && val <= 107) return stream.writeUInt8(val + 139); + else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} + + +class $61aa549f16d58b9b$export$2e2bcd8739ae039 { + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.decodeOperands(type[i], stream, ret, [ + op + ])); + else if (type.decode != null) return type.decode(stream, ret, operands); + else switch(type){ + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) return operands.map((op, i)=>this.encodeOperands(type[i], stream, ctx, op)[0]); + else if (type.encode != null) return type.encode(stream, operands, ctx); + else if (typeof operands === 'number') return [ + operands + ]; + else if (typeof operands === 'boolean') return [ + +operands + ]; + else if (Array.isArray(operands)) return operands; + else return [ + operands + ]; + } + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + // define hidden properties + Object.defineProperties(ret, { + parent: { + value: parent + }, + _startOffset: { + value: stream.pos + } + }); + // fill in defaults + for(let key in this.fields){ + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + while(stream.pos < end){ + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) b = b << 8 | stream.readUInt8(); + let field = this.fields[b]; + if (!field) throw new Error(`Unknown operator ${b}`); + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof (0, $52ZIf$PropertyDescriptor)) Object.defineProperty(ret, field[1], val); + else ret[field[1]] = val; + } + operands = []; + } else operands.push((0, $c2d28e92708f99da$export$2e2bcd8739ae039).decode(stream, b)); + } + return ret; + } + size(dict, parent, includePointers = true) { + let ctx = { + parent: parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + let len = 0; + for(let k in this.fields){ + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || (0, $52ZIf$fastdeepequal)(val, field[3])) continue; + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands)len += (0, $c2d28e92708f99da$export$2e2bcd8739ae039).size(op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + len += key.length; + } + if (includePointers) len += ctx.pointerSize; + return len; + } + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: dict, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + for (let field of this.ops){ + let val = dict[field[1]]; + if (val == null || (0, $52ZIf$fastdeepequal)(val, field[3])) continue; + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands)(0, $c2d28e92708f99da$export$2e2bcd8739ae039).encode(stream, op); + let key = Array.isArray(field[0]) ? field[0] : [ + field[0] + ]; + for (let op of key)stream.writeUInt8(op); + } + let i = 0; + while(i < ctx.pointers.length){ + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + return; + } + constructor(ops = []){ + this.ops = ops; + this.fields = {}; + for (let field of ops){ + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } +} + + + + +class $0e34a43d05bde82c$export$2e2bcd8739ae039 extends $52ZIf$Pointer { + decode(stream, parent, operands) { + this.offsetType = { + decode: ()=>operands[0] + }; + return super.decode(stream, parent, operands); + } + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: ()=>0 + }; + this.size(value, ctx); + return [ + new $0e34a43d05bde82c$var$Ptr(0) + ]; + } + let ptr = null; + this.offsetType = { + encode: (stream, val)=>ptr = val + }; + super.encode(stream, value, ctx); + return [ + new $0e34a43d05bde82c$var$Ptr(ptr) + ]; + } + constructor(type, options = {}){ + if (options.type == null) options.type = 'global'; + super(null, type, options); + } +} +class $0e34a43d05bde82c$var$Ptr { + valueOf() { + return this.val; + } + constructor(val){ + this.val = val; + this.forceLarge = true; + } +} + + + + + +class $6d59db2e29cc77b3$var$CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while(operands.length > numBlends)operands.pop(); + } +} +var $6d59db2e29cc77b3$export$2e2bcd8739ae039 = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type default + [ + 6, + 'BlueValues', + 'delta', + null + ], + [ + 7, + 'OtherBlues', + 'delta', + null + ], + [ + 8, + 'FamilyBlues', + 'delta', + null + ], + [ + 9, + 'FamilyOtherBlues', + 'delta', + null + ], + [ + [ + 12, + 9 + ], + 'BlueScale', + 'number', + 0.039625 + ], + [ + [ + 12, + 10 + ], + 'BlueShift', + 'number', + 7 + ], + [ + [ + 12, + 11 + ], + 'BlueFuzz', + 'number', + 1 + ], + [ + 10, + 'StdHW', + 'number', + null + ], + [ + 11, + 'StdVW', + 'number', + null + ], + [ + [ + 12, + 12 + ], + 'StemSnapH', + 'delta', + null + ], + [ + [ + 12, + 13 + ], + 'StemSnapV', + 'delta', + null + ], + [ + [ + 12, + 14 + ], + 'ForceBold', + 'boolean', + false + ], + [ + [ + 12, + 17 + ], + 'LanguageGroup', + 'number', + 0 + ], + [ + [ + 12, + 18 + ], + 'ExpansionFactor', + 'number', + 0.06 + ], + [ + [ + 12, + 19 + ], + 'initialRandomSeed', + 'number', + 0 + ], + [ + 20, + 'defaultWidthX', + 'number', + 0 + ], + [ + 21, + 'nominalWidthX', + 'number', + 0 + ], + [ + 22, + 'vsindex', + 'number', + 0 + ], + [ + 23, + 'blend', + $6d59db2e29cc77b3$var$CFFBlendOp, + null + ], + [ + 19, + 'Subrs', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039), { + type: 'local' + }), + null + ] +]); + + +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +var $229224aec43783c5$export$2e2bcd8739ae039 = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold" +]; + + +let $bc0433d9b7e41f5f$export$dee0027060fa13bd = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + '', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + '', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + '', + 'questiondown', + '', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + '', + 'ring', + 'cedilla', + '', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'AE', + '', + 'ordfeminine', + '', + '', + '', + '', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + '', + '', + '', + '', + '', + 'ae', + '', + '', + '', + 'dotlessi', + '', + '', + 'lslash', + 'oslash', + 'oe', + 'germandbls' +]; +let $bc0433d9b7e41f5f$export$4f58f497e14a53c3 = [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + '', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + '', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + '', + '', + 'isuperior', + '', + '', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + '', + '', + 'rsuperior', + 'ssuperior', + 'tsuperior', + '', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + '', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + '', + '', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + '', + 'Dotaccentsmall', + '', + '', + 'Macronsmall', + '', + '', + 'figuredash', + 'hypheninferior', + '', + '', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + '', + '', + '', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + '', + '', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; + + +let $ef658f5c9a1488b2$export$c33b50336c234f16 = [ + '.notdef', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quoteright', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'quoteleft', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'exclamdown', + 'cent', + 'sterling', + 'fraction', + 'yen', + 'florin', + 'section', + 'currency', + 'quotesingle', + 'quotedblleft', + 'guillemotleft', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'endash', + 'dagger', + 'daggerdbl', + 'periodcentered', + 'paragraph', + 'bullet', + 'quotesinglbase', + 'quotedblbase', + 'quotedblright', + 'guillemotright', + 'ellipsis', + 'perthousand', + 'questiondown', + 'grave', + 'acute', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'dieresis', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'emdash', + 'AE', + 'ordfeminine', + 'Lslash', + 'Oslash', + 'OE', + 'ordmasculine', + 'ae', + 'dotlessi', + 'lslash', + 'oslash', + 'oe', + 'germandbls', + 'onesuperior', + 'logicalnot', + 'mu', + 'trademark', + 'Eth', + 'onehalf', + 'plusminus', + 'Thorn', + 'onequarter', + 'divide', + 'brokenbar', + 'degree', + 'thorn', + 'threequarters', + 'twosuperior', + 'registered', + 'minus', + 'eth', + 'multiply', + 'threesuperior', + 'copyright', + 'Aacute', + 'Acircumflex', + 'Adieresis', + 'Agrave', + 'Aring', + 'Atilde', + 'Ccedilla', + 'Eacute', + 'Ecircumflex', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Ntilde', + 'Oacute', + 'Ocircumflex', + 'Odieresis', + 'Ograve', + 'Otilde', + 'Scaron', + 'Uacute', + 'Ucircumflex', + 'Udieresis', + 'Ugrave', + 'Yacute', + 'Ydieresis', + 'Zcaron', + 'aacute', + 'acircumflex', + 'adieresis', + 'agrave', + 'aring', + 'atilde', + 'ccedilla', + 'eacute', + 'ecircumflex', + 'edieresis', + 'egrave', + 'iacute', + 'icircumflex', + 'idieresis', + 'igrave', + 'ntilde', + 'oacute', + 'ocircumflex', + 'odieresis', + 'ograve', + 'otilde', + 'scaron', + 'uacute', + 'ucircumflex', + 'udieresis', + 'ugrave', + 'yacute', + 'ydieresis', + 'zcaron' +]; +let $ef658f5c9a1488b2$export$3ed0f9e1fee8d489 = [ + '.notdef', + 'space', + 'exclamsmall', + 'Hungarumlautsmall', + 'dollaroldstyle', + 'dollarsuperior', + 'ampersandsmall', + 'Acutesmall', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'questionsmall', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'Circumflexsmall', + 'hyphensuperior', + 'Gravesmall', + 'Asmall', + 'Bsmall', + 'Csmall', + 'Dsmall', + 'Esmall', + 'Fsmall', + 'Gsmall', + 'Hsmall', + 'Ismall', + 'Jsmall', + 'Ksmall', + 'Lsmall', + 'Msmall', + 'Nsmall', + 'Osmall', + 'Psmall', + 'Qsmall', + 'Rsmall', + 'Ssmall', + 'Tsmall', + 'Usmall', + 'Vsmall', + 'Wsmall', + 'Xsmall', + 'Ysmall', + 'Zsmall', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'Tildesmall', + 'exclamdownsmall', + 'centoldstyle', + 'Lslashsmall', + 'Scaronsmall', + 'Zcaronsmall', + 'Dieresissmall', + 'Brevesmall', + 'Caronsmall', + 'Dotaccentsmall', + 'Macronsmall', + 'figuredash', + 'hypheninferior', + 'Ogoneksmall', + 'Ringsmall', + 'Cedillasmall', + 'onequarter', + 'onehalf', + 'threequarters', + 'questiondownsmall', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior', + 'Agravesmall', + 'Aacutesmall', + 'Acircumflexsmall', + 'Atildesmall', + 'Adieresissmall', + 'Aringsmall', + 'AEsmall', + 'Ccedillasmall', + 'Egravesmall', + 'Eacutesmall', + 'Ecircumflexsmall', + 'Edieresissmall', + 'Igravesmall', + 'Iacutesmall', + 'Icircumflexsmall', + 'Idieresissmall', + 'Ethsmall', + 'Ntildesmall', + 'Ogravesmall', + 'Oacutesmall', + 'Ocircumflexsmall', + 'Otildesmall', + 'Odieresissmall', + 'OEsmall', + 'Oslashsmall', + 'Ugravesmall', + 'Uacutesmall', + 'Ucircumflexsmall', + 'Udieresissmall', + 'Yacutesmall', + 'Thornsmall', + 'Ydieresissmall' +]; +let $ef658f5c9a1488b2$export$dc28be11139d4120 = [ + '.notdef', + 'space', + 'dollaroldstyle', + 'dollarsuperior', + 'parenleftsuperior', + 'parenrightsuperior', + 'twodotenleader', + 'onedotenleader', + 'comma', + 'hyphen', + 'period', + 'fraction', + 'zerooldstyle', + 'oneoldstyle', + 'twooldstyle', + 'threeoldstyle', + 'fouroldstyle', + 'fiveoldstyle', + 'sixoldstyle', + 'sevenoldstyle', + 'eightoldstyle', + 'nineoldstyle', + 'colon', + 'semicolon', + 'commasuperior', + 'threequartersemdash', + 'periodsuperior', + 'asuperior', + 'bsuperior', + 'centsuperior', + 'dsuperior', + 'esuperior', + 'isuperior', + 'lsuperior', + 'msuperior', + 'nsuperior', + 'osuperior', + 'rsuperior', + 'ssuperior', + 'tsuperior', + 'ff', + 'fi', + 'fl', + 'ffi', + 'ffl', + 'parenleftinferior', + 'parenrightinferior', + 'hyphensuperior', + 'colonmonetary', + 'onefitted', + 'rupiah', + 'centoldstyle', + 'figuredash', + 'hypheninferior', + 'onequarter', + 'onehalf', + 'threequarters', + 'oneeighth', + 'threeeighths', + 'fiveeighths', + 'seveneighths', + 'onethird', + 'twothirds', + 'zerosuperior', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'foursuperior', + 'fivesuperior', + 'sixsuperior', + 'sevensuperior', + 'eightsuperior', + 'ninesuperior', + 'zeroinferior', + 'oneinferior', + 'twoinferior', + 'threeinferior', + 'fourinferior', + 'fiveinferior', + 'sixinferior', + 'seveninferior', + 'eightinferior', + 'nineinferior', + 'centinferior', + 'dollarinferior', + 'periodinferior', + 'commainferior' +]; + + + +//######################## +// Scripts and Languages # +//######################## +let $7cbbe4e24ef3cb75$var$LangSysTable = new $52ZIf$Struct({ + reserved: new $52ZIf$Reserved($52ZIf$uint16), + reqFeatureIndex: $52ZIf$uint16, + featureCount: $52ZIf$uint16, + featureIndexes: new $52ZIf$Array($52ZIf$uint16, 'featureCount') +}); +let $7cbbe4e24ef3cb75$var$LangSysRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + langSys: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$LangSysTable, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$var$Script = new $52ZIf$Struct({ + defaultLangSys: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$LangSysTable), + count: $52ZIf$uint16, + langSysRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LangSysRecord, 'count') +}); +let $7cbbe4e24ef3cb75$var$ScriptRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + script: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$Script, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$export$3e15fc05ce864229 = new $52ZIf$Array($7cbbe4e24ef3cb75$var$ScriptRecord, $52ZIf$uint16); +//####################### +// Features and Lookups # +//####################### +let $7cbbe4e24ef3cb75$var$FeatureParams = new $52ZIf$Struct({ + version: $52ZIf$uint16, + nameID: $52ZIf$uint16 +}); +let $7cbbe4e24ef3cb75$export$6e91cf7616333d5 = new $52ZIf$Struct({ + featureParams: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$FeatureParams), + lookupCount: $52ZIf$uint16, + lookupListIndexes: new $52ZIf$Array($52ZIf$uint16, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$FeatureRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + feature: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$6e91cf7616333d5, { + type: 'parent' + }) +}); +let $7cbbe4e24ef3cb75$export$aa18130def4b6cb4 = new $52ZIf$Array($7cbbe4e24ef3cb75$var$FeatureRecord, $52ZIf$uint16); +let $7cbbe4e24ef3cb75$var$LookupFlags = new $52ZIf$Struct({ + markAttachmentType: $52ZIf$uint8, + flags: new $52ZIf$Bitfield($52ZIf$uint8, [ + 'rightToLeft', + 'ignoreBaseGlyphs', + 'ignoreLigatures', + 'ignoreMarks', + 'useMarkFilteringSet' + ]) +}); +function $7cbbe4e24ef3cb75$export$df0008c6ff2da22a(SubTable) { + let Lookup = new $52ZIf$Struct({ + lookupType: $52ZIf$uint16, + flags: $7cbbe4e24ef3cb75$var$LookupFlags, + subTableCount: $52ZIf$uint16, + subTables: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, SubTable), 'subTableCount'), + markFilteringSet: new $52ZIf$Optional($52ZIf$uint16, (t)=>t.flags.flags.useMarkFilteringSet) + }); + return new $52ZIf$LazyArray(new $52ZIf$Pointer($52ZIf$uint16, Lookup), $52ZIf$uint16); +} +//################# +// Coverage Table # +//################# +let $7cbbe4e24ef3cb75$var$RangeRecord = new $52ZIf$Struct({ + start: $52ZIf$uint16, + end: $52ZIf$uint16, + startCoverageIndex: $52ZIf$uint16 +}); +let $7cbbe4e24ef3cb75$export$17608c3f81a6111 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + glyphCount: $52ZIf$uint16, + glyphs: new $52ZIf$Array($52ZIf$uint16, 'glyphCount') + }, + 2: { + rangeCount: $52ZIf$uint16, + rangeRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$RangeRecord, 'rangeCount') + } +}); +//######################### +// Class Definition Table # +//######################### +let $7cbbe4e24ef3cb75$var$ClassRangeRecord = new $52ZIf$Struct({ + start: $52ZIf$uint16, + end: $52ZIf$uint16, + class: $52ZIf$uint16 +}); +let $7cbbe4e24ef3cb75$export$843d551fbbafef71 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + startGlyph: $52ZIf$uint16, + glyphCount: $52ZIf$uint16, + classValueArray: new $52ZIf$Array($52ZIf$uint16, 'glyphCount') + }, + 2: { + classRangeCount: $52ZIf$uint16, + classRangeRecord: new $52ZIf$Array($7cbbe4e24ef3cb75$var$ClassRangeRecord, 'classRangeCount') + } +}); +let $7cbbe4e24ef3cb75$export$8215d14a63d9fb10 = new $52ZIf$Struct({ + a: $52ZIf$uint16, + b: $52ZIf$uint16, + deltaFormat: $52ZIf$uint16 +}); +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# +let $7cbbe4e24ef3cb75$var$LookupRecord = new $52ZIf$Struct({ + sequenceIndex: $52ZIf$uint16, + lookupListIndex: $52ZIf$uint16 +}); +let $7cbbe4e24ef3cb75$var$Rule = new $52ZIf$Struct({ + glyphCount: $52ZIf$uint16, + lookupCount: $52ZIf$uint16, + input: new $52ZIf$Array($52ZIf$uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$RuleSet = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$Rule), $52ZIf$uint16); +let $7cbbe4e24ef3cb75$var$ClassRule = new $52ZIf$Struct({ + glyphCount: $52ZIf$uint16, + lookupCount: $52ZIf$uint16, + classes: new $52ZIf$Array($52ZIf$uint16, (t)=>t.glyphCount - 1), + lookupRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$ClassSet = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$ClassRule), $52ZIf$uint16); +let $7cbbe4e24ef3cb75$export$841858b892ce1f4c = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + ruleSetCount: $52ZIf$uint16, + ruleSets: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$RuleSet), 'ruleSetCount') + }, + 2: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + classDef: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + classSetCnt: $52ZIf$uint16, + classSet: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: $52ZIf$uint16, + lookupCount: $52ZIf$uint16, + coverages: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'glyphCount'), + lookupRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') + } +}); +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### +let $7cbbe4e24ef3cb75$var$ChainRule = new $52ZIf$Struct({ + backtrackGlyphCount: $52ZIf$uint16, + backtrack: new $52ZIf$Array($52ZIf$uint16, 'backtrackGlyphCount'), + inputGlyphCount: $52ZIf$uint16, + input: new $52ZIf$Array($52ZIf$uint16, (t)=>t.inputGlyphCount - 1), + lookaheadGlyphCount: $52ZIf$uint16, + lookahead: new $52ZIf$Array($52ZIf$uint16, 'lookaheadGlyphCount'), + lookupCount: $52ZIf$uint16, + lookupRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') +}); +let $7cbbe4e24ef3cb75$var$ChainRuleSet = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$ChainRule), $52ZIf$uint16); +let $7cbbe4e24ef3cb75$export$5e6d09e6861162f6 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + chainCount: $52ZIf$uint16, + chainRuleSets: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$ChainRuleSet), 'chainCount') + }, + 2: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), + backtrackClassDef: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + inputClassDef: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + lookaheadClassDef: new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$843d551fbbafef71), + chainCount: $52ZIf$uint16, + chainClassSet: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$var$ChainRuleSet), 'chainCount') + }, + 3: { + backtrackGlyphCount: $52ZIf$uint16, + backtrackCoverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'backtrackGlyphCount'), + inputGlyphCount: $52ZIf$uint16, + inputCoverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'inputGlyphCount'), + lookaheadGlyphCount: $52ZIf$uint16, + lookaheadCoverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $7cbbe4e24ef3cb75$export$17608c3f81a6111), 'lookaheadGlyphCount'), + lookupCount: $52ZIf$uint16, + lookupRecords: new $52ZIf$Array($7cbbe4e24ef3cb75$var$LookupRecord, 'lookupCount') + } +}); + + + +/******************* + * Variation Store * + *******************/ let $1a47b0c45c1c22fe$var$F2DOT14 = new $52ZIf$Fixed(16, 'BE', 14); +let $1a47b0c45c1c22fe$var$RegionAxisCoordinates = new $52ZIf$Struct({ + startCoord: $1a47b0c45c1c22fe$var$F2DOT14, + peakCoord: $1a47b0c45c1c22fe$var$F2DOT14, + endCoord: $1a47b0c45c1c22fe$var$F2DOT14 +}); +let $1a47b0c45c1c22fe$var$VariationRegionList = new $52ZIf$Struct({ + axisCount: $52ZIf$uint16, + regionCount: $52ZIf$uint16, + variationRegions: new $52ZIf$Array(new $52ZIf$Array($1a47b0c45c1c22fe$var$RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); +let $1a47b0c45c1c22fe$var$DeltaSet = new $52ZIf$Struct({ + shortDeltas: new $52ZIf$Array($52ZIf$int16, (t)=>t.parent.shortDeltaCount), + regionDeltas: new $52ZIf$Array($52ZIf$int8, (t)=>t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: (t)=>t.shortDeltas.concat(t.regionDeltas) +}); +let $1a47b0c45c1c22fe$var$ItemVariationData = new $52ZIf$Struct({ + itemCount: $52ZIf$uint16, + shortDeltaCount: $52ZIf$uint16, + regionIndexCount: $52ZIf$uint16, + regionIndexes: new $52ZIf$Array($52ZIf$uint16, 'regionIndexCount'), + deltaSets: new $52ZIf$Array($1a47b0c45c1c22fe$var$DeltaSet, 'itemCount') +}); +let $1a47b0c45c1c22fe$export$fe1b122a2710f241 = new $52ZIf$Struct({ + format: $52ZIf$uint16, + variationRegionList: new $52ZIf$Pointer($52ZIf$uint32, $1a47b0c45c1c22fe$var$VariationRegionList), + variationDataCount: $52ZIf$uint16, + itemVariationData: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint32, $1a47b0c45c1c22fe$var$ItemVariationData), 'variationDataCount') +}); +/********************** + * Feature Variations * + **********************/ let $1a47b0c45c1c22fe$var$ConditionTable = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + axisIndex: $52ZIf$uint16, + axisIndex: $52ZIf$uint16, + filterRangeMinValue: $1a47b0c45c1c22fe$var$F2DOT14, + filterRangeMaxValue: $1a47b0c45c1c22fe$var$F2DOT14 + } +}); +let $1a47b0c45c1c22fe$var$ConditionSet = new $52ZIf$Struct({ + conditionCount: $52ZIf$uint16, + conditionTable: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint32, $1a47b0c45c1c22fe$var$ConditionTable), 'conditionCount') +}); +let $1a47b0c45c1c22fe$var$FeatureTableSubstitutionRecord = new $52ZIf$Struct({ + featureIndex: $52ZIf$uint16, + alternateFeatureTable: new $52ZIf$Pointer($52ZIf$uint32, (0, $7cbbe4e24ef3cb75$export$6e91cf7616333d5), { + type: 'parent' + }) +}); +let $1a47b0c45c1c22fe$var$FeatureTableSubstitution = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + substitutionCount: $52ZIf$uint16, + substitutions: new $52ZIf$Array($1a47b0c45c1c22fe$var$FeatureTableSubstitutionRecord, 'substitutionCount') +}); +let $1a47b0c45c1c22fe$var$FeatureVariationRecord = new $52ZIf$Struct({ + conditionSet: new $52ZIf$Pointer($52ZIf$uint32, $1a47b0c45c1c22fe$var$ConditionSet, { + type: 'parent' + }), + featureTableSubstitution: new $52ZIf$Pointer($52ZIf$uint32, $1a47b0c45c1c22fe$var$FeatureTableSubstitution, { + type: 'parent' + }) +}); +let $1a47b0c45c1c22fe$export$441b70b7971dd419 = new $52ZIf$Struct({ + majorVersion: $52ZIf$uint16, + minorVersion: $52ZIf$uint16, + featureVariationRecordCount: $52ZIf$uint32, + featureVariationRecords: new $52ZIf$Array($1a47b0c45c1c22fe$var$FeatureVariationRecord, 'featureVariationRecordCount') +}); + + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class $b84fd3dd9d8eddb2$var$PredefinedOp { + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) return this.predefinedOps[operands[0]]; + return this.type.decode(stream, parent, operands); + } + size(value, ctx) { + return this.type.size(value, ctx); + } + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) return index; + return this.type.encode(stream, value, ctx); + } + constructor(predefinedOps, type){ + this.predefinedOps = predefinedOps; + this.type = type; + } +} +class $b84fd3dd9d8eddb2$var$CFFEncodingVersion extends $52ZIf$Number { + decode(stream) { + return $52ZIf$uint8.decode(stream) & 0x7f; + } + constructor(){ + super('UInt8'); + } +} +let $b84fd3dd9d8eddb2$var$Range1 = new $52ZIf$Struct({ + first: $52ZIf$uint16, + nLeft: $52ZIf$uint8 +}); +let $b84fd3dd9d8eddb2$var$Range2 = new $52ZIf$Struct({ + first: $52ZIf$uint16, + nLeft: $52ZIf$uint16 +}); +let $b84fd3dd9d8eddb2$var$CFFCustomEncoding = new $52ZIf$VersionedStruct(new $b84fd3dd9d8eddb2$var$CFFEncodingVersion(), { + 0: { + nCodes: $52ZIf$uint8, + codes: new $52ZIf$Array($52ZIf$uint8, 'nCodes') + }, + 1: { + nRanges: $52ZIf$uint8, + ranges: new $52ZIf$Array($b84fd3dd9d8eddb2$var$Range1, 'nRanges') + } +}); +let $b84fd3dd9d8eddb2$var$CFFEncoding = new $b84fd3dd9d8eddb2$var$PredefinedOp([ + (0, $bc0433d9b7e41f5f$export$dee0027060fa13bd), + (0, $bc0433d9b7e41f5f$export$4f58f497e14a53c3) +], new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFCustomEncoding, { + lazy: true +})); +// Decodes an array of ranges until the total +// length is equal to the provided length. +class $b84fd3dd9d8eddb2$var$RangeArray extends $52ZIf$Array { + decode(stream, parent) { + let length = (0, $52ZIf$resolveLength)(this.length, stream, parent); + let count = 0; + let res = []; + while(count < length){ + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + return res; + } +} +let $b84fd3dd9d8eddb2$var$CFFCustomCharset = new $52ZIf$VersionedStruct($52ZIf$uint8, { + 0: { + glyphs: new $52ZIf$Array($52ZIf$uint16, (t)=>t.parent.CharStrings.length - 1) + }, + 1: { + ranges: new $b84fd3dd9d8eddb2$var$RangeArray($b84fd3dd9d8eddb2$var$Range1, (t)=>t.parent.CharStrings.length - 1) + }, + 2: { + ranges: new $b84fd3dd9d8eddb2$var$RangeArray($b84fd3dd9d8eddb2$var$Range2, (t)=>t.parent.CharStrings.length - 1) + } +}); +let $b84fd3dd9d8eddb2$var$CFFCharset = new $b84fd3dd9d8eddb2$var$PredefinedOp([ + (0, $ef658f5c9a1488b2$export$c33b50336c234f16), + (0, $ef658f5c9a1488b2$export$3ed0f9e1fee8d489), + (0, $ef658f5c9a1488b2$export$dc28be11139d4120) +], new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFCustomCharset, { + lazy: true +})); +let $b84fd3dd9d8eddb2$var$FDRange3 = new $52ZIf$Struct({ + first: $52ZIf$uint16, + fd: $52ZIf$uint8 +}); +let $b84fd3dd9d8eddb2$var$FDRange4 = new $52ZIf$Struct({ + first: $52ZIf$uint32, + fd: $52ZIf$uint16 +}); +let $b84fd3dd9d8eddb2$var$FDSelect = new $52ZIf$VersionedStruct($52ZIf$uint8, { + 0: { + fds: new $52ZIf$Array($52ZIf$uint8, (t)=>t.parent.CharStrings.length) + }, + 3: { + nRanges: $52ZIf$uint16, + ranges: new $52ZIf$Array($b84fd3dd9d8eddb2$var$FDRange3, 'nRanges'), + sentinel: $52ZIf$uint16 + }, + 4: { + nRanges: $52ZIf$uint32, + ranges: new $52ZIf$Array($b84fd3dd9d8eddb2$var$FDRange4, 'nRanges'), + sentinel: $52ZIf$uint32 + } +}); +let $b84fd3dd9d8eddb2$var$ptr = new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)((0, $6d59db2e29cc77b3$export$2e2bcd8739ae039)); +class $b84fd3dd9d8eddb2$var$CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return $b84fd3dd9d8eddb2$var$ptr.decode(stream, parent, [ + operands[1] + ]); + } + size(dict, ctx) { + return [ + (0, $6d59db2e29cc77b3$export$2e2bcd8739ae039).size(dict, ctx, false), + $b84fd3dd9d8eddb2$var$ptr.size(dict, ctx)[0] + ]; + } + encode(stream, dict, ctx) { + return [ + (0, $6d59db2e29cc77b3$export$2e2bcd8739ae039).size(dict, ctx, false), + $b84fd3dd9d8eddb2$var$ptr.encode(stream, dict, ctx)[0] + ]; + } +} +let $b84fd3dd9d8eddb2$var$FontDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + 18, + 'Private', + new $b84fd3dd9d8eddb2$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ] +]); +let $b84fd3dd9d8eddb2$var$CFFTopDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + // key name type(s) default + [ + [ + 12, + 30 + ], + 'ROS', + [ + 'sid', + 'sid', + 'number' + ], + null + ], + [ + 0, + 'version', + 'sid', + null + ], + [ + 1, + 'Notice', + 'sid', + null + ], + [ + [ + 12, + 0 + ], + 'Copyright', + 'sid', + null + ], + [ + 2, + 'FullName', + 'sid', + null + ], + [ + 3, + 'FamilyName', + 'sid', + null + ], + [ + 4, + 'Weight', + 'sid', + null + ], + [ + [ + 12, + 1 + ], + 'isFixedPitch', + 'boolean', + false + ], + [ + [ + 12, + 2 + ], + 'ItalicAngle', + 'number', + 0 + ], + [ + [ + 12, + 3 + ], + 'UnderlinePosition', + 'number', + -100 + ], + [ + [ + 12, + 4 + ], + 'UnderlineThickness', + 'number', + 50 + ], + [ + [ + 12, + 5 + ], + 'PaintType', + 'number', + 0 + ], + [ + [ + 12, + 6 + ], + 'CharstringType', + 'number', + 2 + ], + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 13, + 'UniqueID', + 'number', + null + ], + [ + 5, + 'FontBBox', + 'array', + [ + 0, + 0, + 0, + 0 + ] + ], + [ + [ + 12, + 8 + ], + 'StrokeWidth', + 'number', + 0 + ], + [ + 14, + 'XUID', + 'array', + null + ], + [ + 15, + 'charset', + $b84fd3dd9d8eddb2$var$CFFCharset, + (0, $ef658f5c9a1488b2$export$c33b50336c234f16) + ], + [ + 16, + 'Encoding', + $b84fd3dd9d8eddb2$var$CFFEncoding, + (0, $bc0433d9b7e41f5f$export$dee0027060fa13bd) + ], + [ + 17, + 'CharStrings', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)), + null + ], + [ + 18, + 'Private', + new $b84fd3dd9d8eddb2$var$CFFPrivateOp, + null + ], + [ + [ + 12, + 20 + ], + 'SyntheticBase', + 'number', + null + ], + [ + [ + 12, + 21 + ], + 'PostScript', + 'sid', + null + ], + [ + [ + 12, + 22 + ], + 'BaseFontName', + 'sid', + null + ], + [ + [ + 12, + 23 + ], + 'BaseFontBlend', + 'delta', + null + ], + // CID font specific + [ + [ + 12, + 31 + ], + 'CIDFontVersion', + 'number', + 0 + ], + [ + [ + 12, + 32 + ], + 'CIDFontRevision', + 'number', + 0 + ], + [ + [ + 12, + 33 + ], + 'CIDFontType', + 'number', + 0 + ], + [ + [ + 12, + 34 + ], + 'CIDCount', + 'number', + 8720 + ], + [ + [ + 12, + 35 + ], + 'UIDBase', + 'number', + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FontDict)), + null + ], + [ + [ + 12, + 38 + ], + 'FontName', + 'sid', + null + ] +]); +let $b84fd3dd9d8eddb2$var$VariationStore = new $52ZIf$Struct({ + length: $52ZIf$uint16, + itemVariationStore: (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241) +}); +let $b84fd3dd9d8eddb2$var$CFF2TopDict = new (0, $61aa549f16d58b9b$export$2e2bcd8739ae039)([ + [ + [ + 12, + 7 + ], + 'FontMatrix', + 'array', + [ + 0.001, + 0, + 0, + 0.001, + 0, + 0 + ] + ], + [ + 17, + 'CharStrings', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)), + null + ], + [ + [ + 12, + 37 + ], + 'FDSelect', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FDSelect), + null + ], + [ + [ + 12, + 36 + ], + 'FDArray', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)(new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$FontDict)), + null + ], + [ + 24, + 'vstore', + new (0, $0e34a43d05bde82c$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$VariationStore), + null + ], + [ + 25, + 'maxstack', + 'number', + 193 + ] +]); +let $b84fd3dd9d8eddb2$var$CFFTop = new $52ZIf$VersionedStruct($52ZIf$fixed16, { + 1: { + hdrSize: $52ZIf$uint8, + offSize: $52ZIf$uint8, + nameIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)(new $52ZIf$String('length')), + topDictIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)($b84fd3dd9d8eddb2$var$CFFTopDict), + stringIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039)(new $52ZIf$String('length')), + globalSubrIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039) + }, + 2: { + hdrSize: $52ZIf$uint8, + length: $52ZIf$uint16, + topDict: $b84fd3dd9d8eddb2$var$CFF2TopDict, + globalSubrIndex: new (0, $43e9821ef3717eec$export$2e2bcd8739ae039) + } +}); +var $b84fd3dd9d8eddb2$export$2e2bcd8739ae039 = $b84fd3dd9d8eddb2$var$CFFTop; + + + + +class $822ac0d589e4e237$var$CFFFont { + static decode(stream) { + return new $822ac0d589e4e237$var$CFFFont(stream); + } + decode() { + let start = this.stream.pos; + let top = (0, $b84fd3dd9d8eddb2$export$2e2bcd8739ae039).decode(this.stream); + for(let key in top){ + let val = top[key]; + this[key] = val; + } + if (this.version < 2) { + if (this.topDictIndex.length !== 1) throw new Error("Only a single font is allowed in CFF"); + this.topDict = this.topDictIndex[0]; + } + this.isCIDFont = this.topDict.ROS != null; + return this; + } + string(sid) { + if (this.version >= 2) return null; + if (sid < (0, $229224aec43783c5$export$2e2bcd8739ae039).length) return (0, $229224aec43783c5$export$2e2bcd8739ae039)[sid]; + return this.stringIndex[sid - (0, $229224aec43783c5$export$2e2bcd8739ae039).length]; + } + get postscriptName() { + if (this.version < 2) return this.nameIndex[0]; + return null; + } + get fullName() { + return this.string(this.topDict.FullName); + } + get familyName() { + return this.string(this.topDict.FamilyName); + } + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) return null; + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) return null; + let { charset: charset } = this.topDict; + if (Array.isArray(charset)) return charset[gid]; + if (gid === 0) return '.notdef'; + gid -= 1; + switch(charset.version){ + case 0: + return this.string(charset.glyphs[gid]); + case 1: + case 2: + for(let i = 0; i < charset.ranges.length; i++){ + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) return this.string(range.first + (gid - range.offset)); + } + break; + } + return null; + } + fdForGlyph(gid) { + if (!this.topDict.FDSelect) return null; + switch(this.topDict.FDSelect.version){ + case 0: + return this.topDict.FDSelect.fds[gid]; + case 3: + case 4: + let { ranges: ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + while(low <= high){ + let mid = low + high >> 1; + if (gid < ranges[mid].first) high = mid - 1; + else if (mid < high && gid >= ranges[mid + 1].first) low = mid + 1; + else return ranges[mid].fd; + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) return this.topDict.FDArray[fd].Private; + return null; + } + if (this.version < 2) return this.topDict.Private; + return this.topDict.FDArray[0].Private; + } + constructor(stream){ + this.stream = stream; + this.decode(); + } +} +var $822ac0d589e4e237$export$2e2bcd8739ae039 = $822ac0d589e4e237$var$CFFFont; + + + +let $2bbf2bc1ce37cd8f$var$VerticalOrigin = new $52ZIf$Struct({ + glyphIndex: $52ZIf$uint16, + vertOriginY: $52ZIf$int16 +}); +var $2bbf2bc1ce37cd8f$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + majorVersion: $52ZIf$uint16, + minorVersion: $52ZIf$uint16, + defaultVertOriginY: $52ZIf$int16, + numVertOriginYMetrics: $52ZIf$uint16, + metrics: new $52ZIf$Array($2bbf2bc1ce37cd8f$var$VerticalOrigin, 'numVertOriginYMetrics') +}); + + + + +let $0941618dc22a946d$export$16b227cb15d716a0 = new $52ZIf$Struct({ + height: $52ZIf$uint8, + width: $52ZIf$uint8, + horiBearingX: $52ZIf$int8, + horiBearingY: $52ZIf$int8, + horiAdvance: $52ZIf$uint8, + vertBearingX: $52ZIf$int8, + vertBearingY: $52ZIf$int8, + vertAdvance: $52ZIf$uint8 +}); +let $0941618dc22a946d$export$62c53e75f69bfe12 = new $52ZIf$Struct({ + height: $52ZIf$uint8, + width: $52ZIf$uint8, + bearingX: $52ZIf$int8, + bearingY: $52ZIf$int8, + advance: $52ZIf$uint8 +}); +let $0941618dc22a946d$var$EBDTComponent = new $52ZIf$Struct({ + glyph: $52ZIf$uint16, + xOffset: $52ZIf$int8, + yOffset: $52ZIf$int8 +}); +class $0941618dc22a946d$var$ByteAligned { +} +class $0941618dc22a946d$var$BitAligned { +} +let $0941618dc22a946d$export$f1f5ddeb20d14f = new $52ZIf$VersionedStruct('version', { + 1: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + data: $0941618dc22a946d$var$ByteAligned + }, + 2: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + data: $0941618dc22a946d$var$BitAligned + }, + // format 3 is deprecated + // format 4 is not supported by Microsoft + 5: { + data: $0941618dc22a946d$var$BitAligned + }, + 6: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + data: $0941618dc22a946d$var$ByteAligned + }, + 7: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + data: $0941618dc22a946d$var$BitAligned + }, + 8: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + pad: new $52ZIf$Reserved($52ZIf$uint8), + numComponents: $52ZIf$uint16, + components: new $52ZIf$Array($0941618dc22a946d$var$EBDTComponent, 'numComponents') + }, + 9: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + pad: new $52ZIf$Reserved($52ZIf$uint8), + numComponents: $52ZIf$uint16, + components: new $52ZIf$Array($0941618dc22a946d$var$EBDTComponent, 'numComponents') + }, + 17: { + metrics: $0941618dc22a946d$export$62c53e75f69bfe12, + dataLen: $52ZIf$uint32, + data: new $52ZIf$Buffer('dataLen') + }, + 18: { + metrics: $0941618dc22a946d$export$16b227cb15d716a0, + dataLen: $52ZIf$uint32, + data: new $52ZIf$Buffer('dataLen') + }, + 19: { + dataLen: $52ZIf$uint32, + data: new $52ZIf$Buffer('dataLen') + } +}); + + +let $9911c4c7201c13de$var$SBitLineMetrics = new $52ZIf$Struct({ + ascender: $52ZIf$int8, + descender: $52ZIf$int8, + widthMax: $52ZIf$uint8, + caretSlopeNumerator: $52ZIf$int8, + caretSlopeDenominator: $52ZIf$int8, + caretOffset: $52ZIf$int8, + minOriginSB: $52ZIf$int8, + minAdvanceSB: $52ZIf$int8, + maxBeforeBL: $52ZIf$int8, + minAfterBL: $52ZIf$int8, + pad: new $52ZIf$Reserved($52ZIf$int8, 2) +}); +let $9911c4c7201c13de$var$CodeOffsetPair = new $52ZIf$Struct({ + glyphCode: $52ZIf$uint16, + offset: $52ZIf$uint16 +}); +let $9911c4c7201c13de$var$IndexSubtable = new $52ZIf$VersionedStruct($52ZIf$uint16, { + header: { + imageFormat: $52ZIf$uint16, + imageDataOffset: $52ZIf$uint32 + }, + 1: { + offsetArray: new $52ZIf$Array($52ZIf$uint32, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 2: { + imageSize: $52ZIf$uint32, + bigMetrics: (0, $0941618dc22a946d$export$16b227cb15d716a0) + }, + 3: { + offsetArray: new $52ZIf$Array($52ZIf$uint16, (t)=>t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + 4: { + numGlyphs: $52ZIf$uint32, + glyphArray: new $52ZIf$Array($9911c4c7201c13de$var$CodeOffsetPair, (t)=>t.numGlyphs + 1) + }, + 5: { + imageSize: $52ZIf$uint32, + bigMetrics: (0, $0941618dc22a946d$export$16b227cb15d716a0), + numGlyphs: $52ZIf$uint32, + glyphCodeArray: new $52ZIf$Array($52ZIf$uint16, 'numGlyphs') + } +}); +let $9911c4c7201c13de$var$IndexSubtableArray = new $52ZIf$Struct({ + firstGlyphIndex: $52ZIf$uint16, + lastGlyphIndex: $52ZIf$uint16, + subtable: new $52ZIf$Pointer($52ZIf$uint32, $9911c4c7201c13de$var$IndexSubtable) +}); +let $9911c4c7201c13de$var$BitmapSizeTable = new $52ZIf$Struct({ + indexSubTableArray: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($9911c4c7201c13de$var$IndexSubtableArray, 1), { + type: 'parent' + }), + indexTablesSize: $52ZIf$uint32, + numberOfIndexSubTables: $52ZIf$uint32, + colorRef: $52ZIf$uint32, + hori: $9911c4c7201c13de$var$SBitLineMetrics, + vert: $9911c4c7201c13de$var$SBitLineMetrics, + startGlyphIndex: $52ZIf$uint16, + endGlyphIndex: $52ZIf$uint16, + ppemX: $52ZIf$uint8, + ppemY: $52ZIf$uint8, + bitDepth: $52ZIf$uint8, + flags: new $52ZIf$Bitfield($52ZIf$uint8, [ + 'horizontal', + 'vertical' + ]) +}); +var $9911c4c7201c13de$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint32, + numSizes: $52ZIf$uint32, + sizes: new $52ZIf$Array($9911c4c7201c13de$var$BitmapSizeTable, 'numSizes') +}); + + + +let $abb847051efd51b1$var$ImageTable = new $52ZIf$Struct({ + ppem: $52ZIf$uint16, + resolution: $52ZIf$uint16, + imageOffsets: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint32, 'void'), (t)=>t.parent.parent.maxp.numGlyphs + 1) +}); +var // This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +$abb847051efd51b1$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + flags: new $52ZIf$Bitfield($52ZIf$uint16, [ + 'renderOutlines' + ]), + numImgTables: $52ZIf$uint32, + imageTables: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint32, $abb847051efd51b1$var$ImageTable), 'numImgTables') +}); + + + +let $eb629188f3dfefdd$var$LayerRecord = new $52ZIf$Struct({ + gid: $52ZIf$uint16, + paletteIndex: $52ZIf$uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for +// the special case noted below. Each palette entry is 16 bits. +// A palette index of 0xFFFF is a special case indicating that +// the text foreground color should be used. +let $eb629188f3dfefdd$var$BaseGlyphRecord = new $52ZIf$Struct({ + gid: $52ZIf$uint16, + // and is not rendered for color. + firstLayerIndex: $52ZIf$uint16, + // There will be numLayers consecutive entries for this base glyph. + numLayers: $52ZIf$uint16 +}); +var $eb629188f3dfefdd$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numBaseGlyphRecords: $52ZIf$uint16, + baseGlyphRecord: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($eb629188f3dfefdd$var$BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($eb629188f3dfefdd$var$LayerRecord, 'numLayerRecords'), { + lazy: true + }), + numLayerRecords: $52ZIf$uint16 +}); + + + +let $08734b8e7dc64587$var$ColorRecord = new $52ZIf$Struct({ + blue: $52ZIf$uint8, + green: $52ZIf$uint8, + red: $52ZIf$uint8, + alpha: $52ZIf$uint8 +}); +var $08734b8e7dc64587$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + header: { + numPaletteEntries: $52ZIf$uint16, + numPalettes: $52ZIf$uint16, + numColorRecords: $52ZIf$uint16, + colorRecords: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($08734b8e7dc64587$var$ColorRecord, 'numColorRecords')), + colorRecordIndices: new $52ZIf$Array($52ZIf$uint16, 'numPalettes') + }, + 0: {}, + 1: { + offsetPaletteTypeArray: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($52ZIf$uint32, 'numPalettes')), + offsetPaletteLabelArray: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($52ZIf$uint16, 'numPalettes')), + offsetPaletteEntryLabelArray: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($52ZIf$uint16, 'numPaletteEntries')) + } +}); + + + + + +let $497cef411d884e34$var$BaseCoord = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coordinate: $52ZIf$int16 // X or Y value, in design units + }, + 2: { + coordinate: $52ZIf$int16, + referenceGlyph: $52ZIf$uint16, + baseCoordPoint: $52ZIf$uint16 // Index of contour point on the referenceGlyph + }, + 3: { + coordinate: $52ZIf$int16, + deviceTable: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) // Device table for X or Y value + } +}); +let $497cef411d884e34$var$BaseValues = new $52ZIf$Struct({ + defaultIndex: $52ZIf$uint16, + baseCoordCount: $52ZIf$uint16, + baseCoords: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseCoord), 'baseCoordCount') +}); +let $497cef411d884e34$var$FeatMinMaxRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + minCoord: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseCoord, { + type: 'parent' + }), + maxCoord: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseCoord, { + type: 'parent' + }) // May be NULL +}); +let $497cef411d884e34$var$MinMax = new $52ZIf$Struct({ + minCoord: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseCoord), + maxCoord: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseCoord), + featMinMaxCount: $52ZIf$uint16, + featMinMaxRecords: new $52ZIf$Array($497cef411d884e34$var$FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); +let $497cef411d884e34$var$BaseLangSysRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + minMax: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$MinMax, { + type: 'parent' + }) +}); +let $497cef411d884e34$var$BaseScript = new $52ZIf$Struct({ + baseValues: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseValues), + defaultMinMax: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$MinMax), + baseLangSysCount: $52ZIf$uint16, + baseLangSysRecords: new $52ZIf$Array($497cef411d884e34$var$BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); +let $497cef411d884e34$var$BaseScriptRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + script: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseScript, { + type: 'parent' + }) +}); +let $497cef411d884e34$var$BaseScriptList = new $52ZIf$Array($497cef411d884e34$var$BaseScriptRecord, $52ZIf$uint16); +// Array of 4-byte baseline identification tags-must be in alphabetical order +let $497cef411d884e34$var$BaseTagList = new $52ZIf$Array(new $52ZIf$String(4), $52ZIf$uint16); +let $497cef411d884e34$var$Axis = new $52ZIf$Struct({ + baseTagList: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseTagList), + baseScriptList: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$BaseScriptList) +}); +var $497cef411d884e34$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint32, { + header: { + horizAxis: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$Axis), + vertAxis: new $52ZIf$Pointer($52ZIf$uint16, $497cef411d884e34$var$Axis) // May be NULL + }, + 0x00010000: {}, + 0x00010001: { + itemVariationStore: new $52ZIf$Pointer($52ZIf$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)) + } +}); + + + + + +let $cf5f33c63ef209e6$var$AttachPoint = new $52ZIf$Array($52ZIf$uint16, $52ZIf$uint16); +let $cf5f33c63ef209e6$var$AttachList = new $52ZIf$Struct({ + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + glyphCount: $52ZIf$uint16, + attachPoints: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$AttachPoint), 'glyphCount') +}); +let $cf5f33c63ef209e6$var$CaretValue = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coordinate: $52ZIf$int16 + }, + 2: { + caretValuePoint: $52ZIf$uint16 + }, + 3: { + coordinate: $52ZIf$int16, + deviceTable: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) + } +}); +let $cf5f33c63ef209e6$var$LigGlyph = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$CaretValue), $52ZIf$uint16); +let $cf5f33c63ef209e6$var$LigCaretList = new $52ZIf$Struct({ + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + ligGlyphCount: $52ZIf$uint16, + ligGlyphs: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$LigGlyph), 'ligGlyphCount') +}); +let $cf5f33c63ef209e6$var$MarkGlyphSetsDef = new $52ZIf$Struct({ + markSetTableFormat: $52ZIf$uint16, + markSetCount: $52ZIf$uint16, + coverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint32, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'markSetCount') +}); +var $cf5f33c63ef209e6$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint32, { + header: { + glyphClassDef: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + attachList: new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$AttachList), + ligCaretList: new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$LigCaretList), + markAttachClassDef: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)) + }, + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new $52ZIf$Pointer($52ZIf$uint16, $cf5f33c63ef209e6$var$MarkGlyphSetsDef), + itemVariationStore: new $52ZIf$Pointer($52ZIf$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)) + } +}); + + + + + +let $47e0e8ef515d9903$var$ValueFormat = new $52ZIf$Bitfield($52ZIf$uint16, [ + 'xPlacement', + 'yPlacement', + 'xAdvance', + 'yAdvance', + 'xPlaDevice', + 'yPlaDevice', + 'xAdvDevice', + 'yAdvDevice' +]); +let $47e0e8ef515d9903$var$types = { + xPlacement: $52ZIf$int16, + yPlacement: $52ZIf$int16, + xAdvance: $52ZIf$int16, + yAdvance: $52ZIf$int16, + xPlaDevice: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yPlaDevice: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + xAdvDevice: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }), + yAdvDevice: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10), { + type: 'global', + relativeTo: (ctx)=>ctx.rel + }) +}; +class $47e0e8ef515d9903$var$ValueRecord { + buildStruct(parent) { + let struct = parent; + while(!struct[this.key] && struct.parent)struct = struct.parent; + if (!struct[this.key]) return; + let fields = {}; + fields.rel = ()=>struct._startOffset; + let format = struct[this.key]; + for(let key in format)if (format[key]) fields[key] = $47e0e8ef515d9903$var$types[key]; + return new $52ZIf$Struct(fields); + } + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } + constructor(key = 'valueFormat'){ + this.key = key; + } +} +let $47e0e8ef515d9903$var$PairValueRecord = new $52ZIf$Struct({ + secondGlyph: $52ZIf$uint16, + value1: new $47e0e8ef515d9903$var$ValueRecord('valueFormat1'), + value2: new $47e0e8ef515d9903$var$ValueRecord('valueFormat2') +}); +let $47e0e8ef515d9903$var$PairSet = new $52ZIf$Array($47e0e8ef515d9903$var$PairValueRecord, $52ZIf$uint16); +let $47e0e8ef515d9903$var$Class2Record = new $52ZIf$Struct({ + value1: new $47e0e8ef515d9903$var$ValueRecord('valueFormat1'), + value2: new $47e0e8ef515d9903$var$ValueRecord('valueFormat2') +}); +let $47e0e8ef515d9903$var$Anchor = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + xCoordinate: $52ZIf$int16, + yCoordinate: $52ZIf$int16 + }, + 2: { + xCoordinate: $52ZIf$int16, + yCoordinate: $52ZIf$int16, + anchorPoint: $52ZIf$uint16 + }, + 3: { + xCoordinate: $52ZIf$int16, + yCoordinate: $52ZIf$int16, + xDeviceTable: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)), + yDeviceTable: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$8215d14a63d9fb10)) + } +}); +let $47e0e8ef515d9903$var$EntryExitRecord = new $52ZIf$Struct({ + entryAnchor: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }), + exitAnchor: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }) +}); +let $47e0e8ef515d9903$var$MarkRecord = new $52ZIf$Struct({ + class: $52ZIf$uint16, + markAnchor: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$Anchor, { + type: 'parent' + }) +}); +let $47e0e8ef515d9903$var$MarkArray = new $52ZIf$Array($47e0e8ef515d9903$var$MarkRecord, $52ZIf$uint16); +let $47e0e8ef515d9903$var$BaseRecord = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$Anchor), (t)=>t.parent.classCount); +let $47e0e8ef515d9903$var$BaseArray = new $52ZIf$Array($47e0e8ef515d9903$var$BaseRecord, $52ZIf$uint16); +let $47e0e8ef515d9903$var$ComponentRecord = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$Anchor), (t)=>t.parent.parent.classCount); +let $47e0e8ef515d9903$var$LigatureAttach = new $52ZIf$Array($47e0e8ef515d9903$var$ComponentRecord, $52ZIf$uint16); +let $47e0e8ef515d9903$var$LigatureArray = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$LigatureAttach), $52ZIf$uint16); +let $47e0e8ef515d9903$export$73a8cfb19cd43a0f = new $52ZIf$VersionedStruct('lookupType', { + 1: new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat: $47e0e8ef515d9903$var$ValueFormat, + value: new $47e0e8ef515d9903$var$ValueRecord() + }, + 2: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat: $47e0e8ef515d9903$var$ValueFormat, + valueCount: $52ZIf$uint16, + values: new $52ZIf$LazyArray(new $47e0e8ef515d9903$var$ValueRecord(), 'valueCount') + } + }), + 2: new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat1: $47e0e8ef515d9903$var$ValueFormat, + valueFormat2: $47e0e8ef515d9903$var$ValueFormat, + pairSetCount: $52ZIf$uint16, + pairSets: new $52ZIf$LazyArray(new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$PairSet), 'pairSetCount') + }, + 2: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + valueFormat1: $47e0e8ef515d9903$var$ValueFormat, + valueFormat2: $47e0e8ef515d9903$var$ValueFormat, + classDef1: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + classDef2: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$843d551fbbafef71)), + class1Count: $52ZIf$uint16, + class2Count: $52ZIf$uint16, + classRecords: new $52ZIf$LazyArray(new $52ZIf$LazyArray($47e0e8ef515d9903$var$Class2Record, 'class2Count'), 'class1Count') + } + }), + 3: { + format: $52ZIf$uint16, + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + entryExitCount: $52ZIf$uint16, + entryExitRecords: new $52ZIf$Array($47e0e8ef515d9903$var$EntryExitRecord, 'entryExitCount') + }, + 4: { + format: $52ZIf$uint16, + markCoverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + baseCoverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $52ZIf$uint16, + markArray: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$MarkArray), + baseArray: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$BaseArray) + }, + 5: { + format: $52ZIf$uint16, + markCoverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + ligatureCoverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $52ZIf$uint16, + markArray: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$MarkArray), + ligatureArray: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$LigatureArray) + }, + 6: { + format: $52ZIf$uint16, + mark1Coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + mark2Coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + classCount: $52ZIf$uint16, + mark1Array: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$MarkArray), + mark2Array: new $52ZIf$Pointer($52ZIf$uint16, $47e0e8ef515d9903$var$BaseArray) + }, + 7: (0, $7cbbe4e24ef3cb75$export$841858b892ce1f4c), + 8: (0, $7cbbe4e24ef3cb75$export$5e6d09e6861162f6), + 9: { + posFormat: $52ZIf$uint16, + lookupType: $52ZIf$uint16, + extension: new $52ZIf$Pointer($52ZIf$uint32, null) + } +}); +// Fix circular reference +$47e0e8ef515d9903$export$73a8cfb19cd43a0f.versions[9].extension.type = $47e0e8ef515d9903$export$73a8cfb19cd43a0f; +var $47e0e8ef515d9903$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint32, { + header: { + scriptList: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$3e15fc05ce864229)), + featureList: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$aa18130def4b6cb4)), + lookupList: new $52ZIf$Pointer($52ZIf$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)($47e0e8ef515d9903$export$73a8cfb19cd43a0f)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $52ZIf$Pointer($52ZIf$uint32, (0, $1a47b0c45c1c22fe$export$441b70b7971dd419)) + } +}); + + + + + +let $d3f442064af66e06$var$Sequence = new $52ZIf$Array($52ZIf$uint16, $52ZIf$uint16); +let $d3f442064af66e06$var$AlternateSet = $d3f442064af66e06$var$Sequence; +let $d3f442064af66e06$var$Ligature = new $52ZIf$Struct({ + glyph: $52ZIf$uint16, + compCount: $52ZIf$uint16, + components: new $52ZIf$Array($52ZIf$uint16, (t)=>t.compCount - 1) +}); +let $d3f442064af66e06$var$LigatureSet = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $d3f442064af66e06$var$Ligature), $52ZIf$uint16); +let $d3f442064af66e06$var$GSUBLookup = new $52ZIf$VersionedStruct('lookupType', { + 1: new $52ZIf$VersionedStruct($52ZIf$uint16, { + 1: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + deltaGlyphID: $52ZIf$int16 + }, + 2: { + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + glyphCount: $52ZIf$uint16, + substitute: new $52ZIf$LazyArray($52ZIf$uint16, 'glyphCount') + } + }), + 2: { + substFormat: $52ZIf$uint16, + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $52ZIf$uint16, + sequences: new $52ZIf$LazyArray(new $52ZIf$Pointer($52ZIf$uint16, $d3f442064af66e06$var$Sequence), 'count') + }, + 3: { + substFormat: $52ZIf$uint16, + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $52ZIf$uint16, + alternateSet: new $52ZIf$LazyArray(new $52ZIf$Pointer($52ZIf$uint16, $d3f442064af66e06$var$AlternateSet), 'count') + }, + 4: { + substFormat: $52ZIf$uint16, + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + count: $52ZIf$uint16, + ligatureSets: new $52ZIf$LazyArray(new $52ZIf$Pointer($52ZIf$uint16, $d3f442064af66e06$var$LigatureSet), 'count') + }, + 5: (0, $7cbbe4e24ef3cb75$export$841858b892ce1f4c), + 6: (0, $7cbbe4e24ef3cb75$export$5e6d09e6861162f6), + 7: { + substFormat: $52ZIf$uint16, + lookupType: $52ZIf$uint16, + extension: new $52ZIf$Pointer($52ZIf$uint32, null) + }, + 8: { + substFormat: $52ZIf$uint16, + coverage: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), + backtrackCoverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'backtrackGlyphCount'), + lookaheadGlyphCount: $52ZIf$uint16, + lookaheadCoverage: new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$17608c3f81a6111)), 'lookaheadGlyphCount'), + glyphCount: $52ZIf$uint16, + substitutes: new $52ZIf$Array($52ZIf$uint16, 'glyphCount') + } +}); +// Fix circular reference +$d3f442064af66e06$var$GSUBLookup.versions[7].extension.type = $d3f442064af66e06$var$GSUBLookup; +var $d3f442064af66e06$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint32, { + header: { + scriptList: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$3e15fc05ce864229)), + featureList: new $52ZIf$Pointer($52ZIf$uint16, (0, $7cbbe4e24ef3cb75$export$aa18130def4b6cb4)), + lookupList: new $52ZIf$Pointer($52ZIf$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)($d3f442064af66e06$var$GSUBLookup)) + }, + 0x00010000: {}, + 0x00010001: { + featureVariations: new $52ZIf$Pointer($52ZIf$uint32, (0, $1a47b0c45c1c22fe$export$441b70b7971dd419)) + } +}); + + + + + +let $71cfb3c4767fbd0c$var$JstfGSUBModList = new $52ZIf$Array($52ZIf$uint16, $52ZIf$uint16); +let $71cfb3c4767fbd0c$var$JstfPriority = new $52ZIf$Struct({ + shrinkageEnableGSUB: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageDisableGSUB: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageEnableGPOS: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageDisableGPOS: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + shrinkageJstfMax: new $52ZIf$Pointer($52ZIf$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)((0, $47e0e8ef515d9903$export$73a8cfb19cd43a0f))), + extensionEnableGSUB: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionDisableGSUB: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionEnableGPOS: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionDisableGPOS: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfGSUBModList), + extensionJstfMax: new $52ZIf$Pointer($52ZIf$uint16, new (0, $7cbbe4e24ef3cb75$export$df0008c6ff2da22a)((0, $47e0e8ef515d9903$export$73a8cfb19cd43a0f))) +}); +let $71cfb3c4767fbd0c$var$JstfLangSys = new $52ZIf$Array(new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfPriority), $52ZIf$uint16); +let $71cfb3c4767fbd0c$var$JstfLangSysRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + jstfLangSys: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfLangSys) +}); +let $71cfb3c4767fbd0c$var$JstfScript = new $52ZIf$Struct({ + extenderGlyphs: new $52ZIf$Pointer($52ZIf$uint16, new $52ZIf$Array($52ZIf$uint16, $52ZIf$uint16)), + defaultLangSys: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfLangSys), + langSysCount: $52ZIf$uint16, + langSysRecords: new $52ZIf$Array($71cfb3c4767fbd0c$var$JstfLangSysRecord, 'langSysCount') +}); +let $71cfb3c4767fbd0c$var$JstfScriptRecord = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + script: new $52ZIf$Pointer($52ZIf$uint16, $71cfb3c4767fbd0c$var$JstfScript, { + type: 'parent' + }) +}); +var $71cfb3c4767fbd0c$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint32, + scriptCount: $52ZIf$uint16, + scriptList: new $52ZIf$Array($71cfb3c4767fbd0c$var$JstfScriptRecord, 'scriptCount') +}); + + + + +// TODO: add this to restructure +class $d059a6bd2d3b5b63$var$VariableSizeNumber { + decode(stream, parent) { + switch(this.size(0, parent)){ + case 1: + return stream.readUInt8(); + case 2: + return stream.readUInt16BE(); + case 3: + return stream.readUInt24BE(); + case 4: + return stream.readUInt32BE(); + } + } + size(val, parent) { + return (0, $52ZIf$resolveLength)(this._size, null, parent); + } + constructor(size){ + this._size = size; + } +} +let $d059a6bd2d3b5b63$var$MapDataEntry = new $52ZIf$Struct({ + entry: new $d059a6bd2d3b5b63$var$VariableSizeNumber((t)=>((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: (t)=>t.entry >> (t.parent.entryFormat & 0x000F) + 1, + innerIndex: (t)=>t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1 +}); +let $d059a6bd2d3b5b63$var$DeltaSetIndexMap = new $52ZIf$Struct({ + entryFormat: $52ZIf$uint16, + mapCount: $52ZIf$uint16, + mapData: new $52ZIf$Array($d059a6bd2d3b5b63$var$MapDataEntry, 'mapCount') +}); +var $d059a6bd2d3b5b63$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + majorVersion: $52ZIf$uint16, + minorVersion: $52ZIf$uint16, + itemVariationStore: new $52ZIf$Pointer($52ZIf$uint32, (0, $1a47b0c45c1c22fe$export$fe1b122a2710f241)), + advanceWidthMapping: new $52ZIf$Pointer($52ZIf$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap), + LSBMapping: new $52ZIf$Pointer($52ZIf$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap), + RSBMapping: new $52ZIf$Pointer($52ZIf$uint32, $d059a6bd2d3b5b63$var$DeltaSetIndexMap) +}); + + + +let $dceeca3e1977ce30$var$Signature = new $52ZIf$Struct({ + format: $52ZIf$uint32, + length: $52ZIf$uint32, + offset: $52ZIf$uint32 +}); +let $dceeca3e1977ce30$var$SignatureBlock = new $52ZIf$Struct({ + reserved: new $52ZIf$Reserved($52ZIf$uint16, 2), + cbSignature: $52ZIf$uint32, + signature: new $52ZIf$Buffer('cbSignature') +}); +var $dceeca3e1977ce30$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + ulVersion: $52ZIf$uint32, + usNumSigs: $52ZIf$uint16, + usFlag: $52ZIf$uint16, + signatures: new $52ZIf$Array($dceeca3e1977ce30$var$Signature, 'usNumSigs'), + signatureBlocks: new $52ZIf$Array($dceeca3e1977ce30$var$SignatureBlock, 'usNumSigs') +}); + + + +let $8acd740a9435aad0$var$GaspRange = new $52ZIf$Struct({ + rangeMaxPPEM: $52ZIf$uint16, + rangeGaspBehavior: new $52ZIf$Bitfield($52ZIf$uint16, [ + 'grayscale', + 'gridfit', + 'symmetricSmoothing', + 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); +var $8acd740a9435aad0$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numRanges: $52ZIf$uint16, + gaspRanges: new $52ZIf$Array($8acd740a9435aad0$var$GaspRange, 'numRanges') // Sorted by ppem +}); + + + +let $b5f380243c34d6a0$var$DeviceRecord = new $52ZIf$Struct({ + pixelSize: $52ZIf$uint8, + maximumWidth: $52ZIf$uint8, + widths: new $52ZIf$Array($52ZIf$uint8, (t)=>t.parent.parent.maxp.numGlyphs) +}); +var // The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +$b5f380243c34d6a0$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numRecords: $52ZIf$int16, + sizeDeviceRecord: $52ZIf$int32, + records: new $52ZIf$Array($b5f380243c34d6a0$var$DeviceRecord, 'numRecords') +}); + + + +let $ca2df1256966e313$var$KernPair = new $52ZIf$Struct({ + left: $52ZIf$uint16, + right: $52ZIf$uint16, + value: $52ZIf$int16 +}); +let $ca2df1256966e313$var$ClassTable = new $52ZIf$Struct({ + firstGlyph: $52ZIf$uint16, + nGlyphs: $52ZIf$uint16, + offsets: new $52ZIf$Array($52ZIf$uint16, 'nGlyphs'), + max: (t)=>t.offsets.length && Math.max.apply(Math, t.offsets) +}); +let $ca2df1256966e313$var$Kern2Array = new $52ZIf$Struct({ + off: (t)=>t._startOffset - t.parent.parent._startOffset, + len: (t)=>((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2), + values: new $52ZIf$LazyArray($52ZIf$int16, 'len') +}); +let $ca2df1256966e313$var$KernSubtable = new $52ZIf$VersionedStruct('format', { + 0: { + nPairs: $52ZIf$uint16, + searchRange: $52ZIf$uint16, + entrySelector: $52ZIf$uint16, + rangeShift: $52ZIf$uint16, + pairs: new $52ZIf$Array($ca2df1256966e313$var$KernPair, 'nPairs') + }, + 2: { + rowWidth: $52ZIf$uint16, + leftTable: new $52ZIf$Pointer($52ZIf$uint16, $ca2df1256966e313$var$ClassTable, { + type: 'parent' + }), + rightTable: new $52ZIf$Pointer($52ZIf$uint16, $ca2df1256966e313$var$ClassTable, { + type: 'parent' + }), + array: new $52ZIf$Pointer($52ZIf$uint16, $ca2df1256966e313$var$Kern2Array, { + type: 'parent' + }) + }, + 3: { + glyphCount: $52ZIf$uint16, + kernValueCount: $52ZIf$uint8, + leftClassCount: $52ZIf$uint8, + rightClassCount: $52ZIf$uint8, + flags: $52ZIf$uint8, + kernValue: new $52ZIf$Array($52ZIf$int16, 'kernValueCount'), + leftClass: new $52ZIf$Array($52ZIf$uint8, 'glyphCount'), + rightClass: new $52ZIf$Array($52ZIf$uint8, 'glyphCount'), + kernIndex: new $52ZIf$Array($52ZIf$uint8, (t)=>t.leftClassCount * t.rightClassCount) + } +}); +let $ca2df1256966e313$var$KernTable = new $52ZIf$VersionedStruct('version', { + 0: { + subVersion: $52ZIf$uint16, + length: $52ZIf$uint16, + format: $52ZIf$uint8, + coverage: new $52ZIf$Bitfield($52ZIf$uint8, [ + 'horizontal', + 'minimum', + 'crossStream', + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: $ca2df1256966e313$var$KernSubtable, + padding: new $52ZIf$Reserved($52ZIf$uint8, (t)=>t.length - t._currentOffset) + }, + 1: { + length: $52ZIf$uint32, + coverage: new $52ZIf$Bitfield($52ZIf$uint8, [ + null, + null, + null, + null, + null, + 'variation', + 'crossStream', + 'vertical' // Set if table has vertical kerning values + ]), + format: $52ZIf$uint8, + tupleIndex: $52ZIf$uint16, + subtable: $ca2df1256966e313$var$KernSubtable, + padding: new $52ZIf$Reserved($52ZIf$uint8, (t)=>t.length - t._currentOffset) + } +}); +var $ca2df1256966e313$export$2e2bcd8739ae039 = new $52ZIf$VersionedStruct($52ZIf$uint16, { + 0: { + nTables: $52ZIf$uint16, + tables: new $52ZIf$Array($ca2df1256966e313$var$KernTable, 'nTables') + }, + 1: { + reserved: new $52ZIf$Reserved($52ZIf$uint16), + nTables: $52ZIf$uint32, + tables: new $52ZIf$Array($ca2df1256966e313$var$KernTable, 'nTables') + } +}); + + + +var // Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +$7a9f92b0c46ebe33$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numGlyphs: $52ZIf$uint16, + yPels: new $52ZIf$Array($52ZIf$uint8, 'numGlyphs') +}); + + + +var // PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +$2b2ccc419d152631$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + fontNumber: $52ZIf$uint32, + pitch: $52ZIf$uint16, + xHeight: $52ZIf$uint16, + style: $52ZIf$uint16, + typeFamily: $52ZIf$uint16, + capHeight: $52ZIf$uint16, + symbolSet: $52ZIf$uint16, + typeface: new $52ZIf$String(16), + characterComplement: new $52ZIf$String(8), + fileName: new $52ZIf$String(6), + strokeWeight: new $52ZIf$String(1), + widthType: new $52ZIf$String(1), + serifStyle: $52ZIf$uint8, + reserved: new $52ZIf$Reserved($52ZIf$uint8) +}); + + + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. +let $ca5b40b9bcda9c9b$var$Ratio = new $52ZIf$Struct({ + bCharSet: $52ZIf$uint8, + xRatio: $52ZIf$uint8, + yStartRatio: $52ZIf$uint8, + yEndRatio: $52ZIf$uint8 // Ending y-Ratio value +}); +let $ca5b40b9bcda9c9b$var$vTable = new $52ZIf$Struct({ + yPelHeight: $52ZIf$uint16, + yMax: $52ZIf$int16, + yMin: $52ZIf$int16 // Minimum value (in pels) for this yPelHeight +}); +let $ca5b40b9bcda9c9b$var$VdmxGroup = new $52ZIf$Struct({ + recs: $52ZIf$uint16, + startsz: $52ZIf$uint8, + endsz: $52ZIf$uint8, + entries: new $52ZIf$Array($ca5b40b9bcda9c9b$var$vTable, 'recs') // The VDMX records +}); +var $ca5b40b9bcda9c9b$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + numRecs: $52ZIf$uint16, + numRatios: $52ZIf$uint16, + ratioRanges: new $52ZIf$Array($ca5b40b9bcda9c9b$var$Ratio, 'numRatios'), + offsets: new $52ZIf$Array($52ZIf$uint16, 'numRatios'), + groups: new $52ZIf$Array($ca5b40b9bcda9c9b$var$VdmxGroup, 'numRecs') // The actual VDMX groupings +}); + + + +var // Vertical Header Table +$69530a3c40755af0$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + ascent: $52ZIf$int16, + descent: $52ZIf$int16, + lineGap: $52ZIf$int16, + advanceHeightMax: $52ZIf$int16, + minTopSideBearing: $52ZIf$int16, + minBottomSideBearing: $52ZIf$int16, + yMaxExtent: $52ZIf$int16, + caretSlopeRise: $52ZIf$int16, + caretSlopeRun: $52ZIf$int16, + caretOffset: $52ZIf$int16, + reserved: new $52ZIf$Reserved($52ZIf$int16, 4), + metricDataFormat: $52ZIf$int16, + numberOfMetrics: $52ZIf$uint16 // Number of advance heights in the Vertical Metrics table +}); + + + +let $344073dd270f0e62$var$VmtxEntry = new $52ZIf$Struct({ + advance: $52ZIf$uint16, + bearing: $52ZIf$int16 // The top sidebearing of the glyph +}); +var // Vertical Metrics Table +$344073dd270f0e62$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + metrics: new $52ZIf$LazyArray($344073dd270f0e62$var$VmtxEntry, (t)=>t.parent.vhea.numberOfMetrics), + bearings: new $52ZIf$LazyArray($52ZIf$int16, (t)=>t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); + + + +let $3793b781918cfced$var$shortFrac = new $52ZIf$Fixed(16, 'BE', 14); +let $3793b781918cfced$var$Correspondence = new $52ZIf$Struct({ + fromCoord: $3793b781918cfced$var$shortFrac, + toCoord: $3793b781918cfced$var$shortFrac +}); +let $3793b781918cfced$var$Segment = new $52ZIf$Struct({ + pairCount: $52ZIf$uint16, + correspondence: new $52ZIf$Array($3793b781918cfced$var$Correspondence, 'pairCount') +}); +var $3793b781918cfced$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + axisCount: $52ZIf$uint32, + segment: new $52ZIf$Array($3793b781918cfced$var$Segment, 'axisCount') +}); + + + + +class $6cb7dd5f47d82580$var$UnboundedArrayAccessor { + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + return this._items[index]; + } + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } + constructor(type, stream, parent){ + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } +} +class $6cb7dd5f47d82580$export$c5af1eebc882e39a extends $52ZIf$Array { + decode(stream, parent) { + return new $6cb7dd5f47d82580$var$UnboundedArrayAccessor(this.type, stream, parent); + } + constructor(type){ + super(type, 0); + } +} +let $6cb7dd5f47d82580$export$8351f8c2ae2f103c = function(ValueType = $52ZIf$uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + constructor(type){ + this.type = type; + } + } + ValueType = new Shadow(ValueType); + let BinarySearchHeader = new $52ZIf$Struct({ + unitSize: $52ZIf$uint16, + nUnits: $52ZIf$uint16, + searchRange: $52ZIf$uint16, + entrySelector: $52ZIf$uint16, + rangeShift: $52ZIf$uint16 + }); + let LookupSegmentSingle = new $52ZIf$Struct({ + lastGlyph: $52ZIf$uint16, + firstGlyph: $52ZIf$uint16, + value: ValueType + }); + let LookupSegmentArray = new $52ZIf$Struct({ + lastGlyph: $52ZIf$uint16, + firstGlyph: $52ZIf$uint16, + values: new $52ZIf$Pointer($52ZIf$uint16, new $52ZIf$Array(ValueType, (t)=>t.lastGlyph - t.firstGlyph + 1), { + type: 'parent' + }) + }); + let LookupSingle = new $52ZIf$Struct({ + glyph: $52ZIf$uint16, + value: ValueType + }); + return new $52ZIf$VersionedStruct($52ZIf$uint16, { + 0: { + values: new $6cb7dd5f47d82580$export$c5af1eebc882e39a(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new $52ZIf$Array(LookupSegmentSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new $52ZIf$Array(LookupSegmentArray, (t)=>t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new $52ZIf$Array(LookupSingle, (t)=>t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: $52ZIf$uint16, + count: $52ZIf$uint16, + values: new $52ZIf$Array(ValueType, 'count') + } + }); +}; +function $6cb7dd5f47d82580$export$79f7d93d790934ba(entryData = {}, lookupType = $52ZIf$uint16) { + let entry = Object.assign({ + newState: $52ZIf$uint16, + flags: $52ZIf$uint16 + }, entryData); + let Entry = new $52ZIf$Struct(entry); + let StateArray = new $6cb7dd5f47d82580$export$c5af1eebc882e39a(new $52ZIf$Array($52ZIf$uint16, (t)=>t.nClasses)); + let StateHeader = new $52ZIf$Struct({ + nClasses: $52ZIf$uint32, + classTable: new $52ZIf$Pointer($52ZIf$uint32, new $6cb7dd5f47d82580$export$8351f8c2ae2f103c(lookupType)), + stateArray: new $52ZIf$Pointer($52ZIf$uint32, StateArray), + entryTable: new $52ZIf$Pointer($52ZIf$uint32, new $6cb7dd5f47d82580$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader; +} +function $6cb7dd5f47d82580$export$105027425199cc51(entryData = {}, lookupType = $52ZIf$uint16) { + let ClassLookupTable = new $52ZIf$Struct({ + version () { + return 8; + }, + firstGlyph: $52ZIf$uint16, + values: new $52ZIf$Array($52ZIf$uint8, $52ZIf$uint16) + }); + let entry = Object.assign({ + newStateOffset: $52ZIf$uint16, + // convert offset to stateArray index + newState: (t)=>(t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: $52ZIf$uint16 + }, entryData); + let Entry = new $52ZIf$Struct(entry); + let StateArray = new $6cb7dd5f47d82580$export$c5af1eebc882e39a(new $52ZIf$Array($52ZIf$uint8, (t)=>t.nClasses)); + let StateHeader1 = new $52ZIf$Struct({ + nClasses: $52ZIf$uint16, + classTable: new $52ZIf$Pointer($52ZIf$uint16, ClassLookupTable), + stateArray: new $52ZIf$Pointer($52ZIf$uint16, StateArray), + entryTable: new $52ZIf$Pointer($52ZIf$uint16, new $6cb7dd5f47d82580$export$c5af1eebc882e39a(Entry)) + }); + return StateHeader1; +} + + +let $6a3746e8c708f5a3$var$BslnSubtable = new $52ZIf$VersionedStruct('format', { + 0: { + deltas: new $52ZIf$Array($52ZIf$int16, 32) + }, + 1: { + deltas: new $52ZIf$Array($52ZIf$int16, 32), + mappingData: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($52ZIf$uint16) + }, + 2: { + standardGlyph: $52ZIf$uint16, + controlPoints: new $52ZIf$Array($52ZIf$uint16, 32) + }, + 3: { + standardGlyph: $52ZIf$uint16, + controlPoints: new $52ZIf$Array($52ZIf$uint16, 32), + mappingData: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($52ZIf$uint16) + } +}); +var $6a3746e8c708f5a3$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + format: $52ZIf$uint16, + defaultBaseline: $52ZIf$uint16, + subtable: $6a3746e8c708f5a3$var$BslnSubtable +}); + + + +let $d0c76fac617b308a$var$Setting = new $52ZIf$Struct({ + setting: $52ZIf$uint16, + nameIndex: $52ZIf$int16, + name: (t)=>t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +let $d0c76fac617b308a$var$FeatureName = new $52ZIf$Struct({ + feature: $52ZIf$uint16, + nSettings: $52ZIf$uint16, + settingTable: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array($d0c76fac617b308a$var$Setting, 'nSettings'), { + type: 'parent' + }), + featureFlags: new $52ZIf$Bitfield($52ZIf$uint8, [ + null, + null, + null, + null, + null, + null, + 'hasDefault', + 'exclusive' + ]), + defaultSetting: $52ZIf$uint8, + nameIndex: $52ZIf$int16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); +var $d0c76fac617b308a$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + featureNameCount: $52ZIf$uint16, + reserved1: new $52ZIf$Reserved($52ZIf$uint16), + reserved2: new $52ZIf$Reserved($52ZIf$uint32), + featureNames: new $52ZIf$Array($d0c76fac617b308a$var$FeatureName, 'featureNameCount') +}); + + + +let $e83fd065f00fcd01$var$Axis = new $52ZIf$Struct({ + axisTag: new $52ZIf$String(4), + minValue: $52ZIf$fixed32, + defaultValue: $52ZIf$fixed32, + maxValue: $52ZIf$fixed32, + flags: $52ZIf$uint16, + nameID: $52ZIf$uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID] +}); +let $e83fd065f00fcd01$var$Instance = new $52ZIf$Struct({ + nameID: $52ZIf$uint16, + name: (t)=>t.parent.parent.name.records.fontFeatures[t.nameID], + flags: $52ZIf$uint16, + coord: new $52ZIf$Array($52ZIf$fixed32, (t)=>t.parent.axisCount), + postscriptNameID: new $52ZIf$Optional($52ZIf$uint16, (t)=>t.parent.instanceSize - t._currentOffset > 0) +}); +var $e83fd065f00fcd01$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + offsetToData: $52ZIf$uint16, + countSizePairs: $52ZIf$uint16, + axisCount: $52ZIf$uint16, + axisSize: $52ZIf$uint16, + instanceCount: $52ZIf$uint16, + instanceSize: $52ZIf$uint16, + axis: new $52ZIf$Array($e83fd065f00fcd01$var$Axis, 'axisCount'), + instance: new $52ZIf$Array($e83fd065f00fcd01$var$Instance, 'instanceCount') +}); + + + +let $dbe33c8d3a7f131c$var$shortFrac = new $52ZIf$Fixed(16, 'BE', 14); +class $dbe33c8d3a7f131c$var$Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2; + } +} +let $dbe33c8d3a7f131c$var$gvar = new $52ZIf$Struct({ + version: $52ZIf$uint16, + reserved: new $52ZIf$Reserved($52ZIf$uint16), + axisCount: $52ZIf$uint16, + globalCoordCount: $52ZIf$uint16, + globalCoords: new $52ZIf$Pointer($52ZIf$uint32, new $52ZIf$Array(new $52ZIf$Array($dbe33c8d3a7f131c$var$shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: $52ZIf$uint16, + flags: $52ZIf$uint16, + offsetToData: $52ZIf$uint32, + offsets: new $52ZIf$Array(new $52ZIf$Pointer($dbe33c8d3a7f131c$var$Offset, 'void', { + relativeTo: (ctx)=>ctx.offsetToData, + allowNull: false + }), (t)=>t.glyphCount + 1) +}); +var $dbe33c8d3a7f131c$export$2e2bcd8739ae039 = $dbe33c8d3a7f131c$var$gvar; + + + + +let $05b01887df96c4ee$var$ClassTable = new $52ZIf$Struct({ + length: $52ZIf$uint16, + coverage: $52ZIf$uint16, + subFeatureFlags: $52ZIf$uint32, + stateTable: new (0, $6cb7dd5f47d82580$export$105027425199cc51) +}); +let $05b01887df96c4ee$var$WidthDeltaRecord = new $52ZIf$Struct({ + justClass: $52ZIf$uint32, + beforeGrowLimit: $52ZIf$fixed32, + beforeShrinkLimit: $52ZIf$fixed32, + afterGrowLimit: $52ZIf$fixed32, + afterShrinkLimit: $52ZIf$fixed32, + growFlags: $52ZIf$uint16, + shrinkFlags: $52ZIf$uint16 +}); +let $05b01887df96c4ee$var$WidthDeltaCluster = new $52ZIf$Array($05b01887df96c4ee$var$WidthDeltaRecord, $52ZIf$uint32); +let $05b01887df96c4ee$var$ActionData = new $52ZIf$VersionedStruct('actionType', { + 0: { + lowerLimit: $52ZIf$fixed32, + upperLimit: $52ZIf$fixed32, + order: $52ZIf$uint16, + glyphs: new $52ZIf$Array($52ZIf$uint16, $52ZIf$uint16) + }, + 1: { + addGlyph: $52ZIf$uint16 + }, + 2: { + substThreshold: $52ZIf$fixed32, + addGlyph: $52ZIf$uint16, + substGlyph: $52ZIf$uint16 + }, + 3: {}, + 4: { + variationAxis: $52ZIf$uint32, + minimumLimit: $52ZIf$fixed32, + noStretchValue: $52ZIf$fixed32, + maximumLimit: $52ZIf$fixed32 + }, + 5: { + flags: $52ZIf$uint16, + glyph: $52ZIf$uint16 + } +}); +let $05b01887df96c4ee$var$Action = new $52ZIf$Struct({ + actionClass: $52ZIf$uint16, + actionType: $52ZIf$uint16, + actionLength: $52ZIf$uint32, + actionData: $05b01887df96c4ee$var$ActionData, + padding: new $52ZIf$Reserved($52ZIf$uint8, (t)=>t.actionLength - t._currentOffset) +}); +let $05b01887df96c4ee$var$PostcompensationAction = new $52ZIf$Array($05b01887df96c4ee$var$Action, $52ZIf$uint32); +let $05b01887df96c4ee$var$PostCompensationTable = new $52ZIf$Struct({ + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)(new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$PostcompensationAction)) +}); +let $05b01887df96c4ee$var$JustificationTable = new $52ZIf$Struct({ + classTable: new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$ClassTable, { + type: 'parent' + }), + wdcOffset: $52ZIf$uint16, + postCompensationTable: new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$PostCompensationTable, { + type: 'parent' + }), + widthDeltaClusters: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)(new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$WidthDeltaCluster, { + type: 'parent', + relativeTo: (ctx)=>ctx.wdcOffset + })) +}); +var $05b01887df96c4ee$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint32, + format: $52ZIf$uint16, + horizontal: new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$JustificationTable), + vertical: new $52ZIf$Pointer($52ZIf$uint16, $05b01887df96c4ee$var$JustificationTable) +}); + + + + +let $03ee6ebd54db1053$var$LigatureData = { + action: $52ZIf$uint16 +}; +let $03ee6ebd54db1053$var$ContextualData = { + markIndex: $52ZIf$uint16, + currentIndex: $52ZIf$uint16 +}; +let $03ee6ebd54db1053$var$InsertionData = { + currentInsertIndex: $52ZIf$uint16, + markedInsertIndex: $52ZIf$uint16 +}; +let $03ee6ebd54db1053$var$SubstitutionTable = new $52ZIf$Struct({ + items: new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)(new $52ZIf$Pointer($52ZIf$uint32, new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c))) +}); +let $03ee6ebd54db1053$var$SubtableData = new $52ZIf$VersionedStruct('type', { + 0: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba) + }, + 1: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$ContextualData), + substitutionTable: new $52ZIf$Pointer($52ZIf$uint32, $03ee6ebd54db1053$var$SubstitutionTable) + }, + 2: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$LigatureData), + ligatureActions: new $52ZIf$Pointer($52ZIf$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($52ZIf$uint32)), + components: new $52ZIf$Pointer($52ZIf$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($52ZIf$uint16)), + ligatureList: new $52ZIf$Pointer($52ZIf$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($52ZIf$uint16)) + }, + 4: { + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c) + }, + 5: { + stateTable: new (0, $6cb7dd5f47d82580$export$79f7d93d790934ba)($03ee6ebd54db1053$var$InsertionData), + insertionActions: new $52ZIf$Pointer($52ZIf$uint32, new (0, $6cb7dd5f47d82580$export$c5af1eebc882e39a)($52ZIf$uint16)) + } +}); +let $03ee6ebd54db1053$var$Subtable = new $52ZIf$Struct({ + length: $52ZIf$uint32, + coverage: $52ZIf$uint24, + type: $52ZIf$uint8, + subFeatureFlags: $52ZIf$uint32, + table: $03ee6ebd54db1053$var$SubtableData, + padding: new $52ZIf$Reserved($52ZIf$uint8, (t)=>t.length - t._currentOffset) +}); +let $03ee6ebd54db1053$var$FeatureEntry = new $52ZIf$Struct({ + featureType: $52ZIf$uint16, + featureSetting: $52ZIf$uint16, + enableFlags: $52ZIf$uint32, + disableFlags: $52ZIf$uint32 +}); +let $03ee6ebd54db1053$var$MorxChain = new $52ZIf$Struct({ + defaultFlags: $52ZIf$uint32, + chainLength: $52ZIf$uint32, + nFeatureEntries: $52ZIf$uint32, + nSubtables: $52ZIf$uint32, + features: new $52ZIf$Array($03ee6ebd54db1053$var$FeatureEntry, 'nFeatureEntries'), + subtables: new $52ZIf$Array($03ee6ebd54db1053$var$Subtable, 'nSubtables') +}); +var $03ee6ebd54db1053$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$uint16, + unused: new $52ZIf$Reserved($52ZIf$uint16), + nChains: $52ZIf$uint32, + chains: new $52ZIf$Array($03ee6ebd54db1053$var$MorxChain, 'nChains') +}); + + + + +let $b7492a80b0d1a056$var$OpticalBounds = new $52ZIf$Struct({ + left: $52ZIf$int16, + top: $52ZIf$int16, + right: $52ZIf$int16, + bottom: $52ZIf$int16 +}); +var $b7492a80b0d1a056$export$2e2bcd8739ae039 = new $52ZIf$Struct({ + version: $52ZIf$fixed32, + format: $52ZIf$uint16, + lookupTable: new (0, $6cb7dd5f47d82580$export$8351f8c2ae2f103c)($b7492a80b0d1a056$var$OpticalBounds) +}); + + +let $c3395722bea751e2$var$tables = {}; +var $c3395722bea751e2$export$2e2bcd8739ae039 = $c3395722bea751e2$var$tables; +$c3395722bea751e2$var$tables.cmap = (0, $26a62205ad06574e$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.head = (0, $f2612a29f92ac062$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hhea = (0, $2c179dd593583073$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hmtx = (0, $bdc9060542264b85$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.maxp = (0, $dbf51cb3d3fe409d$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.name = (0, $2bcf221753ec8e32$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['OS/2'] = (0, $84b272aa31b70606$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.post = (0, $32d9e2eb9565d93c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.fpgm = (0, $5c0f37ca5ffb1850$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.loca = (0, $2b2b260902b1c57e$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.prep = (0, $7afb878c7bea4f66$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['cvt '] = (0, $5202bd9d9ad8eaac$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.glyf = (0, $6c92b6371bce8bd9$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['CFF '] = (0, $822ac0d589e4e237$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables['CFF2'] = (0, $822ac0d589e4e237$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.VORG = (0, $2bbf2bc1ce37cd8f$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.EBLC = (0, $9911c4c7201c13de$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.CBLC = $c3395722bea751e2$var$tables.EBLC; +$c3395722bea751e2$var$tables.sbix = (0, $abb847051efd51b1$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.COLR = (0, $eb629188f3dfefdd$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.CPAL = (0, $08734b8e7dc64587$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.BASE = (0, $497cef411d884e34$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GDEF = (0, $cf5f33c63ef209e6$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GPOS = (0, $47e0e8ef515d9903$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.GSUB = (0, $d3f442064af66e06$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.JSTF = (0, $71cfb3c4767fbd0c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.HVAR = (0, $d059a6bd2d3b5b63$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.DSIG = (0, $dceeca3e1977ce30$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.gasp = (0, $8acd740a9435aad0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.hdmx = (0, $b5f380243c34d6a0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.kern = (0, $ca2df1256966e313$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.LTSH = (0, $7a9f92b0c46ebe33$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.PCLT = (0, $2b2ccc419d152631$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.VDMX = (0, $ca5b40b9bcda9c9b$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.vhea = (0, $69530a3c40755af0$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.vmtx = (0, $344073dd270f0e62$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.avar = (0, $3793b781918cfced$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.bsln = (0, $6a3746e8c708f5a3$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.feat = (0, $d0c76fac617b308a$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.fvar = (0, $e83fd065f00fcd01$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.gvar = (0, $dbe33c8d3a7f131c$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.just = (0, $05b01887df96c4ee$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.morx = (0, $03ee6ebd54db1053$export$2e2bcd8739ae039); +$c3395722bea751e2$var$tables.opbd = (0, $b7492a80b0d1a056$export$2e2bcd8739ae039); + + +let $816c07a04b6dba87$var$TableEntry = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + checkSum: $52ZIf$uint32, + offset: new $52ZIf$Pointer($52ZIf$uint32, 'void', { + type: 'global' + }), + length: $52ZIf$uint32 +}); +let $816c07a04b6dba87$var$Directory = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + numTables: $52ZIf$uint16, + searchRange: $52ZIf$uint16, + entrySelector: $52ZIf$uint16, + rangeShift: $52ZIf$uint16, + tables: new $52ZIf$Array($816c07a04b6dba87$var$TableEntry, 'numTables') +}); +$816c07a04b6dba87$var$Directory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +$816c07a04b6dba87$var$Directory.preEncode = function() { + if (!Array.isArray(this.tables)) { + let tables = []; + for(let tag in this.tables){ + let table = this.tables[tag]; + if (table) tables.push({ + tag: tag, + checkSum: 0, + offset: new $52ZIf$VoidPointer((0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag], table), + length: (0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag].size(table) + }); + } + this.tables = tables; + } + this.tag = 'true'; + this.numTables = this.tables.length; + let maxExponentFor2 = Math.floor(Math.log(this.numTables) / Math.LN2); + let maxPowerOf2 = Math.pow(2, maxExponentFor2); + this.searchRange = maxPowerOf2 * 16; + this.entrySelector = Math.log(maxPowerOf2) / Math.LN2; + this.rangeShift = this.numTables * 16 - this.searchRange; +}; +var $816c07a04b6dba87$export$2e2bcd8739ae039 = $816c07a04b6dba87$var$Directory; + + + + +function $12727730ddfc8bfe$export$2e0ae67339d5f1ac(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while(min <= max){ + let mid = min + max >> 1; + let res = cmp(arr[mid]); + if (res < 0) max = mid - 1; + else if (res > 0) min = mid + 1; + else return mid; + } + return -1; +} +function $12727730ddfc8bfe$export$d02631cccf789723(index, end) { + let range = []; + while(index < end)range.push(index++); + return range; +} +const $12727730ddfc8bfe$export$3d28c1996ced1f14 = new TextDecoder('ascii'); +// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license. +const $12727730ddfc8bfe$var$CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const $12727730ddfc8bfe$var$LOOKUP = new Uint8Array(256); +for(let i = 0; i < $12727730ddfc8bfe$var$CHARS.length; i++)$12727730ddfc8bfe$var$LOOKUP[$12727730ddfc8bfe$var$CHARS.charCodeAt(i)] = i; +function $12727730ddfc8bfe$export$94fdf11bafc8de6b(base64) { + let bufferLength = base64.length * 0.75; + if (base64[base64.length - 1] === '=') { + bufferLength--; + if (base64[base64.length - 2] === '=') bufferLength--; + } + let bytes = new Uint8Array(bufferLength); + let p = 0; + for(let i = 0, len = base64.length; i < len; i += 4){ + let encoded1 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i)]; + let encoded2 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 1)]; + let encoded3 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 2)]; + let encoded4 = $12727730ddfc8bfe$var$LOOKUP[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4; + bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; + bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return bytes; +} + + + + +class $f08dd41ef10b694c$export$2e2bcd8739ae039 { + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs)for (let cmap of cmapTable.tables){ + if (cmap.platformID === platformID && cmap.encodingID === encodingID) return cmap.table; + } + return null; + } + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) codepoint = this.encoding.get(codepoint) || codepoint; + else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) return gid; + } + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return cmap.codeMap.get(codepoint) || 0; + case 4: + { + let min = 0; + let max = cmap.segCount - 1; + while(min <= max){ + let mid = min + max >> 1; + if (codepoint < cmap.startCode.get(mid)) max = mid - 1; + else if (codepoint > cmap.endCode.get(mid)) min = mid + 1; + else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + if (rangeOffset === 0) gid = codepoint + cmap.idDelta.get(mid); + else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) gid += cmap.idDelta.get(mid); + } + return gid & 0xffff; + } + } + return 0; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + case 12: + case 13: + { + let min = 0; + let max = cmap.nGroups - 1; + while(min <= max){ + let mid = min + max >> 1; + let group = cmap.groups.get(mid); + if (codepoint < group.startCharCode) max = mid - 1; + else if (codepoint > group.endCharCode) min = mid + 1; + else { + if (cmap.version === 12) return group.glyphID + (codepoint - group.startCharCode); + else return group.glyphID; + } + } + return 0; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) return 0; + let selectors = this.uvs.varSelectors.toArray(); + let i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(selectors, (x)=>variationSelector - x.varSelector); + let sel = selectors[i]; + if (i !== -1 && sel.defaultUVS) i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(sel.defaultUVS, (x)=>codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? 1 : 0); + if (i !== -1 && sel.nonDefaultUVS) { + i = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(sel.nonDefaultUVS, (x)=>codepoint - x.unicodeValue); + if (i !== -1) return sel.nonDefaultUVS[i].glyphID; + } + return 0; + } + getCharacterSet() { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + return (0, $12727730ddfc8bfe$export$d02631cccf789723)(0, cmap.codeMap.length); + case 4: + { + let res = []; + let endCodes = cmap.endCode.toArray(); + for(let i = 0; i < endCodes.length; i++){ + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(start, tail)); + } + return res; + } + case 8: + throw new Error('TODO: cmap format 8'); + case 6: + case 10: + return (0, $12727730ddfc8bfe$export$d02631cccf789723)(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + case 12: + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + case 14: + throw new Error('TODO: cmap format 14'); + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch(cmap.version){ + case 0: + { + let res = []; + for(let i = 0; i < 256; i++)if (cmap.codeMap.get(i) === gid) res.push(i); + return res; + } + case 4: + { + let res = []; + for(let i = 0; i < cmap.segCount; i++){ + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + for(var c = start; c <= end; c++){ + let g = 0; + if (rangeOffset === 0) g = c + delta; + else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) g += delta; + } + if (g === gid) res.push(c); + } + } + return res; + } + case 12: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) res.push(group.startCharCode + (gid - group.glyphID)); + return res; + } + case 13: + { + let res = []; + for (let group of cmap.groups.toArray())if (gid === group.glyphID) res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(group.startCharCode, group.endCharCode + 1)); + return res; + } + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + constructor(cmapTable){ + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [ + 3, + 10 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + // 16-bit subtables + [ + 3, + 1 + ], + [ + 0, + 3 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ]); + // If not unicode cmap was found, take the first table with a supported encoding. + if (!this.cmap) for (let cmap of cmapTable.tables){ + let encoding = (0, $e449ad78d50845fe$export$badc544e0651b6b1)(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + let mapping = (0, $e449ad78d50845fe$export$1dceb3c14ed68bee)(encoding); + if (mapping) { + this.cmap = cmap.table; + this.encoding = mapping; + } + } + if (!this.cmap) throw new Error("Could not find a supported cmap table"); + this.uvs = this.findSubtable(cmapTable, [ + [ + 0, + 5 + ] + ]); + if (this.uvs && this.uvs.version !== 14) this.uvs = null; + } +} +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f08dd41ef10b694c$export$2e2bcd8739ae039.prototype, "getCharacterSet", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f08dd41ef10b694c$export$2e2bcd8739ae039.prototype, "codePointsForGlyph", null); + + + +class $0bba3a9db57637f3$export$2e2bcd8739ae039 { + process(glyphs, positions) { + for(let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++){ + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + getKerning(left, right) { + let res = 0; + for (let table of this.kern.tables){ + if (table.coverage.crossStream) continue; + switch(table.version){ + case 0: + if (!table.coverage.horizontal) continue; + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) continue; + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + let val = 0; + let s = table.subtable; + switch(table.format){ + case 0: + let pairIdx = (0, $12727730ddfc8bfe$export$2e0ae67339d5f1ac)(s.pairs, function(pair) { + return left - pair.left || right - pair.right; + }); + if (pairIdx >= 0) val = s.pairs[pairIdx].value; + break; + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + else leftOffset = s.array.off; + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) return 0; + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) res = val; + else res += val; + } + return res; + } + constructor(font){ + this.kern = font.kern; + } +} + + + +class $0a4bdfeb6dfd6f5e$export$2e2bcd8739ae039 { + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for(let index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.isMark) clusterEnd = index; + else { + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + clusterStart = clusterEnd = index; + } + } + if (clusterStart !== clusterEnd) this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + return positions; + } + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) // LTR. TODO: RTL support. + baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length; + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + // position each of the mark glyphs relative to the base glyph + for(let index = clusterStart + 1; index <= clusterEnd; index++){ + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + // x positioning + switch(combiningClass){ + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + default: + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + // y positioning + switch(combiningClass){ + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') baseBox.minY += yGap; + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') baseBox.maxY += yGap; + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + return; + } + getCombiningClass(codePoint) { + let combiningClass = (0, $52ZIf$getCombiningClass)(codePoint); + // Thai / Lao need some per-character work + if ((codePoint & -256) === 0x0e00) { + if (combiningClass === 'Not_Reordered') switch(codePoint){ + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + case 0x0ebc: + return 'Below'; + } + else if (codePoint === 0x0e3a) return 'Below_Right'; + } + switch(combiningClass){ + // Hebrew + case 'CCC10': + case 'CCC11': + case 'CCC12': + case 'CCC13': + case 'CCC14': + case 'CCC15': + case 'CCC16': + case 'CCC17': + case 'CCC18': + case 'CCC20': + case 'CCC22': + return 'Below'; + case 'CCC23': + return 'Attached_Above'; + case 'CCC24': + return 'Above_Right'; + case 'CCC25': + case 'CCC19': + return 'Above_Left'; + case 'CCC26': + return 'Above'; + case 'CCC21': + break; + // Arabic and Syriac + case 'CCC27': + case 'CCC28': + case 'CCC30': + case 'CCC31': + case 'CCC33': + case 'CCC34': + case 'CCC35': + case 'CCC36': + return 'Above'; + case 'CCC29': + case 'CCC32': + return 'Below'; + // Thai + case 'CCC103': + return 'Below_Right'; + case 'CCC107': + return 'Above_Right'; + // Lao + case 'CCC118': + return 'Below'; + case 'CCC122': + return 'Above'; + // Tibetan + case 'CCC129': + case 'CCC132': + return 'Below'; + case 'CCC130': + return 'Above'; + } + return combiningClass; + } + constructor(font){ + this.font = font; + } +} + + +/** + * Represents a glyph bounding box + */ class $f34600ab9d7f70d8$export$2e2bcd8739ae039 { + /** + * The width of the bounding box + * @type {number} + */ get width() { + return this.maxX - this.minX; + } + /** + * The height of the bounding box + * @type {number} + */ get height() { + return this.maxY - this.minY; + } + addPoint(x, y) { + if (Math.abs(x) !== Infinity) { + if (x < this.minX) this.minX = x; + if (x > this.maxX) this.maxX = x; + } + if (Math.abs(y) !== Infinity) { + if (y < this.minY) this.minY = y; + if (y > this.maxY) this.maxY = y; + } + } + copy() { + return new $f34600ab9d7f70d8$export$2e2bcd8739ae039(this.minX, this.minY, this.maxX, this.maxY); + } + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity){ + /** + * The minimum X position in the bounding box + * @type {number} + */ this.minX = minX; + /** + * The minimum Y position in the bounding box + * @type {number} + */ this.minY = minY; + /** + * The maxmimum X position in the bounding box + * @type {number} + */ this.maxX = maxX; + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ this.maxY = maxY; + } +} + + + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const $130d1a642ebcd2b7$var$UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: [ + 'bng2', + 'beng' + ], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: [ + 'dev2', + 'deva' + ], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: [ + 'gjr2', + 'gujr' + ], + Gurmukhi: [ + 'gur2', + 'guru' + ], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: [ + 'knd2', + 'knda' + ], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: [ + 'mlm2', + 'mlym' + ], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: [ + 'mym2', + 'mymr' + ], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: [ + 'ory2', + 'orya' + ], + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: [ + 'tml2', + 'taml' + ], + Tai_Viet: 'tavt', + Telugu: [ + 'tel2', + 'telu' + ], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; +const $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS = {}; +for(let script in $130d1a642ebcd2b7$var$UNICODE_SCRIPTS){ + let tag = $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + if (Array.isArray(tag)) for (let t of tag)$130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[t] = script; + else $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[tag] = script; +} +function $130d1a642ebcd2b7$export$b32f0b5f69d65e51(script) { + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; +} +function $130d1a642ebcd2b7$export$ce50e82f12a827a4(tag) { + return $130d1a642ebcd2b7$var$OPENTYPE_SCRIPTS[tag]; +} +function $130d1a642ebcd2b7$export$e5cb25e204fb8450(string) { + let len = string.length; + let idx = 0; + while(idx < len){ + let code = string.charCodeAt(idx++); + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + let script = (0, $52ZIf$getScript)(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + } + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS.Unknown; +} +function $130d1a642ebcd2b7$export$16fab0757cfc223d(codePoints) { + for(let i = 0; i < codePoints.length; i++){ + let codePoint = codePoints[i]; + let script = (0, $52ZIf$getScript)(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS[script]; + } + return $130d1a642ebcd2b7$var$UNICODE_SCRIPTS.Unknown; +} +// The scripts in this map are written from right to left +const $130d1a642ebcd2b7$var$RTL = { + arab: true, + hebr: true, + syrc: true, + thaa: true, + cprt: true, + khar: true, + phnx: true, + 'nko ': true, + lydi: true, + avst: true, + armi: true, + phli: true, + prti: true, + sarb: true, + orkh: true, + samr: true, + mand: true, + merc: true, + mero: true, + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, + mend: true, + nbat: true, + narb: true, + palm: true, + phlp: true // Psalter Pahlavi +}; +function $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script) { + if ($130d1a642ebcd2b7$var$RTL[script]) return 'rtl'; + return 'ltr'; +} + + +class $be07b3e97a42687a$export$2e2bcd8739ae039 { + /** + * The total advance width of the run. + * @type {number} + */ get advanceWidth() { + let width = 0; + for (let position of this.positions)width += position.xAdvance; + return width; + } + /** + * The total advance height of the run. + * @type {number} + */ get advanceHeight() { + let height = 0; + for (let position of this.positions)height += position.yAdvance; + return height; + } + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ get bbox() { + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + let x = 0; + let y = 0; + for(let index = 0; index < this.glyphs.length; index++){ + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + x += p.xAdvance; + y += p.yAdvance; + } + return bbox; + } + constructor(glyphs, features, script, language, direction){ + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ this.glyphs = glyphs; + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ this.positions = null; + /** + * The script that was requested for shaping. This was either passed in or detected automatically. + * @type {string} + */ this.script = script; + /** + * The language requested for shaping, as passed in. If `null`, the default language for the + * script was used. + * @type {string} + */ this.language = language || null; + /** + * The direction requested for shaping, as passed in (either ltr or rtl). + * If `null`, the default direction of the script is used. + * @type {string} + */ this.direction = direction || $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script); + /** + * The features requested during shaping. This is a combination of user + * specified features and features chosen by the shaper. + * @type {object} + */ this.features = {}; + // Convert features to an object + if (Array.isArray(features)) for (let tag of features)this.features[tag] = true; + else if (typeof features === 'object') this.features = features; + } +} + + +/** + * Represents positioning information for a glyph in a GlyphRun. + */ class $1ac75d9a55b67f01$export$2e2bcd8739ae039 { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0){ + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ this.xAdvance = xAdvance; + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ this.yAdvance = yAdvance; + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ this.xOffset = xOffset; + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ this.yOffset = yOffset; + } +} + + + +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const $3b6302b64eccc32c$var$features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; +const $3b6302b64eccc32c$var$feature = (name, selector)=>[ + $3b6302b64eccc32c$var$features[name].code, + $3b6302b64eccc32c$var$features[name][selector] + ]; +const $3b6302b64eccc32c$var$OTMapping = { + rlig: $3b6302b64eccc32c$var$feature('ligatures', 'requiredLigatures'), + clig: $3b6302b64eccc32c$var$feature('ligatures', 'contextualLigatures'), + dlig: $3b6302b64eccc32c$var$feature('ligatures', 'rareLigatures'), + hlig: $3b6302b64eccc32c$var$feature('ligatures', 'historicalLigatures'), + liga: $3b6302b64eccc32c$var$feature('ligatures', 'commonLigatures'), + hist: $3b6302b64eccc32c$var$feature('ligatures', 'historicalLigatures'), + smcp: $3b6302b64eccc32c$var$feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: $3b6302b64eccc32c$var$feature('lowerCase', 'lowerCasePetiteCaps'), + frac: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + dnom: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + numr: $3b6302b64eccc32c$var$feature('fractions', 'diagonalFractions'), + afrc: $3b6302b64eccc32c$var$feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + case: $3b6302b64eccc32c$var$feature('caseSensitiveLayout', 'caseSensitiveLayout'), + ccmp: $3b6302b64eccc32c$var$feature('unicodeDecomposition', 'canonicalComposition'), + cpct: $3b6302b64eccc32c$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + valt: $3b6302b64eccc32c$var$feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: $3b6302b64eccc32c$var$feature('contextualAlternates', 'swashAlternates'), + cswh: $3b6302b64eccc32c$var$feature('contextualAlternates', 'contextualSwashAlternates'), + curs: $3b6302b64eccc32c$var$feature('cursiveConnection', 'cursive'), + c2pc: $3b6302b64eccc32c$var$feature('upperCase', 'upperCasePetiteCaps'), + c2sc: $3b6302b64eccc32c$var$feature('upperCase', 'upperCaseSmallCaps'), + init: $3b6302b64eccc32c$var$feature('smartSwash', 'wordInitialSwashes'), + fin2: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + medi: $3b6302b64eccc32c$var$feature('smartSwash', 'nonFinalSwashes'), + med2: $3b6302b64eccc32c$var$feature('smartSwash', 'nonFinalSwashes'), + fin3: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + fina: $3b6302b64eccc32c$var$feature('smartSwash', 'wordFinalSwashes'), + pkna: $3b6302b64eccc32c$var$feature('kanaSpacing', 'proportionalKana'), + half: $3b6302b64eccc32c$var$feature('textSpacing', 'halfWidthText'), + halt: $3b6302b64eccc32c$var$feature('textSpacing', 'altHalfWidthText'), + hkna: $3b6302b64eccc32c$var$feature('alternateKana', 'alternateHorizKana'), + vkna: $3b6302b64eccc32c$var$feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + ital: $3b6302b64eccc32c$var$feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: $3b6302b64eccc32c$var$feature('numberCase', 'upperCaseNumbers'), + onum: $3b6302b64eccc32c$var$feature('numberCase', 'lowerCaseNumbers'), + mgrk: $3b6302b64eccc32c$var$feature('mathematicalExtras', 'mathematicalGreek'), + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + calt: $3b6302b64eccc32c$var$feature('contextualAlternates', 'contextualAlternates'), + vrt2: $3b6302b64eccc32c$var$feature('verticalSubstitution', 'substituteVerticalForms'), + vert: $3b6302b64eccc32c$var$feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: $3b6302b64eccc32c$var$feature('numberSpacing', 'monospacedNumbers'), + pnum: $3b6302b64eccc32c$var$feature('numberSpacing', 'proportionalNumbers'), + sups: $3b6302b64eccc32c$var$feature('verticalPosition', 'superiors'), + subs: $3b6302b64eccc32c$var$feature('verticalPosition', 'inferiors'), + ordn: $3b6302b64eccc32c$var$feature('verticalPosition', 'ordinals'), + pwid: $3b6302b64eccc32c$var$feature('textSpacing', 'proportionalText'), + hwid: $3b6302b64eccc32c$var$feature('textSpacing', 'halfWidthText'), + qwid: $3b6302b64eccc32c$var$feature('textSpacing', 'quarterWidthText'), + twid: $3b6302b64eccc32c$var$feature('textSpacing', 'thirdWidthText'), + fwid: $3b6302b64eccc32c$var$feature('textSpacing', 'proportionalText'), + palt: $3b6302b64eccc32c$var$feature('textSpacing', 'altProportionalText'), + trad: $3b6302b64eccc32c$var$feature('characterShape', 'traditionalCharacters'), + smpl: $3b6302b64eccc32c$var$feature('characterShape', 'simplifiedCharacters'), + jp78: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1978Characters'), + jp83: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1983Characters'), + jp90: $3b6302b64eccc32c$var$feature('characterShape', 'JIS1990Characters'), + jp04: $3b6302b64eccc32c$var$feature('characterShape', 'JIS2004Characters'), + expt: $3b6302b64eccc32c$var$feature('characterShape', 'expertCharacters'), + hojo: $3b6302b64eccc32c$var$feature('characterShape', 'hojoCharacters'), + nlck: $3b6302b64eccc32c$var$feature('characterShape', 'NLCCharacters'), + tnam: $3b6302b64eccc32c$var$feature('characterShape', 'traditionalNamesCharacters'), + ruby: $3b6302b64eccc32c$var$feature('rubyKana', 'rubyKana'), + titl: $3b6302b64eccc32c$var$feature('styleOptions', 'titlingCaps'), + zero: $3b6302b64eccc32c$var$feature('typographicExtras', 'slashedZero'), + ss01: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: $3b6302b64eccc32c$var$feature('stylisticAlternatives', 'stylisticAltTwenty') +}; +// salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose +// Add cv01-cv99 features +for(let i = 1; i <= 99; i++)$3b6302b64eccc32c$var$OTMapping[`cv${`00${i}`.slice(-2)}`] = [ + $3b6302b64eccc32c$var$features.characterAlternatives.code, + i +]; +// create inverse mapping +let $3b6302b64eccc32c$var$AATMapping = {}; +for(let ot in $3b6302b64eccc32c$var$OTMapping){ + let aat = $3b6302b64eccc32c$var$OTMapping[ot]; + if ($3b6302b64eccc32c$var$AATMapping[aat[0]] == null) $3b6302b64eccc32c$var$AATMapping[aat[0]] = {}; + $3b6302b64eccc32c$var$AATMapping[aat[0]][aat[1]] = ot; +} +function $3b6302b64eccc32c$export$b813f7d2a1677c16(features) { + let res = {}; + for(let k in features){ + let r; + if (r = $3b6302b64eccc32c$var$OTMapping[k]) { + if (res[r[0]] == null) res[r[0]] = {}; + res[r[0]][r[1]] = features[k]; + } + } + return res; +} +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function $3b6302b64eccc32c$var$mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) var typeCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type].code; + else var typeCode = type; + if (isNaN(setting)) var settingCode = $3b6302b64eccc32c$var$features[type] && $3b6302b64eccc32c$var$features[type][setting]; + else var settingCode = setting; + return [ + typeCode, + settingCode + ]; +} +function $3b6302b64eccc32c$export$bd6df347a4f391c4(features) { + let res = {}; + if (Array.isArray(features)) for(let k = 0; k < features.length; k++){ + let r; + let f = $3b6302b64eccc32c$var$mapFeatureStrings(features[k]); + if (r = $3b6302b64eccc32c$var$AATMapping[f[0]] && $3b6302b64eccc32c$var$AATMapping[f[0]][f[1]]) res[r] = true; + } + else if (typeof features === 'object') for(let type in features){ + let feature = features[type]; + for(let setting in feature){ + let r; + let f = $3b6302b64eccc32c$var$mapFeatureStrings([ + type, + setting + ]); + if (feature[setting] && (r = $3b6302b64eccc32c$var$AATMapping[f[0]] && $3b6302b64eccc32c$var$AATMapping[f[0]][f[1]])) res[r] = true; + } + } + return Object.keys(res); +} + + + + + + + +class $ff5ce077dae0f144$export$2e2bcd8739ae039 { + lookup(glyph) { + switch(this.table.version){ + case 0: + return this.table.values.getItem(glyph); + case 2: + case 4: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.firstGlyph === 0xffff) return null; + if (glyph < seg.firstGlyph) max = mid - 1; + else if (glyph > seg.lastGlyph) min = mid + 1; + else { + if (this.table.version === 2) return seg.value; + else return seg.values[glyph - seg.firstGlyph]; + } + } + return null; + } + case 6: + { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + while(min <= max){ + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + // special end of search value + if (seg.glyph === 0xffff) return null; + if (glyph < seg.glyph) max = mid - 1; + else if (glyph > seg.glyph) min = mid + 1; + else return seg.value; + } + return null; + } + case 8: + return this.table.values[glyph - this.table.firstGlyph]; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + glyphsForValue(classValue) { + let res = []; + switch(this.table.version){ + case 2: + case 4: + for (let segment of this.table.segments)if (this.table.version === 2 && segment.value === classValue) res.push(...(0, $12727730ddfc8bfe$export$d02631cccf789723)(segment.firstGlyph, segment.lastGlyph + 1)); + else { + for(let index = 0; index < segment.values.length; index++)if (segment.values[index] === classValue) res.push(segment.firstGlyph + index); + } + break; + case 6: + for (let segment of this.table.segments)if (segment.value === classValue) res.push(segment.glyph); + break; + case 8: + for(let i = 0; i < this.table.values.length; i++)if (this.table.values[i] === classValue) res.push(this.table.firstGlyph + i); + break; + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + return res; + } + constructor(table){ + this.table = table; + } +} +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $ff5ce077dae0f144$export$2e2bcd8739ae039.prototype, "glyphsForValue", null); + + +const $50c7aac9316f2948$var$START_OF_TEXT_STATE = 0; +const $50c7aac9316f2948$var$START_OF_LINE_STATE = 1; +const $50c7aac9316f2948$var$END_OF_TEXT_CLASS = 0; +const $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS = 1; +const $50c7aac9316f2948$var$DELETED_GLYPH_CLASS = 2; +const $50c7aac9316f2948$var$END_OF_LINE_CLASS = 3; +const $50c7aac9316f2948$var$DONT_ADVANCE = 0x4000; +class $50c7aac9316f2948$export$2e2bcd8739ae039 { + process(glyphs, reverse, processEntry) { + let currentState = $50c7aac9316f2948$var$START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + while(dir === 1 && index <= glyphs.length || dir === -1 && index >= -1){ + let glyph = null; + let classCode = $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + if (index === glyphs.length || index === -1) classCode = $50c7aac9316f2948$var$END_OF_TEXT_CLASS; + else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) classCode = $50c7aac9316f2948$var$DELETED_GLYPH_CLASS; + else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) classCode = $50c7aac9316f2948$var$OUT_OF_BOUNDS_CLASS; + } + } + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + if (classCode !== $50c7aac9316f2948$var$END_OF_TEXT_CLASS && classCode !== $50c7aac9316f2948$var$DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & $50c7aac9316f2948$var$DONT_ADVANCE); + } + currentState = entry.newState; + if (shouldAdvance) index += dir; + } + return glyphs; + } + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) return; + visited.add(state); + let { nClasses: nClasses, stateArray: stateArray, entryTable: entryTable } = this.stateTable; + let row = stateArray.getItem(state); + // Skip predefined classes + for(let classCode = 4; classCode < nClasses; classCode++){ + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)){ + if (opts.enter) opts.enter(glyph, entry); + if (entry.newState !== 0) this.traverse(opts, entry.newState, visited); + if (opts.exit) opts.exit(glyph, entry); + } + } + } + constructor(stateTable){ + this.stateTable = stateTable; + this.lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(stateTable.classTable); + } +} + + + + +// indic replacement flags +const $55f71433a605c87d$var$MARK_FIRST = 0x8000; +const $55f71433a605c87d$var$MARK_LAST = 0x2000; +const $55f71433a605c87d$var$VERB = 0x000F; +// contextual substitution and glyph insertion flag +const $55f71433a605c87d$var$SET_MARK = 0x8000; +// ligature entry flags +const $55f71433a605c87d$var$SET_COMPONENT = 0x8000; +const $55f71433a605c87d$var$PERFORM_ACTION = 0x2000; +// ligature action masks +const $55f71433a605c87d$var$LAST_MASK = 0x80000000; +const $55f71433a605c87d$var$STORE_MASK = 0x40000000; +const $55f71433a605c87d$var$OFFSET_MASK = 0x3FFFFFFF; +const $55f71433a605c87d$var$VERTICAL_ONLY = 0x800000; +const $55f71433a605c87d$var$REVERSE_DIRECTION = 0x400000; +const $55f71433a605c87d$var$HORIZONTAL_AND_VERTICAL = 0x200000; +// glyph insertion flags +const $55f71433a605c87d$var$CURRENT_IS_KASHIDA_LIKE = 0x2000; +const $55f71433a605c87d$var$MARKED_IS_KASHIDA_LIKE = 0x1000; +const $55f71433a605c87d$var$CURRENT_INSERT_BEFORE = 0x0800; +const $55f71433a605c87d$var$MARKED_INSERT_BEFORE = 0x0400; +const $55f71433a605c87d$var$CURRENT_INSERT_COUNT = 0x03E0; +const $55f71433a605c87d$var$MARKED_INSERT_COUNT = 0x001F; +class $55f71433a605c87d$export$2e2bcd8739ae039 { + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:boolean}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + // enable/disable the requested features + for (let feature of chain.features){ + let f; + if (f = features[feature.featureType]) { + if (f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } else if (f[feature.featureSetting] === false) { + flags |= ~feature.disableFlags; + flags &= ~feature.enableFlags; + } + } + } + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.processSubtable(subtable, glyphs); + } + // remove deleted glyphs + let index = glyphs.length - 1; + while(index >= 0){ + if (glyphs[index].id === 0xffff) glyphs.splice(index, 1); + index--; + } + return glyphs; + } + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let reverse = !!(this.subtable.coverage & $55f71433a605c87d$var$REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + getStateMachine(subtable) { + return new (0, $50c7aac9316f2948$export$2e2bcd8739ae039)(subtable.table.stateTable); + } + getProcessor() { + switch(this.subtable.type){ + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + processIndicRearragement(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$MARK_FIRST) this.firstGlyph = index; + if (entry.flags & $55f71433a605c87d$var$MARK_LAST) this.lastGlyph = index; + $55f71433a605c87d$var$reorderGlyphs(this.glyphs, entry.flags & $55f71433a605c87d$var$VERB, this.firstGlyph, this.lastGlyph); + } + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + if (entry.flags & $55f71433a605c87d$var$SET_MARK) this.markedGlyph = index; + } + processLigature(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$SET_COMPONENT) this.ligatureStack.push(index); + if (entry.flags & $55f71433a605c87d$var$PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + while(!last){ + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + let action = actions.getItem(actionIndex++); + last = !!(action & $55f71433a605c87d$var$LAST_MASK); + let store = !!(action & $55f71433a605c87d$var$STORE_MASK); + let offset = (action & $55f71433a605c87d$var$OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + let component = components.getItem(offset); + ligatureIndex += component; + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new (0, $ff5ce077dae0f144$export$2e2bcd8739ae039)(subtable.table.lookupTable); + for(index = 0; index < glyphs.length; index++){ + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while(count--){ + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + if (!isBefore) glyphIndex++; + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & $55f71433a605c87d$var$SET_MARK) this.markedIndex = index; + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & $55f71433a605c87d$var$MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $55f71433a605c87d$var$MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & $55f71433a605c87d$var$CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & $55f71433a605c87d$var$CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains)for (let feature of chain.features)features.push([ + feature.featureType, + feature.featureSetting + ]); + return features; + } + generateInputs(gid) { + if (!this.inputCache) this.generateInputCache(); + return this.inputCache[gid] || []; + } + generateInputCache() { + this.inputCache = {}; + for (let chain of this.morx.chains){ + let flags = chain.defaultFlags; + for (let subtable of chain.subtables)if (subtable.subFeatureFlags & flags) this.generateInputsForSubtable(subtable); + } + } + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) return; + let reverse = !!(subtable.coverage & $55f71433a605c87d$var$REVERSE_DIRECTION); + if (reverse) throw new Error('Reverse subtable, not supported.'); + this.subtable = subtable; + this.ligatureStack = []; + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + let input = []; + let stack = []; + this.glyphs = []; + stateMachine.traverse({ + enter: (glyph, entry)=>{ + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for(let i = 0; i < glyphs.length && count <= 1; i++)if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + if (count === 1) { + let result = input.map((g)=>g.id); + let cache = this.inputCache[found]; + if (cache) cache.push(result); + else this.inputCache[found] = [ + result + ]; + } + }, + exit: ()=>{ + ({ glyphs: this.glyphs, ligatureStack: this.ligatureStack } = stack.pop()); + input.pop(); + } + }); + } + constructor(font){ + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } +} +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $55f71433a605c87d$export$2e2bcd8739ae039.prototype, "getStateMachine", null); +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function $55f71433a605c87d$var$swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) end.reverse(); + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) start.reverse(); + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} +function $55f71433a605c87d$var$reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch(verb){ + case 0: + return glyphs; + case 1: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 0 + ]); + case 2: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 1 + ]); + case 3: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 1 + ]); + case 4: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ]); + case 5: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 0 + ], true, false); + case 6: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ]); + case 7: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 0 + ], [ + lastGlyph, + 2 + ], false, true); + case 8: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ]); + case 9: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 1 + ], [ + lastGlyph, + 2 + ], false, true); + case 10: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ]); + case 11: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 1 + ], true, false); + case 12: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ]); + case 13: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, false); + case 14: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], false, true); + case 15: + return $55f71433a605c87d$var$swap(glyphs, [ + firstGlyph, + 2 + ], [ + lastGlyph, + 2 + ], true, true); + default: + throw new Error(`Unknown verb: ${verb}`); + } +} + + +class $ba6dd74203be8728$export$2e2bcd8739ae039 { + substitute(glyphRun) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + if (glyphRun.direction === 'rtl') glyphRun.glyphs.reverse(); + this.morxProcessor.process(glyphRun.glyphs, $3b6302b64eccc32c$export$b813f7d2a1677c16(glyphRun.features)); + } + getAvailableFeatures(script, language) { + return $3b6302b64eccc32c$export$bd6df347a4f391c4(this.morxProcessor.getSupportedFeatures()); + } + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + for (let glyphs of glyphStrings)this._addStrings(glyphs, 0, result, ''); + return result; + } + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + for (let codePoint of codePoints){ + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) this._addStrings(glyphs, index + 1, strings, s); + else strings.add(s); + } + } + constructor(font){ + this.font = font; + this.morxProcessor = new (0, $55f71433a605c87d$export$2e2bcd8739ae039)(font); + this.fallbackPosition = false; + } +} + + + +class $94d7a73bd2edfc9a$export$2e2bcd8739ae039 { + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ _addFeatures(features, global) { + let stageIndex = this.stages.length - 1; + let stage = this.stages[stageIndex]; + for (let feature of features)if (this.allFeatures[feature] == null) { + stage.push(feature); + this.allFeatures[feature] = stageIndex; + if (global) this.globalFeatures[feature] = true; + } + } + /** + * Add features to the last stage + */ add(arg, global = true) { + if (this.stages.length === 0) this.stages.push([]); + if (typeof arg === 'string') arg = [ + arg + ]; + if (Array.isArray(arg)) this._addFeatures(arg, global); + else if (typeof arg === 'object') { + this._addFeatures(arg.global || [], true); + this._addFeatures(arg.local || [], false); + } else throw new Error("Unsupported argument to ShapingPlan#add"); + } + /** + * Add a new stage + */ addStage(arg, global) { + if (typeof arg === 'function') this.stages.push(arg, []); + else { + this.stages.push([]); + this.add(arg, global); + } + } + setFeatureOverrides(features) { + if (Array.isArray(features)) this.add(features); + else if (typeof features === 'object') for(let tag in features){ + if (features[tag]) this.add(tag); + else if (this.allFeatures[tag] != null) { + let stage = this.stages[this.allFeatures[tag]]; + stage.splice(stage.indexOf(tag), 1); + delete this.allFeatures[tag]; + delete this.globalFeatures[tag]; + } + } + } + /** + * Assigns the global features to the given glyphs + */ assignGlobalFeatures(glyphs) { + for (let glyph of glyphs)for(let feature in this.globalFeatures)glyph.features[feature] = true; + } + /** + * Executes the planned stages using the given OTProcessor + */ process(processor, glyphs, positions) { + for (let stage of this.stages){ + if (typeof stage === 'function') { + if (!positions) stage(this.font, glyphs, this); + } else if (stage.length > 0) processor.applyFeatures(stage, glyphs, positions); + } + } + constructor(font, script, direction){ + this.font = font; + this.script = script; + this.direction = direction; + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } +} + + + + +const $649970d87335b30f$var$VARIATION_FEATURES = [ + 'rvrn' +]; +const $649970d87335b30f$var$COMMON_FEATURES = [ + 'ccmp', + 'locl', + 'rlig', + 'mark', + 'mkmk' +]; +const $649970d87335b30f$var$FRACTIONAL_FEATURES = [ + 'frac', + 'numr', + 'dnom' +]; +const $649970d87335b30f$var$HORIZONTAL_FEATURES = [ + 'calt', + 'clig', + 'liga', + 'rclt', + 'curs', + 'kern' +]; +const $649970d87335b30f$var$VERTICAL_FEATURES = [ + 'vert' +]; +const $649970d87335b30f$var$DIRECTIONAL_FEATURES = { + ltr: [ + 'ltra', + 'ltrm' + ], + rtl: [ + 'rtla', + 'rtlm' + ] +}; +class $649970d87335b30f$export$2e2bcd8739ae039 { + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + static planPreprocessing(plan) { + plan.add({ + global: [ + ...$649970d87335b30f$var$VARIATION_FEATURES, + ...$649970d87335b30f$var$DIRECTIONAL_FEATURES[plan.direction] + ], + local: $649970d87335b30f$var$FRACTIONAL_FEATURES + }); + } + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + static planPostprocessing(plan, userFeatures) { + plan.add([ + ...$649970d87335b30f$var$COMMON_FEATURES, + ...$649970d87335b30f$var$HORIZONTAL_FEATURES + ]); + plan.setFeatureOverrides(userFeatures); + } + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + for(let i = 0; i < glyphs.length; i++){ + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { + let start = i; + let end = i + 1; + // Apply numerator + while(start > 0 && (0, $52ZIf$isDigit)(glyphs[start - 1].codePoints[0])){ + glyphs[start - 1].features.numr = true; + glyphs[start - 1].features.frac = true; + start--; + } + // Apply denominator + while(end < glyphs.length && (0, $52ZIf$isDigit)(glyphs[end].codePoints[0])){ + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } + } + } +} +(0, $52ZIf$_)($649970d87335b30f$export$2e2bcd8739ae039, "zeroMarkWidths", 'AFTER_GPOS'); + + + + + + +const $764eb544bbe1ccf0$var$trie = new (0, $52ZIf$unicodetrie)((0, $12727730ddfc8bfe$export$94fdf11bafc8de6b)("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==")); +const $764eb544bbe1ccf0$var$FEATURES = [ + 'isol', + 'fina', + 'fin2', + 'fin3', + 'medi', + 'med2', + 'init' +]; +const $764eb544bbe1ccf0$var$ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; +const $764eb544bbe1ccf0$var$ISOL = 'isol'; +const $764eb544bbe1ccf0$var$FINA = 'fina'; +const $764eb544bbe1ccf0$var$FIN2 = 'fin2'; +const $764eb544bbe1ccf0$var$FIN3 = 'fin3'; +const $764eb544bbe1ccf0$var$MEDI = 'medi'; +const $764eb544bbe1ccf0$var$MED2 = 'med2'; +const $764eb544bbe1ccf0$var$INIT = 'init'; +const $764eb544bbe1ccf0$var$NONE = null; +// Each entry is [prevAction, curAction, nextState] +const $764eb544bbe1ccf0$var$STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 2: prev was D/L in ISOL form, willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 1 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 3 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 4 + ], + [ + $764eb544bbe1ccf0$var$INIT, + $764eb544bbe1ccf0$var$FINA, + 6 + ] + ], + // State 3: prev was D in FINA form, willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 1 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 3 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 4 + ], + [ + $764eb544bbe1ccf0$var$MEDI, + $764eb544bbe1ccf0$var$FINA, + 6 + ] + ], + // State 4: prev was FINA ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$MED2, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$FIN2, + 5 + ], + [ + $764eb544bbe1ccf0$var$ISOL, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ], + // State 6: prev was DALATH/RISH, not willing to join. + [ + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$NONE, + 0 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 1 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 2 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$FIN3, + 5 + ], + [ + $764eb544bbe1ccf0$var$NONE, + $764eb544bbe1ccf0$var$ISOL, + 6 + ] + ] +]; +class $764eb544bbe1ccf0$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ccmp', + 'locl' + ]); + for(let i = 0; i < $764eb544bbe1ccf0$var$FEATURES.length; i++){ + let feature = $764eb544bbe1ccf0$var$FEATURES[i]; + plan.addStage(feature, false); + } + plan.addStage('mset'); + } + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + let prev = -1; + let state = 0; + let actions = []; + // Apply the state machine to map glyphs to features + for(let i = 0; i < glyphs.length; i++){ + let curAction, prevAction; + var glyph = glyphs[i]; + let type = $764eb544bbe1ccf0$var$getShapingClass(glyph.codePoints[0]); + if (type === $764eb544bbe1ccf0$var$ShapingClasses.Transparent) { + actions[i] = $764eb544bbe1ccf0$var$NONE; + continue; + } + [prevAction, curAction, state] = $764eb544bbe1ccf0$var$STATE_TABLE[state][type]; + if (prevAction !== $764eb544bbe1ccf0$var$NONE && prev !== -1) actions[prev] = prevAction; + actions[i] = curAction; + prev = i; + } + // Apply the chosen features to their respective glyphs + for(let index = 0; index < glyphs.length; index++){ + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) glyph.features[feature] = true; + } + } +} +function $764eb544bbe1ccf0$var$getShapingClass(codePoint) { + let res = $764eb544bbe1ccf0$var$trie.get(codePoint); + if (res) return res - 1; + let category = (0, $52ZIf$getCategory)(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') return $764eb544bbe1ccf0$var$ShapingClasses.Transparent; + return $764eb544bbe1ccf0$var$ShapingClasses.Non_Joining; +} + + + + + +class $85d408632270248b$export$2e2bcd8739ae039 { + reset(options = {}, index = 0) { + this.options = options; + this.flags = options.flags || {}; + this.markAttachmentType = options.markAttachmentType || 0; + this.index = index; + } + get cur() { + return this.glyphs[this.index] || null; + } + shouldIgnore(glyph) { + return this.flags.ignoreMarks && glyph.isMark || this.flags.ignoreBaseGlyphs && glyph.isBase || this.flags.ignoreLigatures && glyph.isLigature || this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType; + } + move(dir) { + this.index += dir; + while(0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index]))this.index += dir; + if (0 > this.index || this.index >= this.glyphs.length) return null; + return this.glyphs[this.index]; + } + next() { + return this.move(1); + } + prev() { + return this.move(-1); + } + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while(count--)this.move(dir); + return this.glyphs[this.index]; + } + constructor(glyphs, options){ + this.glyphs = glyphs; + this.reset(options); + } +} + + + +const $a83b9c36aaa94fd3$var$DEFAULT_SCRIPTS = [ + 'DFLT', + 'dflt', + 'latn' +]; +class $a83b9c36aaa94fd3$export$2e2bcd8739ae039 { + findScript(script) { + if (this.table.scriptList == null) return null; + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script)for (let entry of this.table.scriptList){ + if (entry.tag === s) return entry; + } + return null; + } + selectScript(script, language, direction) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (!entry) entry = this.findScript($a83b9c36aaa94fd3$var$DEFAULT_SCRIPTS); + if (!entry) return this.scriptTag; + this.scriptTag = entry.tag; + this.script = entry.script; + this.language = null; + this.languageTag = null; + changed = true; + } + if (!direction || direction !== this.direction) this.direction = direction || $130d1a642ebcd2b7$export$9fddb9d0dd7d8a54(script); + if (language && language.length < 4) language += ' '.repeat(4 - language.length); + if (!language || language !== this.languageTag) { + this.language = null; + for (let lang of this.script.langSysRecords)if (lang.tag === language) { + this.language = lang.langSys; + this.languageTag = lang.tag; + break; + } + if (!this.language) { + this.language = this.script.defaultLangSys; + this.languageTag = null; + } + changed = true; + } + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) for (let featureIndex of this.language.featureIndexes){ + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + return this.scriptTag; + } + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures){ + let feature = this.features[tag]; + if (!feature) continue; + for (let lookupIndex of feature.lookupListIndexes){ + if (exclude && exclude.indexOf(lookupIndex) !== -1) continue; + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + lookups.sort((a, b)=>a.index - b.index); + return lookups; + } + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) return null; + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions){ + if (substitution.featureIndex === featureIndex) return substitution.alternateFeatureTable; + } + return null; + } + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) return -1; + let records = variations.featureVariationRecords; + for(let i = 0; i < records.length; i++){ + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) return i; + } + return -1; + } + variationConditionsMatch(conditions, coords) { + return conditions.every((condition)=>{ + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new (0, $85d408632270248b$export$2e2bcd8739ae039)(glyphs); + for (let { feature: feature, lookup: lookup } of lookups){ + this.currentFeature = feature; + this.glyphIterator.reset(lookup.flags); + while(this.glyphIterator.index < glyphs.length){ + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + for (let table of lookup.subTables){ + let res = this.applyLookup(lookup.lookupType, table); + if (res) break; + } + this.glyphIterator.next(); + } + } + } + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + applyLookupList(lookupRecords) { + let options = this.glyphIterator.options; + let glyphIndex = this.glyphIterator.index; + for (let lookupRecord of lookupRecords){ + // Reset flags and find glyph index for this lookup record + this.glyphIterator.reset(options, glyphIndex); + this.glyphIterator.increment(lookupRecord.sequenceIndex); + // Get the lookup and setup flags for subtables + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); + // Apply lookup subtables until one matches + for (let table of lookup.subTables){ + if (this.applyLookup(lookup.lookupType, table)) break; + } + } + this.glyphIterator.reset(options, glyphIndex); + return true; + } + coverageIndex(coverage, glyph) { + if (glyph == null) glyph = this.glyphIterator.cur.id; + switch(coverage.version){ + case 1: + return coverage.glyphs.indexOf(glyph); + case 2: + for (let range of coverage.rangeRecords){ + if (range.start <= glyph && glyph <= range.end) return range.startCoverageIndex + glyph - range.start; + } + break; + } + return -1; + } + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + while(idx < sequence.length && glyph && fn(sequence[idx], glyph)){ + if (matched) matched.push(this.glyphIterator.index); + idx++; + glyph = this.glyphIterator.next(); + } + this.glyphIterator.index = pos; + if (idx < sequence.length) return false; + return matched || true; + } + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>component === glyph.id); + } + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph)=>{ + // If the current feature doesn't apply to this glyph, + if (!(this.currentFeature in glyph.features)) return false; + return component === glyph.id; + }, []); + } + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph)=>this.coverageIndex(coverage, glyph.id) >= 0); + } + getClassID(glyph, classDef) { + switch(classDef.version){ + case 1: + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) return classDef.classValueArray[i]; + break; + case 2: + for (let range of classDef.classRangeRecord){ + if (range.start <= glyph && glyph <= range.end) return range.class; + } + break; + } + return 0; + } + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph)=>classID === this.getClassID(glyph.id, classDef)); + } + applyContext(table) { + let index, set; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + set = table.ruleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(1, rule.input)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) return false; + set = table.classSet[index]; + for (let rule of set){ + if (this.classSequenceMatches(1, rule.classes, table.classDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + applyChainingContext(table) { + let index; + switch(table.version){ + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let set = table.chainRuleSets[index]; + for (let rule of set){ + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 2: + if (this.coverageIndex(table.coverage) === -1) return false; + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) return false; + for (let rule of rules){ + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, rule.input, table.inputClassDef) && this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) return this.applyLookupList(rule.lookupRecords); + } + break; + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) return this.applyLookupList(table.lookupRecords); + break; + } + return false; + } + constructor(font, table){ + this.font = font; + this.table = table; + this.script = null; + this.scriptTag = null; + this.language = null; + this.languageTag = null; + this.features = {}; + this.lookups = {}; + // Setup variation substitutions + this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; + // initialize to default script + language + this.selectScript(); + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + this.currentFeature = null; + } +} + + +class $10e7b257e1a9a756$export$2e2bcd8739ae039 { + get id() { + return this._id; + } + set id(id) { + this._id = id; + this.substituted = true; + let GDEF = this._font.GDEF; + if (GDEF && GDEF.glyphClassDef) { + // TODO: clean this up + let classID = (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.glyphClassDef); + this.isBase = classID === 1; + this.isLigature = classID === 2; + this.isMark = classID === 3; + this.markAttachmentType = GDEF.markAttachClassDef ? (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039).prototype.getClassID(id, GDEF.markAttachClassDef) : 0; + } else { + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $52ZIf$isMark)); + this.isBase = !this.isMark; + this.isLigature = this.codePoints.length > 1; + this.markAttachmentType = 0; + } + } + copy() { + return new $10e7b257e1a9a756$export$2e2bcd8739ae039(this._font, this.id, this.codePoints, this.features); + } + constructor(font, id, codePoints = [], features){ + this._font = font; + this.codePoints = codePoints; + this.id = id; + this.features = {}; + if (Array.isArray(features)) for(let i = 0; i < features.length; i++){ + let feature = features[i]; + this.features[feature] = true; + } + else if (typeof features === 'object') Object.assign(this.features, features); + this.ligatureID = null; + this.ligatureComponent = null; + this.isLigated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + this.isMultiplied = false; + } +} + + +class $e1c6bbc8cb416f8c$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.add([ + 'ljmo', + 'vjmo', + 'tjmo' + ], false); + } + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while(i < glyphs.length){ + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = $e1c6bbc8cb416f8c$var$getType(code); + [action, state] = $e1c6bbc8cb416f8c$var$STATE_TABLE[state][type]; + switch(action){ + case $e1c6bbc8cb416f8c$var$DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) i = $e1c6bbc8cb416f8c$var$decompose(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = $e1c6bbc8cb416f8c$var$compose(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + $e1c6bbc8cb416f8c$var$reorderToneMark(glyphs, i, plan.font); + break; + case $e1c6bbc8cb416f8c$var$INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = $e1c6bbc8cb416f8c$var$insertDottedCircle(glyphs, i, plan.font); + break; + } + i++; + } + } +} +(0, $52ZIf$_)($e1c6bbc8cb416f8c$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +const $e1c6bbc8cb416f8c$var$HANGUL_BASE = 0xac00; +const $e1c6bbc8cb416f8c$var$HANGUL_END = 0xd7a4; +const $e1c6bbc8cb416f8c$var$HANGUL_COUNT = $e1c6bbc8cb416f8c$var$HANGUL_END - $e1c6bbc8cb416f8c$var$HANGUL_BASE + 1; +const $e1c6bbc8cb416f8c$var$L_BASE = 0x1100; // lead +const $e1c6bbc8cb416f8c$var$V_BASE = 0x1161; // vowel +const $e1c6bbc8cb416f8c$var$T_BASE = 0x11a7; // trail +const $e1c6bbc8cb416f8c$var$L_COUNT = 19; +const $e1c6bbc8cb416f8c$var$V_COUNT = 21; +const $e1c6bbc8cb416f8c$var$T_COUNT = 28; +const $e1c6bbc8cb416f8c$var$L_END = $e1c6bbc8cb416f8c$var$L_BASE + $e1c6bbc8cb416f8c$var$L_COUNT - 1; +const $e1c6bbc8cb416f8c$var$V_END = $e1c6bbc8cb416f8c$var$V_BASE + $e1c6bbc8cb416f8c$var$V_COUNT - 1; +const $e1c6bbc8cb416f8c$var$T_END = $e1c6bbc8cb416f8c$var$T_BASE + $e1c6bbc8cb416f8c$var$T_COUNT - 1; +const $e1c6bbc8cb416f8c$var$DOTTED_CIRCLE = 0x25cc; +const $e1c6bbc8cb416f8c$var$isL = (code)=>0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const $e1c6bbc8cb416f8c$var$isV = (code)=>0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const $e1c6bbc8cb416f8c$var$isT = (code)=>0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const $e1c6bbc8cb416f8c$var$isTone = (code)=>0x302e <= code && code <= 0x302f; +const $e1c6bbc8cb416f8c$var$isLVT = (code)=>$e1c6bbc8cb416f8c$var$HANGUL_BASE <= code && code <= $e1c6bbc8cb416f8c$var$HANGUL_END; +const $e1c6bbc8cb416f8c$var$isLV = (code)=>code - $e1c6bbc8cb416f8c$var$HANGUL_BASE < $e1c6bbc8cb416f8c$var$HANGUL_COUNT && (code - $e1c6bbc8cb416f8c$var$HANGUL_BASE) % $e1c6bbc8cb416f8c$var$T_COUNT === 0; +const $e1c6bbc8cb416f8c$var$isCombiningL = (code)=>$e1c6bbc8cb416f8c$var$L_BASE <= code && code <= $e1c6bbc8cb416f8c$var$L_END; +const $e1c6bbc8cb416f8c$var$isCombiningV = (code)=>$e1c6bbc8cb416f8c$var$V_BASE <= code && code <= $e1c6bbc8cb416f8c$var$V_END; +const $e1c6bbc8cb416f8c$var$isCombiningT = (code)=>$e1c6bbc8cb416f8c$var$T_BASE + 1 && 1 <= code && code <= $e1c6bbc8cb416f8c$var$T_END; +// Character categories +const $e1c6bbc8cb416f8c$var$X = 0; // Other character +const $e1c6bbc8cb416f8c$var$L = 1; // Leading consonant +const $e1c6bbc8cb416f8c$var$V = 2; // Medial vowel +const $e1c6bbc8cb416f8c$var$T = 3; // Trailing consonant +const $e1c6bbc8cb416f8c$var$LV = 4; // Composed syllable +const $e1c6bbc8cb416f8c$var$LVT = 5; // Composed syllable +const $e1c6bbc8cb416f8c$var$M = 6; // Tone mark +// This function classifies a character using the above categories. +function $e1c6bbc8cb416f8c$var$getType(code) { + if ($e1c6bbc8cb416f8c$var$isL(code)) return $e1c6bbc8cb416f8c$var$L; + if ($e1c6bbc8cb416f8c$var$isV(code)) return $e1c6bbc8cb416f8c$var$V; + if ($e1c6bbc8cb416f8c$var$isT(code)) return $e1c6bbc8cb416f8c$var$T; + if ($e1c6bbc8cb416f8c$var$isLV(code)) return $e1c6bbc8cb416f8c$var$LV; + if ($e1c6bbc8cb416f8c$var$isLVT(code)) return $e1c6bbc8cb416f8c$var$LVT; + if ($e1c6bbc8cb416f8c$var$isTone(code)) return $e1c6bbc8cb416f8c$var$M; + return $e1c6bbc8cb416f8c$var$X; +} +// State machine actions +const $e1c6bbc8cb416f8c$var$NO_ACTION = 0; +const $e1c6bbc8cb416f8c$var$DECOMPOSE = 1; +const $e1c6bbc8cb416f8c$var$COMPOSE = 2; +const $e1c6bbc8cb416f8c$var$TONE_MARK = 4; +const $e1c6bbc8cb416f8c$var$INVALID = 5; +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const $e1c6bbc8cb416f8c$var$STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$INVALID, + 0 + ] + ], + // State 1: + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$COMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$INVALID, + 0 + ] + ], + // State 2: or + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$COMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$TONE_MARK, + 0 + ] + ], + // State 3: or + [ + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 1 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$NO_ACTION, + 0 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 2 + ], + [ + $e1c6bbc8cb416f8c$var$DECOMPOSE, + 3 + ], + [ + $e1c6bbc8cb416f8c$var$TONE_MARK, + 0 + ] + ] +]; +function $e1c6bbc8cb416f8c$var$getGlyph(font, code, features) { + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, font.glyphForCodePoint(code).id, [ + code + ], features); +} +function $e1c6bbc8cb416f8c$var$decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let s = code - $e1c6bbc8cb416f8c$var$HANGUL_BASE; + let t = $e1c6bbc8cb416f8c$var$T_BASE + s % $e1c6bbc8cb416f8c$var$T_COUNT; + s = s / $e1c6bbc8cb416f8c$var$T_COUNT | 0; + let l = $e1c6bbc8cb416f8c$var$L_BASE + s / $e1c6bbc8cb416f8c$var$V_COUNT | 0; + let v = $e1c6bbc8cb416f8c$var$V_BASE + s % $e1c6bbc8cb416f8c$var$V_COUNT; + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== $e1c6bbc8cb416f8c$var$T_BASE && !font.hasGlyphForCodePoint(t)) return i; + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = $e1c6bbc8cb416f8c$var$getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + let vjmo = $e1c6bbc8cb416f8c$var$getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + let insert = [ + ljmo, + vjmo + ]; + if (t > $e1c6bbc8cb416f8c$var$T_BASE) { + let tjmo = $e1c6bbc8cb416f8c$var$getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} +function $e1c6bbc8cb416f8c$var$compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = $e1c6bbc8cb416f8c$var$getType(code); + let prev = glyphs[i - 1].codePoints[0]; + let prevType = $e1c6bbc8cb416f8c$var$getType(prev); + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === $e1c6bbc8cb416f8c$var$LV && type === $e1c6bbc8cb416f8c$var$T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === $e1c6bbc8cb416f8c$var$V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + // Make sure L and V are combining characters + if ($e1c6bbc8cb416f8c$var$isCombiningL(l) && $e1c6bbc8cb416f8c$var$isCombiningV(v)) lv = $e1c6bbc8cb416f8c$var$HANGUL_BASE + ((l - $e1c6bbc8cb416f8c$var$L_BASE) * $e1c6bbc8cb416f8c$var$V_COUNT + (v - $e1c6bbc8cb416f8c$var$V_BASE)) * $e1c6bbc8cb416f8c$var$T_COUNT; + } + let t = tjmo && tjmo.codePoints[0] || $e1c6bbc8cb416f8c$var$T_BASE; + if (lv != null && (t === $e1c6bbc8cb416f8c$var$T_BASE || $e1c6bbc8cb416f8c$var$isCombiningT(t))) { + let s = lv + (t - $e1c6bbc8cb416f8c$var$T_BASE); + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === $e1c6bbc8cb416f8c$var$V ? 3 : 2; + glyphs.splice(i - del + 1, del, $e1c6bbc8cb416f8c$var$getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) ljmo.features.ljmo = true; + if (vjmo) vjmo.features.vjmo = true; + if (tjmo) tjmo.features.tjmo = true; + if (prevType === $e1c6bbc8cb416f8c$var$LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + $e1c6bbc8cb416f8c$var$decompose(glyphs, i - 1, font); + return i + 1; + } + return i; +} +function $e1c6bbc8cb416f8c$var$getLength(code) { + switch($e1c6bbc8cb416f8c$var$getType(code)){ + case $e1c6bbc8cb416f8c$var$LV: + case $e1c6bbc8cb416f8c$var$LVT: + return 1; + case $e1c6bbc8cb416f8c$var$V: + return 2; + case $e1c6bbc8cb416f8c$var$T: + return 3; + } +} +function $e1c6bbc8cb416f8c$var$reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) return; + let prev = glyphs[i - 1].codePoints[0]; + let len = $e1c6bbc8cb416f8c$var$getLength(prev); + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} +function $e1c6bbc8cb416f8c$var$insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + if (font.hasGlyphForCodePoint($e1c6bbc8cb416f8c$var$DOTTED_CIRCLE)) { + let dottedCircle = $e1c6bbc8cb416f8c$var$getGlyph(font, $e1c6bbc8cb416f8c$var$DOTTED_CIRCLE, glyph.features); + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + return i; +} + + + + + + + + + +var $4b0735ca6c692ea5$exports = {}; +$4b0735ca6c692ea5$exports = JSON.parse("{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}"); + + +var $aa333a9607471296$exports = {}; +$aa333a9607471296$exports = JSON.parse("{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0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[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}"); + + +// Cateories used in the OpenType spec: +// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx +const $90a9d3398ee54fe5$export$a513ea61a7bee91c = { + X: 1, + C: 2, + V: 4, + N: 8, + H: 16, + ZWNJ: 32, + ZWJ: 64, + M: 128, + SM: 256, + VD: 512, + A: 1024, + Placeholder: 2048, + Dotted_Circle: 4096, + RS: 8192, + Coeng: 16384, + Repha: 32768, + Ra: 65536, + CM: 131072, + Symbol: 262144 // Avagraha, etc that take marks (SM,A,VD). +}; +const $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0 = { + Start: 1, + Ra_To_Become_Reph: 2, + Pre_M: 4, + Pre_C: 8, + Base_C: 16, + After_Main: 32, + Above_C: 64, + Before_Sub: 128, + Below_C: 256, + After_Sub: 512, + Before_Post: 1024, + Post_C: 2048, + After_Post: 4096, + Final_C: 8192, + SMVD: 16384, + End: 32768 +}; +const $90a9d3398ee54fe5$export$8519deaa7de2b07 = $90a9d3398ee54fe5$export$a513ea61a7bee91c.C | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Ra | $90a9d3398ee54fe5$export$a513ea61a7bee91c.CM | $90a9d3398ee54fe5$export$a513ea61a7bee91c.V | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Placeholder | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Dotted_Circle; +const $90a9d3398ee54fe5$export$bbcd928767338e0d = $90a9d3398ee54fe5$export$a513ea61a7bee91c.ZWJ | $90a9d3398ee54fe5$export$a513ea61a7bee91c.ZWNJ; +const $90a9d3398ee54fe5$export$ca9599b2a300afc = $90a9d3398ee54fe5$export$a513ea61a7bee91c.H | $90a9d3398ee54fe5$export$a513ea61a7bee91c.Coeng; +const $90a9d3398ee54fe5$export$e99d119da76a0fc5 = { + Default: { + hasOldSpec: false, + virama: 0, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Devanagari: { + hasOldSpec: true, + virama: 0x094D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Bengali: { + hasOldSpec: true, + virama: 0x09CD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gurmukhi: { + hasOldSpec: true, + virama: 0x0A4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Gujarati: { + hasOldSpec: true, + virama: 0x0ACD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Oriya: { + hasOldSpec: true, + virama: 0x0B4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Tamil: { + hasOldSpec: true, + virama: 0x0BCD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + Telugu: { + hasOldSpec: true, + virama: 0x0C4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Explicit', + blwfMode: 'Post_Only' + }, + Kannada: { + hasOldSpec: true, + virama: 0x0CCD, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Post, + rephMode: 'Implicit', + blwfMode: 'Post_Only' + }, + Malayalam: { + hasOldSpec: true, + virama: 0x0D4D, + basePos: 'Last', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.After_Main, + rephMode: 'Log_Repha', + blwfMode: 'Pre_And_Post' + }, + // Handled by UniversalShaper + // Sinhala: { + // hasOldSpec: false, + // virama: 0x0DCA, + // basePos: 'Last_Sinhala', + // rephPos: POSITIONS.After_Main, + // rephMode: 'Explicit', + // blwfMode: 'Pre_And_Post' + // }, + Khmer: { + hasOldSpec: false, + virama: 0x17D2, + basePos: 'First', + rephPos: $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0.Ra_To_Become_Reph, + rephMode: 'Vis_Repha', + blwfMode: 'Pre_And_Post' + } +}; +const $90a9d3398ee54fe5$export$f647c9cfdd77d95a = { + // Khmer + 0x17BE: [ + 0x17C1, + 0x17BE + ], + 0x17BF: [ + 0x17C1, + 0x17BF + ], + 0x17C0: [ + 0x17C1, + 0x17C0 + ], + 0x17C4: [ + 0x17C1, + 0x17C4 + ], + 0x17C5: [ + 0x17C1, + 0x17C5 + ] +}; + + + +const { decompositions: $7826f90f6f0cecc9$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$exports))); +const $7826f90f6f0cecc9$var$trie = new (0, $52ZIf$unicodetrie)((0, $12727730ddfc8bfe$export$94fdf11bafc8de6b)("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3n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ov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=")); +const $7826f90f6f0cecc9$var$stateMachine = new (0, $52ZIf$dfa)((0, (/*@__PURE__*/$parcel$interopDefault($4b0735ca6c692ea5$exports)))); +class $7826f90f6f0cecc9$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($7826f90f6f0cecc9$var$setupSyllables); + plan.addStage([ + 'locl', + 'ccmp' + ]); + plan.addStage($7826f90f6f0cecc9$var$initialReordering); + plan.addStage('nukt'); + plan.addStage('akhn'); + plan.addStage('rphf', false); + plan.addStage('rkrf'); + plan.addStage('pref', false); + plan.addStage('blwf', false); + plan.addStage('abvf', false); + plan.addStage('half', false); + plan.addStage('pstf', false); + plan.addStage('vatu'); + plan.addStage('cjct'); + plan.addStage('cfar', false); + plan.addStage($7826f90f6f0cecc9$var$finalReordering); + plan.addStage({ + local: [ + 'init' + ], + global: [ + 'pres', + 'abvs', + 'blws', + 'psts', + 'haln', + 'dist', + 'abvm', + 'blwm', + 'calt', + 'clig' + ] + }); + // Setup the indic config for the selected script + plan.unicodeScript = $130d1a642ebcd2b7$export$ce50e82f12a827a4(plan.script); + plan.indicConfig = (0, $90a9d3398ee54fe5$export$e99d119da76a0fc5)[plan.unicodeScript] || (0, $90a9d3398ee54fe5$export$e99d119da76a0fc5).Default; + plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; + // TODO: turn off kern (Khmer) and liga features. + } + static assignFeatures(plan, glyphs) { + // Decompose split matras + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + let d = (0, $90a9d3398ee54fe5$export$f647c9cfdd77d95a)[codepoint] || $7826f90f6f0cecc9$var$decompositions[codepoint]; + if (d) { + let decomposed = d.map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $52ZIf$_)($7826f90f6f0cecc9$export$2e2bcd8739ae039, "zeroMarkWidths", 'NONE'); +function $7826f90f6f0cecc9$var$indicCategory(glyph) { + return $7826f90f6f0cecc9$var$trie.get(glyph.codePoints[0]) >> 8; +} +function $7826f90f6f0cecc9$var$indicPosition(glyph) { + return 1 << ($7826f90f6f0cecc9$var$trie.get(glyph.codePoints[0]) & 0xff); +} +class $7826f90f6f0cecc9$var$IndicInfo { + constructor(category, position, syllableType, syllable){ + this.category = category; + this.position = position; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $7826f90f6f0cecc9$var$setupSyllables(font, glyphs) { + let syllable = 0; + let last = 0; + for (let [start, end, tags] of $7826f90f6f0cecc9$var$stateMachine.match(glyphs.map($7826f90f6f0cecc9$var$indicCategory))){ + if (start > last) { + ++syllable; + for(let i = last; i < start; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).X, (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(glyphs[i]), $7826f90f6f0cecc9$var$indicPosition(glyphs[i]), tags[0], syllable); + last = end + 1; + } + if (last < glyphs.length) { + ++syllable; + for(let i = last; i < glyphs.length; i++)glyphs[i].shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).X, (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).End, 'non_indic_cluster', syllable); + } +} +function $7826f90f6f0cecc9$var$isConsonant(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$8519deaa7de2b07); +} +function $7826f90f6f0cecc9$var$isJoiner(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$bbcd928767338e0d); +} +function $7826f90f6f0cecc9$var$isHalantOrCoeng(glyph) { + return glyph.shaperInfo.category & (0, $90a9d3398ee54fe5$export$ca9599b2a300afc); +} +function $7826f90f6f0cecc9$var$wouldSubstitute(glyphs, feature) { + for (let glyph of glyphs)glyph.features = { + [feature]: true + }; + let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor; + GSUB.applyFeatures([ + feature + ], glyphs); + return glyphs.length === 1; +} +function $7826f90f6f0cecc9$var$consonantPosition(font, consonant, virama) { + let glyphs = [ + virama, + consonant, + virama + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'blwf') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'blwf')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C; + else if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'pstf') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'pstf')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C; + else if ($7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(0, 2), 'pref') || $7826f90f6f0cecc9$var$wouldSubstitute(glyphs.slice(1, 3), 'pref')) return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C; + return (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; +} +function $7826f90f6f0cecc9$var$initialReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + let virama = font.glyphForCodePoint(indicConfig.virama).id; + if (virama) { + let info = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, virama, [ + indicConfig.virama + ]); + for(let i = 0; i < glyphs.length; i++)if (glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) glyphs[i].shaperInfo.position = $7826f90f6f0cecc9$var$consonantPosition(font, glyphs[i].copy(), info); + } + for(let start = 0, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, start)){ + let { category: category, syllableType: syllableType } = glyphs[start].shaperInfo; + if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') continue; + if (syllableType === 'broken_cluster' && dottedCircle) { + let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = new $7826f90f6f0cecc9$var$IndicInfo(1 << $7826f90f6f0cecc9$var$indicCategory(g), $7826f90f6f0cecc9$var$indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable); + // Insert after possible Repha. + let i = start; + while(i < end && glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha)i++; + glyphs.splice(i++, 0, g); + end++; + } + // 1. Find base consonant: + // + // The shaping engine finds the base consonant of the syllable, using the + // following algorithm: starting from the end of the syllable, move backwards + // until a consonant is found that does not have a below-base or post-base + // form (post-base forms have to follow below-base forms), or that is not a + // pre-base reordering Ra, or arrive at the first consonant. The consonant + // stopped at will be the base. + let base = end; + let limit = start; + let hasReph = false; + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + if (indicConfig.rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === 'Implicit' && !$7826f90f6f0cecc9$var$isJoiner(glyphs[start + 2]) || indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) { + // See if it matches the 'rphf' feature. + let g = [ + glyphs[start].copy(), + glyphs[start + 1].copy(), + glyphs[start + 2].copy() + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(g.slice(0, 2), 'rphf') || indicConfig.rephMode === 'Explicit' && $7826f90f6f0cecc9$var$wouldSubstitute(g, 'rphf')) { + limit += 2; + while(limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha) { + limit++; + while(limit < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[limit]))limit++; + base = start; + hasReph = true; + } + switch(indicConfig.basePos){ + case 'Last': + { + // starting from the end of the syllable, move backwards + let i = end; + let seenBelow = false; + do { + let info = glyphs[--i].shaperInfo; + // until a consonant is found + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) { + // that does not have a below-base or post-base form + // (post-base forms have to follow below-base forms), + if (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C && (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C || seenBelow)) { + base = i; + break; + } + // or that is not a pre-base reordering Ra, + // + // IMPLEMENTATION NOTES: + // + // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped + // by the logic above already. + // + // or arrive at the first consonant. The consonant stopped at will + // be the base. + if (info.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C) seenBelow = true; + base = i; + } else if (start < i && info.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ && glyphs[i - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) break; + }while (i > limit); + break; + } + case 'First': + // The first consonant is always the base. + base = start; + // Mark all subsequent consonants as below. + for(let i = base + 1; i < end; i++)if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) glyphs[i].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C; + } + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + // + // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ) + if (hasReph && base === start && limit - base <= 2) hasReph = false; + // 2. Decompose and reorder Matras: + // + // Each matra and any syllable modifier sign in the cluster are moved to the + // appropriate position relative to the consonant(s) in the cluster. The + // shaping engine decomposes two- or three-part matras into their constituent + // parts before any repositioning. Matra characters are classified by which + // consonant in a conjunct they have affinity for and are reordered to the + // following positions: + // + // o Before first half form in the syllable + // o After subjoined consonants + // o After post-form consonant + // o After main consonant (for above marks) + // + // IMPLEMENTATION NOTES: + // + // The normalize() routine has already decomposed matras for us, so we don't + // need to worry about that. + // 3. Reorder marks to canonical order: + // + // Adjacent nukta and halant or nukta and vedic sign are always repositioned + // if necessary, so that the nukta is first. + // + // IMPLEMENTATION NOTES: + // + // We don't need to do this: the normalize() routine already did this for us. + // Reorder characters + for(let i = start; i < base; i++){ + let info = glyphs[i].shaperInfo; + info.position = Math.min((0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_C, info.position); + } + if (base < end) glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; + // Mark final consonants. A final consonant is one appearing after a matra, + // like in Khmer. + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + for(let j = i + 1; j < end; j++)if ($7826f90f6f0cecc9$var$isConsonant(glyphs[j])) { + glyphs[j].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Final_C; + break; + } + break; + } + // Handle beginning Ra + if (hasReph) glyphs[start].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; + // For old-style Indic script tags, move the first post-base Halant after + // last consonant. + // + // Reports suggest that in some scripts Uniscribe does this only if there + // is *not* a Halant after last consonant already (eg. Kannada), while it + // does it unconditionally in other scripts (eg. Malayalam). We don't + // currently know about other scripts, so we single out Malayalam for now. + // + // Kannada test case: + // U+0C9A,U+0CCD,U+0C9A,U+0CCD + // With some versions of Lohit Kannada. + // https://bugs.freedesktop.org/show_bug.cgi?id=59118 + // + // Malayalam test case: + // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + // With lohit-ttf-20121122/Lohit-Malayalam.ttf + if (plan.isOldSpec) { + let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam'; + for(let i = base + 1; i < end; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) { + let j; + for(j = end - 1; j > i; j--){ + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[j]) || disallowDoubleHalants && glyphs[j].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H) break; + } + if (glyphs[j].shaperInfo.category !== (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && j > i) { + // Move Halant to after last consonant. + let t = glyphs[i]; + glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i)); + glyphs[j] = t; + } + break; + } + } + // Attach misc marks to previous char to move with them. + let lastPos = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Start; + for(let i = start; i < end; i++){ + let info = glyphs[i].shaperInfo; + if (info.category & ((0, $90a9d3398ee54fe5$export$bbcd928767338e0d) | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).N | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).RS | (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).CM | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc) & info.category)) { + info.position = lastPos; + if (info.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && info.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + // Uniscribe doesn't move the Halant with Left Matra. + // TEST: U+092B,U+093F,U+094DE + // We follow. This is important for the Sinhala + // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + // where U+0DD9 is a left matra and U+0DCA is the virama. + // We don't want to move the virama with the left matra. + // TEST: U+0D9A,U+0DDA + for(let j = i; j > start; j--)if (glyphs[j - 1].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + info.position = glyphs[j - 1].shaperInfo.position; + break; + } + } + } else if (info.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD) lastPos = info.position; + } + // For post-base consonants let them own anything before them + // since the last consonant or matra. + let last = base; + for(let i = base + 1; i < end; i++){ + if ($7826f90f6f0cecc9$var$isConsonant(glyphs[i])) { + for(let j = last + 1; j < i; j++)if (glyphs[j].shaperInfo.position < (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD) glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position; + last = i; + } else if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) last = i; + } + let arr = glyphs.slice(start, end); + arr.sort((a, b)=>a.shaperInfo.position - b.shaperInfo.position); + glyphs.splice(start, arr.length, ...arr); + // Find base again + for(let i = start; i < end; i++)if (glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) { + base = i; + break; + } + // Setup features now + // Reph + for(let i = start; i < end && glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph; i++)glyphs[i].features.rphf = true; + // Pre-base + let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post'; + for(let i = start; i < base; i++){ + glyphs[i].features.half = true; + if (blwf) glyphs[i].features.blwf = true; + } + // Post-base + for(let i = base + 1; i < end; i++){ + glyphs[i].features.abvf = true; + glyphs[i].features.pstf = true; + glyphs[i].features.blwf = true; + } + if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') { + // Old-spec eye-lash Ra needs special handling. From the + // spec: + // + // "The feature 'below-base form' is applied to consonants + // having below-base forms and following the base consonant. + // The exception is vattu, which may appear below half forms + // as well as below the base glyph. The feature 'below-base + // form' will be applied to all such occurrences of Ra as well." + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+0915 + // with Sanskrit 2003 font. + // + // However, note that Ra,Halant,ZWJ is the correct way to + // request eyelash form of Ra, so we wouldbn't inhibit it + // in that sequence. + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915 + for(let i = start; i + 1 < base; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Ra && glyphs[i + 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).H && (i + 1 === base || glyphs[i + 2].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ)) { + glyphs[i].features.blwf = true; + glyphs[i + 1].features.blwf = true; + } + } + let prefLen = 2; + if (features.pref && base + prefLen < end) // Find a Halant,Ra sequence and mark it for pre-base reordering processing. + for(let i = base + 1; i + prefLen - 1 < end; i++){ + let g = [ + glyphs[i].copy(), + glyphs[i + 1].copy() + ]; + if ($7826f90f6f0cecc9$var$wouldSubstitute(g, 'pref')) { + for(let j = 0; j < prefLen; j++)glyphs[i++].features.pref = true; + // Mark the subsequent stuff with 'cfar'. Used in Khmer. + // Read the feature spec. + // This allows distinguishing the following cases with MS Khmer fonts: + // U+1784,U+17D2,U+179A,U+17D2,U+1782 + // U+1784,U+17D2,U+1782,U+17D2,U+179A + if (features.cfar) for(; i < end; i++)glyphs[i].features.cfar = true; + break; + } + } + // Apply ZWJ/ZWNJ effects + for(let i = start + 1; i < end; i++)if ($7826f90f6f0cecc9$var$isJoiner(glyphs[i])) { + let nonJoiner = glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWNJ; + let j = i; + do { + j--; + // ZWJ/ZWNJ should disable CJCT. They do that by simply + // being there, since we don't skip them for the CJCT + // feature (ie. F_MANUAL_ZWJ) + // A ZWNJ disables HALF. + if (nonJoiner) delete glyphs[j].features.half; + }while (j > start && !$7826f90f6f0cecc9$var$isConsonant(glyphs[j])); + } + } +} +function $7826f90f6f0cecc9$var$finalReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + for(let start = 0, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7826f90f6f0cecc9$var$nextSyllable(glyphs, start)){ + // 4. Final reordering: + // + // After the localized forms and basic shaping forms GSUB features have been + // applied (see below), the shaping engine performs some final glyph + // reordering before applying all the remaining font features to the entire + // cluster. + let tryPref = !!features.pref; + // Find base again + let base = start; + for(; base < end; base++)if (glyphs[base].shaperInfo.position >= (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) { + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) { + // Ok, this was a 'pref' candidate but didn't form any. + // Base is around here... + base = i; + while(base < end && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[base]))base++; + glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).BASE_C; + tryPref = false; + } + break; + } + } + // For Malayalam, skip over unformed below- (but NOT post-) forms. + if (plan.unicodeScript === 'Malayalam') for(let i = base + 1; i < end; i++){ + while(i < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[i]))i++; + if (i === end || !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[i])) break; + i++; // Skip halant. + while(i < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[i]))i++; + if (i < end && $7826f90f6f0cecc9$var$isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Below_C) { + base = i; + glyphs[base].shaperInfo.position = (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C; + } + } + if (start < base && glyphs[base].shaperInfo.position > (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Base_C) base--; + break; + } + if (base === end && start < base && glyphs[base - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).ZWJ) base--; + if (base < end) while(start < base && glyphs[base].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).N | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc)))base--; + // o Reorder matras: + // + // If a pre-base matra character had been reordered before applying basic + // features, the glyph can be moved closer to the main consonant based on + // whether half-forms had been formed. Actual position for the matra is + // defined as “after last standalone halant glyph, after initial matra + // position and before the main consonant”. If ZWJ or ZWNJ follow this + // halant, position is moved after it. + // + if (start + 1 < end && start < base) { + // If we lost track of base, alas, position before last thingy. + let newPos = base === end ? base - 2 : base - 1; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc))))newPos--; + // If we found no Halant we are done. + // Otherwise only proceed if the Halant does + // not belong to the Matra itself! + if ($7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) // If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos + 1 < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[newPos + 1])) newPos++; + } else newPos = start; // No move. + } + if (start < newPos && glyphs[newPos].shaperInfo.position !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + // Now go see if there's actually any matras... + for(let i = newPos; i > start; i--)if (glyphs[i - 1].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M) { + let oldPos = i - 1; + if (oldPos < base && base <= newPos) base--; + let tmp = glyphs[oldPos]; + glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos)); + glyphs[newPos] = tmp; + newPos--; + } + } + } + // o Reorder reph: + // + // Reph’s original position is always at the beginning of the syllable, + // (i.e. it is not reordered at the character reordering stage). However, + // it will be reordered according to the basic-forms shaping results. + // Possible positions for reph, depending on the script, are; after main, + // before post-base consonant forms, and after post-base consonant forms. + // Two cases: + // + // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then + // we should only move it if the sequence ligated to the repha form. + // + // - If repha is encoded separately and in the logical position, we should only + // move it if it did NOT ligate. If it ligated, it's probably the font trying + // to make it work without the reordering. + if (start + 1 < end && glyphs[start].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Ra_To_Become_Reph && glyphs[start].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).Repha !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)) { + let newRephPos; + let rephPos = indicConfig.rephPos; + let found = false; + // 1. If reph should be positioned after post-base consonant forms, + // proceed to step 5. + if (rephPos !== (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Post) { + // 2. If the reph repositioning class is not after post-base: target + // position is after the first explicit halant glyph between the + // first post-reph consonant and last main consonant. If ZWJ or ZWNJ + // are following this halant, position is moved after it. If such + // position is found, this is the target position. Otherwise, + // proceed to the next step. + // + // Note: in old-implementation fonts, where classifications were + // fixed in shaping engine, there was no case where reph position + // will be found on this step. + newRephPos = start + 1; + while(newRephPos < base && !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $7826f90f6f0cecc9$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + // 3. If reph should be repositioned after the main consonant: find the + // first consonant not ligated with main, or find the first + // consonant that is not a potential pre-base reordering Ra. + if (!found && rephPos === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Main) { + newRephPos = base; + while(newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Main)newRephPos++; + found = newRephPos < end; + } + // 4. If reph should be positioned before post-base consonant, find + // first post-base classified consonant not ligated with main. If no + // consonant is found, the target position should be before the + // first matra, syllable modifier sign or vedic sign. + // + // This is our take on what step 4 is trying to say (and failing, BADLY). + if (!found && rephPos === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Sub) { + newRephPos = base; + while(newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & ((0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Post_C | (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).After_Post | (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD)))newRephPos++; + found = newRephPos < end; + } + } + // 5. If no consonant is found in steps 3 or 4, move reph to a position + // immediately before the first post-base matra, syllable modifier + // sign or vedic sign that has a reordering class after the intended + // reph position. For example, if the reordering position for reph + // is post-main, it will skip above-base matras that also have a + // post-main position. + if (!found) { + // Copied from step 2. + newRephPos = start + 1; + while(newRephPos < base && !$7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos]))newRephPos++; + if (newRephPos < base && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && $7826f90f6f0cecc9$var$isJoiner(glyphs[newRephPos + 1])) newRephPos++; + found = true; + } + } + // 6. Otherwise, reorder reph to the end of the syllable. + if (!found) { + newRephPos = end - 1; + while(newRephPos > start && glyphs[newRephPos].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).SMVD)newRephPos--; + // If the Reph is to be ending up after a Matra,Halant sequence, + // position it before that Halant so it can interact with the Matra. + // However, if it's a plain Consonant,Halant we shouldn't do that. + // Uniscribe doesn't do this. + // TEST: U+0930,U+094D,U+0915,U+094B,U+094D + if ($7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newRephPos])) { + for(let i = base + 1; i < newRephPos; i++)if (glyphs[i].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) newRephPos--; + } + } + let reph = glyphs[start]; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start)); + glyphs[newRephPos] = reph; + if (start < base && base <= newRephPos) base--; + } + // o Reorder pre-base reordering consonants: + // + // If a pre-base reordering consonant is found, reorder it according to + // the following rules: + if (tryPref && base + 1 < end) { + for(let i = base + 1; i < end; i++)if (glyphs[i].features.pref) { + // 1. Only reorder a glyph produced by substitution during application + // of the feature. (Note that a font may shape a Ra consonant with + // the feature generally but block it in certain contexts.) + // Note: We just check that something got substituted. We don't check that + // the feature actually did it... + // + // Reorder pref only if it ligated. + if (glyphs[i].isLigated && !glyphs[i].isMultiplied) { + // 2. Try to find a target position the same way as for pre-base matra. + // If it is found, reorder pre-base consonant glyph. + // + // 3. If position is not found, reorder immediately before main + // consonant. + let newPos = base; + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while(newPos > start && !(glyphs[newPos - 1].shaperInfo.category & ((0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M | (0, $90a9d3398ee54fe5$export$ca9599b2a300afc))))newPos--; + // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a + // split matra, it should be reordered to *before* the left part of such matra. + if (newPos > start && glyphs[newPos - 1].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + let oldPos = i; + for(let j = base + 1; j < oldPos; j++)if (glyphs[j].shaperInfo.category === (0, $90a9d3398ee54fe5$export$a513ea61a7bee91c).M) { + newPos--; + break; + } + } + } + if (newPos > start && $7826f90f6f0cecc9$var$isHalantOrCoeng(glyphs[newPos - 1])) // -> If ZWJ or ZWNJ follow this halant, position is moved after it. + { + if (newPos < end && $7826f90f6f0cecc9$var$isJoiner(glyphs[newPos])) newPos++; + } + let oldPos = i; + let tmp = glyphs[oldPos]; + glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos)); + glyphs[newPos] = tmp; + if (newPos <= base && base < oldPos) base++; + } + break; + } + } + // Apply 'init' to the Left Matra if it's a word start. + if (glyphs[start].shaperInfo.position === (0, $90a9d3398ee54fe5$export$1a1f61c9c4dd9df0).Pre_M && (!start || !/Cf|Mn/.test((0, $52ZIf$getCategory)(glyphs[start - 1].codePoints[0])))) glyphs[start].features.init = true; + } +} +function $7826f90f6f0cecc9$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + + + + + + + + + +const { categories: $7ab494fe977143c6$var$categories, decompositions: $7ab494fe977143c6$var$decompositions } = (0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$exports))); +const $7ab494fe977143c6$var$trie = new (0, $52ZIf$unicodetrie)((0, $12727730ddfc8bfe$export$94fdf11bafc8de6b)("AAACAAAAAAAQugAAAQUO+vHtnHuMX0UVx2d3u/t7bXe7FlqgvB+mpQhFmhikMRAg0ZQmakMU+cPWBzZisEGNjUpoiIYCEgmGUGOEGqOVNPUZUGNA+QNIBU2KREEFFSMBUYRISMXE+B3vnPzOzp553tcWfif5ZO5jnufMzJ2ZO/eumlDqFLAWnAMuBBvBZnC5uXZeBe4WsA1sBzs8/naCXcL1G8GtYDfYA74NvgfuAfcZHmT+fwEeBb8DTwvxPQWeAavACyZvq8z9VYxXwCGglijVBcvACnA8eCM4E6wHG8BF4BLwbvA+8AHwUbAd7AA7wS5wC9gN7gR7wX5wN7gXPAAeBr8Gvwd/Ac+CF8EhoCaV6oBZsBKcAE4FZ0wWeV8P9zxwoTnfCHczuBxsAdvAx8Gnzf1r4X4B3AxuA1+bHJb9m5PzdVGW/Yjv+xXHyfmxFfd9OH8Q/Ar8Bjw1WZT3GfACeAX8N5CfqSmlZsA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ab494fe977143c6$var$stateMachine = new (0, $52ZIf$dfa)((0, (/*@__PURE__*/$parcel$interopDefault($aa333a9607471296$exports)))); +class $7ab494fe977143c6$export$2e2bcd8739ae039 extends (0, $649970d87335b30f$export$2e2bcd8739ae039) { + static planFeatures(plan) { + plan.addStage($7ab494fe977143c6$var$setupSyllables); + // Default glyph pre-processing group + plan.addStage([ + 'locl', + 'ccmp', + 'nukt', + 'akhn' + ]); + // Reordering group + plan.addStage($7ab494fe977143c6$var$clearSubstitutionFlags); + plan.addStage([ + 'rphf' + ], false); + plan.addStage($7ab494fe977143c6$var$recordRphf); + plan.addStage($7ab494fe977143c6$var$clearSubstitutionFlags); + plan.addStage([ + 'pref' + ]); + plan.addStage($7ab494fe977143c6$var$recordPref); + // Orthographic unit shaping group + plan.addStage([ + 'rkrf', + 'abvf', + 'blwf', + 'half', + 'pstf', + 'vatu', + 'cjct' + ]); + plan.addStage($7ab494fe977143c6$var$reorder); + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + // Standard topographic presentation and positional feature application + plan.addStage([ + 'abvs', + 'blws', + 'pres', + 'psts', + 'dist', + 'abvm', + 'blwm' + ]); + } + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for(let i = glyphs.length - 1; i >= 0; i--){ + let codepoint = glyphs[i].codePoints[0]; + if ($7ab494fe977143c6$var$decompositions[codepoint]) { + let decomposed = $7ab494fe977143c6$var$decompositions[codepoint].map((c)=>{ + let g = plan.font.glyphForCodePoint(c); + return new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(plan.font, g.id, [ + c + ], glyphs[i].features); + }); + glyphs.splice(i, 1, ...decomposed); + } + } + } +} +(0, $52ZIf$_)($7ab494fe977143c6$export$2e2bcd8739ae039, "zeroMarkWidths", 'BEFORE_GPOS'); +function $7ab494fe977143c6$var$useCategory(glyph) { + return $7ab494fe977143c6$var$trie.get(glyph.codePoints[0]); +} +class $7ab494fe977143c6$var$USEInfo { + constructor(category, syllableType, syllable){ + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} +function $7ab494fe977143c6$var$setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of $7ab494fe977143c6$var$stateMachine.match(glyphs.map($7ab494fe977143c6$var$useCategory))){ + ++syllable; + // Create shaper info + for(let i = start; i <= end; i++)glyphs[i].shaperInfo = new $7ab494fe977143c6$var$USEInfo($7ab494fe977143c6$var$categories[$7ab494fe977143c6$var$useCategory(glyphs[i])], tags[0], syllable); + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for(let i = start; i < start + limit; i++)glyphs[i].features.rphf = true; + } +} +function $7ab494fe977143c6$var$clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs)glyph.substituted = false; +} +function $7ab494fe977143c6$var$recordRphf(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted && glyph.features.rphf) // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; +} +function $7ab494fe977143c6$var$recordPref(font, glyphs) { + for (let glyph of glyphs)if (glyph.substituted) // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; +} +function $7ab494fe977143c6$var$reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + for(let start = 0, end = $7ab494fe977143c6$var$nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = $7ab494fe977143c6$var$nextSyllable(glyphs, start)){ + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') continue; + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(font, dottedCircle, [ + 0x25cc + ]); + g.shaperInfo = info; + // Insert after possible Repha. + for(i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + // Move things forward. + if (info.category === 'R' && end - start > 1) // Got a repha. Reorder it to after first base, before first halant. + for(i = start + 1; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($7ab494fe977143c6$var$isBase(info) || $7ab494fe977143c6$var$isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if ($7ab494fe977143c6$var$isHalant(glyphs[i])) i--; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + // Move things back. + for(i = start, j = end; i < end; i++){ + info = glyphs[i].shaperInfo; + if ($7ab494fe977143c6$var$isBase(info) || $7ab494fe977143c6$var$isHalant(glyphs[i])) // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = $7ab494fe977143c6$var$isHalant(glyphs[i]) ? i + 1 : i; + else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } +} +function $7ab494fe977143c6$var$nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while(++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} +function $7ab494fe977143c6$var$isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} +function $7ab494fe977143c6$var$isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} + + +const $102b6fe50f1d50b4$var$SHAPERS = { + arab: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mong: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + syrc: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + 'nko ': (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + phag: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mand: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + mani: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + phlp: (0, $764eb544bbe1ccf0$export$2e2bcd8739ae039), + hang: (0, $e1c6bbc8cb416f8c$export$2e2bcd8739ae039), + bng2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + beng: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + dev2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + deva: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gjr2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gujr: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + guru: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + gur2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + knda: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + knd2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + mlm2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + mlym: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + ory2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + orya: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + taml: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + tml2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + telu: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + tel2: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + khmr: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + bali: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + batk: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + brah: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + bugi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + buhd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + cakm: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + cham: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + dupl: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + egyp: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + gran: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + hano: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + java: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + kthi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + kali: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + khar: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + khoj: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sind: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + lepc: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + limb: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + mahj: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + modi: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + saur: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + shrd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sidd: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sinh: (0, $7826f90f6f0cecc9$export$2e2bcd8739ae039), + sund: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + sylo: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tglg: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tagb: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tale: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + lana: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tavt: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + takr: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tibt: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tfng: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + tirh: (0, $7ab494fe977143c6$export$2e2bcd8739ae039), + latn: (0, $649970d87335b30f$export$2e2bcd8739ae039), + DFLT: (0, $649970d87335b30f$export$2e2bcd8739ae039 // Default + ) +}; +function $102b6fe50f1d50b4$export$7877a478dd30fd3d(script) { + if (!Array.isArray(script)) script = [ + script + ]; + for (let s of script){ + let shaper = $102b6fe50f1d50b4$var$SHAPERS[s]; + if (shaper) return shaper; + } + return 0, $649970d87335b30f$export$2e2bcd8739ae039; +} + + + + + +class $0a876c45f1f7c41c$export$2e2bcd8739ae039 extends (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039) { + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + let glyph = this.glyphIterator.cur; + switch(table.version){ + case 1: + glyph.id = glyph.id + table.deltaGlyphID & 0xffff; + break; + case 2: + glyph.id = table.substitute.get(index); + break; + } + return true; + } + case 2: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + if (sequence.length === 0) { + // If the sequence length is zero, delete the glyph. + // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it. + this.glyphs.splice(this.glyphIterator.index, 1); + return true; + } + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i)=>{ + let glyph = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + glyph.isMultiplied = true; + return glyph; + }); + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + return false; + } + case 3: + { + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + return false; + } + case 4: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + for (let ligature of table.ligatureSets.get(index)){ + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) continue; + let curGlyph = this.glyphIterator.cur; + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched)characters.push(...this.glyphs[index].codePoints); + // Create the replacement ligature glyph + let ligatureGlyph = new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for(let i = 0; i < matched.length && isMarkLigature; i++)isMarkLigature = this.glyphs[matched[i]].isMark; + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched){ + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) idx = matchIndex; + else while(idx < matchIndex){ + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) for(let i = idx; i < this.glyphs.length; i++){ + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else break; + } + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for(let i = matched.length - 1; i >= 0; i--)this.glyphs.splice(matched[i], 1); + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + return false; + } + case 5: + return this.applyContext(table); + case 6: + return this.applyChainingContext(table); + case 7: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} + + + +class $c96c93587d49c14d$export$2e2bcd8739ae039 extends (0, $a83b9c36aaa94fd3$export$2e2bcd8739ae039) { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) position.xAdvance += value.xAdvance; + if (value.yAdvance != null) position.yAdvance += value.yAdvance; + if (value.xPlacement != null) position.xOffset += value.xPlacement; + if (value.yPlacement != null) position.yOffset += value.yPlacement; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (value.xPlaDevice) position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b); + if (value.yPlaDevice) position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b); + if (value.xAdvDevice) position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b); + if (value.yAdvDevice) position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b); + } + // TODO: device tables + } + applyLookup(lookupType, table) { + switch(lookupType){ + case 1: + { + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + this.applyPositionValue(0, table.value); + break; + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + return true; + } + case 2: + { + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) return false; + let index = this.coverageIndex(table.coverage); + if (index === -1) return false; + switch(table.version){ + case 1: + let set = table.pairSets.get(index); + for (let pair of set)if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + return false; + case 2: + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) return false; + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + case 3: + { + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) return false; + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) return false; + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) return false; + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + let d; + switch(this.direction){ + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + return true; + } + case 4: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)); + if (baseGlyphIndex < 0) return false; + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) return false; + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 5: + { + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) return false; + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while(--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + if (baseGlyphIndex < 0) return false; + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) return false; + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent > 0 ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1; + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + case 6: + { + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) return false; + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) return false; + let cur = this.glyphIterator.cur; + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) good = true; + else if (cur.ligatureComponent === prev.ligatureComponent) good = true; + } else // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if (cur.ligatureID && !cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) good = true; + if (!good) return false; + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) return false; + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + case 7: + return this.applyContext(table); + case 8: + return this.applyChainingContext(table); + case 9: + return this.applyLookup(table.lookupType, table.extension); + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + getAnchor(anchor) { + // TODO: contour point, device tables + let x = anchor.xCoordinate; + let y = anchor.yCoordinate; + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (anchor.xDeviceTable) x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b); + if (anchor.yDeviceTable) y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b); + } + return { + x: x, + y: y + }; + } + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + for(var i = 0; i < this.glyphs.length; i++)this.fixCursiveAttachment(i); + this.fixMarkAttachment(); + } + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + fixMarkAttachment() { + for(let i = 0; i < this.glyphs.length; i++){ + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + if (this.direction === 'ltr') for(let k = j; k < i; k++){ + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + else for(let k = j + 1; k < i + 1; k++){ + this.positions[i].xOffset += this.positions[k].xAdvance; + this.positions[i].yOffset += this.positions[k].yAdvance; + } + } + } + } +} + + +class $a62492810de27e3d$export$2e2bcd8739ae039 { + setup(glyphRun) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphRun.glyphs.map((glyph)=>new (0, $10e7b257e1a9a756$export$2e2bcd8739ae039)(this.font, glyph.id, [ + ...glyph.codePoints + ])); + // Select a script based on what is available in GSUB/GPOS. + let script = null; + if (this.GPOSProcessor) script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + if (this.GSUBProcessor) script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = $102b6fe50f1d50b4$export$7877a478dd30fd3d(script); + this.plan = new (0, $94d7a73bd2edfc9a$export$2e2bcd8739ae039)(this.font, script, glyphRun.direction); + this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); + // Assign chosen features to output glyph run + for(let key in this.plan.allFeatures)glyphRun.features[key] = true; + } + substitute(glyphRun) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + // Map glyph infos back to normal Glyph objects + glyphRun.glyphs = this.glyphInfos.map((glyphInfo)=>this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + } + position(glyphRun) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') this.zeroMarkAdvances(glyphRun.positions); + if (this.GPOSProcessor) this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions); + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') this.zeroMarkAdvances(glyphRun.positions); + // Reverse the glyphs and positions if the script is right-to-left + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + glyphRun.positions.reverse(); + } + return this.GPOSProcessor && this.GPOSProcessor.features; + } + zeroMarkAdvances(positions) { + for(let i = 0; i < this.glyphInfos.length; i++)if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + getAvailableFeatures(script, language) { + let features = []; + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + return features; + } + constructor(font){ + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + this.fallbackPosition = true; + if (font.GSUB) this.GSUBProcessor = new (0, $0a876c45f1f7c41c$export$2e2bcd8739ae039)(font, font.GSUB); + if (font.GPOS) this.GPOSProcessor = new (0, $c96c93587d49c14d$export$2e2bcd8739ae039)(font, font.GPOS); + } +} + + +class $4c0a7fa5df7a9ab1$export$2e2bcd8739ae039 { + layout(string, features, script, language, direction) { + // Make the features parameter optional + if (typeof features === 'string') { + direction = language; + language = script; + script = features; + features = []; + } + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) script = $130d1a642ebcd2b7$export$e5cb25e204fb8450(string); + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string)codePoints.push(...glyph.codePoints); + script = $130d1a642ebcd2b7$export$16fab0757cfc223d(codePoints); + } + var glyphs = string; + } + let glyphRun = new (0, $be07b3e97a42687a$export$2e2bcd8739ae039)(glyphs, features, script, language, direction); + // Return early if there are no glyphs + if (glyphs.length === 0) { + glyphRun.positions = []; + return glyphRun; + } + // Setup the advanced layout engine + if (this.engine && this.engine.setup) this.engine.setup(glyphRun); + // Substitute and position the glyphs + this.substitute(glyphRun); + this.position(glyphRun); + this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) this.engine.cleanup(); + return glyphRun; + } + substitute(glyphRun) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) this.engine.substitute(glyphRun); + } + position(glyphRun) { + // Get initial glyph positions + glyphRun.positions = glyphRun.glyphs.map((glyph)=>new (0, $1ac75d9a55b67f01$export$2e2bcd8739ae039)(glyph.advanceWidth)); + let positioned = null; + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) positioned = this.engine.position(glyphRun); + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned && (!this.engine || this.engine.fallbackPosition)) { + if (!this.unicodeLayoutEngine) this.unicodeLayoutEngine = new (0, $0a4bdfeb6dfd6f5e$export$2e2bcd8739ae039)(this.font); + this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions); + } + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) { + if (!this.kernProcessor) this.kernProcessor = new (0, $0bba3a9db57637f3$export$2e2bcd8739ae039)(this.font); + this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions); + glyphRun.features.kern = true; + } + } + hideDefaultIgnorables(glyphs, positions) { + let space = this.font.glyphForCodePoint(0x20); + for(let i = 0; i < glyphs.length; i++)if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) { + glyphs[i] = space; + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + isDefaultIgnorable(ch) { + // From DerivedCoreProperties.txt in the Unicode database, + // minus U+115F, U+1160, U+3164 and U+FFA0, which is what + // Harfbuzz and Uniscribe do. + let plane = ch >> 16; + if (plane === 0) // BMP + switch(ch >> 8){ + case 0x00: + return ch === 0x00AD; + case 0x03: + return ch === 0x034F; + case 0x06: + return ch === 0x061C; + case 0x17: + return 0x17B4 <= ch && ch <= 0x17B5; + case 0x18: + return 0x180B <= ch && ch <= 0x180E; + case 0x20: + return 0x200B <= ch && ch <= 0x200F || 0x202A <= ch && ch <= 0x202E || 0x2060 <= ch && ch <= 0x206F; + case 0xFE: + return 0xFE00 <= ch && ch <= 0xFE0F || ch === 0xFEFF; + case 0xFF: + return 0xFFF0 <= ch && ch <= 0xFFF8; + default: + return false; + } + else // Other planes + switch(plane){ + case 0x01: + return 0x1BCA0 <= ch && ch <= 0x1BCA3 || 0x1D173 <= ch && ch <= 0x1D17A; + case 0x0E: + return 0xE0000 <= ch && ch <= 0xE0FFF; + default: + return false; + } + } + getAvailableFeatures(script, language) { + let features = []; + if (this.engine) features.push(...this.engine.getAvailableFeatures(script, language)); + if (this.font.kern && features.indexOf('kern') === -1) features.push('kern'); + return features; + } + stringsForGlyph(gid) { + let result = new Set; + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints)result.add(String.fromCodePoint(codePoint)); + if (this.engine && this.engine.stringsForGlyph) for (let string of this.engine.stringsForGlyph(gid))result.add(string); + return Array.from(result); + } + constructor(font){ + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) this.engine = new (0, $ba6dd74203be8728$export$2e2bcd8739ae039)(this.font); + else if (this.font.GSUB || this.font.GPOS) this.engine = new (0, $a62492810de27e3d$export$2e2bcd8739ae039)(this.font); + } +} + + + + + + +const $f43aec954cdfdf21$var$SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; +class $f43aec954cdfdf21$export$2e2bcd8739ae039 { + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ toFunction() { + return (ctx)=>{ + this.commands.forEach((c)=>{ + return ctx[c.command].apply(ctx, c.args); + }); + }; + } + /** + * Converts the path to an SVG path data string + * @return {string} + */ toSVG() { + let cmds = this.commands.map((c)=>{ + let args = c.args.map((arg)=>Math.round(arg * 100) / 100); + return `${$f43aec954cdfdf21$var$SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + return cmds.join(''); + } + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ get cbox() { + if (!this._cbox) { + let cbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + for (let command of this.commands)for(let i = 0; i < command.args.length; i += 2)cbox.addPoint(command.args[i], command.args[i + 1]); + this._cbox = Object.freeze(cbox); + } + return this._cbox; + } + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ get bbox() { + if (this._bbox) return this._bbox; + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + let cx = 0, cy = 0; + let f = (t)=>Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; + for (let c of this.commands)switch(c.command){ + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + var p0 = [ + cx, + cy + ]; + var p1 = [ + cp1x, + cp1y + ]; + var p2 = [ + cp2x, + cp2y + ]; + var p3 = [ + p3x, + p3y + ]; + for(var i = 0; i <= 1; i++){ + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + if (a === 0) { + if (b === 0) continue; + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) bbox.addPoint(f(t), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t)); + } + continue; + } + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) continue; + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) bbox.addPoint(f(t1), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t1)); + } + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) bbox.addPoint(f(t2), bbox.maxY); + else if (i === 1) bbox.addPoint(bbox.maxX, f(t2)); + } + } + cx = p3x; + cy = p3y; + break; + } + return this._bbox = Object.freeze(bbox); + } + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ mapPoints(fn) { + let path = new $f43aec954cdfdf21$export$2e2bcd8739ae039; + for (let c of this.commands){ + let args = []; + for(let i = 0; i < c.args.length; i += 2){ + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + path[c.command](...args); + } + return path; + } + /** + * Transforms the path by the given matrix. + */ transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y)=>{ + const tx = m0 * x + m2 * y + m4; + const ty = m1 * x + m3 * y + m5; + return [ + tx, + ty + ]; + }); + } + /** + * Translates the path by the given offset. + */ translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + /** + * Rotates the path by the given angle (in radians). + */ rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + /** + * Scales the path. + */ scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } + constructor(){ + this.commands = []; + this._bbox = null; + this._cbox = null; + } +} +for (let command of [ + 'moveTo', + 'lineTo', + 'quadraticCurveTo', + 'bezierCurveTo', + 'closePath' +])$f43aec954cdfdf21$export$2e2bcd8739ae039.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command: command, + args: args + }); + return this; +}; + + + +var $7713b9b7b438dff8$export$2e2bcd8739ae039 = [ + '.notdef', + '.null', + 'nonmarkingreturn', + 'space', + 'exclam', + 'quotedbl', + 'numbersign', + 'dollar', + 'percent', + 'ampersand', + 'quotesingle', + 'parenleft', + 'parenright', + 'asterisk', + 'plus', + 'comma', + 'hyphen', + 'period', + 'slash', + 'zero', + 'one', + 'two', + 'three', + 'four', + 'five', + 'six', + 'seven', + 'eight', + 'nine', + 'colon', + 'semicolon', + 'less', + 'equal', + 'greater', + 'question', + 'at', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F', + 'G', + 'H', + 'I', + 'J', + 'K', + 'L', + 'M', + 'N', + 'O', + 'P', + 'Q', + 'R', + 'S', + 'T', + 'U', + 'V', + 'W', + 'X', + 'Y', + 'Z', + 'bracketleft', + 'backslash', + 'bracketright', + 'asciicircum', + 'underscore', + 'grave', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f', + 'g', + 'h', + 'i', + 'j', + 'k', + 'l', + 'm', + 'n', + 'o', + 'p', + 'q', + 'r', + 's', + 't', + 'u', + 'v', + 'w', + 'x', + 'y', + 'z', + 'braceleft', + 'bar', + 'braceright', + 'asciitilde', + 'Adieresis', + 'Aring', + 'Ccedilla', + 'Eacute', + 'Ntilde', + 'Odieresis', + 'Udieresis', + 'aacute', + 'agrave', + 'acircumflex', + 'adieresis', + 'atilde', + 'aring', + 'ccedilla', + 'eacute', + 'egrave', + 'ecircumflex', + 'edieresis', + 'iacute', + 'igrave', + 'icircumflex', + 'idieresis', + 'ntilde', + 'oacute', + 'ograve', + 'ocircumflex', + 'odieresis', + 'otilde', + 'uacute', + 'ugrave', + 'ucircumflex', + 'udieresis', + 'dagger', + 'degree', + 'cent', + 'sterling', + 'section', + 'bullet', + 'paragraph', + 'germandbls', + 'registered', + 'copyright', + 'trademark', + 'acute', + 'dieresis', + 'notequal', + 'AE', + 'Oslash', + 'infinity', + 'plusminus', + 'lessequal', + 'greaterequal', + 'yen', + 'mu', + 'partialdiff', + 'summation', + 'product', + 'pi', + 'integral', + 'ordfeminine', + 'ordmasculine', + 'Omega', + 'ae', + 'oslash', + 'questiondown', + 'exclamdown', + 'logicalnot', + 'radical', + 'florin', + 'approxequal', + 'Delta', + 'guillemotleft', + 'guillemotright', + 'ellipsis', + 'nonbreakingspace', + 'Agrave', + 'Atilde', + 'Otilde', + 'OE', + 'oe', + 'endash', + 'emdash', + 'quotedblleft', + 'quotedblright', + 'quoteleft', + 'quoteright', + 'divide', + 'lozenge', + 'ydieresis', + 'Ydieresis', + 'fraction', + 'currency', + 'guilsinglleft', + 'guilsinglright', + 'fi', + 'fl', + 'daggerdbl', + 'periodcentered', + 'quotesinglbase', + 'quotedblbase', + 'perthousand', + 'Acircumflex', + 'Ecircumflex', + 'Aacute', + 'Edieresis', + 'Egrave', + 'Iacute', + 'Icircumflex', + 'Idieresis', + 'Igrave', + 'Oacute', + 'Ocircumflex', + 'apple', + 'Ograve', + 'Uacute', + 'Ucircumflex', + 'Ugrave', + 'dotlessi', + 'circumflex', + 'tilde', + 'macron', + 'breve', + 'dotaccent', + 'ring', + 'cedilla', + 'hungarumlaut', + 'ogonek', + 'caron', + 'Lslash', + 'lslash', + 'Scaron', + 'scaron', + 'Zcaron', + 'zcaron', + 'brokenbar', + 'Eth', + 'eth', + 'Yacute', + 'yacute', + 'Thorn', + 'thorn', + 'minus', + 'multiply', + 'onesuperior', + 'twosuperior', + 'threesuperior', + 'onehalf', + 'onequarter', + 'threequarters', + 'franc', + 'Gbreve', + 'gbreve', + 'Idotaccent', + 'Scedilla', + 'scedilla', + 'Cacute', + 'cacute', + 'Ccaron', + 'ccaron', + 'dcroat' +]; + + +class $f92906be28e61769$export$2e2bcd8739ae039 { + _getPath() { + return new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)(); + } + _getCBox() { + return this.path.cbox; + } + _getBBox() { + return this.path.bbox; + } + _getTableMetrics(table) { + if (this.id < table.metrics.length) return table.metrics.get(this.id); + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + return res; + } + _getMetrics(cbox) { + if (this._metrics) return this._metrics; + let { advance: advanceWidth, bearing: leftBearing } = this._getTableMetrics(this._font.hmtx); + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) var { advance: advanceHeight, bearing: topBearing } = this._getTableMetrics(this._font.vmtx); + else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) ({ cbox: cbox } = this); + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + } else { + let { hhea: hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + if (this._font._variationProcessor && this._font.HVAR) advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + return this._metrics = { + advanceWidth: advanceWidth, + advanceHeight: advanceHeight, + leftBearing: leftBearing, + topBearing: topBearing + }; + } + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ get cbox() { + return this._getCBox(); + } + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ get bbox() { + return this._getBBox(); + } + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + /** + * The glyph's advance width. + * @type {number} + */ get advanceWidth() { + return this._getMetrics().advanceWidth; + } + /** + * The glyph's advance height. + * @type {number} + */ get advanceHeight() { + return this._getMetrics().advanceHeight; + } + get ligatureCaretPositions() {} + _getName() { + let { post: post } = this._font; + if (!post) return null; + switch(post.version){ + case 1: + return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[this.id]; + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < (0, $7713b9b7b438dff8$export$2e2bcd8739ae039).length) return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[id]; + return post.names[id - (0, $7713b9b7b438dff8$export$2e2bcd8739ae039).length]; + case 2.5: + return (0, $7713b9b7b438dff8$export$2e2bcd8739ae039)[this.id + post.offsets[this.id]]; + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + /** + * The glyph's name + * @type {string} + */ get name() { + return this._getName(); + } + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ render(ctx, size) { + ctx.save(); + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + ctx.restore(); + } + constructor(id, codePoints, font){ + /** + * The glyph id in the font + * @type {number} + */ this.id = id; + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ this.codePoints = codePoints; + this._font = font; + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.length > 0 && this.codePoints.every((0, $52ZIf$isMark)); + this.isLigature = this.codePoints.length > 1; + } +} +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "cbox", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "path", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "advanceWidth", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "advanceHeight", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $f92906be28e61769$export$2e2bcd8739ae039.prototype, "name", null); + + + + + +// The header for both simple and composite glyphs +let $69aac16029968692$var$GlyfHeader = new $52ZIf$Struct({ + numberOfContours: $52ZIf$int16, + xMin: $52ZIf$int16, + yMin: $52ZIf$int16, + xMax: $52ZIf$int16, + yMax: $52ZIf$int16 +}); +// Flags for simple glyphs +const $69aac16029968692$var$ON_CURVE = 1; +const $69aac16029968692$var$X_SHORT_VECTOR = 2; +const $69aac16029968692$var$Y_SHORT_VECTOR = 4; +const $69aac16029968692$var$REPEAT = 8; +const $69aac16029968692$var$SAME_X = 16; +const $69aac16029968692$var$SAME_Y = 32; +// Flags for composite glyphs +const $69aac16029968692$var$ARG_1_AND_2_ARE_WORDS = 1; +const $69aac16029968692$var$ARGS_ARE_XY_VALUES = 2; +const $69aac16029968692$var$ROUND_XY_TO_GRID = 4; +const $69aac16029968692$var$WE_HAVE_A_SCALE = 8; +const $69aac16029968692$var$MORE_COMPONENTS = 32; +const $69aac16029968692$var$WE_HAVE_AN_X_AND_Y_SCALE = 64; +const $69aac16029968692$var$WE_HAVE_A_TWO_BY_TWO = 128; +const $69aac16029968692$var$WE_HAVE_INSTRUCTIONS = 256; +const $69aac16029968692$var$USE_MY_METRICS = 512; +const $69aac16029968692$var$OVERLAP_COMPOUND = 1024; +const $69aac16029968692$var$SCALED_COMPONENT_OFFSET = 2048; +const $69aac16029968692$var$UNSCALED_COMPONENT_OFFSET = 4096; +class $69aac16029968692$export$baf26146a414f24a { + copy() { + return new $69aac16029968692$export$baf26146a414f24a(this.onCurve, this.endContour, this.x, this.y); + } + constructor(onCurve, endContour, x = 0, y = 0){ + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } +} +// Represents a component in a composite glyph +class $69aac16029968692$var$Component { + constructor(glyphID, dx, dy){ + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} +class $69aac16029968692$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) return this.path.cbox; + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = $69aac16029968692$var$GlyfHeader.decode(stream); + let cbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) val = -val; + val += prev; + } else if (same) var val = prev; + else var val = prev + stream.readInt16BE(); + return val; + } + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) return null; + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + let glyph = $69aac16029968692$var$GlyfHeader.decode(stream); + if (glyph.numberOfContours > 0) this._decodeSimple(glyph, stream); + else if (glyph.numberOfContours < 0) this._decodeComposite(glyph, stream, startPos); + return glyph; + } + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + let endPtsOfContours = new $52ZIf$Array($52ZIf$uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new $52ZIf$Array($52ZIf$uint8, $52ZIf$uint16).decode(stream); + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + while(flags.length < numCoords){ + var flag = stream.readUInt8(); + flags.push(flag); + // check for repeat flag + if (flag & $69aac16029968692$var$REPEAT) { + let count = stream.readUInt8(); + for(let j = 0; j < count; j++)flags.push(flag); + } + } + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + let point = new $69aac16029968692$export$baf26146a414f24a(!!(flag & $69aac16029968692$var$ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + let px = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & $69aac16029968692$var$X_SHORT_VECTOR, flag & $69aac16029968692$var$SAME_X); + } + let py = 0; + for(var i = 0; i < flags.length; i++){ + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & $69aac16029968692$var$Y_SHORT_VECTOR, flag & $69aac16029968692$var$SAME_Y); + } + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + return; + } + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = $69aac16029968692$var$MORE_COMPONENTS; + while(flags & $69aac16029968692$var$MORE_COMPONENTS){ + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) haveInstructions = (flags & $69aac16029968692$var$WE_HAVE_INSTRUCTIONS) !== 0; + if (flags & $69aac16029968692$var$ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + var component = new $69aac16029968692$var$Component(glyphID, dx, dy); + component.pos = gPos; + if (flags & $69aac16029968692$var$WE_HAVE_A_SCALE) // fixed number with 14 bits of fraction + component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + else if (flags & $69aac16029968692$var$WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & $69aac16029968692$var$WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } + glyph.components.push(component); + } + if (this._font._variationProcessor) { + let points = []; + for(let j = 0; j < glyph.components.length; j++){ + var component = glyph.components[j]; + points.push(new $69aac16029968692$export$baf26146a414f24a(true, true, component.dx, component.dy)); + } + points.push(...this._getPhantomPoints(glyph)); + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + for(let i = 0; i < points.length; i++){ + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + return haveInstructions; + } + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) this._metrics = (0, $f92906be28e61769$export$2e2bcd8739ae039).prototype._getMetrics.call(this, cbox); + let { advanceWidth: advanceWidth, advanceHeight: advanceHeight, leftBearing: leftBearing, topBearing: topBearing } = this._metrics; + return [ + new $69aac16029968692$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing, 0), + new $69aac16029968692$export$baf26146a414f24a(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new $69aac16029968692$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing), + new $69aac16029968692$export$baf26146a414f24a(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) return []; + let points = []; + if (glyph.numberOfContours < 0) // resolve composite glyphs + for (let component of glyph.components){ + let contours = this._font.getGlyph(component.glyphID)._getContours(); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + for(let j = 0; j < contour.length; j++){ + let point = contour[j]; + let x = point.x * component.scaleX + point.y * component.scale01 + component.dx; + let y = point.y * component.scaleY + point.x * component.scale10 + component.dy; + points.push(new $69aac16029968692$export$baf26146a414f24a(point.onCurve, point.endContour, x, y)); + } + } + } + else points = glyph.points || []; + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + let contours = []; + let cur = []; + for(let k = 0; k < points.length; k++){ + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + return contours; + } + _getMetrics() { + if (this._metrics) return this._metrics; + let cbox = this._getCBox(true); + super._getMetrics(cbox); + if (this._font._variationProcessor && !this._font.HVAR) // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + return this._metrics; + } + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039); + for(let i = 0; i < contours.length; i++){ + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + else // Start at the middle if both the first and last points are off curve + firstPt = new $69aac16029968692$export$baf26146a414f24a(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + var curvePt = firstPt; + } + path.moveTo(firstPt.x, firstPt.y); + for(let j = start; j < contour.length; j++){ + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + if (prevPt.onCurve && pt.onCurve) path.lineTo(pt.x, pt.y); + else if (prevPt.onCurve && !pt.onCurve) var curvePt = pt; + else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + } else throw new Error("Unknown TTF path state"); + } + // Connect the first and last points + if (curvePt) path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + path.closePath(); + } + return path; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'TTF'); + } +} + + + + + +class $62cc5109c6101893$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + _getName() { + if (this._font.CFF2) return super._getName(); + return this._font['CFF '].getGlyphName(this.id); + } + bias(s) { + if (s.length < 1240) return 107; + else if (s.length < 33900) return 1131; + else return 32768; + } + _getPath() { + let cff = this._font.CFF2 || this._font['CFF ']; + let { stream: stream } = cff; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + let path = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039); + let stack = []; + let trans = []; + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + let privateDict = cff.privateDictForGlyph(this.id) || {}; + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + function checkWidth() { + if (width == null) width = stack.shift() + privateDict.nominalWidthX; + } + function parseStems() { + if (stack.length % 2 !== 0) checkWidth(); + nStems += stack.length >> 1; + return stack.length = 0; + } + function moveTo(x, y) { + if (open) path.closePath(); + path.moveTo(x, y); + open = true; + } + let parse = function() { + while(stream.pos < end){ + let op = stream.readUInt8(); + if (op < 32) { + let index, subr, phase; + let c1x, c1y, c2x, c2y, c3x, c3y; + let c4x, c4y, c5x, c5y, c6x, c6y; + let pts; + switch(op){ + case 1: + case 3: + case 18: + case 23: + parseStems(); + break; + case 4: + if (stack.length > 1) checkWidth(); + y += stack.shift(); + moveTo(x, y); + break; + case 5: + while(stack.length >= 2){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + case 6: + case 7: + phase = op === 6; + while(stack.length >= 1){ + if (phase) x += stack.shift(); + else y += stack.shift(); + path.lineTo(x, y); + phase = !phase; + } + break; + case 8: + while(stack.length > 0){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 10: + index = stack.pop() + subrsBias; + subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 11: + if (cff.version >= 2) break; + return; + case 14: + if (cff.version >= 2) break; + if (stack.length > 0) checkWidth(); + if (open) { + path.closePath(); + open = false; + } + break; + case 15: + if (cff.version < 2) throw new Error('vsindex operator not supported in CFF v1'); + vsindex = stack.pop(); + break; + case 16: + { + if (cff.version < 2) throw new Error('blend operator not supported in CFF v1'); + if (!variationProcessor) throw new Error('blend operator in non-variation font'); + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + for(let i = 0; i < numBlends; i++){ + let sum = stack[base + i]; + for(let j = 0; j < blendVector.length; j++)sum += blendVector[j] * stack[delta++]; + stack[base + i] = sum; + } + while(numOperands--)stack.pop(); + break; + } + case 19: + case 20: + parseStems(); + stream.pos += nStems + 7 >> 3; + break; + case 21: + if (stack.length > 2) checkWidth(); + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + case 22: + if (stack.length > 1) checkWidth(); + x += stack.shift(); + moveTo(x, y); + break; + case 24: + while(stack.length >= 8){ + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + case 25: + while(stack.length >= 8){ + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + case 26: + if (stack.length % 2) x += stack.shift(); + while(stack.length >= 4){ + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 27: + if (stack.length % 2) y += stack.shift(); + while(stack.length >= 4){ + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + case 28: + stack.push(stream.readInt16BE()); + break; + case 29: + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + case 30: + case 31: + phase = op === 31; + while(stack.length >= 4){ + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + case 12: + op = stream.readUInt8(); + switch(op){ + case 3: + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + case 4: + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + case 5: + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + case 9: + a = stack.pop(); + stack.push(Math.abs(a)); + break; + case 10: + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + case 11: + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + case 12: + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + case 14: + a = stack.pop(); + stack.push(-a); + break; + case 15: + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + case 18: + stack.pop(); + break; + case 20: + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + case 21: + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + case 22: + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + case 23: + stack.push(Math.random()); + break; + case 24: + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + case 26: + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + case 27: + a = stack.pop(); + stack.push(a, a); + break; + case 28: + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + case 29: + idx = stack.pop(); + if (idx < 0) idx = 0; + else if (idx > stack.length - 1) idx = stack.length - 1; + stack.push(stack[idx]); + break; + case 30: + let n = stack.pop(); + let j = stack.pop(); + if (j >= 0) while(j > 0){ + var t = stack[n - 1]; + for(let i = n - 2; i >= 0; i--)stack[i + 1] = stack[i]; + stack[0] = t; + j--; + } + else while(j < 0){ + var t = stack[0]; + for(let i = 0; i <= n; i++)stack[i] = stack[i + 1]; + stack[n - 1] = t; + j++; + } + break; + case 34: + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y; + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 35: + pts = []; + for(let i = 0; i <= 5; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + case 36: + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + case 37: + let startx = x; + let starty = y; + pts = []; + for(let i = 0; i <= 4; i++){ + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + if (Math.abs(x - startx) > Math.abs(y - starty)) { + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + default: + throw new Error(`Unknown op: ${op}`); + } + } else if (op < 247) stack.push(op - 139); + else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else stack.push(stream.readInt32BE() / 65536); + } + }; + parse(); + if (open) path.closePath(); + return path; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'CFF'); + } +} + + + + + +let $25d8f049c222084c$var$SBIXImage = new $52ZIf$Struct({ + originX: $52ZIf$uint16, + originY: $52ZIf$uint16, + type: new $52ZIf$String(4), + data: new $52ZIf$Buffer((t)=>t.parent.buflen - t._currentOffset) +}); +class $25d8f049c222084c$export$2e2bcd8739ae039 extends (0, $69aac16029968692$export$2e2bcd8739ae039) { + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ getImageForSize(size) { + for(let i = 0; i < this._font.sbix.imageTables.length; i++){ + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) break; + } + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + if (start === end) return null; + this._font.stream.pos = start; + return $25d8f049c222084c$var$SBIXImage.decode(this._font.stream, { + buflen: end - start + }); + } + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, { + height: size, + x: img.originX, + y: (this.bbox.minY - img.originY) * scale + }); + } + if (this._font.sbix.flags.renderOutlines) super.render(ctx, size); + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'SBIX'); + } +} + + + + + +class $0d411f0165859681$var$COLRLayer { + constructor(glyph, color){ + this.glyph = glyph; + this.color = color; + } +} +class $0d411f0165859681$export$2e2bcd8739ae039 extends (0, $f92906be28e61769$export$2e2bcd8739ae039) { + _getBBox() { + let bbox = new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039); + for(let i = 0; i < this.layers.length; i++){ + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + return bbox; + } + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + while(low <= high){ + let mid = low + high >> 1; + var rec = colr.baseGlyphRecord[mid]; + if (this.id < rec.gid) high = mid - 1; + else if (this.id > rec.gid) low = mid + 1; + else { + var baseLayer = rec; + break; + } + } + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + return [ + new $0d411f0165859681$var$COLRLayer(g, color) + ]; + } + // otherwise, return an array of all the layers + let layers = []; + for(let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++){ + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new $0d411f0165859681$var$COLRLayer(g, color)); + } + return layers; + } + render(ctx, size) { + for (let { glyph: glyph, color: color } of this.layers){ + ctx.fillColor([ + color.red, + color.green, + color.blue + ], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + return; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'COLR'); + } +} + + +const $0bb840cac04e911b$var$TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const $0bb840cac04e911b$var$TUPLE_COUNT_MASK = 0x0fff; +const $0bb840cac04e911b$var$EMBEDDED_TUPLE_COORD = 0x8000; +const $0bb840cac04e911b$var$INTERMEDIATE_TUPLE = 0x4000; +const $0bb840cac04e911b$var$PRIVATE_POINT_NUMBERS = 0x2000; +const $0bb840cac04e911b$var$TUPLE_INDEX_MASK = 0x0fff; +const $0bb840cac04e911b$var$POINTS_ARE_WORDS = 0x80; +const $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK = 0x7f; +const $0bb840cac04e911b$var$DELTAS_ARE_ZERO = 0x80; +const $0bb840cac04e911b$var$DELTAS_ARE_WORDS = 0x40; +const $0bb840cac04e911b$var$DELTA_RUN_COUNT_MASK = 0x3f; +class $0bb840cac04e911b$export$2e2bcd8739ae039 { + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for(var i = 0; i < this.font.fvar.axis.length; i++){ + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + else normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) for(var i = 0; i < this.font.avar.segment.length; i++){ + let segment = this.font.avar.segment[i]; + for(let j = 0; j < segment.correspondence.length; j++){ + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / (pair.fromCoord - prev.fromCoord + Number.EPSILON) + prev.toCoord; + break; + } + } + } + return normalized; + } + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) return; + let { gvar: gvar } = this.font; + if (gid >= gvar.glyphCount) return; + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) return; + // Read the gvar data for this glyph + let { stream: stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) return; + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + if (tupleCount & $0bb840cac04e911b$var$TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + let origPoints = glyphPoints.map((pt)=>pt.copy()); + tupleCount &= $0bb840cac04e911b$var$TUPLE_COUNT_MASK; + for(let i = 0; i < tupleCount; i++){ + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + if (tupleIndex & $0bb840cac04e911b$var$EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for(let a = 0; a < gvar.axisCount; a++)tupleCoords.push(stream.readInt16BE() / 16384); + } else { + if ((tupleIndex & $0bb840cac04e911b$var$TUPLE_INDEX_MASK) >= gvar.globalCoordCount) throw new Error('Invalid gvar table'); + var tupleCoords = gvar.globalCoords[tupleIndex & $0bb840cac04e911b$var$TUPLE_INDEX_MASK]; + } + if (tupleIndex & $0bb840cac04e911b$var$INTERMEDIATE_TUPLE) { + var startCoords = []; + for(let a = 0; a < gvar.axisCount; a++)startCoords.push(stream.readInt16BE() / 16384); + var endCoords = []; + for(let a = 0; a < gvar.axisCount; a++)endCoords.push(stream.readInt16BE() / 16384); + } + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + var here = stream.pos; + stream.pos = offsetToData; + if (tupleIndex & $0bb840cac04e911b$var$PRIVATE_POINT_NUMBERS) var points = this.decodePoints(); + else var points = sharedPoints; + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + if (points.length === 0) for(let i = 0; i < glyphPoints.length; i++){ + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + else { + let outPoints = origPoints.map((pt)=>pt.copy()); + let hasDelta = glyphPoints.map(()=>false); + for(let i = 0; i < points.length; i++){ + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + point.x += xDeltas[i] * factor; + point.y += yDeltas[i] * factor; + } + } + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + for(let i = 0; i < glyphPoints.length; i++){ + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX); + glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY); + } + } + offsetToData += tupleDataSize; + stream.pos = here; + } + } + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + if (count & $0bb840cac04e911b$var$POINTS_ARE_WORDS) count = (count & $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $0bb840cac04e911b$var$POINT_RUN_COUNT_MASK) + 1; + let fn = run & $0bb840cac04e911b$var$POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + for(let j = 0; j < runCount && i < count; j++){ + point += fn.call(stream); + points[i++] = point; + } + } + return points; + } + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + while(i < count){ + let run = stream.readUInt8(); + let runCount = (run & $0bb840cac04e911b$var$DELTA_RUN_COUNT_MASK) + 1; + if (run & $0bb840cac04e911b$var$DELTAS_ARE_ZERO) i += runCount; + else { + let fn = run & $0bb840cac04e911b$var$DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for(let j = 0; j < runCount && i < count; j++)deltas[i++] = fn.call(stream); + } + } + return deltas; + } + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar: gvar } = this.font; + let factor = 1; + for(let i = 0; i < gvar.axisCount; i++){ + if (tupleCoords[i] === 0) continue; + if (normalized[i] === 0) return 0; + if ((tupleIndex & $0bb840cac04e911b$var$INTERMEDIATE_TUPLE) === 0) { + if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) return 0; + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) return 0; + else if (normalized[i] < tupleCoords[i]) factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + else factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + return factor; + } + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) return; + let point = 0; + while(point < points.length){ + let firstPoint = point; + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while(!pt.endContour)pt = points[++endPoint]; + // find the first point that has a delta + while(point <= endPoint && !hasDelta[point])point++; + if (point > endPoint) continue; + let firstDelta = point; + let curDelta = point; + point++; + while(point <= endPoint){ + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + point++; + } + // shift contour if we only have a single delta + if (curDelta === firstDelta) this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + if (firstDelta > 0) this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + point = endPoint + 1; + } + } + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) return; + let iterable = [ + 'x', + 'y' + ]; + for(let i = 0; i < iterable.length; i++){ + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + for(let p = p1; p <= p2; p++){ + let out = inPoints[p][k]; + if (out <= in1) out += out1 - in1; + else if (out >= in2) out += out2 - in2; + else out = out1 + (out - in1) * scale; + outPoints[p][k] = out; + } + } + } + } + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + if (deltaX === 0 && deltaY === 0) return; + for(let p = p1; p <= p2; p++)if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) idx = table.advanceWidthMapping.mapCount - 1; + let entryFormat = table.advanceWidthMapping.entryFormat; + ({ outerIndex: outerIndex, innerIndex: innerIndex } = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + return this.getDelta(table.itemVariationStore, outerIndex, innerIndex); + } + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getDelta(itemStore, outerIndex, innerIndex) { + if (outerIndex >= itemStore.itemVariationData.length) return 0; + let varData = itemStore.itemVariationData[outerIndex]; + if (innerIndex >= varData.deltaSets.length) return 0; + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + for(let master = 0; master < varData.regionIndexCount; master++)netAdjustment += deltaSet.deltas[master] * blendVector[master]; + return netAdjustment; + } + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) return this.blendVectors.get(varData); + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + // outer loop steps through master designs to be blended + for(let master = 0; master < varData.regionIndexCount; master++){ + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + // inner loop steps through axes in this region + for(let j = 0; j < axes.length; j++){ + let axis = axes[j]; + let axisScalar; + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) axisScalar = 1; + else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) axisScalar = 1; + else if (axis.peakCoord === 0) axisScalar = 1; + else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) axisScalar = 0; + else { + if (normalizedCoords[j] === axis.peakCoord) axisScalar = 1; + else if (normalizedCoords[j] < axis.peakCoord) axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.startCoord + Number.EPSILON); + else axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + // take product of all the axis scalars + scalar *= axisScalar; + } + blendVector[master] = scalar; + } + this.blendVectors.set(varData, blendVector); + return blendVector; + } + constructor(font, coords){ + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } +} + + + + +const $5cc7476da92df375$var$resolved = Promise.resolve(); +class $5cc7476da92df375$export$2e2bcd8739ae039 { + includeGlyph(glyph) { + if (typeof glyph === 'object') glyph = glyph.id; + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + return this.mapping[glyph]; + } + constructor(font){ + this.font = font; + this.glyphs = []; + this.mapping = {}; + // always include the missing glyph + this.includeGlyph(0); + } +} + + + + + +// Flags for simple glyphs +const $807e58506be70005$var$ON_CURVE = 1; +const $807e58506be70005$var$X_SHORT_VECTOR = 2; +const $807e58506be70005$var$Y_SHORT_VECTOR = 4; +const $807e58506be70005$var$REPEAT = 8; +const $807e58506be70005$var$SAME_X = 16; +const $807e58506be70005$var$SAME_Y = 32; +class $807e58506be70005$var$Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + static encode(stream, value) { + if (value >= 0 && value <= 255) stream.writeUInt8(value); + else stream.writeInt16BE(value); + } +} +let $807e58506be70005$var$Glyf = new $52ZIf$Struct({ + numberOfContours: $52ZIf$int16, + xMin: $52ZIf$int16, + yMin: $52ZIf$int16, + xMax: $52ZIf$int16, + yMax: $52ZIf$int16, + endPtsOfContours: new $52ZIf$Array($52ZIf$uint16, 'numberOfContours'), + instructions: new $52ZIf$Array($52ZIf$uint8, $52ZIf$uint16), + flags: new $52ZIf$Array($52ZIf$uint8, 0), + xPoints: new $52ZIf$Array($807e58506be70005$var$Point, 0), + yPoints: new $52ZIf$Array($807e58506be70005$var$Point, 0) +}); +class $807e58506be70005$export$2e2bcd8739ae039 { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + for(let i = 0; i < path.commands.length; i++){ + let c = path.commands[i]; + for(let j = 0; j < c.args.length; j += 2){ + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + if (x === midX && y === midY) continue; + } + } + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) flag |= $807e58506be70005$var$ON_CURVE; + flag = this._encodePoint(x, lastX, xPoints, flag, $807e58506be70005$var$X_SHORT_VECTOR, $807e58506be70005$var$SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, $807e58506be70005$var$Y_SHORT_VECTOR, $807e58506be70005$var$SAME_Y); + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= $807e58506be70005$var$REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + flags.push(flag); + lastFlag = flag; + } + lastX = x; + lastY = y; + pointCount++; + } + if (c.command === 'closePath') endPtsOfContours.push(pointCount - 1); + } + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') endPtsOfContours.push(pointCount - 1); + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + let size = $807e58506be70005$var$Glyf.size(glyf); + let tail = 4 - size % 4; + let stream = new $52ZIf$EncodeStream(size + tail); + $807e58506be70005$var$Glyf.encode(stream, glyf); + // Align to 4-byte length + if (tail !== 0) stream.fill(0, tail); + return stream.buffer; + } + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + if (value === last) flag |= sameFlag; + else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) diff = -diff; + else flag |= sameFlag; + } + points.push(diff); + } + return flag; + } +} + + +class $4abbb6a5dbdc441a$export$2e2bcd8739ae039 extends (0, $5cc7476da92df375$export$2e2bcd8739ae039) { + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + let buffer = stream.readBuffer(nextOffset - curOffset); + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Uint8Array(buffer); + let view = new DataView(buffer.buffer); + for (let component of glyf.components){ + gid = this.includeGlyph(component.glyphID); + view.setUint16(component.pos, gid); + } + } else if (glyf && this.font._variationProcessor) // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + this.offset += buffer.length; + return this.glyf.length - 1; + } + encode() { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [], + version: this.font.loca.version + }; + this.hmtx = { + metrics: [], + bearings: [] + }; + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while(i < this.glyphs.length)this._addGlyph(this.glyphs[i++]); + let maxp = (0, $52ZIf$clone)(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + this.loca.offsets.push(this.offset); + let head = (0, $52ZIf$clone)(this.font.head); + head.indexToLocFormat = this.loca.version; + let hhea = (0, $52ZIf$clone)(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + // TODO: subset prep, cvt, fpgm? + return (0, $816c07a04b6dba87$export$2e2bcd8739ae039).toBuffer({ + tables: { + head: head, + hhea: hhea, + loca: this.loca, + maxp: maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + } + }); + } + constructor(font){ + super(font); + this.glyphEncoder = new (0, $807e58506be70005$export$2e2bcd8739ae039); + } +} + + + + + + +class $001d739428a71d5a$export$2e2bcd8739ae039 extends (0, $5cc7476da92df375$export$2e2bcd8739ae039) { + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + for (let gid of this.glyphs){ + this.charstrings.push(this.cff.getCharString(gid)); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedGsubrs)gsubrs[subr] = true; + } + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + subsetSubrs(subrs, used) { + let res = []; + for(let i = 0; i < subrs.length; i++){ + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else res.push(new Uint8Array([ + 11 + ])); // return + } + return res; + } + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + let used_fds = {}; + let used_subrs = []; + let fd_select = {}; + for (let gid of this.glyphs){ + let fd = this.cff.fdForGlyph(gid); + if (fd == null) continue; + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + fd_select[fd] = topDict.FDArray.length - 1; + } + used_fds[fd] = true; + topDict.FDSelect.fds.push(fd_select[fd]); + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[fd_select[fd]][subr] = true; + } + for(let i = 0; i < topDict.FDArray.length; i++){ + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + return; + } + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs){ + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for(let subr in glyph._usedSubrs)used_subrs[subr] = true; + } + let privateDict = Object.assign({}, this.cff.topDict.Private); + if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + topDict.FDArray = [ + { + Private: privateDict + } + ]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [ + { + first: 0, + fd: 0 + } + ], + sentinel: this.charstrings.length + }; + } + addString(string) { + if (!string) return null; + if (!this.strings) this.strings = []; + this.strings.push(string); + return (0, $229224aec43783c5$export$2e2bcd8739ae039).length + this.strings.length - 1; + } + encode() { + this.subsetCharstrings(); + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [ + { + first: 1, + nLeft: this.charstrings.length - 2 + } + ] + }; + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + for (let key of [ + 'version', + 'Notice', + 'Copyright', + 'FullName', + 'FamilyName', + 'Weight', + 'PostScript', + 'BaseFontName', + 'FontName' + ])topDict[key] = this.addString(this.cff.string(topDict[key])); + topDict.ROS = [ + this.addString('Adobe'), + this.addString('Identity'), + 0 + ]; + topDict.CIDCount = this.charstrings.length; + if (this.cff.isCIDFont) this.subsetFontdict(topDict); + else this.createCIDFontdict(topDict); + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: 4, + header: this.cff.header, + nameIndex: [ + this.cff.postscriptName + ], + topDictIndex: [ + topDict + ], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + return (0, $b84fd3dd9d8eddb2$export$2e2bcd8739ae039).toBuffer(top); + } + constructor(font){ + super(font); + this.cff = this.font['CFF ']; + if (!this.cff) throw new Error('Not a CFF Font'); + } +} + + + + +class $4c1709dee528ea76$export$2e2bcd8739ae039 { + static probe(buffer) { + let format = (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + setDefaultLanguage(lang = null) { + this.defaultLanguage = lang; + } + _getTable(table) { + if (!(table.tag in this._tables)) try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if ($d636bc798e7178db$export$bd5c5d8b8dcafd78) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + return this._tables[table.tag]; + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + return null; + } + _decodeDirectory() { + return this.directory = (0, $816c07a04b6dba87$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _decodeTable(table) { + let pos = this.stream.pos; + let stream = this._getTableStream(table.tag); + let result = (0, $c3395722bea751e2$export$2e2bcd8739ae039)[table.tag].decode(stream, this, table.length); + this.stream.pos = pos; + return result; + } + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ getName(key, lang = this.defaultLanguage || $d636bc798e7178db$export$42940898df819940) { + let record = this.name && this.name.records[key]; + if (record) // Attempt to retrieve the entry, depending on which translation is available: + return record[lang] || record[this.defaultLanguage] || record[$d636bc798e7178db$export$42940898df819940] || record['en'] || record[Object.keys(record)[0]] // Seriously, ANY language would be fine + || null; + return null; + } + /** + * The unique PostScript name for this font, e.g. "Helvetica-Bold" + * @type {string} + */ get postscriptName() { + return this.getName('postscriptName'); + } + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ get fullName() { + return this.getName('fullName'); + } + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ get familyName() { + return this.getName('fontFamily'); + } + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ get subfamilyName() { + return this.getName('fontSubfamily'); + } + /** + * The font's copyright information + * @type {string} + */ get copyright() { + return this.getName('copyright'); + } + /** + * The font's version number + * @type {string} + */ get version() { + return this.getName('version'); + } + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ get ascent() { + return this.hhea.ascent; + } + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ get descent() { + return this.hhea.descent; + } + /** + * The amount of space that should be included between lines + * @type {number} + */ get lineGap() { + return this.hhea.lineGap; + } + /** + * The offset from the normal underline position that should be used + * @type {number} + */ get underlinePosition() { + return this.post.underlinePosition; + } + /** + * The weight of the underline that should be used + * @type {number} + */ get underlineThickness() { + return this.post.underlineThickness; + } + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ get italicAngle() { + return this.post.italicAngle; + } + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + /** + * The number of glyphs in the font. + * @type {number} + */ get numGlyphs() { + return this.maxp.numGlyphs; + } + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ get unitsPerEm() { + return this.head.unitsPerEm; + } + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ get bbox() { + return Object.freeze(new (0, $f34600ab9d7f70d8$export$2e2bcd8739ae039)(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + get _cmapProcessor() { + return new (0, $f08dd41ef10b694c$export$2e2bcd8739ae039)(this.cmap); + } + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [ + codePoint + ]); + } + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + while(idx <= len){ + let code = 0; + let nextState = 0; + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0; + } else idx++; + if (state === 0 && nextState === 1) // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [ + last, + code + ])); + else if (state === 0 && nextState === 0) // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + last = code; + state = nextState; + } + return glyphs; + } + get _layoutEngine() { + return new (0, $4c0a7fa5df7a9ab1$export$2e2bcd8739ae039)(this); + } + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @param {string} [direction] + * @return {GlyphRun} + */ layout(string, userFeatures, script, language, direction) { + return this._layoutEngine.layout(string, userFeatures, script, language, direction); + } + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + getAvailableFeatures(script, language) { + return this._layoutEngine.getAvailableFeatures(script, language); + } + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) this._glyphs[glyph] = new (0, $69aac16029968692$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) this._glyphs[glyph] = new (0, $62cc5109c6101893$export$2e2bcd8739ae039)(glyph, characters, this); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) this._glyphs[glyph] = new (0, $25d8f049c222084c$export$2e2bcd8739ae039)(glyph, characters, this); + else if (this.directory.tables.COLR && this.directory.tables.CPAL) this._glyphs[glyph] = new (0, $0d411f0165859681$export$2e2bcd8739ae039)(glyph, characters, this); + else this._getBaseGlyph(glyph, characters); + } + return this._glyphs[glyph] || null; + } + /** + * Returns a Subset for this font. + * @return {Subset} + */ createSubset() { + if (this.directory.tables['CFF ']) return new (0, $001d739428a71d5a$export$2e2bcd8739ae039)(this); + return new (0, $4abbb6a5dbdc441a$export$2e2bcd8739ae039)(this); + } + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ get variationAxes() { + let res = {}; + if (!this.fvar) return res; + for (let axis of this.fvar.axis)res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + return res; + } + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ get namedVariations() { + let res = {}; + if (!this.fvar) return res; + for (let instance of this.fvar.instance){ + let settings = {}; + for(let i = 0; i < this.fvar.axis.length; i++){ + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + res[instance.name.en] = settings; + } + return res; + } + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ getVariation(settings) { + if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + if (typeof settings === 'string') settings = this.namedVariations[settings]; + if (typeof settings !== 'object') throw new Error('Variation settings must be either a variation name or settings object.'); + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i)=>{ + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + else return axis.defaultValue; + }); + let stream = new $52ZIf$DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + let font = new $4c1709dee528ea76$export$2e2bcd8739ae039(stream, coords); + font._tables = this._tables; + return font; + } + get _variationProcessor() { + if (!this.fvar) return null; + let variationCoords = this.variationCoords; + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) return null; + if (!variationCoords) variationCoords = this.fvar.axis.map((axis)=>axis.defaultValue); + return new (0, $0bb840cac04e911b$export$2e2bcd8739ae039)(this, variationCoords); + } + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } + constructor(stream, variationCoords = null){ + (0, $52ZIf$_)(this, "type", 'TTF'); + this.defaultLanguage = null; + this.stream = stream; + this.variationCoords = variationCoords; + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + // define properties for each table to lazily parse + for(let tag in this.directory.tables){ + let table = this.directory.tables[tag]; + if ((0, $c3395722bea751e2$export$2e2bcd8739ae039)[tag] && table.length > 0) Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } +} +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "bbox", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_cmapProcessor", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "characterSet", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_layoutEngine", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "variationAxes", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "namedVariations", null); +(0, $52ZIf$_1)([ + (0, $e71565f2ce09cb6b$export$69a3209f1a06c04d) +], $4c1709dee528ea76$export$2e2bcd8739ae039.prototype, "_variationProcessor", null); + + + + + + +let $c1726355ecc5b889$var$WOFFDirectoryEntry = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + offset: new $52ZIf$Pointer($52ZIf$uint32, 'void', { + type: 'global' + }), + compLength: $52ZIf$uint32, + length: $52ZIf$uint32, + origChecksum: $52ZIf$uint32 +}); +let $c1726355ecc5b889$var$WOFFDirectory = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + flavor: $52ZIf$uint32, + length: $52ZIf$uint32, + numTables: $52ZIf$uint16, + reserved: new $52ZIf$Reserved($52ZIf$uint16), + totalSfntSize: $52ZIf$uint32, + majorVersion: $52ZIf$uint16, + minorVersion: $52ZIf$uint16, + metaOffset: $52ZIf$uint32, + metaLength: $52ZIf$uint32, + metaOrigLength: $52ZIf$uint32, + privOffset: $52ZIf$uint32, + privLength: $52ZIf$uint32, + tables: new $52ZIf$Array($c1726355ecc5b889$var$WOFFDirectoryEntry, 'numTables') +}); +$c1726355ecc5b889$var$WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables)tables[table.tag] = table; + this.tables = tables; +}; +var $c1726355ecc5b889$export$2e2bcd8739ae039 = $c1726355ecc5b889$var$WOFFDirectory; + + + + + + +class $760785214b9fc52c$export$2e2bcd8739ae039 extends (0, $4c1709dee528ea76$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOFF'; + } + _decodeDirectory() { + this.directory = (0, $c1726355ecc5b889$export$2e2bcd8739ae039).decode(this.stream, { + _startOffset: 0 + }); + } + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Uint8Array(table.length); + let buf = (0, $52ZIf$tinyinflate)(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new $52ZIf$DecodeStream(buf); + } else return this.stream; + } + return null; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'WOFF'); + } +} + + + + + + + + + +class $8046190c9f1ad19e$export$2e2bcd8739ae039 extends (0, $69aac16029968692$export$2e2bcd8739ae039) { + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + _getCBox() { + return this.path.bbox; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'WOFF2'); + } +} + + + +const $c28ec7bbb3b8de3a$var$Base128 = { + decode (stream) { + let result = 0; + let iterable = [ + 0, + 1, + 2, + 3, + 4 + ]; + for(let j = 0; j < iterable.length; j++){ + let i = iterable[j]; + let code = stream.readUInt8(); + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) throw new Error('Overflow'); + result = result << 7 | code & 0x7f; + if ((code & 0x80) === 0) return result; + } + throw new Error('Bad base 128 number'); + } +}; +let $c28ec7bbb3b8de3a$var$knownTags = [ + 'cmap', + 'head', + 'hhea', + 'hmtx', + 'maxp', + 'name', + 'OS/2', + 'post', + 'cvt ', + 'fpgm', + 'glyf', + 'loca', + 'prep', + 'CFF ', + 'VORG', + 'EBDT', + 'EBLC', + 'gasp', + 'hdmx', + 'kern', + 'LTSH', + 'PCLT', + 'VDMX', + 'vhea', + 'vmtx', + 'BASE', + 'GDEF', + 'GPOS', + 'GSUB', + 'EBSC', + 'JSTF', + 'MATH', + 'CBDT', + 'CBLC', + 'COLR', + 'CPAL', + 'SVG ', + 'sbix', + 'acnt', + 'avar', + 'bdat', + 'bloc', + 'bsln', + 'cvar', + 'fdsc', + 'feat', + 'fmtx', + 'fvar', + 'gvar', + 'hsty', + 'just', + 'lcar', + 'mort', + 'morx', + 'opbd', + 'prop', + 'trak', + 'Zapf', + 'Silf', + 'Glat', + 'Gloc', + 'Feat', + 'Sill' +]; +let $c28ec7bbb3b8de3a$var$WOFF2DirectoryEntry = new $52ZIf$Struct({ + flags: $52ZIf$uint8, + customTag: new $52ZIf$Optional(new $52ZIf$String(4), (t)=>(t.flags & 0x3f) === 0x3f), + tag: (t)=>t.customTag || $c28ec7bbb3b8de3a$var$knownTags[t.flags & 0x3f], + length: $c28ec7bbb3b8de3a$var$Base128, + transformVersion: (t)=>t.flags >>> 6 & 0x03, + transformed: (t)=>t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new $52ZIf$Optional($c28ec7bbb3b8de3a$var$Base128, (t)=>t.transformed) +}); +let $c28ec7bbb3b8de3a$var$WOFF2Directory = new $52ZIf$Struct({ + tag: new $52ZIf$String(4), + flavor: $52ZIf$uint32, + length: $52ZIf$uint32, + numTables: $52ZIf$uint16, + reserved: new $52ZIf$Reserved($52ZIf$uint16), + totalSfntSize: $52ZIf$uint32, + totalCompressedSize: $52ZIf$uint32, + majorVersion: $52ZIf$uint16, + minorVersion: $52ZIf$uint16, + metaOffset: $52ZIf$uint32, + metaLength: $52ZIf$uint32, + metaOrigLength: $52ZIf$uint32, + privOffset: $52ZIf$uint32, + privLength: $52ZIf$uint32, + tables: new $52ZIf$Array($c28ec7bbb3b8de3a$var$WOFF2DirectoryEntry, 'numTables') +}); +$c28ec7bbb3b8de3a$var$WOFF2Directory.process = function() { + let tables = {}; + for(let i = 0; i < this.tables.length; i++){ + let table = this.tables[i]; + tables[table.tag] = table; + } + return this.tables = tables; +}; +var $c28ec7bbb3b8de3a$export$2e2bcd8739ae039 = $c28ec7bbb3b8de3a$var$WOFF2Directory; + + + +class $21ee218f84ac7f32$export$2e2bcd8739ae039 extends (0, $4c1709dee528ea76$export$2e2bcd8739ae039) { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'wOF2'; + } + _decodeDirectory() { + this.directory = (0, $c28ec7bbb3b8de3a$export$2e2bcd8739ae039).decode(this.stream); + this._dataPos = this.stream.pos; + } + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + let decompressedSize = 0; + for(let tag in this.directory.tables){ + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length; + } + let decompressed = (0, $52ZIf$brotlidecompressjs)(buffer, decompressedSize); + if (!decompressed) throw new Error('Error decoding compressed data in WOFF2'); + this.stream = new $52ZIf$DecodeStream(decompressed); + this._decompressed = true; + } + } + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) this._transformGlyfTable(); + return this._glyphs[glyph] = new (0, $8046190c9f1ad19e$export$2e2bcd8739ae039)(glyph, characters, this); + } else return super._getBaseGlyph(glyph, characters); + } + } + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = $21ee218f84ac7f32$var$GlyfTable.decode(this.stream); + let glyphs = []; + for(let index = 0; index < table.numGlyphs; index++){ + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + if (nContours > 0) { + let nPoints = []; + let totalPoints = 0; + for(let i = 0; i < nContours; i++){ + let r = $21ee218f84ac7f32$var$read255UInt16(table.nPoints); + totalPoints += r; + nPoints.push(totalPoints); + } + glyph.points = $21ee218f84ac7f32$var$decodeTriplet(table.flags, table.glyphs, totalPoints); + for(let i = 0; i < nContours; i++)glyph.points[nPoints[i] - 1].endContour = true; + var instructionSize = $21ee218f84ac7f32$var$read255UInt16(table.glyphs); + } else if (nContours < 0) { + let haveInstructions = (0, $69aac16029968692$export$2e2bcd8739ae039).prototype._decodeComposite.call({ + _font: this + }, glyph, table.composites); + if (haveInstructions) var instructionSize = $21ee218f84ac7f32$var$read255UInt16(table.glyphs); + } + glyphs.push(glyph); + } + this._transformedGlyphs = glyphs; + } + constructor(...args){ + super(...args); + (0, $52ZIf$_)(this, "type", 'WOFF2'); + } +} +// Special class that accepts a length and returns a sub-stream for that data +class $21ee218f84ac7f32$var$Substream { + decode(stream, parent) { + return new $52ZIf$DecodeStream(this._buf.decode(stream, parent)); + } + constructor(length){ + this.length = length; + this._buf = new $52ZIf$Buffer(length); + } +} +// This struct represents the entire glyf table +let $21ee218f84ac7f32$var$GlyfTable = new $52ZIf$Struct({ + version: $52ZIf$uint32, + numGlyphs: $52ZIf$uint16, + indexFormat: $52ZIf$uint16, + nContourStreamSize: $52ZIf$uint32, + nPointsStreamSize: $52ZIf$uint32, + flagStreamSize: $52ZIf$uint32, + glyphStreamSize: $52ZIf$uint32, + compositeStreamSize: $52ZIf$uint32, + bboxStreamSize: $52ZIf$uint32, + instructionStreamSize: $52ZIf$uint32, + nContours: new $21ee218f84ac7f32$var$Substream('nContourStreamSize'), + nPoints: new $21ee218f84ac7f32$var$Substream('nPointsStreamSize'), + flags: new $21ee218f84ac7f32$var$Substream('flagStreamSize'), + glyphs: new $21ee218f84ac7f32$var$Substream('glyphStreamSize'), + composites: new $21ee218f84ac7f32$var$Substream('compositeStreamSize'), + bboxes: new $21ee218f84ac7f32$var$Substream('bboxStreamSize'), + instructions: new $21ee218f84ac7f32$var$Substream('instructionStreamSize') +}); +const $21ee218f84ac7f32$var$WORD_CODE = 253; +const $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE2 = 254; +const $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE1 = 255; +const $21ee218f84ac7f32$var$LOWEST_U_CODE = 253; +function $21ee218f84ac7f32$var$read255UInt16(stream) { + let code = stream.readUInt8(); + if (code === $21ee218f84ac7f32$var$WORD_CODE) return stream.readUInt16BE(); + if (code === $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE1) return stream.readUInt8() + $21ee218f84ac7f32$var$LOWEST_U_CODE; + if (code === $21ee218f84ac7f32$var$ONE_MORE_BYTE_CODE2) return stream.readUInt8() + $21ee218f84ac7f32$var$LOWEST_U_CODE * 2; + return code; +} +function $21ee218f84ac7f32$var$withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} +function $21ee218f84ac7f32$var$decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + for(let i = 0; i < nPoints; i++){ + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + if (flag < 10) { + dx = 0; + dy = $21ee218f84ac7f32$var$withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + } else if (flag < 20) { + dx = $21ee218f84ac7f32$var$withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8()); + dy = 0; + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = $21ee218f84ac7f32$var$withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + } else if (flag < 120) { + var b0 = flag - 84; + dx = $21ee218f84ac7f32$var$withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8()); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8()); + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = $21ee218f84ac7f32$var$withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + } else { + dx = $21ee218f84ac7f32$var$withSign(flag, glyphs.readUInt16BE()); + dy = $21ee218f84ac7f32$var$withSign(flag >> 1, glyphs.readUInt16BE()); + } + x += dx; + y += dy; + res.push(new (0, $69aac16029968692$export$baf26146a414f24a)(onCurve, false, x, y)); + } + return res; +} + + + + + + + + +let $cd5853a56c68fec7$var$TTCHeader = new $52ZIf$VersionedStruct($52ZIf$uint32, { + 0x00010000: { + numFonts: $52ZIf$uint32, + offsets: new $52ZIf$Array($52ZIf$uint32, 'numFonts') + }, + 0x00020000: { + numFonts: $52ZIf$uint32, + offsets: new $52ZIf$Array($52ZIf$uint32, 'numFonts'), + dsigTag: $52ZIf$uint32, + dsigLength: $52ZIf$uint32, + dsigOffset: $52ZIf$uint32 + } +}); +class $cd5853a56c68fec7$export$2e2bcd8739ae039 { + static probe(buffer) { + return (0, $12727730ddfc8bfe$export$3d28c1996ced1f14).decode(buffer.slice(0, 4)) === 'ttcf'; + } + getFont(name) { + for (let offset of this.header.offsets){ + let stream = new $52ZIf$DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let offset of this.header.offsets){ + let stream = new $52ZIf$DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $52ZIf$_)(this, "type", 'TTC'); + this.stream = stream; + if (stream.readString(4) !== 'ttcf') throw new Error('Not a TrueType collection'); + this.header = $cd5853a56c68fec7$var$TTCHeader.decode(stream); + } +} + + + + + +let $05f49f930186144e$var$DFontName = new $52ZIf$String($52ZIf$uint8); +let $05f49f930186144e$var$DFontData = new $52ZIf$Struct({ + len: $52ZIf$uint32, + buf: new $52ZIf$Buffer('len') +}); +let $05f49f930186144e$var$Ref = new $52ZIf$Struct({ + id: $52ZIf$uint16, + nameOffset: $52ZIf$int16, + attr: $52ZIf$uint8, + dataOffset: $52ZIf$uint24, + handle: $52ZIf$uint32 +}); +let $05f49f930186144e$var$Type = new $52ZIf$Struct({ + name: new $52ZIf$String(4), + maxTypeIndex: $52ZIf$uint16, + refList: new $52ZIf$Pointer($52ZIf$uint16, new $52ZIf$Array($05f49f930186144e$var$Ref, (t)=>t.maxTypeIndex + 1), { + type: 'parent' + }) +}); +let $05f49f930186144e$var$TypeList = new $52ZIf$Struct({ + length: $52ZIf$uint16, + types: new $52ZIf$Array($05f49f930186144e$var$Type, (t)=>t.length + 1) +}); +let $05f49f930186144e$var$DFontMap = new $52ZIf$Struct({ + reserved: new $52ZIf$Reserved($52ZIf$uint8, 24), + typeList: new $52ZIf$Pointer($52ZIf$uint16, $05f49f930186144e$var$TypeList), + nameListOffset: new $52ZIf$Pointer($52ZIf$uint16, 'void') +}); +let $05f49f930186144e$var$DFontHeader = new $52ZIf$Struct({ + dataOffset: $52ZIf$uint32, + map: new $52ZIf$Pointer($52ZIf$uint32, $05f49f930186144e$var$DFontMap), + dataLength: $52ZIf$uint32, + mapLength: $52ZIf$uint32 +}); +class $05f49f930186144e$export$2e2bcd8739ae039 { + static probe(buffer) { + let stream = new $52ZIf$DecodeStream(buffer); + try { + var header = $05f49f930186144e$var$DFontHeader.decode(stream); + } catch (e) { + return false; + } + for (let type of header.map.typeList.types){ + if (type.name === 'sfnt') return true; + } + return false; + } + getFont(name) { + if (!this.sfnt) return null; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $52ZIf$DecodeStream(this.stream.buffer.slice(pos)); + let font = new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream); + if (font.postscriptName === name || font.postscriptName instanceof Uint8Array && name instanceof Uint8Array && font.postscriptName.every((v, i)=>name[i] === v)) return font; + } + return null; + } + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList){ + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new $52ZIf$DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new (0, $4c1709dee528ea76$export$2e2bcd8739ae039)(stream)); + } + return fonts; + } + constructor(stream){ + (0, $52ZIf$_)(this, "type", 'DFont'); + this.stream = stream; + this.header = $05f49f930186144e$var$DFontHeader.decode(this.stream); + for (let type of this.header.map.typeList.types){ + for (let ref of type.refList)if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = $05f49f930186144e$var$DFontName.decode(this.stream); + } else ref.name = null; + if (type.name === 'sfnt') this.sfnt = type; + } + } +} + + +// Register font formats +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $4c1709dee528ea76$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $760785214b9fc52c$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $21ee218f84ac7f32$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $cd5853a56c68fec7$export$2e2bcd8739ae039)); +(0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $05f49f930186144e$export$2e2bcd8739ae039)); + + +export {$d636bc798e7178db$export$bd5c5d8b8dcafd78 as logErrors, $d636bc798e7178db$export$36b2f24e97d43be as registerFormat, $d636bc798e7178db$export$185802fd694ee1f5 as create, $d636bc798e7178db$export$42940898df819940 as defaultLanguage, $d636bc798e7178db$export$5157e7780d44cc36 as setDefaultLanguage, $b422b1e013cd6010$export$fa5499edb1ab414a as openSync, $b422b1e013cd6010$export$3ce6949f20cea765 as open}; +//# sourceMappingURL=module.mjs.map diff --git a/node_modules/fontkit/dist/module.mjs.map b/node_modules/fontkit/dist/module.mjs.map new file mode 100644 index 0000000..d8d6a91 --- /dev/null +++ b/node_modules/fontkit/dist/module.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEO,IAAI,4CAAY;AAEvB,IAAI,gCAAU,EAAE;AACT,SAAS,yCAAe,MAAM;IACnC,8BAAQ,IAAI,CAAC;AACf;AAEO,SAAS,0CAAO,MAAM,EAAE,cAAc;IAC3C,IAAK,IAAI,IAAI,GAAG,IAAI,8BAAQ,MAAM,EAAE,IAAK;QACvC,IAAI,SAAS,6BAAO,CAAC,EAAE;QACvB,IAAI,OAAO,KAAK,CAAC,SAAS;YACxB,IAAI,OAAO,IAAI,OAAO,IAAI,CAAA,GAAA,mBAAW,EAAE;YACvC,IAAI,gBACF,OAAO,KAAK,OAAO,CAAC;YAGtB,OAAO;QACT;IACF;IAEA,MAAM,IAAI,MAAM;AAClB;AAEO,IAAI,4CAAkB;AACtB,SAAS,0CAAmB,OAAO,IAAI;IAC5C,4CAAkB;AACpB;;;;;;;;;ACzBO,SAAS,0CAAS,QAAQ,EAAE,cAAc;IAC/C,IAAI,SAAS,CAAA,GAAA,SAAC,EAAE,YAAY,CAAC;IAC7B,OAAO,CAAA,GAAA,yCAAK,EAAE,QAAQ;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,EAAE,CAAA,GAAA,wCAAI","sources":["src/node.js","src/base.js","src/fs.js","src/TTFFont.js","src/decorators.js","src/tables/directory.js","src/tables/index.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/tables/name.js","src/encodings.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFFont.js","src/cff/CFFIndex.js","src/cff/CFFTop.js","src/cff/CFFDict.js","src/cff/CFFOperand.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/variations.js","src/tables/opentype.js","src/tables/VORG.js","src/tables/EBLC.js","src/tables/EBDT.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/bsln.js","src/tables/aat.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/CmapProcessor.js","src/utils.js","src/layout/LayoutEngine.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/layout/GlyphRun.js","src/glyph/BBox.js","src/layout/Script.js","src/layout/GlyphPosition.js","src/aat/AATLayoutEngine.js","src/aat/AATFeatureMap.js","src/aat/AATMorxProcessor.js","src/aat/AATStateMachine.js","src/aat/AATLookupTable.js","src/opentype/OTLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/index.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/shapers/HangulShaper.js","src/opentype/GlyphInfo.js","src/opentype/OTProcessor.js","src/opentype/GlyphIterator.js","src/opentype/shapers/IndicShaper.js","src/opentype/shapers/indic.json","src/opentype/shapers/use.json","src/opentype/shapers/indic-data.js","src/opentype/shapers/UniversalShaper.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/glyph/TTFGlyph.js","src/glyph/Glyph.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/TTFSubset.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/CFFSubset.js","src/WOFFFont.js","src/tables/WOFFDirectory.js","src/WOFF2Font.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/TrueTypeCollection.js","src/DFont.js"],"sourcesContent":["import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base';\nimport { open, openSync } from './fs';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nregisterFormat(TTFFont);\nregisterFormat(WOFFFont);\nregisterFormat(WOFF2Font);\nregisterFormat(TrueTypeCollection);\nregisterFormat(DFont);\n\nexport * from './base';\nexport * from './fs';\n","import {DecodeStream} from 'restructure';\n\nexport let logErrors = false;\n\nlet formats = [];\nexport function registerFormat(format) {\n formats.push(format);\n};\n\nexport function create(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n\nexport let defaultLanguage = 'en';\nexport function setDefaultLanguage(lang = 'en') {\n defaultLanguage = lang;\n};\n","import { create } from './base';\nimport fs from 'fs';\n\nexport function openSync(filename, postscriptName) {\n let buffer = fs.readFileSync(filename);\n return create(buffer, postscriptName);\n}\n\nexport async function open(filename, postscriptName, callback) {\n if (typeof postscriptName === 'function') {\n callback = postscriptName;\n postscriptName = null;\n }\n\n let buffer = await fs.promises.readFile(filename);\n return create(buffer, postscriptName);\n}\n","import * as r from 'restructure';\nimport { cache } from './decorators';\nimport * as fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\nimport { asciiDecoder } from './utils';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n type = 'TTF';\n\n static probe(buffer) {\n let format = asciiDecoder.decode(buffer.slice(0, 4));\n return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n }\n\n constructor(stream, variationCoords = null) {\n this.defaultLanguage = null;\n this.stream = stream;\n this.variationCoords = variationCoords;\n\n this._directoryPos = this.stream.pos;\n this._tables = {};\n this._glyphs = {};\n this._decodeDirectory();\n\n // define properties for each table to lazily parse\n for (let tag in this.directory.tables) {\n let table = this.directory.tables[tag];\n if (tables[tag] && table.length > 0) {\n Object.defineProperty(this, tag, {\n get: this._getTable.bind(this, table)\n });\n }\n }\n }\n\n setDefaultLanguage(lang = null) {\n this.defaultLanguage = lang;\n }\n\n _getTable(table) {\n if (!(table.tag in this._tables)) {\n try {\n this._tables[table.tag] = this._decodeTable(table);\n } catch (e) {\n if (fontkit.logErrors) {\n console.error(`Error decoding table ${table.tag}`);\n console.error(e.stack);\n }\n }\n }\n\n return this._tables[table.tag];\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n return this.stream;\n }\n\n return null;\n }\n\n _decodeDirectory() {\n return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n }\n\n _decodeTable(table) {\n let pos = this.stream.pos;\n\n let stream = this._getTableStream(table.tag);\n let result = tables[table.tag].decode(stream, this, table.length);\n\n this.stream.pos = pos;\n return result;\n }\n\n /**\n * Gets a string from the font's `name` table\n * `lang` is a BCP-47 language code.\n * @return {string}\n */\n getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) {\n let record = this.name && this.name.records[key];\n if (record) {\n // Attempt to retrieve the entry, depending on which translation is available:\n return (\n record[lang]\n || record[this.defaultLanguage]\n || record[fontkit.defaultLanguage]\n || record['en']\n || record[Object.keys(record)[0]] // Seriously, ANY language would be fine\n || null\n );\n }\n\n return null;\n }\n\n /**\n * The unique PostScript name for this font, e.g. \"Helvetica-Bold\"\n * @type {string}\n */\n get postscriptName() {\n return this.getName('postscriptName');\n }\n\n /**\n * The font's full name, e.g. \"Helvetica Bold\"\n * @type {string}\n */\n get fullName() {\n return this.getName('fullName');\n }\n\n /**\n * The font's family name, e.g. \"Helvetica\"\n * @type {string}\n */\n get familyName() {\n return this.getName('fontFamily');\n }\n\n /**\n * The font's sub-family, e.g. \"Bold\".\n * @type {string}\n */\n get subfamilyName() {\n return this.getName('fontSubfamily');\n }\n\n /**\n * The font's copyright information\n * @type {string}\n */\n get copyright() {\n return this.getName('copyright');\n }\n\n /**\n * The font's version number\n * @type {string}\n */\n get version() {\n return this.getName('version');\n }\n\n /**\n * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n * @type {number}\n */\n get ascent() {\n return this.hhea.ascent;\n }\n\n /**\n * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n * @type {number}\n */\n get descent() {\n return this.hhea.descent;\n }\n\n /**\n * The amount of space that should be included between lines\n * @type {number}\n */\n get lineGap() {\n return this.hhea.lineGap;\n }\n\n /**\n * The offset from the normal underline position that should be used\n * @type {number}\n */\n get underlinePosition() {\n return this.post.underlinePosition;\n }\n\n /**\n * The weight of the underline that should be used\n * @type {number}\n */\n get underlineThickness() {\n return this.post.underlineThickness;\n }\n\n /**\n * If this is an italic font, the angle the cursor should be drawn at to match the font design\n * @type {number}\n */\n get italicAngle() {\n return this.post.italicAngle;\n }\n\n /**\n * The height of capital letters above the baseline.\n * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n * @type {number}\n */\n get capHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.capHeight : this.ascent;\n }\n\n /**\n * The height of lower case letters in the font.\n * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n * @type {number}\n */\n get xHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.xHeight : 0;\n }\n\n /**\n * The number of glyphs in the font.\n * @type {number}\n */\n get numGlyphs() {\n return this.maxp.numGlyphs;\n }\n\n /**\n * The size of the font’s internal coordinate grid\n * @type {number}\n */\n get unitsPerEm() {\n return this.head.unitsPerEm;\n }\n\n /**\n * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n }\n\n @cache\n get _cmapProcessor() {\n return new CmapProcessor(this.cmap);\n }\n\n /**\n * An array of all of the unicode code points supported by the font.\n * @type {number[]}\n */\n @cache\n get characterSet() {\n return this._cmapProcessor.getCharacterSet();\n }\n\n /**\n * Returns whether there is glyph in the font for the given unicode code point.\n *\n * @param {number} codePoint\n * @return {boolean}\n */\n hasGlyphForCodePoint(codePoint) {\n return !!this._cmapProcessor.lookup(codePoint);\n }\n\n /**\n * Maps a single unicode code point to a Glyph object.\n * Does not perform any advanced substitutions (there is no context to do so).\n *\n * @param {number} codePoint\n * @return {Glyph}\n */\n glyphForCodePoint(codePoint) {\n return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n }\n\n /**\n * Returns an array of Glyph objects for the given string.\n * This is only a one-to-one mapping from characters to glyphs.\n * For most uses, you should use font.layout (described below), which\n * provides a much more advanced mapping supporting AAT and OpenType shaping.\n *\n * @param {string} string\n * @return {Glyph[]}\n */\n glyphsForString(string) {\n let glyphs = [];\n let len = string.length;\n let idx = 0;\n let last = -1;\n let state = -1;\n\n while (idx <= len) {\n let code = 0;\n let nextState = 0;\n\n if (idx < len) {\n // Decode the next codepoint from UTF 16\n code = string.charCodeAt(idx++);\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n }\n }\n\n // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n } else {\n idx++;\n }\n\n if (state === 0 && nextState === 1) {\n // Variation selector following normal codepoint.\n glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n } else if (state === 0 && nextState === 0) {\n // Normal codepoint following normal codepoint.\n glyphs.push(this.glyphForCodePoint(last));\n }\n\n last = code;\n state = nextState;\n }\n\n return glyphs;\n }\n\n @cache\n get _layoutEngine() {\n return new LayoutEngine(this);\n }\n\n /**\n * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n *\n * @param {string} string\n * @param {string[]} [userFeatures]\n * @param {string} [script]\n * @param {string} [language]\n * @param {string} [direction]\n * @return {GlyphRun}\n */\n layout(string, userFeatures, script, language, direction) {\n return this._layoutEngine.layout(string, userFeatures, script, language, direction);\n }\n\n /**\n * Returns an array of strings that map to the given glyph id.\n * @param {number} gid - glyph id\n */\n stringsForGlyph(gid) {\n return this._layoutEngine.stringsForGlyph(gid);\n }\n\n /**\n * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n * (or mapped AAT tags) supported by the font.\n * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n *\n * @type {string[]}\n */\n get availableFeatures() {\n return this._layoutEngine.getAvailableFeatures();\n }\n\n getAvailableFeatures(script, language) {\n return this._layoutEngine.getAvailableFeatures(script, language);\n }\n\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf) {\n this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a glyph object for the given glyph id.\n * You can pass the array of code points this glyph represents for\n * your use later, and it will be stored in the glyph object.\n *\n * @param {number} glyph\n * @param {number[]} characters\n * @return {Glyph}\n */\n getGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.sbix) {\n this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n } else {\n this._getBaseGlyph(glyph, characters);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a Subset for this font.\n * @return {Subset}\n */\n createSubset() {\n if (this.directory.tables['CFF ']) {\n return new CFFSubset(this);\n }\n\n return new TTFSubset(this);\n }\n\n /**\n * Returns an object describing the available variation axes\n * that this font supports. Keys are setting tags, and values\n * contain the axis name, range, and default value.\n *\n * @type {object}\n */\n @cache\n get variationAxes() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let axis of this.fvar.axis) {\n res[axis.axisTag.trim()] = {\n name: axis.name.en,\n min: axis.minValue,\n default: axis.defaultValue,\n max: axis.maxValue\n };\n }\n\n return res;\n }\n\n /**\n * Returns an object describing the named variation instances\n * that the font designer has specified. Keys are variation names\n * and values are the variation settings for this instance.\n *\n * @type {object}\n */\n @cache\n get namedVariations() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let instance of this.fvar.instance) {\n let settings = {};\n for (let i = 0; i < this.fvar.axis.length; i++) {\n let axis = this.fvar.axis[i];\n settings[axis.axisTag.trim()] = instance.coord[i];\n }\n\n res[instance.name.en] = settings;\n }\n\n return res;\n }\n\n /**\n * Returns a new font with the given variation settings applied.\n * Settings can either be an instance name, or an object containing\n * variation tags as specified by the `variationAxes` property.\n *\n * @param {object} settings\n * @return {TTFFont}\n */\n getVariation(settings) {\n if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n }\n\n if (typeof settings === 'string') {\n settings = this.namedVariations[settings];\n }\n\n if (typeof settings !== 'object') {\n throw new Error('Variation settings must be either a variation name or settings object.');\n }\n\n // normalize the coordinates\n let coords = this.fvar.axis.map((axis, i) => {\n let axisTag = axis.axisTag.trim();\n if (axisTag in settings) {\n return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n } else {\n return axis.defaultValue;\n }\n });\n\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = this._directoryPos;\n\n let font = new TTFFont(stream, coords);\n font._tables = this._tables;\n\n return font;\n }\n\n @cache\n get _variationProcessor() {\n if (!this.fvar) {\n return null;\n }\n\n let variationCoords = this.variationCoords;\n\n // Ignore if no variation coords and not CFF2\n if (!variationCoords && !this.CFF2) {\n return null;\n }\n\n if (!variationCoords) {\n variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n }\n\n return new GlyphVariationProcessor(this, variationCoords);\n }\n\n // Standardized format plugin API\n getFont(name) {\n return this.getVariation(name);\n }\n}\n","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n if (descriptor.get) {\n let get = descriptor.get;\n descriptor.get = function() {\n let value = get.call(this);\n Object.defineProperty(this, key, { value });\n return value;\n };\n } else if (typeof descriptor.value === 'function') {\n let fn = descriptor.value;\n\n return {\n get() {\n let cache = new Map;\n function memoized(...args) {\n let key = args.length > 0 ? args[0] : 'value';\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n let result = fn.apply(this, args);\n cache.set(key, result);\n return result;\n };\n\n Object.defineProperty(this, key, {value: memoized});\n return memoized;\n }\n };\n }\n}\n","import * as r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n tag: new r.String(4),\n checkSum: r.uint32,\n offset: new r.Pointer(r.uint32, 'void', { type: 'global' }),\n length: r.uint32\n});\n\nlet Directory = new r.Struct({\n tag: new r.String(4),\n numTables: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n tables: new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nDirectory.preEncode = function() {\n if (!Array.isArray(this.tables)) {\n let tables = [];\n for (let tag in this.tables) {\n let table = this.tables[tag];\n if (table) {\n tables.push({\n tag: tag,\n checkSum: 0,\n offset: new r.VoidPointer(Tables[tag], table),\n length: Tables[tag].size(table)\n });\n }\n }\n \n this.tables = tables;\n }\n\n this.tag = 'true';\n this.numTables = this.tables.length;\n\n let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2));\n let maxPowerOf2 = Math.pow(2, maxExponentFor2);\n\n this.searchRange = maxPowerOf2 * 16;\n this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;\n this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import * as r from 'restructure';\n\nlet SubHeader = new r.Struct({\n firstCode: r.uint16,\n entryCount: r.uint16,\n idDelta: r.int16,\n idRangeOffset: r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n startCharCode: r.uint32,\n endCharCode: r.uint32,\n glyphID: r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n startUnicodeValue: r.uint24,\n additionalCount: r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n unicodeValue: r.uint24,\n glyphID: r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n varSelector: r.uint24,\n defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n 0: { // Byte encoding\n length: r.uint16, // Total table length in bytes (set to 262 for format 0)\n language: r.uint16, // Language code for this encoding subtable, or zero if language-independent\n codeMap: new r.LazyArray(r.uint8, 256)\n },\n\n 2: { // High-byte mapping (CJK)\n length: r.uint16,\n language: r.uint16,\n subHeaderKeys: new r.Array(r.uint16, 256),\n subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys),\n subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')\n },\n\n 4: { // Segment mapping to delta values\n length: r.uint16, // Total table length in bytes\n language: r.uint16, // Language code\n segCountX2: r.uint16,\n segCount: t => t.segCountX2 >> 1,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n endCode: new r.LazyArray(r.uint16, 'segCount'),\n reservedPad: new r.Reserved(r.uint16), // This value should be zero\n startCode: new r.LazyArray(r.uint16, 'segCount'),\n idDelta: new r.LazyArray(r.int16, 'segCount'),\n idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n },\n\n 6: { // Trimmed table\n length: r.uint16,\n language: r.uint16,\n firstCode: r.uint16,\n entryCount: r.uint16,\n glyphIndices: new r.LazyArray(r.uint16, 'entryCount')\n },\n\n 8: { // mixed 16-bit and 32-bit coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint16,\n is32: new r.LazyArray(r.uint8, 8192),\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 10: { // Trimmed Array\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n firstCode: r.uint32,\n entryCount: r.uint32,\n glyphIndices: new r.LazyArray(r.uint16, 'numChars')\n },\n\n 12: { // Segmented coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 14: { // Unicode Variation Sequences\n length: r.uint32,\n numRecords: r.uint32,\n varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n }\n});\n\nlet CmapEntry = new r.Struct({\n platformID: r.uint16, // Platform identifier\n encodingID: r.uint16, // Platform-specific encoding identifier\n table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n version: r.uint16,\n numSubtables: r.uint16,\n tables: new r.Array(CmapEntry, 'numSubtables')\n});\n","import * as r from 'restructure';\n\n// font header\nexport default new r.Struct({\n version: r.int32, // 0x00010000 (version 1.0)\n revision: r.int32, // set by font manufacturer\n checkSumAdjustment: r.uint32,\n magicNumber: r.uint32, // set to 0x5F0F3CF5\n flags: r.uint16,\n unitsPerEm: r.uint16, // range from 64 to 16384\n created: new r.Array(r.int32, 2),\n modified: new r.Array(r.int32, 2),\n xMin: r.int16, // for all glyph bounding boxes\n yMin: r.int16, // for all glyph bounding boxes\n xMax: r.int16, // for all glyph bounding boxes\n yMax: r.int16, // for all glyph bounding boxes\n macStyle: new r.Bitfield(r.uint16, [\n 'bold', 'italic', 'underline', 'outline',\n 'shadow', 'condensed', 'extended'\n ]),\n lowestRecPPEM: r.uint16, // smallest readable size in pixels\n fontDirectionHint: r.int16,\n indexToLocFormat: r.int16, // 0 for short offsets, 1 for long\n glyphDataFormat: r.int16 // 0 for current format\n});\n","import * as r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n version: r.int32,\n ascent: r.int16, // Distance from baseline of highest ascender\n descent: r.int16, // Distance from baseline of lowest descender\n lineGap: r.int16, // Typographic line gap\n advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table\n minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table\n minRightSideBearing: r.int16, // Minimum right sidebearing value\n xMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n caretSlopeRun: r.int16, // 0 for vertical\n caretOffset: r.int16, // Set to 0 for non-slanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // 0 for current format\n numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table\n});\n","import * as r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n advance: r.uint16,\n bearing: r.int16\n});\n\nexport default new r.Struct({\n metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n version: r.int32,\n numGlyphs: r.uint16, // The number of glyphs in the font\n maxPoints: r.uint16, // Maximum points in a non-composite glyph\n maxContours: r.uint16, // Maximum contours in a non-composite glyph\n maxComponentPoints: r.uint16, // Maximum points in a composite glyph\n maxComponentContours: r.uint16, // Maximum contours in a composite glyph\n maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise\n maxTwilightPoints: r.uint16, // Maximum points used in Z0\n maxStorage: r.uint16, // Number of Storage Area locations\n maxFunctionDefs: r.uint16, // Number of FDEFs\n maxInstructionDefs: r.uint16, // Number of IDEFs\n maxStackElements: r.uint16, // Maximum stack depth\n maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions\n maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph\n maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components\n});\n","import * as r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n platformID: r.uint16,\n encodingID: r.uint16,\n languageID: r.uint16,\n nameID: r.uint16,\n length: r.uint16,\n string: new r.Pointer(r.uint16,\n new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n { type: 'parent', relativeTo: ctx => ctx.parent.stringOffset, allowNull: false }\n )\n});\n\nlet LangTagRecord = new r.Struct({\n length: r.uint16,\n tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: ctx => ctx.stringOffset})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n 0: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count')\n },\n 1: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count'),\n langTagCount: r.uint16,\n langTags: new r.Array(LangTagRecord, 'langTagCount')\n }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n 'copyright',\n 'fontFamily',\n 'fontSubfamily',\n 'uniqueSubfamily',\n 'fullName',\n 'version',\n 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n 'trademark',\n 'manufacturer',\n 'designer',\n 'description',\n 'vendorURL',\n 'designerURL',\n 'license',\n 'licenseURL',\n null, // reserved\n 'preferredFamily',\n 'preferredSubfamily',\n 'compatibleFull',\n 'sampleText',\n 'postscriptCIDFontName',\n 'wwsFamilyName',\n 'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n var records = {};\n for (let record of this.records) {\n // find out what language this is for\n let language = LANGUAGES[record.platformID][record.languageID];\n\n if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n language = this.langTags[record.languageID - 0x8000].tag;\n }\n\n if (language == null) {\n language = record.platformID + '-' + record.languageID;\n }\n\n // if the nameID is >= 256, it is a font feature record (AAT)\n let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n if (records[key] == null) {\n records[key] = {};\n }\n\n let obj = records[key];\n if (record.nameID >= 256) {\n obj = obj[record.nameID] || (obj[record.nameID] = {});\n }\n\n if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n obj[language] = record.string;\n }\n }\n\n this.records = records;\n};\n\nNameTable.preEncode = function() {\n if (Array.isArray(this.records)) return;\n this.version = 0;\n\n let records = [];\n for (let key in this.records) {\n let val = this.records[key];\n if (key === 'fontFeatures') continue;\n\n records.push({\n platformID: 3,\n encodingID: 1,\n languageID: 0x409,\n nameID: NAMES.indexOf(key),\n length: val.en.length * 2,\n string: val.en\n });\n\n if (key === 'postscriptName') {\n records.push({\n platformID: 1,\n encodingID: 0,\n languageID: 0,\n nameID: NAMES.indexOf(key),\n length: val.en.length,\n string: val.en\n });\n }\n }\n\n this.records = records;\n this.count = records.length;\n this.stringOffset = NameTable.size(this, null, false);\n};\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n return MAC_LANGUAGE_ENCODINGS[languageID];\n }\n \n return ENCODINGS[platformID][encodingID];\n}\n\nconst SINGLE_BYTE_ENCODINGS = new Set(['x-mac-roman', 'x-mac-cyrillic', 'iso-8859-6', 'iso-8859-8']);\nconst MAC_ENCODINGS = {\n 'x-mac-croatian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',\n 'x-mac-gaelic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',\n 'x-mac-greek': 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\\u00AD',\n 'x-mac-icelandic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-inuit': 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',\n 'x-mac-ce': 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',\n 'x-mac-romanian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n 'x-mac-turkish': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'\n};\n\nconst encodingCache = new Map();\n\nexport function getEncodingMapping(encoding) {\n let cached = encodingCache.get(encoding);\n if (cached) {\n return cached;\n }\n\n // These encodings aren't supported by TextDecoder.\n let mapping = MAC_ENCODINGS[encoding];\n if (mapping) {\n let res = new Map();\n for (let i = 0; i < mapping.length; i++) {\n res.set(mapping.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n\n // Only single byte encodings can be mapped 1:1.\n if (SINGLE_BYTE_ENCODINGS.has(encoding)) {\n // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings.\n // Use this to create a mapping of code points.\n let decoder = new TextDecoder(encoding);\n let mapping = new Uint8Array(0x80);\n for (let i = 0; i < 0x80; i++) {\n mapping[i] = 0x80 + i;\n }\n\n let res = new Map();\n let s = decoder.decode(mapping);\n for (let i = 0; i < 0x80; i++) {\n res.set(s.charCodeAt(i), 0x80 + i);\n }\n\n encodingCache.set(encoding, res);\n return res;\n }\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n // unicode\n ['utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be'],\n \n // macintosh\n // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n // 0\tRoman 17\tMalayalam\n // 1\tJapanese\t 18\tSinhalese\n // 2\tTraditional Chinese\t 19\tBurmese\n // 3\tKorean\t 20\tKhmer\n // 4\tArabic\t 21\tThai\n // 5\tHebrew\t 22\tLaotian\n // 6\tGreek\t 23\tGeorgian\n // 7\tRussian\t 24\tArmenian\n // 8\tRSymbol\t 25\tSimplified Chinese\n // 9\tDevanagari\t 26\tTibetan\n // 10\tGurmukhi\t 27\tMongolian\n // 11\tGujarati\t 28\tGeez\n // 12\tOriya\t 29\tSlavic\n // 13\tBengali\t 30\tVietnamese\n // 14\tTamil\t 31\tSindhi\n // 15\tTelugu\t 32\t(Uninterpreted)\n // 16\tKannada\n ['x-mac-roman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n 'x-mac-greek', 'x-mac-cyrillic', 'x-mac-symbol', 'x-mac-devanagari', 'x-mac-gurmukhi', 'x-mac-gujarati',\n 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n 'Burmese', 'Khmer', 'iso-8859-11', 'Laotian', 'Georgian', 'Armenian', 'gbk', \n 'Tibetan', 'Mongolian', 'Geez', 'x-mac-ce', 'Vietnamese', 'Sindhi'],\n \n // ISO (deprecated)\n ['ascii', null, 'iso-8859-1'],\n \n // windows\n // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n ['symbol', 'utf-16be', 'shift-jis', 'gb18030', 'big5', 'euc-kr', 'johab', null, null, null, 'utf-16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n 15: 'x-mac-icelandic',\n 17: 'x-mac-turkish',\n 18: 'x-mac-croatian',\n 24: 'x-mac-ce',\n 25: 'x-mac-ce',\n 26: 'x-mac-ce',\n 27: 'x-mac-ce',\n 28: 'x-mac-ce',\n 30: 'x-mac-icelandic',\n 37: 'x-mac-romanian',\n 38: 'x-mac-ce',\n 39: 'x-mac-ce',\n 40: 'x-mac-ce',\n 143: 'x-mac-inuit',\n 146: 'x-mac-gaelic'\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n // unicode\n [],\n \n { // macintosh\n 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw',\n 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn',\n 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny',\n 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg',\n 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo',\n 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy',\n 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu',\n 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca',\n 8: 'pt', 38: 'cz', 68: 'as', 131: 'la',\n 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu',\n 10: 'he', 40: 'si', 70: 'pa', 133: 'gn',\n 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay',\n 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt',\n 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug',\n 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz',\n 15: 'is', 45: 'uk', 75: 'te', 138: 'jv',\n 16: 'mt', 46: 'be', 76: 'si', 139: 'su',\n 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl',\n 18: 'hr', 48: 'kk', 78: 'km', 141: 'af',\n 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br',\n 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu',\n 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd',\n 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv',\n 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga',\n 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to',\n 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton',\n 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl',\n 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az',\n 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn',\n 29: 'se', 59: 'ps', 89: 'sw',\n },\n \n // ISO (deprecated)\n [],\n \n { // windows \n 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', \n 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', \n 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', \n 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', \n 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', \n 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', \n 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', \n 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', \n 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', \n 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', \n 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', \n 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', \n 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', \n 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', \n 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', \n 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', \n 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', \n 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', \n 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', \n 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', \n 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', \n 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', \n 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', \n 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', \n 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', \n 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', \n 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', \n 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', \n 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', \n 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', \n 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', \n 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', \n 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', \n 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', \n 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', \n 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', \n 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', \n 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', \n 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', \n 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', \n 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', \n 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', \n 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', \n 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', \n 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', \n 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', \n 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', \n 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', \n 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', \n 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', \n 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', \n 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', \n }\n];\n","import * as r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n header: {\n xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space\n usWeightClass: r.uint16, // visual weight of stroke in glyphs\n usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio)\n fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n null, 'noEmbedding', 'viewOnly', 'editable', null,\n null, null, null, 'noSubsetting', 'bitmapOnly'\n ]),\n ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts\n ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts\n ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts\n ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts\n ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts\n ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts\n ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts\n ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts\n yStrikeoutSize: r.int16, // width of the strikeout stroke\n yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline\n sFamilyClass: r.int16, // classification of font-family design\n panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface\n ulCharRange: new r.Array(r.uint32, 4),\n vendorID: new r.String(4), // four character identifier for the font vendor\n fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font\n 'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n ]),\n usFirstCharIndex: r.uint16, // The minimum Unicode index in this font\n usLastCharIndex: r.uint16 // The maximum Unicode index in this font\n },\n\n // The Apple version of this table ends here, but the Microsoft one continues on...\n 0: {},\n\n 1: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2)\n },\n\n 2: {\n // these should be common with version 1 somehow\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16\n },\n\n 5: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16,\n\n usLowerOpticalPointSize: r.uint16,\n usUpperOpticalPointSize: r.uint16\n }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import * as r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n header: { // these fields exist at the top of all versions\n italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline\n underlineThickness: r.int16, // Suggested values for the underline thickness\n isFixedPitch: r.uint32, // Whether the font is monospaced\n minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n },\n\n 1: {}, // version 1 has no additional fields\n\n 2: {\n numberOfGlyphs: r.uint16,\n glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n names: new r.Array(new r.String(r.uint8))\n },\n\n 2.5: {\n numberOfGlyphs: r.uint16,\n offsets: new r.Array(r.uint8, 'numberOfGlyphs')\n },\n\n 3: {}, // version 3 has no additional fields\n\n 4: {\n map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n }\n});\n","import * as r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n controlValues: new r.Array(r.int16)\n});\n","import * as r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n instructions: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n 0: {\n offsets: new r.Array(r.uint16)\n },\n 1: {\n offsets: new r.Array(r.uint32)\n }\n});\n\nloca.process = function() {\n if (this.version === 0 && !this._processed) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] <<= 1;\n }\n this._processed = true;\n }\n};\n\nloca.preEncode = function() {\n if (this.version === 0 && this._processed !== false) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] >>>= 1;\n }\n this._processed = false;\n }\n};\n\nexport default loca;\n","import * as r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n controlValueProgram: new r.Array(r.uint8)\n});\n","import * as r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import * as r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n constructor(stream) {\n this.stream = stream;\n this.decode();\n }\n\n static decode(stream) {\n return new CFFFont(stream);\n }\n\n decode() {\n let start = this.stream.pos;\n let top = CFFTop.decode(this.stream);\n for (let key in top) {\n let val = top[key];\n this[key] = val;\n }\n\n if (this.version < 2) {\n if (this.topDictIndex.length !== 1) {\n throw new Error(\"Only a single font is allowed in CFF\");\n }\n\n this.topDict = this.topDictIndex[0];\n }\n\n this.isCIDFont = this.topDict.ROS != null;\n return this;\n }\n\n string(sid) {\n if (this.version >= 2) {\n return null;\n }\n\n if (sid < standardStrings.length) {\n return standardStrings[sid];\n }\n\n return this.stringIndex[sid - standardStrings.length];\n }\n\n get postscriptName() {\n if (this.version < 2) {\n return this.nameIndex[0];\n }\n\n return null;\n }\n\n get fullName() {\n return this.string(this.topDict.FullName);\n }\n\n get familyName() {\n return this.string(this.topDict.FamilyName);\n }\n\n getCharString(glyph) {\n this.stream.pos = this.topDict.CharStrings[glyph].offset;\n return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n }\n\n getGlyphName(gid) {\n // CFF2 glyph names are in the post table.\n if (this.version >= 2) {\n return null;\n }\n\n // CID-keyed fonts don't have glyph names\n if (this.isCIDFont) {\n return null;\n }\n\n let { charset } = this.topDict;\n if (Array.isArray(charset)) {\n return charset[gid];\n }\n\n if (gid === 0) {\n return '.notdef';\n }\n\n gid -= 1;\n\n switch (charset.version) {\n case 0:\n return this.string(charset.glyphs[gid]);\n\n case 1:\n case 2:\n for (let i = 0; i < charset.ranges.length; i++) {\n let range = charset.ranges[i];\n if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n return this.string(range.first + (gid - range.offset));\n }\n }\n break;\n }\n\n return null;\n }\n\n fdForGlyph(gid) {\n if (!this.topDict.FDSelect) {\n return null;\n }\n\n switch (this.topDict.FDSelect.version) {\n case 0:\n return this.topDict.FDSelect.fds[gid];\n\n case 3:\n case 4:\n let { ranges } = this.topDict.FDSelect;\n let low = 0;\n let high = ranges.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n\n if (gid < ranges[mid].first) {\n high = mid - 1;\n } else if (mid < high && gid >= ranges[mid + 1].first) {\n low = mid + 1;\n } else {\n return ranges[mid].fd;\n }\n }\n default:\n throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n }\n }\n\n privateDictForGlyph(gid) {\n if (this.topDict.FDSelect) {\n let fd = this.fdForGlyph(gid);\n if (this.topDict.FDArray[fd]) {\n return this.topDict.FDArray[fd].Private;\n }\n\n return null;\n }\n\n if (this.version < 2) {\n return this.topDict.Private;\n }\n\n return this.topDict.FDArray[0].Private;\n }\n}\n\nexport default CFFFont;\n","import * as r from 'restructure';\n\nexport default class CFFIndex {\n constructor(type) {\n this.type = type;\n }\n\n getCFFVersion(ctx) {\n while (ctx && !ctx.hdrSize) {\n ctx = ctx.parent;\n }\n\n return ctx ? ctx.version : -1;\n }\n\n decode(stream, parent) {\n let version = this.getCFFVersion(parent);\n let count = version >= 2\n ? stream.readUInt32BE()\n : stream.readUInt16BE();\n\n if (count === 0) {\n return [];\n }\n\n let offSize = stream.readUInt8();\n let offsetType;\n if (offSize === 1) {\n offsetType = r.uint8;\n } else if (offSize === 2) {\n offsetType = r.uint16;\n } else if (offSize === 3) {\n offsetType = r.uint24;\n } else if (offSize === 4) {\n offsetType = r.uint32;\n } else {\n throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n }\n\n let ret = [];\n let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n let start = offsetType.decode(stream);\n for (let i = 0; i < count; i++) {\n let end = offsetType.decode(stream);\n\n if (this.type != null) {\n let pos = stream.pos;\n stream.pos = startPos + start;\n\n parent.length = end - start;\n ret.push(this.type.decode(stream, parent));\n stream.pos = pos;\n } else {\n ret.push({\n offset: startPos + start,\n length: end - start\n });\n }\n\n start = end;\n }\n\n stream.pos = startPos + start;\n return ret;\n }\n\n size(arr, parent) {\n let size = 2;\n if (arr.length === 0) {\n return size;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let offset = 1;\n for (let i = 0; i < arr.length; i++) {\n let item = arr[i];\n offset += type.size(item, parent);\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n size += 1 + offsetType.size() * (arr.length + 1);\n size += offset - 1;\n\n return size;\n }\n\n encode(stream, arr, parent) {\n stream.writeUInt16BE(arr.length);\n if (arr.length === 0) {\n return;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let sizes = [];\n let offset = 1;\n for (let item of arr) {\n let s = type.size(item, parent);\n sizes.push(s);\n offset += s;\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n // write offset size\n stream.writeUInt8(offsetType.size());\n\n // write elements\n offset = 1;\n offsetType.encode(stream, offset);\n\n for (let size of sizes) {\n offset += size;\n offsetType.encode(stream, offset);\n }\n\n for (let item of arr) {\n type.encode(stream, item, parent);\n }\n\n return;\n }\n}\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n constructor(predefinedOps, type) {\n this.predefinedOps = predefinedOps;\n this.type = type;\n }\n\n decode(stream, parent, operands) {\n if (this.predefinedOps[operands[0]]) {\n return this.predefinedOps[operands[0]];\n }\n\n return this.type.decode(stream, parent, operands);\n }\n\n size(value, ctx) {\n return this.type.size(value, ctx);\n }\n\n encode(stream, value, ctx) {\n let index = this.predefinedOps.indexOf(value);\n if (index !== -1) {\n return index;\n }\n\n return this.type.encode(stream, value, ctx);\n }\n}\n\nclass CFFEncodingVersion extends r.Number {\n constructor() {\n super('UInt8');\n }\n\n decode(stream) {\n return r.uint8.decode(stream) & 0x7f;\n }\n}\n\nlet Range1 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n 0: {\n nCodes: r.uint8,\n codes: new r.Array(r.uint8, 'nCodes')\n },\n\n 1: {\n nRanges: r.uint8,\n ranges: new r.Array(Range1, 'nRanges')\n }\n\n // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n decode(stream, parent) {\n let length = resolveLength(this.length, stream, parent);\n let count = 0;\n let res = [];\n while (count < length) {\n let range = this.type.decode(stream, parent);\n range.offset = count;\n count += range.nLeft + 1;\n res.push(range);\n }\n\n return res;\n }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n 0: {\n glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n },\n\n 1: {\n ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n },\n\n 2: {\n ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n first: r.uint16,\n fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n first: r.uint32,\n fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n 0: {\n fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n },\n\n 3: {\n nRanges: r.uint16,\n ranges: new r.Array(FDRange3, 'nRanges'),\n sentinel: r.uint16\n },\n\n 4: {\n nRanges: r.uint32,\n ranges: new r.Array(FDRange4, 'nRanges'),\n sentinel: r.uint32\n }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n decode(stream, parent, operands) {\n parent.length = operands[0];\n return ptr.decode(stream, parent, [operands[1]]);\n }\n\n size(dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n }\n\n encode(stream, dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n }\n}\n\nlet FontDict = new CFFDict([\n // key name type(s) default\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 38], 'FontName', 'sid', null],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [[12, 5], 'PaintType', 'number', 0],\n]);\n\nlet CFFTopDict = new CFFDict([\n // key name type(s) default\n [[12, 30], 'ROS', ['sid', 'sid', 'number'], null],\n\n [0, 'version', 'sid', null],\n [1, 'Notice', 'sid', null],\n [[12, 0], 'Copyright', 'sid', null],\n [2, 'FullName', 'sid', null],\n [3, 'FamilyName', 'sid', null],\n [4, 'Weight', 'sid', null],\n [[12, 1], 'isFixedPitch', 'boolean', false],\n [[12, 2], 'ItalicAngle', 'number', 0],\n [[12, 3], 'UnderlinePosition', 'number', -100],\n [[12, 4], 'UnderlineThickness', 'number', 50],\n [[12, 5], 'PaintType', 'number', 0],\n [[12, 6], 'CharstringType', 'number', 2],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [13, 'UniqueID', 'number', null],\n [5, 'FontBBox', 'array', [0, 0, 0, 0]],\n [[12, 8], 'StrokeWidth', 'number', 0],\n [14, 'XUID', 'array', null],\n [15, 'charset', CFFCharset, ISOAdobeCharset],\n [16, 'Encoding', CFFEncoding, StandardEncoding],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 20], 'SyntheticBase', 'number', null],\n [[12, 21], 'PostScript', 'sid', null],\n [[12, 22], 'BaseFontName', 'sid', null],\n [[12, 23], 'BaseFontBlend', 'delta', null],\n\n // CID font specific\n [[12, 31], 'CIDFontVersion', 'number', 0],\n [[12, 32], 'CIDFontRevision', 'number', 0],\n [[12, 33], 'CIDFontType', 'number', 0],\n [[12, 34], 'CIDCount', 'number', 8720],\n [[12, 35], 'UIDBase', 'number', null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet VariationStore = new r.Struct({\n length: r.uint16,\n itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [24, 'vstore', new CFFPointer(VariationStore), null],\n [25, 'maxstack', 'number', 193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n 1: {\n hdrSize: r.uint8,\n offSize: r.uint8,\n nameIndex: new CFFIndex(new r.String('length')),\n topDictIndex: new CFFIndex(CFFTopDict),\n stringIndex: new CFFIndex(new r.String('length')),\n globalSubrIndex: new CFFIndex\n },\n\n 2: {\n hdrSize: r.uint8,\n length: r.uint16,\n topDict: CFF2TopDict,\n globalSubrIndex: new CFFIndex\n }\n});\n\nexport default CFFTop;\n","import isEqual from 'fast-deep-equal';\nimport * as r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure';\n\nexport default class CFFDict {\n constructor(ops = []) {\n this.ops = ops;\n this.fields = {};\n for (let field of ops) {\n let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n this.fields[key] = field;\n }\n }\n\n decodeOperands(type, stream, ret, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n } else if (type.decode != null) {\n return type.decode(stream, ret, operands);\n } else {\n switch (type) {\n case 'number':\n case 'offset':\n case 'sid':\n return operands[0];\n case 'boolean':\n return !!operands[0];\n default:\n return operands;\n }\n }\n }\n\n encodeOperands(type, stream, ctx, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n } else if (type.encode != null) {\n return type.encode(stream, operands, ctx);\n } else if (typeof operands === 'number') {\n return [operands];\n } else if (typeof operands === 'boolean') {\n return [+operands];\n } else if (Array.isArray(operands)) {\n return operands;\n } else {\n return [operands];\n }\n }\n\n decode(stream, parent) {\n let end = stream.pos + parent.length;\n let ret = {};\n let operands = [];\n\n // define hidden properties\n Object.defineProperties(ret, {\n parent: { value: parent },\n _startOffset: { value: stream.pos }\n });\n\n // fill in defaults\n for (let key in this.fields) {\n let field = this.fields[key];\n ret[field[1]] = field[3];\n }\n\n while (stream.pos < end) {\n let b = stream.readUInt8();\n if (b < 28) {\n if (b === 12) {\n b = (b << 8) | stream.readUInt8();\n }\n\n let field = this.fields[b];\n if (!field) {\n throw new Error(`Unknown operator ${b}`);\n }\n\n let val = this.decodeOperands(field[2], stream, ret, operands);\n if (val != null) {\n if (val instanceof PropertyDescriptor) {\n Object.defineProperty(ret, field[1], val);\n } else {\n ret[field[1]] = val;\n }\n }\n\n operands = [];\n } else {\n operands.push(CFFOperand.decode(stream, b));\n }\n }\n\n return ret;\n }\n\n size(dict, parent, includePointers = true) {\n let ctx = {\n parent,\n val: dict,\n pointerSize: 0,\n startOffset: parent.startOffset || 0\n };\n\n let len = 0;\n\n for (let k in this.fields) {\n let field = this.fields[k];\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], null, ctx, val);\n for (let op of operands) {\n len += CFFOperand.size(op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n len += key.length;\n }\n\n if (includePointers) {\n len += ctx.pointerSize;\n }\n\n return len;\n }\n\n encode(stream, dict, parent) {\n let ctx = {\n pointers: [],\n startOffset: stream.pos,\n parent,\n val: dict,\n pointerSize: 0\n };\n\n ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n for (let field of this.ops) {\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], stream, ctx, val);\n for (let op of operands) {\n CFFOperand.encode(stream, op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n for (let op of key) {\n stream.writeUInt8(op);\n }\n }\n\n let i = 0;\n while (i < ctx.pointers.length) {\n let ptr = ctx.pointers[i++];\n ptr.type.encode(stream, ptr.val, ptr.parent);\n }\n\n return;\n }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n '.': 10,\n 'E': 11,\n 'E-': 12,\n '-': 14\n};\n\nexport default class CFFOperand {\n static decode(stream, value) {\n if (32 <= value && value <= 246) {\n return value - 139;\n }\n\n if (247 <= value && value <= 250) {\n return (value - 247) * 256 + stream.readUInt8() + 108;\n }\n\n if (251 <= value && value <= 254) {\n return -(value - 251) * 256 - stream.readUInt8() - 108;\n }\n\n if (value === 28) {\n return stream.readInt16BE();\n }\n\n if (value === 29) {\n return stream.readInt32BE();\n }\n\n if (value === 30) {\n let str = '';\n while (true) {\n let b = stream.readUInt8();\n\n let n1 = b >> 4;\n if (n1 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n1];\n\n let n2 = b & 15;\n if (n2 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n2];\n }\n\n return parseFloat(str);\n }\n\n return null;\n }\n\n static size(value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, set to 32768\n if (value.forceLarge) {\n value = 32768;\n }\n\n if ((value | 0) !== value) { // floating point\n let str = '' + value;\n return 1 + Math.ceil((str.length + 1) / 2);\n\n } else if (-107 <= value && value <= 107) {\n return 1;\n\n } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n return 2;\n\n } else if (-32768 <= value && value <= 32767) {\n return 3;\n\n } else {\n return 5;\n }\n }\n\n static encode(stream, value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, save the old value and set to 32768\n let val = Number(value);\n\n if (value.forceLarge) {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n\n } else if ((val | 0) !== val) { // floating point\n stream.writeUInt8(30);\n\n let str = '' + val;\n for (let i = 0; i < str.length; i += 2) {\n let c1 = str[i];\n let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n if (i === str.length - 1) {\n var n2 = FLOAT_EOF;\n } else {\n let c2 = str[i + 1];\n var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n }\n\n stream.writeUInt8((n1 << 4) | (n2 & 15));\n }\n\n if (n2 !== FLOAT_EOF) {\n return stream.writeUInt8((FLOAT_EOF << 4));\n }\n\n } else if (-107 <= val && val <= 107) {\n return stream.writeUInt8(val + 139);\n\n } else if (108 <= val && val <= 1131) {\n val -= 108;\n stream.writeUInt8((val >> 8) + 247);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-1131 <= val && val <= -108) {\n val = -val - 108;\n stream.writeUInt8((val >> 8) + 251);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-32768 <= val && val <= 32767) {\n stream.writeUInt8(28);\n return stream.writeInt16BE(val);\n\n } else {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n }\n }\n}\n","import * as r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n constructor(type, options = {}) {\n if (options.type == null) {\n options.type = 'global';\n }\n\n super(null, type, options);\n }\n\n decode(stream, parent, operands) {\n this.offsetType = {\n decode: () => operands[0]\n };\n\n return super.decode(stream, parent, operands);\n }\n\n encode(stream, value, ctx) {\n if (!stream) {\n // compute the size (so ctx.pointerSize is correct)\n this.offsetType = {\n size: () => 0\n };\n\n this.size(value, ctx);\n return [new Ptr(0)];\n }\n\n let ptr = null;\n this.offsetType = {\n encode: (stream, val) => ptr = val\n };\n\n super.encode(stream, value, ctx);\n return [new Ptr(ptr)];\n }\n}\n\nclass Ptr {\n constructor(val) {\n this.val = val;\n this.forceLarge = true;\n }\n\n valueOf() {\n return this.val;\n }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n static decode(stream, parent, operands) {\n let numBlends = operands.pop();\n\n // TODO: actually blend. For now just consume the deltas\n // since we don't use any of the values anyway.\n while (operands.length > numBlends) {\n operands.pop();\n }\n }\n}\n\nexport default new CFFDict([\n // key name type default\n [6, 'BlueValues', 'delta', null],\n [7, 'OtherBlues', 'delta', null],\n [8, 'FamilyBlues', 'delta', null],\n [9, 'FamilyOtherBlues', 'delta', null],\n [[12, 9], 'BlueScale', 'number', 0.039625],\n [[12, 10], 'BlueShift', 'number', 7],\n [[12, 11], 'BlueFuzz', 'number', 1],\n [10, 'StdHW', 'number', null],\n [11, 'StdVW', 'number', null],\n [[12, 12], 'StemSnapH', 'delta', null],\n [[12, 13], 'StemSnapV', 'delta', null],\n [[12, 14], 'ForceBold', 'boolean', false],\n [[12, 17], 'LanguageGroup', 'number', 0],\n [[12, 18], 'ExpansionFactor', 'number', 0.06],\n [[12, 19], 'initialRandomSeed', 'number', 0],\n [20, 'defaultWidthX', 'number', 0],\n [21, 'nominalWidthX', 'number', 0],\n [22, 'vsindex', 'number', 0],\n [23, 'blend', CFFBlendOp, null],\n [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n 'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n 'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n 'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior'\n];\n","import {Feature} from './opentype';\nimport * as r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n startCoord: F2DOT14,\n peakCoord: F2DOT14,\n endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n axisCount: r.uint16,\n regionCount: r.uint16,\n variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n itemCount: r.uint16,\n shortDeltaCount: r.uint16,\n regionIndexCount: r.uint16,\n regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n format: r.uint16,\n variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n variationDataCount: r.uint16,\n itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n 1: {\n axisIndex: r.uint16,\n axisIndex: r.uint16,\n filterRangeMinValue: F2DOT14,\n filterRangeMaxValue: F2DOT14\n }\n});\n\nlet ConditionSet = new r.Struct({\n conditionCount: r.uint16,\n conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n featureIndex: r.uint16,\n alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n version: r.fixed32,\n substitutionCount: r.uint16,\n substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n featureVariationRecordCount: r.uint32,\n featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import * as r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n reserved: new r.Reserved(r.uint16),\n reqFeatureIndex: r.uint16,\n featureCount: r.uint16,\n featureIndexes: new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n tag: new r.String(4),\n langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n count: r.uint16,\n langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nlet FeatureParams = new r.Struct({\n version: r.uint16, // should be set to 0 according OT spec\n nameID: r.uint16, //OT spec: UI Name ID or uiLabelNameId\n});\n\nexport let Feature = new r.Struct({\n featureParams: new r.Pointer(r.uint16, FeatureParams),\n lookupCount: r.uint16,\n lookupListIndexes: new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n tag: new r.String(4),\n feature: new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Struct({\n markAttachmentType: r.uint8,\n flags: new r.Bitfield(r.uint8, [\n 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n 'ignoreMarks', 'useMarkFilteringSet'\n ])\n});\n\nexport function LookupList(SubTable) {\n let Lookup = new r.Struct({\n lookupType: r.uint16,\n flags: LookupFlags,\n subTableCount: r.uint16,\n subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n markFilteringSet: new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet)\n });\n\n return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n 1: {\n glyphCount: r.uint16,\n glyphs: new r.Array(r.uint16, 'glyphCount')\n },\n 2: {\n rangeCount: r.uint16,\n rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n class: r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n 1: { // Class array\n startGlyph: r.uint16,\n glyphCount: r.uint16,\n classValueArray: new r.Array(r.uint16, 'glyphCount')\n },\n 2: { // Class ranges\n classRangeCount: r.uint16,\n classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex\n b: r.uint16, // endSize for Device, innerIndex for VariationIndex\n deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n sequenceIndex: r.uint16,\n lookupListIndex: r.uint16\n});\n\nlet Rule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n input: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n classes: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context\n coverage: new r.Pointer(r.uint16, Coverage),\n ruleSetCount: r.uint16,\n ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n },\n 2: { // Class-based context\n coverage: new r.Pointer(r.uint16, Coverage),\n classDef: new r.Pointer(r.uint16, ClassDef),\n classSetCnt: r.uint16,\n classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n },\n 3: {\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n backtrackGlyphCount: r.uint16,\n backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n input: new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n lookaheadGlyphCount: r.uint16,\n lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context glyph substitution\n coverage: new r.Pointer(r.uint16, Coverage),\n chainCount: r.uint16,\n chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 2: { // Class-based chaining context\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackClassDef: new r.Pointer(r.uint16, ClassDef),\n inputClassDef: new r.Pointer(r.uint16, ClassDef),\n lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),\n chainCount: r.uint16,\n chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 3: { // Coverage-based chaining context\n backtrackGlyphCount: r.uint16,\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n","import * as r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n glyphIndex: r.uint16,\n vertOriginY: r.int16\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n defaultVertOriginY: r.int16,\n numVertOriginYMetrics: r.uint16,\n metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import * as r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n ascender: r.int8,\n descender: r.int8,\n widthMax: r.uint8,\n caretSlopeNumerator: r.int8,\n caretSlopeDenominator: r.int8,\n caretOffset: r.int8,\n minOriginSB: r.int8,\n minAdvanceSB: r.int8,\n maxBeforeBL: r.int8,\n minAfterBL: r.int8,\n pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n glyphCode: r.uint16,\n offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n header: {\n imageFormat: r.uint16,\n imageDataOffset: r.uint32\n },\n\n 1: {\n offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 2: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics\n },\n\n 3: {\n offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 4: {\n numGlyphs: r.uint32,\n glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n },\n\n 5: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics,\n numGlyphs: r.uint32,\n glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n }\n});\n\nlet IndexSubtableArray = new r.Struct({\n firstGlyphIndex: r.uint16,\n lastGlyphIndex: r.uint16,\n subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n indexTablesSize: r.uint32,\n numberOfIndexSubTables: r.uint32,\n colorRef: r.uint32,\n hori: SBitLineMetrics,\n vert: SBitLineMetrics,\n startGlyphIndex: r.uint16,\n endGlyphIndex: r.uint16,\n ppemX: r.uint8,\n ppemY: r.uint8,\n bitDepth: r.uint8,\n flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n version: r.uint32, // 0x00020000\n numSizes: r.uint32,\n sizes: new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import * as r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n horiBearingX: r.int8,\n horiBearingY: r.int8,\n horiAdvance: r.uint8,\n vertBearingX: r.int8,\n vertBearingY: r.int8,\n vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n bearingX: r.int8,\n bearingY: r.int8,\n advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n glyph: r.uint16,\n xOffset: r.int8,\n yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n 1: {\n metrics: SmallMetrics,\n data: ByteAligned\n },\n\n 2: {\n metrics: SmallMetrics,\n data: BitAligned\n },\n\n // format 3 is deprecated\n // format 4 is not supported by Microsoft\n\n 5: {\n data: BitAligned\n },\n\n 6: {\n metrics: BigMetrics,\n data: ByteAligned\n },\n\n 7: {\n metrics: BigMetrics,\n data: BitAligned\n },\n\n 8: {\n metrics: SmallMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 9: {\n metrics: BigMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 17: {\n metrics: SmallMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 18: {\n metrics: BigMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 19: {\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n }\n});\n\n","import * as r from 'restructure';\n\nlet ImageTable = new r.Struct({\n ppem: r.uint16,\n resolution: r.uint16,\n imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n version: r.uint16,\n flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n numImgTables: r.uint32,\n imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import * as r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).\n paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must\n}); // be less than numPaletteEntries in the CPAL table, except for\n // the special case noted below. Each palette entry is 16 bits.\n // A palette index of 0xFFFF is a special case indicating that\n // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only\n // and is not rendered for color.\n firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n // There will be numLayers consecutive entries for this base glyph.\n numLayers: r.uint16\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numBaseGlyphRecords: r.uint16,\n baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n numLayerRecords: r.uint16\n});\n","import * as r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n blue: r.uint8,\n green: r.uint8,\n red: r.uint8,\n alpha: r.uint8\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n header: {\n numPaletteEntries: r.uint16,\n numPalettes: r.uint16,\n numColorRecords: r.uint16,\n colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n colorRecordIndices: new r.Array(r.uint16, 'numPalettes'),\n },\n 0: {},\n 1: {\n offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),\n offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),\n offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16 // X or Y value, in design units\n },\n\n 2: { // Design units plus contour point\n coordinate: r.int16, // X or Y value, in design units\n referenceGlyph: r.uint16, // GlyphID of control glyph\n baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16, // X or Y value, in design units\n deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value\n }\n});\n\nlet BaseValues = new r.Struct({\n defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList\n baseCoordCount: r.uint16,\n baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList\n minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL\n});\n\nlet MinMax = new r.Struct({\n minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n featMinMaxCount: r.uint16, // May be 0\n featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n tag: new r.String(4), // 4-byte language system identification tag\n minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL\n defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL\n baseLangSysCount: r.uint16, // May be 0\n baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n tag: new r.String(4), // 4-byte script identification tag\n script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL\n baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL\n vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL\n },\n\n 0x00010000: {},\n 0x00010001: {\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16\n },\n\n 2: { // Contour point\n caretValuePoint: r.uint16\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16,\n deviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n ligGlyphCount: r.uint16,\n ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n markSetTableFormat: r.uint16,\n markSetCount: r.uint16,\n coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n glyphClassDef: new r.Pointer(r.uint16, ClassDef),\n attachList: new r.Pointer(r.uint16, AttachList),\n ligCaretList: new r.Pointer(r.uint16, LigCaretList),\n markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n },\n\n 0x00010000: {},\n 0x00010002: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)\n },\n 0x00010003: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n 'xPlacement', 'yPlacement',\n 'xAdvance', 'yAdvance',\n 'xPlaDevice', 'yPlaDevice',\n 'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n xPlacement: r.int16,\n yPlacement: r.int16,\n xAdvance: r.int16,\n yAdvance: r.int16,\n xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }),\n yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel })\n};\n\nclass ValueRecord {\n constructor(key = 'valueFormat') {\n this.key = key;\n }\n\n buildStruct(parent) {\n let struct = parent;\n while (!struct[this.key] && struct.parent) {\n struct = struct.parent;\n }\n\n if (!struct[this.key]) return;\n\n let fields = {};\n fields.rel = () => struct._startOffset;\n\n let format = struct[this.key];\n for (let key in format) {\n if (format[key]) {\n fields[key] = types[key];\n }\n }\n\n return new r.Struct(fields);\n }\n\n size(val, ctx) {\n return this.buildStruct(ctx).size(val, ctx);\n }\n\n decode(stream, parent) {\n let res = this.buildStruct(parent).decode(stream, parent);\n delete res.rel;\n return res;\n }\n}\n\nlet PairValueRecord = new r.Struct({\n secondGlyph: r.uint16,\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n xCoordinate: r.int16,\n yCoordinate: r.int16\n },\n\n 2: { // Design units plus contour point\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n anchorPoint: r.uint16\n },\n\n 3: { // Design units plus Device tables\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n xDeviceTable: new r.Pointer(r.uint16, Device),\n yDeviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet EntryExitRecord = new r.Struct({\n entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n class: r.uint16,\n markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n 1: { // Single positioning value\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n value: new ValueRecord()\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n valueCount: r.uint16,\n values: new r.LazyArray(new ValueRecord(), 'valueCount')\n }\n }),\n\n 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n 1: { // Adjustments for glyph pairs\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n pairSetCount: r.uint16,\n pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n },\n\n 2: { // Class pair adjustment\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n classDef1: new r.Pointer(r.uint16, ClassDef),\n classDef2: new r.Pointer(r.uint16, ClassDef),\n class1Count: r.uint16,\n class2Count: r.uint16,\n classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n }\n }),\n\n 3: { // Cursive Attachment Positioning\n format: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n entryExitCount: r.uint16,\n entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')\n },\n\n 4: { // MarkToBase Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n baseCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n baseArray: new r.Pointer(r.uint16, BaseArray)\n },\n\n 5: { // MarkToLigature Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n ligatureCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n ligatureArray: new r.Pointer(r.uint16, LigatureArray)\n },\n\n 6: { // MarkToMark Attachment Positioning\n format: r.uint16,\n mark1Coverage: new r.Pointer(r.uint16, Coverage),\n mark2Coverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n mark1Array: new r.Pointer(r.uint16, MarkArray),\n mark2Array: new r.Pointer(r.uint16, BaseArray)\n },\n\n 7: Context, // Contextual positioning\n 8: ChainingContext, // Chaining contextual positioning\n\n 9: { // Extension Positioning\n posFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 9\n extension: new r.Pointer(r.uint32, null)\n }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import * as r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n glyph: r.uint16,\n compCount: r.uint16,\n components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, {// Single Substitution\n 1: {\n coverage: new r.Pointer(r.uint16, Coverage),\n deltaGlyphID: r.int16\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n substitute: new r.LazyArray(r.uint16, 'glyphCount')\n }\n }),\n\n 2: { // Multiple Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n },\n\n 3: { // Alternate Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n },\n\n 4: { // Ligature Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n },\n\n 5: Context, // Contextual Substitution\n 6: ChainingContext, // Chaining Contextual Substitution\n\n 7: { // Extension Substitution\n substFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 7\n extension: new r.Pointer(r.uint32, null)\n },\n\n 8: { // Reverse Chaining Contextual Single Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n glyphCount: r.uint16,\n substitutes: new r.Array(r.uint16, 'glyphCount')\n }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n","import * as r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n tag: new r.String(4),\n jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n langSysCount: r.uint16,\n langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n version: r.uint32, // should be 0x00010000\n scriptCount: r.uint16,\n scriptList: new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import * as r from 'restructure';\nimport { resolveLength } from 'restructure';\nimport { ItemVariationStore } from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n constructor(size) {\n this._size = size;\n }\n\n decode(stream, parent) {\n switch (this.size(0, parent)) {\n case 1: return stream.readUInt8();\n case 2: return stream.readUInt16BE();\n case 3: return stream.readUInt24BE();\n case 4: return stream.readUInt32BE();\n }\n }\n\n size(val, parent) {\n return resolveLength(this._size, null, parent);\n }\n}\n\nlet MapDataEntry = new r.Struct({\n entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n entryFormat: r.uint16,\n mapCount: r.uint16,\n mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import * as r from 'restructure';\n\nlet Signature = new r.Struct({\n format: r.uint32,\n length: r.uint32,\n offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n reserved: new r.Reserved(r.uint16, 2),\n cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature\n signature: new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n ulVersion: r.uint32, // Version number of the DSIG table (0x00000001)\n usNumSigs: r.uint16, // Number of signatures in the table\n usFlag: r.uint16, // Permission flags\n signatures: new r.Array(Signature, 'usNumSigs'),\n signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import * as r from 'restructure';\n\nlet GaspRange = new r.Struct({\n rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem\n rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n 'grayscale', 'gridfit',\n 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType\n ])\n});\n\nexport default new r.Struct({\n version: r.uint16, // set to 0\n numRanges: r.uint16,\n gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import * as r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n pixelSize: r.uint8,\n maximumWidth: r.uint8,\n widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n version: r.uint16,\n numRecords: r.int16,\n sizeDeviceRecord: r.int32,\n records: new r.Array(DeviceRecord, 'numRecords')\n});\n","import * as r from 'restructure';\n\nlet KernPair = new r.Struct({\n left: r.uint16,\n right: r.uint16,\n value: r.int16\n});\n\nlet ClassTable = new r.Struct({\n firstGlyph: r.uint16,\n nGlyphs: r.uint16,\n offsets: new r.Array(r.uint16, 'nGlyphs'),\n max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n off: t => t._startOffset - t.parent.parent._startOffset,\n len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n 0: {\n nPairs: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n pairs: new r.Array(KernPair, 'nPairs')\n },\n\n 2: {\n rowWidth: r.uint16,\n leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n },\n\n 3: {\n glyphCount: r.uint16,\n kernValueCount: r.uint8,\n leftClassCount: r.uint8,\n rightClassCount: r.uint8,\n flags: r.uint8,\n kernValue: new r.Array(r.int16, 'kernValueCount'),\n leftClass: new r.Array(r.uint8, 'glyphCount'),\n rightClass: new r.Array(r.uint8, 'glyphCount'),\n kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n 0: { // Microsoft uses this format\n subVersion: r.uint16, // Microsoft has an extra sub-table version number\n length: r.uint16, // Length of the subtable, in bytes\n format: r.uint8, // Format of subtable\n coverage: new r.Bitfield(r.uint8, [\n 'horizontal', // 1 if table has horizontal data, 0 if vertical\n 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text\n 'override' // If set to 1 the value in this table replaces the accumulated value\n ]),\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n },\n 1: { // Apple uses this format\n length: r.uint32,\n coverage: new r.Bitfield(r.uint8, [\n null, null, null, null, null,\n 'variation', // Set if table has variation kerning values\n 'crossStream', // Set if table has cross-stream kerning values\n 'vertical' // Set if table has vertical kerning values\n ]),\n format: r.uint8,\n tupleIndex: r.uint16,\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n 0: { // Microsoft Version\n nTables: r.uint16,\n tables: new r.Array(KernTable, 'nTables')\n },\n\n 1: { // Apple Version\n reserved: new r.Reserved(r.uint16), // the other half of the version number\n nTables: r.uint32,\n tables: new r.Array(KernTable, 'nTables')\n }\n});\n","import * as r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n version: r.uint16,\n numGlyphs: r.uint16,\n yPels: new r.Array(r.uint8, 'numGlyphs')\n});\n","import * as r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n version: r.uint16,\n fontNumber: r.uint32,\n pitch: r.uint16,\n xHeight: r.uint16,\n style: r.uint16,\n typeFamily: r.uint16,\n capHeight: r.uint16,\n symbolSet: r.uint16,\n typeface: new r.String(16),\n characterComplement: new r.String(8),\n fileName: new r.String(6),\n strokeWeight: new r.String(1),\n widthType: new r.String(1),\n serifStyle: r.uint8,\n reserved: new r.Reserved(r.uint8)\n});\n","import * as r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n bCharSet: r.uint8, // Character set\n xRatio: r.uint8, // Value to use for x-Ratio\n yStartRatio: r.uint8, // Starting y-Ratio value\n yEndRatio: r.uint8 // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n yPelHeight: r.uint16, // yPelHeight to which values apply\n yMax: r.int16, // Maximum value (in pels) for this yPelHeight\n yMin: r.int16 // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n recs: r.uint16, // Number of height records in this group\n startsz: r.uint8, // Starting yPelHeight\n endsz: r.uint8, // Ending yPelHeight\n entries: new r.Array(vTable, 'recs') // The VDMX records\n});\n\nexport default new r.Struct({\n version: r.uint16, // Version number (0 or 1)\n numRecs: r.uint16, // Number of VDMX groups present\n numRatios: r.uint16, // Number of aspect ratio groupings\n ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges\n offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range\n groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings\n});\n","import * as r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n version: r.uint16, // Version number of the Vertical Header Table\n ascent: r.int16, // The vertical typographic ascender for this font\n descent: r.int16, // The vertical typographic descender for this font\n lineGap: r.int16, // The vertical typographic line gap for this font\n advanceHeightMax: r.int16, // The maximum advance height measurement found in the font\n minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font\n minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font\n yMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Caret slope (rise/run)\n caretSlopeRun: r.int16,\n caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // Set to 0\n numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table\n});\n","import * as r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n advance: r.uint16, // The advance height of the glyph\n bearing: r.int16 // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n fromCoord: shortFrac,\n toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n pairCount: r.uint16,\n correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n axisCount: r.uint32,\n segment: new r.Array(Segment, 'axisCount')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n 0: { // Distance-based, no mapping\n deltas: new r.Array(r.int16, 32)\n },\n\n 1: { // Distance-based, with mapping\n deltas: new r.Array(r.int16, 32),\n mappingData: new LookupTable(r.uint16)\n },\n\n 2: { // Control point-based, no mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32)\n },\n\n 3: { // Control point-based, with mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32),\n mappingData: new LookupTable(r.uint16)\n }\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n defaultBaseline: r.uint16,\n subtable: BslnSubtable\n});\n","import * as r from 'restructure';\n\nclass UnboundedArrayAccessor {\n constructor(type, stream, parent) {\n this.type = type;\n this.stream = stream;\n this.parent = parent;\n this.base = this.stream.pos;\n this._items = [];\n }\n\n getItem(index) {\n if (this._items[index] == null) {\n let pos = this.stream.pos;\n this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n this._items[index] = this.type.decode(this.stream, this.parent);\n this.stream.pos = pos;\n }\n\n return this._items[index];\n }\n\n inspect() {\n return `[UnboundedArray ${this.type.constructor.name}]`;\n }\n}\n\nexport class UnboundedArray extends r.Array {\n constructor(type) {\n super(type, 0);\n }\n\n decode(stream, parent) {\n return new UnboundedArrayAccessor(this.type, stream, parent);\n }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n // Helper class that makes internal structures invisible to pointers\n class Shadow {\n constructor(type) {\n this.type = type;\n }\n\n decode(stream, ctx) {\n ctx = ctx.parent.parent;\n return this.type.decode(stream, ctx);\n }\n\n size(val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.size(val, ctx);\n }\n\n encode(stream, val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.encode(stream, val, ctx);\n }\n }\n\n ValueType = new Shadow(ValueType);\n\n let BinarySearchHeader = new r.Struct({\n unitSize: r.uint16,\n nUnits: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16\n });\n\n let LookupSegmentSingle = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n value: ValueType\n });\n\n let LookupSegmentArray = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n });\n\n let LookupSingle = new r.Struct({\n glyph: r.uint16,\n value: ValueType\n });\n\n return new r.VersionedStruct(r.uint16, {\n 0: {\n values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n },\n 2: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n },\n 4: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n },\n 6: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n },\n 8: {\n firstGlyph: r.uint16,\n count: r.uint16,\n values: new r.Array(ValueType, 'count')\n }\n });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n let entry = Object.assign({\n newState: r.uint16,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n let StateHeader = new r.Struct({\n nClasses: r.uint32,\n classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n stateArray: new r.Pointer(r.uint32, StateArray),\n entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n });\n\n return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n let ClassLookupTable = new r.Struct({\n version() { return 8; }, // simulate LookupTable\n firstGlyph: r.uint16,\n values: new r.Array(r.uint8, r.uint16)\n });\n\n let entry = Object.assign({\n newStateOffset: r.uint16,\n // convert offset to stateArray index\n newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n let StateHeader1 = new r.Struct({\n nClasses: r.uint16,\n classTable: new r.Pointer(r.uint16, ClassLookupTable),\n stateArray: new r.Pointer(r.uint16, StateArray),\n entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n });\n\n return StateHeader1;\n}\n","import * as r from 'restructure';\n\nlet Setting = new r.Struct({\n setting: r.uint16,\n nameIndex: r.int16,\n name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n feature: r.uint16,\n nSettings: r.uint16,\n settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n featureFlags: new r.Bitfield(r.uint8, [\n null, null, null, null, null, null,\n 'hasDefault', 'exclusive'\n ]),\n defaultSetting: r.uint8,\n nameIndex: r.int16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n featureNameCount: r.uint16,\n reserved1: new r.Reserved(r.uint16),\n reserved2: new r.Reserved(r.uint32),\n featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import * as r from 'restructure';\n\nlet Axis = new r.Struct({\n axisTag: new r.String(4),\n minValue: r.fixed32,\n defaultValue: r.fixed32,\n maxValue: r.fixed32,\n flags: r.uint16,\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n flags: r.uint16,\n coord: new r.Array(r.fixed32, t => t.parent.axisCount),\n postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0)\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n offsetToData: r.uint16,\n countSizePairs: r.uint16,\n axisCount: r.uint16,\n axisSize: r.uint16,\n instanceCount: r.uint16,\n instanceSize: r.uint16,\n axis: new r.Array(Axis, 'axisCount'),\n instance: new r.Array(Instance, 'instanceCount')\n});\n","import * as r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n static decode(stream, parent) {\n // In short format, offsets are multiplied by 2.\n // This doesn't seem to be documented by Apple, but it\n // is implemented this way in Freetype.\n return parent.flags\n ? stream.readUInt32BE()\n : stream.readUInt16BE() * 2;\n }\n}\n\nlet gvar = new r.Struct({\n version: r.uint16,\n reserved: new r.Reserved(r.uint16),\n axisCount: r.uint16,\n globalCoordCount: r.uint16,\n globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n glyphCount: r.uint16,\n flags: r.uint16,\n offsetToData: r.uint32,\n offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: ctx => ctx.offsetToData, allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import * as r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n length: r.uint16,\n coverage: r.uint16,\n subFeatureFlags: r.uint32,\n stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n justClass: r.uint32,\n beforeGrowLimit: r.fixed32,\n beforeShrinkLimit: r.fixed32,\n afterGrowLimit: r.fixed32,\n afterShrinkLimit: r.fixed32,\n growFlags: r.uint16,\n shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n 0: { // Decomposition action\n lowerLimit: r.fixed32,\n upperLimit: r.fixed32,\n order: r.uint16,\n glyphs: new r.Array(r.uint16, r.uint16)\n },\n\n 1: { // Unconditional add glyph action\n addGlyph: r.uint16\n },\n\n 2: { // Conditional add glyph action\n substThreshold: r.fixed32,\n addGlyph: r.uint16,\n substGlyph: r.uint16\n },\n\n 3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n 4: { // Ductile glyph action (not supported by CoreText)\n variationAxis: r.uint32,\n minimumLimit: r.fixed32,\n noStretchValue: r.fixed32,\n maximumLimit: r.fixed32\n },\n\n 5: { // Repeated add glyph action\n flags: r.uint16,\n glyph: r.uint16\n }\n});\n\nlet Action = new r.Struct({\n actionClass: r.uint16,\n actionType: r.uint16,\n actionLength: r.uint32,\n actionData: ActionData,\n padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n wdcOffset: r.uint16,\n postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: ctx => ctx.wdcOffset }))\n});\n\nexport default new r.Struct({\n version: r.uint32,\n format: r.uint16,\n horizontal: new r.Pointer(r.uint16, JustificationTable),\n vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import * as r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n action: r.uint16\n};\n\nlet ContextualData = {\n markIndex: r.uint16,\n currentIndex: r.uint16\n};\n\nlet InsertionData = {\n currentInsertIndex: r.uint16,\n markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n 0: { // Indic Rearrangement Subtable\n stateTable: new StateTable\n },\n\n 1: { // Contextual Glyph Substitution Subtable\n stateTable: new StateTable(ContextualData),\n substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n },\n\n 2: { // Ligature subtable\n stateTable: new StateTable(LigatureData),\n ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n },\n\n 4: { // Non-contextual Glyph Substitution Subtable\n lookupTable: new LookupTable\n },\n\n 5: { // Glyph Insertion Subtable\n stateTable: new StateTable(InsertionData),\n insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n }\n});\n\nlet Subtable = new r.Struct({\n length: r.uint32,\n coverage: r.uint24,\n type: r.uint8,\n subFeatureFlags: r.uint32,\n table: SubtableData,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n featureType: r.uint16,\n featureSetting: r.uint16,\n enableFlags: r.uint32,\n disableFlags: r.uint32\n});\n\nlet MorxChain = new r.Struct({\n defaultFlags: r.uint32,\n chainLength: r.uint32,\n nFeatureEntries: r.uint32,\n nSubtables: r.uint32,\n features: new r.Array(FeatureEntry, 'nFeatureEntries'),\n subtables: new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n version: r.uint16,\n unused: new r.Reserved(r.uint16),\n nChains: r.uint32,\n chains: new r.Array(MorxChain, 'nChains')\n});\n","import * as r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n left: r.int16,\n top: r.int16,\n right: r.int16,\n bottom: r.int16\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n lookupTable: new LookupTable(OpticalBounds)\n});\n","import { binarySearch } from './utils';\nimport { encodingExists, getEncoding, getEncodingMapping } from './encodings';\nimport { cache } from './decorators';\nimport { range } from './utils';\n\nexport default class CmapProcessor {\n constructor(cmapTable) {\n // Attempt to find a Unicode cmap first\n this.encoding = null;\n this.cmap = this.findSubtable(cmapTable, [\n // 32-bit subtables\n [3, 10],\n [0, 6],\n [0, 4],\n\n // 16-bit subtables\n [3, 1],\n [0, 3],\n [0, 2],\n [0, 1],\n [0, 0]\n ]);\n\n // If not unicode cmap was found, take the first table with a supported encoding.\n if (!this.cmap) {\n for (let cmap of cmapTable.tables) {\n let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n let mapping = getEncodingMapping(encoding);\n if (mapping) {\n this.cmap = cmap.table;\n this.encoding = mapping;\n }\n }\n }\n\n if (!this.cmap) {\n throw new Error(\"Could not find a supported cmap table\");\n }\n\n this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n if (this.uvs && this.uvs.version !== 14) {\n this.uvs = null;\n }\n }\n\n findSubtable(cmapTable, pairs) {\n for (let [platformID, encodingID] of pairs) {\n for (let cmap of cmapTable.tables) {\n if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n return cmap.table;\n }\n }\n }\n\n return null;\n }\n\n lookup(codepoint, variationSelector) {\n // If there is no Unicode cmap in this font, we need to re-encode\n // the codepoint in the encoding that the cmap supports.\n if (this.encoding) {\n codepoint = this.encoding.get(codepoint) || codepoint;\n\n // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n } else if (variationSelector) {\n let gid = this.getVariationSelector(codepoint, variationSelector);\n if (gid) {\n return gid;\n }\n }\n\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return cmap.codeMap.get(codepoint) || 0;\n\n case 4: {\n let min = 0;\n let max = cmap.segCount - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n\n if (codepoint < cmap.startCode.get(mid)) {\n max = mid - 1;\n } else if (codepoint > cmap.endCode.get(mid)) {\n min = mid + 1;\n } else {\n let rangeOffset = cmap.idRangeOffset.get(mid);\n let gid;\n\n if (rangeOffset === 0) {\n gid = codepoint + cmap.idDelta.get(mid);\n } else {\n let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n gid = cmap.glyphIndexArray.get(index) || 0;\n if (gid !== 0) {\n gid += cmap.idDelta.get(mid);\n }\n }\n\n return gid & 0xffff;\n }\n }\n\n return 0;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n case 12:\n case 13: {\n let min = 0;\n let max = cmap.nGroups - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let group = cmap.groups.get(mid);\n\n if (codepoint < group.startCharCode) {\n max = mid - 1;\n } else if (codepoint > group.endCharCode) {\n min = mid + 1;\n } else {\n if (cmap.version === 12) {\n return group.glyphID + (codepoint - group.startCharCode);\n } else {\n return group.glyphID;\n }\n }\n }\n\n return 0;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n getVariationSelector(codepoint, variationSelector) {\n if (!this.uvs) {\n return 0;\n }\n\n let selectors = this.uvs.varSelectors.toArray();\n let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n let sel = selectors[i];\n\n if (i !== -1 && sel.defaultUVS) {\n i = binarySearch(sel.defaultUVS, x =>\n codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n );\n }\n\n if (i !== -1 && sel.nonDefaultUVS) {\n i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n if (i !== -1) {\n return sel.nonDefaultUVS[i].glyphID;\n }\n }\n\n return 0;\n }\n\n @cache\n getCharacterSet() {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return range(0, cmap.codeMap.length);\n\n case 4: {\n let res = [];\n let endCodes = cmap.endCode.toArray();\n for (let i = 0; i < endCodes.length; i++) {\n let tail = endCodes[i] + 1;\n let start = cmap.startCode.get(i);\n res.push(...range(start, tail));\n }\n\n return res;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n case 12:\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n\n return res;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n @cache\n codePointsForGlyph(gid) {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0: {\n let res = [];\n for (let i = 0; i < 256; i++) {\n if (cmap.codeMap.get(i) === gid) {\n res.push(i);\n }\n }\n\n return res;\n }\n\n case 4: {\n let res = [];\n for (let i = 0; i < cmap.segCount; i++) {\n let end = cmap.endCode.get(i);\n let start = cmap.startCode.get(i);\n let rangeOffset = cmap.idRangeOffset.get(i);\n let delta = cmap.idDelta.get(i);\n\n for (var c = start; c <= end; c++) {\n let g = 0;\n if (rangeOffset === 0) {\n g = c + delta;\n } else {\n let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n g = cmap.glyphIndexArray.get(index) || 0;\n if (g !== 0) {\n g += delta;\n }\n }\n\n if (g === gid) {\n res.push(c);\n }\n }\n }\n\n return res;\n }\n\n case 12: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n res.push(group.startCharCode + (gid - group.glyphID));\n }\n }\n\n return res;\n }\n\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid === group.glyphID) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n }\n\n return res;\n }\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n}\n","export function binarySearch(arr, cmp) {\n let min = 0;\n let max = arr.length - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let res = cmp(arr[mid]);\n\n if (res < 0) {\n max = mid - 1;\n } else if (res > 0) {\n min = mid + 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n}\n\nexport function range(index, end) {\n let range = [];\n while (index < end) {\n range.push(index++);\n }\n return range;\n}\n\nexport const asciiDecoder = new TextDecoder('ascii');\n\n// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license.\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst LOOKUP = new Uint8Array(256);\nfor (let i = 0; i < CHARS.length; i++) {\n LOOKUP[CHARS.charCodeAt(i)] = i;\n}\n\nexport function decodeBase64(base64) {\n let bufferLength = base64.length * 0.75;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n let bytes = new Uint8Array(bufferLength);\n let p = 0;\n\n for (let i = 0, len = base64.length; i < len; i += 4) {\n let encoded1 = LOOKUP[base64.charCodeAt(i)];\n let encoded2 = LOOKUP[base64.charCodeAt(i + 1)];\n let encoded3 = LOOKUP[base64.charCodeAt(i + 2)];\n let 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 bytes;\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n constructor(font) {\n this.font = font;\n this.unicodeLayoutEngine = null;\n this.kernProcessor = null;\n\n // Choose an advanced layout engine. We try the AAT morx table first since more\n // scripts are currently supported because the shaping logic is built into the font.\n if (this.font.morx) {\n this.engine = new AATLayoutEngine(this.font);\n\n } else if (this.font.GSUB || this.font.GPOS) {\n this.engine = new OTLayoutEngine(this.font);\n }\n }\n\n layout(string, features, script, language, direction) {\n // Make the features parameter optional\n if (typeof features === 'string') {\n direction = language;\n language = script;\n script = features;\n features = [];\n }\n\n // Map string to glyphs if needed\n if (typeof string === 'string') {\n // Attempt to detect the script from the string if not provided.\n if (script == null) {\n script = Script.forString(string);\n }\n\n var glyphs = this.font.glyphsForString(string);\n } else {\n // Attempt to detect the script from the glyph code points if not provided.\n if (script == null) {\n let codePoints = [];\n for (let glyph of string) {\n codePoints.push(...glyph.codePoints);\n }\n\n script = Script.forCodePoints(codePoints);\n }\n\n var glyphs = string;\n }\n\n let glyphRun = new GlyphRun(glyphs, features, script, language, direction);\n\n // Return early if there are no glyphs\n if (glyphs.length === 0) {\n glyphRun.positions = [];\n return glyphRun;\n }\n\n // Setup the advanced layout engine\n if (this.engine && this.engine.setup) {\n this.engine.setup(glyphRun);\n }\n\n // Substitute and position the glyphs\n this.substitute(glyphRun);\n this.position(glyphRun);\n\n this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions);\n\n // Let the layout engine clean up any state it might have\n if (this.engine && this.engine.cleanup) {\n this.engine.cleanup();\n }\n\n return glyphRun;\n }\n\n substitute(glyphRun) {\n // Call the advanced layout engine to make substitutions\n if (this.engine && this.engine.substitute) {\n this.engine.substitute(glyphRun);\n }\n }\n\n position(glyphRun) {\n // Get initial glyph positions\n glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n let positioned = null;\n\n // Call the advanced layout engine. Returns the features applied.\n if (this.engine && this.engine.position) {\n positioned = this.engine.position(glyphRun);\n }\n\n // if there is no GPOS table, use unicode properties to position marks.\n if (!positioned && (!this.engine || this.engine.fallbackPosition)) {\n if (!this.unicodeLayoutEngine) {\n this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n }\n\n this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);\n }\n\n // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {\n if (!this.kernProcessor) {\n this.kernProcessor = new KernProcessor(this.font);\n }\n\n this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);\n glyphRun.features.kern = true;\n }\n }\n\n hideDefaultIgnorables(glyphs, positions) {\n let space = this.font.glyphForCodePoint(0x20);\n for (let i = 0; i < glyphs.length; i++) {\n if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {\n glyphs[i] = space;\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n isDefaultIgnorable(ch) {\n // From DerivedCoreProperties.txt in the Unicode database,\n // minus U+115F, U+1160, U+3164 and U+FFA0, which is what\n // Harfbuzz and Uniscribe do.\n let plane = ch >> 16;\n if (plane === 0) {\n // BMP\n switch (ch >> 8) {\n \tcase 0x00: return ch === 0x00AD;\n \tcase 0x03: return ch === 0x034F;\n \tcase 0x06: return ch === 0x061C;\n \tcase 0x17: return 0x17B4 <= ch && ch <= 0x17B5;\n \tcase 0x18: return 0x180B <= ch && ch <= 0x180E;\n \tcase 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F);\n \tcase 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF;\n \tcase 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8;\n \tdefault: return false;\n }\n } else {\n // Other planes\n switch (plane) {\n \tcase 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A);\n \tcase 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF;\n \tdefault: return false;\n }\n }\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.engine) {\n features.push(...this.engine.getAvailableFeatures(script, language));\n }\n\n if (this.font.kern && features.indexOf('kern') === -1) {\n features.push('kern');\n }\n\n return features;\n }\n\n stringsForGlyph(gid) {\n let result = new Set;\n\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n for (let codePoint of codePoints) {\n result.add(String.fromCodePoint(codePoint));\n }\n\n if (this.engine && this.engine.stringsForGlyph) {\n for (let string of this.engine.stringsForGlyph(gid)) {\n result.add(string);\n }\n }\n\n return Array.from(result);\n }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n constructor(font) {\n this.kern = font.kern;\n }\n\n process(glyphs, positions) {\n for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n let left = glyphs[glyphIndex].id;\n let right = glyphs[glyphIndex + 1].id;\n positions[glyphIndex].xAdvance += this.getKerning(left, right);\n }\n }\n\n getKerning(left, right) {\n let res = 0;\n\n for (let table of this.kern.tables) {\n if (table.coverage.crossStream) {\n continue;\n }\n\n switch (table.version) {\n case 0:\n if (!table.coverage.horizontal) {\n continue;\n }\n\n break;\n case 1:\n if (table.coverage.vertical || table.coverage.variation) {\n continue;\n }\n\n break;\n default:\n throw new Error(`Unsupported kerning table version ${table.version}`);\n }\n\n let val = 0;\n let s = table.subtable;\n switch (table.format) {\n case 0:\n let pairIdx = binarySearch(s.pairs, function (pair) {\n return (left - pair.left) || (right - pair.right);\n });\n\n if (pairIdx >= 0) {\n val = s.pairs[pairIdx].value;\n }\n\n break;\n\n case 2:\n let leftOffset = 0, rightOffset = 0;\n if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n } else {\n leftOffset = s.array.off;\n }\n\n if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n }\n\n let index = (leftOffset + rightOffset - s.array.off) / 2;\n val = s.array.values.get(index);\n break;\n\n case 3:\n if (left >= s.glyphCount || right >= s.glyphCount) {\n return 0;\n }\n\n val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n break;\n\n default:\n throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n }\n\n // Microsoft supports the override flag, which resets the result\n // Otherwise, the sum of the results from all subtables is returned\n if (table.coverage.override) {\n res = val;\n } else {\n res += val;\n }\n }\n\n return res;\n }\n}\n","import {getCombiningClass} from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n constructor(font) {\n this.font = font;\n }\n\n positionGlyphs(glyphs, positions) {\n // find each base + mark cluster, and position the marks relative to the base\n let clusterStart = 0;\n let clusterEnd = 0;\n for (let index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.isMark) { // TODO: handle ligatures\n clusterEnd = index;\n } else {\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n clusterStart = clusterEnd = index;\n }\n }\n\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n return positions;\n }\n\n positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n let base = glyphs[clusterStart];\n let baseBox = base.cbox.copy();\n\n // adjust bounding box for ligature glyphs\n if (base.codePoints.length > 1) {\n // LTR. TODO: RTL support.\n baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n }\n\n let xOffset = -positions[clusterStart].xAdvance;\n let yOffset = 0;\n let yGap = this.font.unitsPerEm / 16;\n\n // position each of the mark glyphs relative to the base glyph\n for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n let mark = glyphs[index];\n let markBox = mark.cbox;\n let position = positions[index];\n\n let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n if (combiningClass !== 'Not_Reordered') {\n position.xOffset = position.yOffset = 0;\n\n // x positioning\n switch (combiningClass) {\n case 'Double_Above':\n case 'Double_Below':\n // LTR. TODO: RTL support.\n position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n break;\n\n case 'Attached_Below_Left':\n case 'Below_Left':\n case 'Above_Left':\n // left align\n position.xOffset += baseBox.minX - markBox.minX;\n break;\n\n case 'Attached_Above_Right':\n case 'Below_Right':\n case 'Above_Right':\n // right align\n position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n break;\n\n default: // Attached_Below, Attached_Above, Below, Above, other\n // center align\n position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n }\n\n // y positioning\n switch (combiningClass) {\n case 'Double_Below':\n case 'Below_Left':\n case 'Below':\n case 'Below_Right':\n case 'Attached_Below_Left':\n case 'Attached_Below':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n baseBox.minY += yGap;\n }\n\n position.yOffset = -baseBox.minY - markBox.maxY;\n baseBox.minY += markBox.height;\n break;\n\n case 'Double_Above':\n case 'Above_Left':\n case 'Above':\n case 'Above_Right':\n case 'Attached_Above':\n case 'Attached_Above_Right':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n baseBox.maxY += yGap;\n }\n\n position.yOffset = baseBox.maxY - markBox.minY;\n baseBox.maxY += markBox.height;\n break;\n }\n\n position.xAdvance = position.yAdvance = 0;\n position.xOffset += xOffset;\n position.yOffset += yOffset;\n\n } else {\n xOffset -= position.xAdvance;\n yOffset -= position.yAdvance;\n }\n }\n\n return;\n }\n\n getCombiningClass(codePoint) {\n let combiningClass = getCombiningClass(codePoint);\n\n // Thai / Lao need some per-character work\n if ((codePoint & ~0xff) === 0x0e00) {\n if (combiningClass === 'Not_Reordered') {\n switch (codePoint) {\n case 0x0e31:\n case 0x0e34:\n case 0x0e35:\n case 0x0e36:\n case 0x0e37:\n case 0x0e47:\n case 0x0e4c:\n case 0x0e3d:\n case 0x0e4e:\n return 'Above_Right';\n\n case 0x0eb1:\n case 0x0eb4:\n case 0x0eb5:\n case 0x0eb6:\n case 0x0eb7:\n case 0x0ebb:\n case 0x0ecc:\n case 0x0ecd:\n return 'Above';\n\n case 0x0ebc:\n return 'Below';\n }\n } else if (codePoint === 0x0e3a) { // virama\n return 'Below_Right';\n }\n }\n\n switch (combiningClass) {\n // Hebrew\n\n case 'CCC10': // sheva\n case 'CCC11': // hataf segol\n case 'CCC12': // hataf patah\n case 'CCC13': // hataf qamats\n case 'CCC14': // hiriq\n case 'CCC15': // tsere\n case 'CCC16': // segol\n case 'CCC17': // patah\n case 'CCC18': // qamats\n case 'CCC20': // qubuts\n case 'CCC22': // meteg\n return 'Below';\n\n case 'CCC23': // rafe\n return 'Attached_Above';\n\n case 'CCC24': // shin dot\n return 'Above_Right';\n\n case 'CCC25': // sin dot\n case 'CCC19': // holam\n return 'Above_Left';\n\n case 'CCC26': // point varika\n return 'Above';\n\n case 'CCC21': // dagesh\n break;\n\n // Arabic and Syriac\n\n case 'CCC27': // fathatan\n case 'CCC28': // dammatan\n case 'CCC30': // fatha\n case 'CCC31': // damma\n case 'CCC33': // shadda\n case 'CCC34': // sukun\n case 'CCC35': // superscript alef\n case 'CCC36': // superscript alaph\n return 'Above';\n\n case 'CCC29': // kasratan\n case 'CCC32': // kasra\n return 'Below';\n\n // Thai\n\n case 'CCC103': // sara u / sara uu\n return 'Below_Right';\n\n case 'CCC107': // mai\n return 'Above_Right';\n\n // Lao\n\n case 'CCC118': // sign u / sign uu\n return 'Below';\n\n case 'CCC122': // mai\n return 'Above';\n\n // Tibetan\n\n case 'CCC129': // sign aa\n case 'CCC132': // sign u\n return 'Below';\n\n case 'CCC130': // sign i\n return 'Above';\n }\n\n return combiningClass;\n }\n}\n","import BBox from '../glyph/BBox';\nimport * as Script from '../layout/Script';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n constructor(glyphs, features, script, language, direction) {\n /**\n * An array of Glyph objects in the run\n * @type {Glyph[]}\n */\n this.glyphs = glyphs;\n\n /**\n * An array of GlyphPosition objects for each glyph in the run\n * @type {GlyphPosition[]}\n */\n this.positions = null;\n\n /**\n * The script that was requested for shaping. This was either passed in or detected automatically.\n * @type {string}\n */\n this.script = script;\n\n /**\n * The language requested for shaping, as passed in. If `null`, the default language for the\n * script was used.\n * @type {string}\n */\n this.language = language || null;\n\n /**\n * The direction requested for shaping, as passed in (either ltr or rtl).\n * If `null`, the default direction of the script is used.\n * @type {string}\n */\n this.direction = direction || Script.direction(script);\n\n /**\n * The features requested during shaping. This is a combination of user\n * specified features and features chosen by the shaper.\n * @type {object}\n */\n this.features = {};\n\n // Convert features to an object\n if (Array.isArray(features)) {\n for (let tag of features) {\n this.features[tag] = true;\n }\n } else if (typeof features === 'object') {\n this.features = features;\n }\n }\n\n /**\n * The total advance width of the run.\n * @type {number}\n */\n get advanceWidth() {\n let width = 0;\n for (let position of this.positions) {\n width += position.xAdvance;\n }\n\n return width;\n }\n\n /**\n * The total advance height of the run.\n * @type {number}\n */\n get advanceHeight() {\n let height = 0;\n for (let position of this.positions) {\n height += position.yAdvance;\n }\n\n return height;\n }\n\n /**\n * The bounding box containing all glyphs in the run.\n * @type {BBox}\n */\n get bbox() {\n let bbox = new BBox;\n\n let x = 0;\n let y = 0;\n for (let index = 0; index < this.glyphs.length; index++) {\n let glyph = this.glyphs[index];\n let p = this.positions[index];\n let b = glyph.bbox;\n\n bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n x += p.xAdvance;\n y += p.yAdvance;\n }\n\n return bbox;\n }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n /**\n * The minimum X position in the bounding box\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * The minimum Y position in the bounding box\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * The maxmimum X position in the bounding box\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * The maxmimum Y position in the bounding box\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * The width of the bounding box\n * @type {number}\n */\n get width() {\n return this.maxX - this.minX;\n }\n\n /**\n * The height of the bounding box\n * @type {number}\n */\n get height() {\n return this.maxY - this.minY;\n }\n\n addPoint(x, y) {\n if (Math.abs(x) !== Infinity) {\n if (x < this.minX) {\n this.minX = x;\n }\n\n if (x > this.maxX) {\n this.maxX = x;\n }\n }\n\n if (Math.abs(y) !== Infinity) {\n if (y < this.minY) {\n this.minY = y;\n }\n\n if (y > this.maxY) {\n this.maxY = y;\n }\n }\n }\n\n copy() {\n return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n }\n}\n","import {getScript} from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n Caucasian_Albanian: 'aghb',\n Arabic: 'arab',\n Imperial_Aramaic: 'armi',\n Armenian: 'armn',\n Avestan: 'avst',\n Balinese: 'bali',\n Bamum: 'bamu',\n Bassa_Vah: 'bass',\n Batak: 'batk',\n Bengali: ['bng2', 'beng'],\n Bopomofo: 'bopo',\n Brahmi: 'brah',\n Braille: 'brai',\n Buginese: 'bugi',\n Buhid: 'buhd',\n Chakma: 'cakm',\n Canadian_Aboriginal: 'cans',\n Carian: 'cari',\n Cham: 'cham',\n Cherokee: 'cher',\n Coptic: 'copt',\n Cypriot: 'cprt',\n Cyrillic: 'cyrl',\n Devanagari: ['dev2', 'deva'],\n Deseret: 'dsrt',\n Duployan: 'dupl',\n Egyptian_Hieroglyphs: 'egyp',\n Elbasan: 'elba',\n Ethiopic: 'ethi',\n Georgian: 'geor',\n Glagolitic: 'glag',\n Gothic: 'goth',\n Grantha: 'gran',\n Greek: 'grek',\n Gujarati: ['gjr2', 'gujr'],\n Gurmukhi: ['gur2', 'guru'],\n Hangul: 'hang',\n Han: 'hani',\n Hanunoo: 'hano',\n Hebrew: 'hebr',\n Hiragana: 'hira',\n Pahawh_Hmong: 'hmng',\n Katakana_Or_Hiragana: 'hrkt',\n Old_Italic: 'ital',\n Javanese: 'java',\n Kayah_Li: 'kali',\n Katakana: 'kana',\n Kharoshthi: 'khar',\n Khmer: 'khmr',\n Khojki: 'khoj',\n Kannada: ['knd2', 'knda'],\n Kaithi: 'kthi',\n Tai_Tham: 'lana',\n Lao: 'lao ',\n Latin: 'latn',\n Lepcha: 'lepc',\n Limbu: 'limb',\n Linear_A: 'lina',\n Linear_B: 'linb',\n Lisu: 'lisu',\n Lycian: 'lyci',\n Lydian: 'lydi',\n Mahajani: 'mahj',\n Mandaic: 'mand',\n Manichaean: 'mani',\n Mende_Kikakui: 'mend',\n Meroitic_Cursive: 'merc',\n Meroitic_Hieroglyphs: 'mero',\n Malayalam: ['mlm2', 'mlym'],\n Modi: 'modi',\n Mongolian: 'mong',\n Mro: 'mroo',\n Meetei_Mayek: 'mtei',\n Myanmar: ['mym2', 'mymr'],\n Old_North_Arabian: 'narb',\n Nabataean: 'nbat',\n Nko: 'nko ',\n Ogham: 'ogam',\n Ol_Chiki: 'olck',\n Old_Turkic: 'orkh',\n Oriya: ['ory2', 'orya'],\n Osmanya: 'osma',\n Palmyrene: 'palm',\n Pau_Cin_Hau: 'pauc',\n Old_Permic: 'perm',\n Phags_Pa: 'phag',\n Inscriptional_Pahlavi: 'phli',\n Psalter_Pahlavi: 'phlp',\n Phoenician: 'phnx',\n Miao: 'plrd',\n Inscriptional_Parthian: 'prti',\n Rejang: 'rjng',\n Runic: 'runr',\n Samaritan: 'samr',\n Old_South_Arabian: 'sarb',\n Saurashtra: 'saur',\n Shavian: 'shaw',\n Sharada: 'shrd',\n Siddham: 'sidd',\n Khudawadi: 'sind',\n Sinhala: 'sinh',\n Sora_Sompeng: 'sora',\n Sundanese: 'sund',\n Syloti_Nagri: 'sylo',\n Syriac: 'syrc',\n Tagbanwa: 'tagb',\n Takri: 'takr',\n Tai_Le: 'tale',\n New_Tai_Lue: 'talu',\n Tamil: ['tml2', 'taml'],\n Tai_Viet: 'tavt',\n Telugu: ['tel2', 'telu'],\n Tifinagh: 'tfng',\n Tagalog: 'tglg',\n Thaana: 'thaa',\n Thai: 'thai',\n Tibetan: 'tibt',\n Tirhuta: 'tirh',\n Ugaritic: 'ugar',\n Vai: 'vai ',\n Warang_Citi: 'wara',\n Old_Persian: 'xpeo',\n Cuneiform: 'xsux',\n Yi: 'yi ',\n Inherited: 'zinh',\n Common: 'zyyy',\n Unknown: 'zzzz'\n};\n\nconst OPENTYPE_SCRIPTS = {};\nfor (let script in UNICODE_SCRIPTS) {\n let tag = UNICODE_SCRIPTS[script];\n if (Array.isArray(tag)) {\n for (let t of tag) {\n OPENTYPE_SCRIPTS[t] = script;\n }\n } else {\n OPENTYPE_SCRIPTS[tag] = script;\n }\n}\n\nexport function fromUnicode(script) {\n return UNICODE_SCRIPTS[script];\n}\n\nexport function fromOpenType(tag) {\n return OPENTYPE_SCRIPTS[tag];\n}\n\nexport function forString(string) {\n let len = string.length;\n let idx = 0;\n while (idx < len) {\n let code = string.charCodeAt(idx++);\n\n // Check if this is a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n\n // Check if this is a low surrogate\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n }\n }\n\n let script = getScript(code);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n let codePoint = codePoints[i];\n let script = getScript(codePoint);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n arab: true, // Arabic\n hebr: true, // Hebrew\n syrc: true, // Syriac\n thaa: true, // Thaana\n cprt: true, // Cypriot Syllabary\n khar: true, // Kharosthi\n phnx: true, // Phoenician\n 'nko ': true, // N'Ko\n lydi: true, // Lydian\n avst: true, // Avestan\n armi: true, // Imperial Aramaic\n phli: true, // Inscriptional Pahlavi\n prti: true, // Inscriptional Parthian\n sarb: true, // Old South Arabian\n orkh: true, // Old Turkic, Orkhon Runic\n samr: true, // Samaritan\n mand: true, // Mandaic, Mandaean\n merc: true, // Meroitic Cursive\n mero: true, // Meroitic Hieroglyphs\n\n // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n mani: true, // Manichaean\n mend: true, // Mende Kikakui\n nbat: true, // Nabataean\n narb: true, // Old North Arabian\n palm: true, // Palmyrene\n phlp: true // Psalter Pahlavi\n};\n\nexport function direction(script) {\n if (RTL[script]) {\n return 'rtl';\n }\n\n return 'ltr';\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n /**\n * The amount to move the virtual pen in the X direction after rendering this glyph.\n * @type {number}\n */\n this.xAdvance = xAdvance;\n\n /**\n * The amount to move the virtual pen in the Y direction after rendering this glyph.\n * @type {number}\n */\n this.yAdvance = yAdvance;\n\n /**\n * The offset from the pen position in the X direction at which to render this glyph.\n * @type {number}\n */\n this.xOffset = xOffset;\n\n /**\n * The offset from the pen position in the Y direction at which to render this glyph.\n * @type {number}\n */\n this.yOffset = yOffset;\n }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n constructor(font) {\n this.font = font;\n this.morxProcessor = new AATMorxProcessor(font);\n this.fallbackPosition = false;\n }\n\n substitute(glyphRun) {\n // AAT expects the glyphs to be in visual order prior to morx processing,\n // so reverse the glyphs if the script is right-to-left.\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n }\n\n this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features));\n }\n\n getAvailableFeatures(script, language) {\n return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n }\n\n stringsForGlyph(gid) {\n let glyphStrings = this.morxProcessor.generateInputs(gid);\n let result = new Set;\n\n for (let glyphs of glyphStrings) {\n this._addStrings(glyphs, 0, result, '');\n }\n\n return result;\n }\n\n _addStrings(glyphs, index, strings, string) {\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n for (let codePoint of codePoints) {\n let s = string + String.fromCodePoint(codePoint);\n if (index < glyphs.length - 1) {\n this._addStrings(glyphs, index + 1, strings, s);\n } else {\n strings.add(s);\n }\n }\n }\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n allTypographicFeatures: {\n code: 0,\n exclusive: false,\n allTypeFeatures: 0\n },\n ligatures: {\n code: 1,\n exclusive: false,\n requiredLigatures: 0,\n commonLigatures: 2,\n rareLigatures: 4,\n // logos: 6\n rebusPictures: 8,\n diphthongLigatures: 10,\n squaredLigatures: 12,\n abbrevSquaredLigatures: 14,\n symbolLigatures: 16,\n contextualLigatures: 18,\n historicalLigatures: 20\n },\n cursiveConnection: {\n code: 2,\n exclusive: true,\n unconnected: 0,\n partiallyConnected: 1,\n cursive: 2\n },\n letterCase: {\n code: 3,\n exclusive: true\n },\n // upperAndLowerCase: 0 # deprecated\n // allCaps: 1 # deprecated\n // allLowerCase: 2 # deprecated\n // smallCaps: 3 # deprecated\n // initialCaps: 4 # deprecated\n // initialCapsAndSmallCaps: 5 # deprecated\n verticalSubstitution: {\n code: 4,\n exclusive: false,\n substituteVerticalForms: 0\n },\n linguisticRearrangement: {\n code: 5,\n exclusive: false,\n linguisticRearrangement: 0\n },\n numberSpacing: {\n code: 6,\n exclusive: true,\n monospacedNumbers: 0,\n proportionalNumbers: 1,\n thirdWidthNumbers: 2,\n quarterWidthNumbers: 3\n },\n smartSwash: {\n code: 8,\n exclusive: false,\n wordInitialSwashes: 0,\n wordFinalSwashes: 2,\n // lineInitialSwashes: 4\n // lineFinalSwashes: 6\n nonFinalSwashes: 8\n },\n diacritics: {\n code: 9,\n exclusive: true,\n showDiacritics: 0,\n hideDiacritics: 1,\n decomposeDiacritics: 2\n },\n verticalPosition: {\n code: 10,\n exclusive: true,\n normalPosition: 0,\n superiors: 1,\n inferiors: 2,\n ordinals: 3,\n scientificInferiors: 4\n },\n fractions: {\n code: 11,\n exclusive: true,\n noFractions: 0,\n verticalFractions: 1,\n diagonalFractions: 2\n },\n overlappingCharacters: {\n code: 13,\n exclusive: false,\n preventOverlap: 0\n },\n typographicExtras: {\n code: 14,\n exclusive: false,\n // hyphensToEmDash: 0\n // hyphenToEnDash: 2\n slashedZero: 4\n },\n // formInterrobang: 6\n // smartQuotes: 8\n // periodsToEllipsis: 10\n mathematicalExtras: {\n code: 15,\n exclusive: false,\n // hyphenToMinus: 0\n // asteristoMultiply: 2\n // slashToDivide: 4\n // inequalityLigatures: 6\n // exponents: 8\n mathematicalGreek: 10\n },\n ornamentSets: {\n code: 16,\n exclusive: true,\n noOrnaments: 0,\n dingbats: 1,\n piCharacters: 2,\n fleurons: 3,\n decorativeBorders: 4,\n internationalSymbols: 5,\n mathSymbols: 6\n },\n characterAlternatives: {\n code: 17,\n exclusive: true,\n noAlternates: 0\n },\n // user defined options\n designComplexity: {\n code: 18,\n exclusive: true,\n designLevel1: 0,\n designLevel2: 1,\n designLevel3: 2,\n designLevel4: 3,\n designLevel5: 4\n },\n styleOptions: {\n code: 19,\n exclusive: true,\n noStyleOptions: 0,\n displayText: 1,\n engravedText: 2,\n illuminatedCaps: 3,\n titlingCaps: 4,\n tallCaps: 5\n },\n characterShape: {\n code: 20,\n exclusive: true,\n traditionalCharacters: 0,\n simplifiedCharacters: 1,\n JIS1978Characters: 2,\n JIS1983Characters: 3,\n JIS1990Characters: 4,\n traditionalAltOne: 5,\n traditionalAltTwo: 6,\n traditionalAltThree: 7,\n traditionalAltFour: 8,\n traditionalAltFive: 9,\n expertCharacters: 10,\n JIS2004Characters: 11,\n hojoCharacters: 12,\n NLCCharacters: 13,\n traditionalNamesCharacters: 14\n },\n numberCase: {\n code: 21,\n exclusive: true,\n lowerCaseNumbers: 0,\n upperCaseNumbers: 1\n },\n textSpacing: {\n code: 22,\n exclusive: true,\n proportionalText: 0,\n monospacedText: 1,\n halfWidthText: 2,\n thirdWidthText: 3,\n quarterWidthText: 4,\n altProportionalText: 5,\n altHalfWidthText: 6\n },\n transliteration: {\n code: 23,\n exclusive: true,\n noTransliteration: 0\n },\n // hanjaToHangul: 1\n // hiraganaToKatakana: 2\n // katakanaToHiragana: 3\n // kanaToRomanization: 4\n // romanizationToHiragana: 5\n // romanizationToKatakana: 6\n // hanjaToHangulAltOne: 7\n // hanjaToHangulAltTwo: 8\n // hanjaToHangulAltThree: 9\n annotation: {\n code: 24,\n exclusive: true,\n noAnnotation: 0,\n boxAnnotation: 1,\n roundedBoxAnnotation: 2,\n circleAnnotation: 3,\n invertedCircleAnnotation: 4,\n parenthesisAnnotation: 5,\n periodAnnotation: 6,\n romanNumeralAnnotation: 7,\n diamondAnnotation: 8,\n invertedBoxAnnotation: 9,\n invertedRoundedBoxAnnotation: 10\n },\n kanaSpacing: {\n code: 25,\n exclusive: true,\n fullWidthKana: 0,\n proportionalKana: 1\n },\n ideographicSpacing: {\n code: 26,\n exclusive: true,\n fullWidthIdeographs: 0,\n proportionalIdeographs: 1,\n halfWidthIdeographs: 2\n },\n unicodeDecomposition: {\n code: 27,\n exclusive: false,\n canonicalComposition: 0,\n compatibilityComposition: 2,\n transcodingComposition: 4\n },\n rubyKana: {\n code: 28,\n exclusive: false,\n // noRubyKana: 0 # deprecated - use rubyKanaOff instead\n // rubyKana: 1 # deprecated - use rubyKanaOn instead\n rubyKana: 2\n },\n CJKSymbolAlternatives: {\n code: 29,\n exclusive: true,\n noCJKSymbolAlternatives: 0,\n CJKSymbolAltOne: 1,\n CJKSymbolAltTwo: 2,\n CJKSymbolAltThree: 3,\n CJKSymbolAltFour: 4,\n CJKSymbolAltFive: 5\n },\n ideographicAlternatives: {\n code: 30,\n exclusive: true,\n noIdeographicAlternatives: 0,\n ideographicAltOne: 1,\n ideographicAltTwo: 2,\n ideographicAltThree: 3,\n ideographicAltFour: 4,\n ideographicAltFive: 5\n },\n CJKVerticalRomanPlacement: {\n code: 31,\n exclusive: true,\n CJKVerticalRomanCentered: 0,\n CJKVerticalRomanHBaseline: 1\n },\n italicCJKRoman: {\n code: 32,\n exclusive: false,\n // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead\n // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead\n CJKItalicRoman: 2\n },\n caseSensitiveLayout: {\n code: 33,\n exclusive: false,\n caseSensitiveLayout: 0,\n caseSensitiveSpacing: 2\n },\n alternateKana: {\n code: 34,\n exclusive: false,\n alternateHorizKana: 0,\n alternateVertKana: 2\n },\n stylisticAlternatives: {\n code: 35,\n exclusive: false,\n noStylisticAlternates: 0,\n stylisticAltOne: 2,\n stylisticAltTwo: 4,\n stylisticAltThree: 6,\n stylisticAltFour: 8,\n stylisticAltFive: 10,\n stylisticAltSix: 12,\n stylisticAltSeven: 14,\n stylisticAltEight: 16,\n stylisticAltNine: 18,\n stylisticAltTen: 20,\n stylisticAltEleven: 22,\n stylisticAltTwelve: 24,\n stylisticAltThirteen: 26,\n stylisticAltFourteen: 28,\n stylisticAltFifteen: 30,\n stylisticAltSixteen: 32,\n stylisticAltSeventeen: 34,\n stylisticAltEighteen: 36,\n stylisticAltNineteen: 38,\n stylisticAltTwenty: 40\n },\n contextualAlternates: {\n code: 36,\n exclusive: false,\n contextualAlternates: 0,\n swashAlternates: 2,\n contextualSwashAlternates: 4\n },\n lowerCase: {\n code: 37,\n exclusive: true,\n defaultLowerCase: 0,\n lowerCaseSmallCaps: 1,\n lowerCasePetiteCaps: 2\n },\n upperCase: {\n code: 38,\n exclusive: true,\n defaultUpperCase: 0,\n upperCaseSmallCaps: 1,\n upperCasePetiteCaps: 2\n },\n languageTag: { // indices into ltag table\n code: 39,\n exclusive: true\n },\n CJKRomanSpacing: {\n code: 103,\n exclusive: true,\n halfWidthCJKRoman: 0,\n proportionalCJKRoman: 1,\n defaultCJKRoman: 2,\n fullWidthCJKRoman: 3\n }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n rlig: feature('ligatures', 'requiredLigatures'),\n clig: feature('ligatures', 'contextualLigatures'),\n dlig: feature('ligatures', 'rareLigatures'),\n hlig: feature('ligatures', 'historicalLigatures'),\n liga: feature('ligatures', 'commonLigatures'),\n hist: feature('ligatures', 'historicalLigatures'), // ??\n\n smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n frac: feature('fractions', 'diagonalFractions'),\n dnom: feature('fractions', 'diagonalFractions'), // ??\n numr: feature('fractions', 'diagonalFractions'), // ??\n afrc: feature('fractions', 'verticalFractions'),\n // aalt\n // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n // unic, vatu, vhal, vjmo, vpal, vrt2\n // dist -> trak table?\n // kern, vkrn -> kern table\n // lfbd + opbd + rtbd -> opbd table?\n // mark, mkmk -> acnt table?\n // locl -> languageTag + ltag table\n\n case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n swsh: feature('contextualAlternates', 'swashAlternates'),\n cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n curs: feature('cursiveConnection', 'cursive'), // ??\n c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n init: feature('smartSwash', 'wordInitialSwashes'), // ??\n fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n pkna: feature('kanaSpacing', 'proportionalKana'),\n half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n halt: feature('textSpacing', 'altHalfWidthText'),\n\n hkna: feature('alternateKana', 'alternateHorizKana'),\n vkna: feature('alternateKana', 'alternateVertKana'),\n // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n lnum: feature('numberCase', 'upperCaseNumbers'),\n onum: feature('numberCase', 'lowerCaseNumbers'),\n mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n // nalt: not enough info. what type of annotation?\n // ornm: ditto, which ornament style?\n\n calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n tnum: feature('numberSpacing', 'monospacedNumbers'),\n pnum: feature('numberSpacing', 'proportionalNumbers'),\n sups: feature('verticalPosition', 'superiors'),\n subs: feature('verticalPosition', 'inferiors'),\n ordn: feature('verticalPosition', 'ordinals'),\n pwid: feature('textSpacing', 'proportionalText'),\n hwid: feature('textSpacing', 'halfWidthText'),\n qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n fwid: feature('textSpacing', 'proportionalText'), //??\n palt: feature('textSpacing', 'altProportionalText'),\n trad: feature('characterShape', 'traditionalCharacters'),\n smpl: feature('characterShape', 'simplifiedCharacters'),\n jp78: feature('characterShape', 'JIS1978Characters'),\n jp83: feature('characterShape', 'JIS1983Characters'),\n jp90: feature('characterShape', 'JIS1990Characters'),\n jp04: feature('characterShape', 'JIS2004Characters'),\n expt: feature('characterShape', 'expertCharacters'),\n hojo: feature('characterShape', 'hojoCharacters'),\n nlck: feature('characterShape', 'NLCCharacters'),\n tnam: feature('characterShape', 'traditionalNamesCharacters'),\n ruby: feature('rubyKana', 'rubyKana'),\n titl: feature('styleOptions', 'titlingCaps'),\n zero: feature('typographicExtras', 'slashedZero'),\n\n ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n let aat = OTMapping[ot];\n if (AATMapping[aat[0]] == null) {\n AATMapping[aat[0]] = {};\n }\n\n AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n let res = {};\n for (let k in features) {\n let r;\n if (r = OTMapping[k]) {\n if (res[r[0]] == null) {\n res[r[0]] = {};\n }\n\n res[r[0]][r[1]] = features[k];\n }\n }\n\n return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n let [type, setting] = f;\n if (isNaN(type)) {\n var typeCode = features[type] && features[type].code;\n } else {\n var typeCode = type;\n }\n\n if (isNaN(setting)) {\n var settingCode = features[type] && features[type][setting];\n } else {\n var settingCode = setting;\n }\n\n return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n let res = {};\n if (Array.isArray(features)) {\n for (let k = 0; k < features.length; k++) {\n let r;\n let f = mapFeatureStrings(features[k]);\n if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n res[r] = true;\n }\n }\n\n } else if (typeof features === 'object') {\n for (let type in features) {\n let feature = features[type];\n for (let setting in feature) {\n let r;\n let f = mapFeatureStrings([type, setting]);\n if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n res[r] = true;\n }\n }\n }\n }\n\n return Object.keys(res);\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST = 0x2000;\nconst VERB = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK = 0x80000000;\nconst STORE_MASK = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY = 0x800000;\nconst REVERSE_DIRECTION = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE = 0x1000;\nconst CURRENT_INSERT_BEFORE = 0x0800;\nconst MARKED_INSERT_BEFORE = 0x0400;\nconst CURRENT_INSERT_COUNT = 0x03E0;\nconst MARKED_INSERT_COUNT = 0x001F;\n\nexport default class AATMorxProcessor {\n constructor(font) {\n this.processIndicRearragement = this.processIndicRearragement.bind(this);\n this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n this.processLigature = this.processLigature.bind(this);\n this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n this.font = font;\n this.morx = font.morx;\n this.inputCache = null;\n }\n\n // Processes an array of glyphs and applies the specified features\n // Features should be in the form of {featureType:{featureSetting:boolean}}\n process(glyphs, features = {}) {\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n // enable/disable the requested features\n for (let feature of chain.features) {\n let f;\n if (f = features[feature.featureType]) {\n if (f[feature.featureSetting]) {\n flags &= feature.disableFlags;\n flags |= feature.enableFlags;\n } else if (f[feature.featureSetting] === false) {\n flags |= ~feature.disableFlags;\n flags &= ~feature.enableFlags;\n }\n }\n }\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.processSubtable(subtable, glyphs);\n }\n }\n }\n\n // remove deleted glyphs\n let index = glyphs.length - 1;\n while (index >= 0) {\n if (glyphs[index].id === 0xffff) {\n glyphs.splice(index, 1);\n }\n\n index--;\n }\n\n return glyphs;\n }\n\n processSubtable(subtable, glyphs) {\n this.subtable = subtable;\n this.glyphs = glyphs;\n if (this.subtable.type === 4) {\n this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n return;\n }\n\n this.ligatureStack = [];\n this.markedGlyph = null;\n this.firstGlyph = null;\n this.lastGlyph = null;\n this.markedIndex = null;\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n return stateMachine.process(this.glyphs, reverse, process);\n }\n\n @cache\n getStateMachine(subtable) {\n return new AATStateMachine(subtable.table.stateTable);\n }\n\n getProcessor() {\n switch (this.subtable.type) {\n case 0:\n return this.processIndicRearragement;\n case 1:\n return this.processContextualSubstitution;\n case 2:\n return this.processLigature;\n case 4:\n return this.processNoncontextualSubstitutions;\n case 5:\n return this.processGlyphInsertion;\n default:\n throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n }\n }\n\n processIndicRearragement(glyph, entry, index) {\n if (entry.flags & MARK_FIRST) {\n this.firstGlyph = index;\n }\n\n if (entry.flags & MARK_LAST) {\n this.lastGlyph = index;\n }\n\n reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n }\n\n processContextualSubstitution(glyph, entry, index) {\n let subsitutions = this.subtable.table.substitutionTable.items;\n if (entry.markIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.markIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[this.markedGlyph];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.currentIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.currentIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[index];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.flags & SET_MARK) {\n this.markedGlyph = index;\n }\n }\n\n processLigature(glyph, entry, index) {\n if (entry.flags & SET_COMPONENT) {\n this.ligatureStack.push(index);\n }\n\n if (entry.flags & PERFORM_ACTION) {\n let actions = this.subtable.table.ligatureActions;\n let components = this.subtable.table.components;\n let ligatureList = this.subtable.table.ligatureList;\n\n let actionIndex = entry.action;\n let last = false;\n let ligatureIndex = 0;\n let codePoints = [];\n let ligatureGlyphs = [];\n\n while (!last) {\n let componentGlyph = this.ligatureStack.pop();\n codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n let action = actions.getItem(actionIndex++);\n last = !!(action & LAST_MASK);\n let store = !!(action & STORE_MASK);\n let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n offset += this.glyphs[componentGlyph].id;\n\n let component = components.getItem(offset);\n ligatureIndex += component;\n\n if (last || store) {\n let ligatureEntry = ligatureList.getItem(ligatureIndex);\n this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n ligatureGlyphs.push(componentGlyph);\n ligatureIndex = 0;\n codePoints = [];\n } else {\n this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n }\n }\n\n // Put ligature glyph indexes back on the stack\n this.ligatureStack.push(...ligatureGlyphs);\n }\n }\n\n processNoncontextualSubstitutions(subtable, glyphs, index) {\n let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n for (index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.id !== 0xffff) {\n let gid = lookupTable.lookup(glyph.id);\n if (gid) { // 0 means do nothing\n glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n }\n }\n\n _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n let insertions = [];\n while (count--) {\n let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n insertions.push(this.font.getGlyph(gid));\n }\n\n if (!isBefore) {\n glyphIndex++;\n }\n\n this.glyphs.splice(glyphIndex, 0, ...insertions);\n }\n\n processGlyphInsertion(glyph, entry, index) {\n if (entry.flags & SET_MARK) {\n this.markedIndex = index;\n }\n\n if (entry.markedInsertIndex !== 0xffff) {\n let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n }\n\n if (entry.currentInsertIndex !== 0xffff) {\n let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n }\n }\n\n getSupportedFeatures() {\n let features = [];\n for (let chain of this.morx.chains) {\n for (let feature of chain.features) {\n features.push([feature.featureType, feature.featureSetting]);\n }\n }\n\n return features;\n }\n\n generateInputs(gid) {\n if (!this.inputCache) {\n this.generateInputCache();\n }\n\n return this.inputCache[gid] || [];\n }\n\n generateInputCache() {\n this.inputCache = {};\n\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.generateInputsForSubtable(subtable);\n }\n }\n }\n }\n\n generateInputsForSubtable(subtable) {\n // Currently, only supporting ligature subtables.\n if (subtable.type !== 2) {\n return;\n }\n\n let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n if (reverse) {\n throw new Error('Reverse subtable, not supported.');\n }\n\n this.subtable = subtable;\n this.ligatureStack = [];\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let input = [];\n let stack = [];\n this.glyphs = [];\n\n stateMachine.traverse({\n enter: (glyph, entry) => {\n let glyphs = this.glyphs;\n stack.push({\n glyphs: glyphs.slice(),\n ligatureStack: this.ligatureStack.slice()\n });\n\n // Add glyph to input and glyphs to process.\n let g = this.font.getGlyph(glyph);\n input.push(g);\n glyphs.push(input[input.length - 1]);\n\n // Process ligature substitution\n process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n // Add input to result if only one matching (non-deleted) glyph remains.\n let count = 0;\n let found = 0;\n for (let i = 0; i < glyphs.length && count <= 1; i++) {\n if (glyphs[i].id !== 0xffff) {\n count++;\n found = glyphs[i].id;\n }\n }\n\n if (count === 1) {\n let result = input.map(g => g.id);\n let cache = this.inputCache[found];\n if (cache) {\n cache.push(result);\n } else {\n this.inputCache[found] = [result];\n }\n }\n },\n\n exit: () => {\n ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n input.pop();\n }\n });\n }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n if (reverseB) {\n end.reverse();\n }\n\n let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n if (reverseA) {\n start.reverse();\n }\n\n glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n let length = lastGlyph - firstGlyph + 1;\n switch (verb) {\n case 0: // no change\n return glyphs;\n\n case 1: // Ax => xA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n case 2: // xD => Dx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n case 3: // AxD => DxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n case 4: // ABx => xAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n case 5: // ABx => xBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n case 6: // xCD => CDx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n case 7: // xCD => DCx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n case 8: // AxCD => CDxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n case 9: // AxCD => DCxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n case 10: // ABxD => DxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n case 11: // ABxD => DxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n case 12: // ABxCD => CDxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n case 13: // ABxCD => CDxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n case 14: // ABxCD => DCxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n case 15: // ABxCD => DCxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n default:\n throw new Error(`Unknown verb: ${verb}`);\n }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n constructor(stateTable) {\n this.stateTable = stateTable;\n this.lookupTable = new AATLookupTable(stateTable.classTable);\n }\n\n process(glyphs, reverse, processEntry) {\n let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n let index = reverse ? glyphs.length - 1 : 0;\n let dir = reverse ? -1 : 1;\n\n while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n let glyph = null;\n let classCode = OUT_OF_BOUNDS_CLASS;\n let shouldAdvance = true;\n\n if (index === glyphs.length || index === -1) {\n classCode = END_OF_TEXT_CLASS;\n } else {\n glyph = glyphs[index];\n if (glyph.id === 0xffff) { // deleted glyph\n classCode = DELETED_GLYPH_CLASS;\n } else {\n classCode = this.lookupTable.lookup(glyph.id);\n if (classCode == null) {\n classCode = OUT_OF_BOUNDS_CLASS;\n }\n }\n }\n\n let row = this.stateTable.stateArray.getItem(currentState);\n let entryIndex = row[classCode];\n let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {\n processEntry(glyph, entry, index);\n shouldAdvance = !(entry.flags & DONT_ADVANCE);\n }\n\n currentState = entry.newState;\n if (shouldAdvance) {\n index += dir;\n }\n }\n\n return glyphs;\n }\n\n /**\n * Performs a depth-first traversal of the glyph strings\n * represented by the state machine.\n */\n traverse(opts, state = 0, visited = new Set) {\n if (visited.has(state)) {\n return;\n }\n\n visited.add(state);\n\n let {nClasses, stateArray, entryTable} = this.stateTable;\n let row = stateArray.getItem(state);\n\n // Skip predefined classes\n for (let classCode = 4; classCode < nClasses; classCode++) {\n let entryIndex = row[classCode];\n let entry = entryTable.getItem(entryIndex);\n\n // Try all glyphs in the class\n for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n if (opts.enter) {\n opts.enter(glyph, entry);\n }\n\n if (entry.newState !== 0) {\n this.traverse(opts, entry.newState, visited);\n }\n\n if (opts.exit) {\n opts.exit(glyph, entry);\n }\n }\n }\n }\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n constructor(table) {\n this.table = table;\n }\n\n lookup(glyph) {\n switch (this.table.version) {\n case 0: // simple array format\n return this.table.values.getItem(glyph);\n\n case 2: // segment format\n case 4: {\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.firstGlyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.firstGlyph) {\n max = mid - 1;\n } else if (glyph > seg.lastGlyph) {\n min = mid + 1;\n } else {\n if (this.table.version === 2) {\n return seg.value;\n } else {\n return seg.values[glyph - seg.firstGlyph];\n }\n }\n }\n\n return null;\n }\n\n case 6: { // lookup single\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.glyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.glyph) {\n max = mid - 1;\n } else if (glyph > seg.glyph) {\n min = mid + 1;\n } else {\n return seg.value;\n }\n }\n\n return null;\n }\n\n case 8: // lookup trimmed\n return this.table.values[glyph - this.table.firstGlyph];\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n }\n\n @cache\n glyphsForValue(classValue) {\n let res = [];\n\n switch (this.table.version) {\n case 2: // segment format\n case 4: {\n for (let segment of this.table.segments) {\n if ((this.table.version === 2 && segment.value === classValue)) {\n res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n } else {\n for (let index = 0; index < segment.values.length; index++) {\n if (segment.values[index] === classValue) {\n res.push(segment.firstGlyph + index);\n }\n }\n }\n }\n\n break;\n }\n\n case 6: { // lookup single\n for (let segment of this.table.segments) {\n if (segment.value === classValue) {\n res.push(segment.glyph);\n }\n }\n\n break;\n }\n\n case 8: { // lookup trimmed\n for (let i = 0; i < this.table.values.length; i++) {\n if (this.table.values[i] === classValue) {\n res.push(this.table.firstGlyph + i);\n }\n }\n\n break;\n }\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n\n return res;\n }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n constructor(font) {\n this.font = font;\n this.glyphInfos = null;\n this.plan = null;\n this.GSUBProcessor = null;\n this.GPOSProcessor = null;\n this.fallbackPosition = true;\n\n if (font.GSUB) {\n this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n }\n\n if (font.GPOS) {\n this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n }\n }\n\n setup(glyphRun) {\n // Map glyphs to GlyphInfo objects so data can be passed between\n // GSUB and GPOS without mutating the real (shared) Glyph objects.\n this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n // Select a script based on what is available in GSUB/GPOS.\n let script = null;\n if (this.GPOSProcessor) {\n script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n if (this.GSUBProcessor) {\n script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n }\n\n // Choose a shaper based on the script, and setup a shaping plan.\n // This determines which features to apply to which glyphs.\n this.shaper = Shapers.choose(script);\n this.plan = new ShapingPlan(this.font, script, glyphRun.direction);\n this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features);\n\n // Assign chosen features to output glyph run\n for (let key in this.plan.allFeatures) {\n glyphRun.features[key] = true;\n }\n }\n\n substitute(glyphRun) {\n if (this.GSUBProcessor) {\n this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n // Map glyph infos back to normal Glyph objects\n glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n }\n }\n\n position(glyphRun) {\n if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n if (this.GPOSProcessor) {\n this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);\n }\n\n if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n this.zeroMarkAdvances(glyphRun.positions);\n }\n\n // Reverse the glyphs and positions if the script is right-to-left\n if (glyphRun.direction === 'rtl') {\n glyphRun.glyphs.reverse();\n glyphRun.positions.reverse();\n }\n\n return this.GPOSProcessor && this.GPOSProcessor.features;\n }\n\n zeroMarkAdvances(positions) {\n for (let i = 0; i < this.glyphInfos.length; i++) {\n if (this.glyphInfos[i].isMark) {\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n cleanup() {\n this.glyphInfos = null;\n this.plan = null;\n this.shaper = null;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.GSUBProcessor) {\n this.GSUBProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GSUBProcessor.features));\n }\n\n if (this.GPOSProcessor) {\n this.GPOSProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GPOSProcessor.features));\n }\n\n return features;\n }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n constructor(font, script, direction) {\n this.font = font;\n this.script = script;\n this.direction = direction;\n this.stages = [];\n this.globalFeatures = {};\n this.allFeatures = {};\n }\n\n /**\n * Adds the given features to the last stage.\n * Ignores features that have already been applied.\n */\n _addFeatures(features, global) {\n let stageIndex = this.stages.length - 1;\n let stage = this.stages[stageIndex];\n for (let feature of features) {\n if (this.allFeatures[feature] == null) {\n stage.push(feature);\n this.allFeatures[feature] = stageIndex;\n\n if (global) {\n this.globalFeatures[feature] = true;\n }\n }\n }\n }\n\n /**\n * Add features to the last stage\n */\n add(arg, global = true) {\n if (this.stages.length === 0) {\n this.stages.push([]);\n }\n\n if (typeof arg === 'string') {\n arg = [arg];\n }\n\n if (Array.isArray(arg)) {\n this._addFeatures(arg, global);\n } else if (typeof arg === 'object') {\n this._addFeatures(arg.global || [], true);\n this._addFeatures(arg.local || [], false);\n } else {\n throw new Error(\"Unsupported argument to ShapingPlan#add\");\n }\n }\n\n /**\n * Add a new stage\n */\n addStage(arg, global) {\n if (typeof arg === 'function') {\n this.stages.push(arg, []);\n } else {\n this.stages.push([]);\n this.add(arg, global);\n }\n }\n\n setFeatureOverrides(features) {\n if (Array.isArray(features)) {\n this.add(features);\n } else if (typeof features === 'object') {\n for (let tag in features) {\n if (features[tag]) {\n this.add(tag);\n } else if (this.allFeatures[tag] != null) {\n let stage = this.stages[this.allFeatures[tag]];\n stage.splice(stage.indexOf(tag), 1);\n delete this.allFeatures[tag];\n delete this.globalFeatures[tag];\n }\n }\n }\n }\n\n /**\n * Assigns the global features to the given glyphs\n */\n assignGlobalFeatures(glyphs) {\n for (let glyph of glyphs) {\n for (let feature in this.globalFeatures) {\n glyph.features[feature] = true;\n }\n }\n }\n\n /**\n * Executes the planned stages using the given OTProcessor\n */\n process(processor, glyphs, positions) {\n for (let stage of this.stages) {\n if (typeof stage === 'function') {\n if (!positions) {\n stage(this.font, glyphs, this);\n }\n\n } else if (stage.length > 0) {\n processor.applyFeatures(stage, glyphs, positions);\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport IndicShaper from './IndicShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n arab: ArabicShaper, // Arabic\n mong: ArabicShaper, // Mongolian\n syrc: ArabicShaper, // Syriac\n 'nko ': ArabicShaper, // N'Ko\n phag: ArabicShaper, // Phags Pa\n mand: ArabicShaper, // Mandaic\n mani: ArabicShaper, // Manichaean\n phlp: ArabicShaper, // Psalter Pahlavi\n\n hang: HangulShaper, // Hangul\n\n bng2: IndicShaper, // Bengali\n beng: IndicShaper, // Bengali\n dev2: IndicShaper, // Devanagari\n deva: IndicShaper, // Devanagari\n gjr2: IndicShaper, // Gujarati\n gujr: IndicShaper, // Gujarati\n guru: IndicShaper, // Gurmukhi\n gur2: IndicShaper, // Gurmukhi\n knda: IndicShaper, // Kannada\n knd2: IndicShaper, // Kannada\n mlm2: IndicShaper, // Malayalam\n mlym: IndicShaper, // Malayalam\n ory2: IndicShaper, // Oriya\n orya: IndicShaper, // Oriya\n taml: IndicShaper, // Tamil\n tml2: IndicShaper, // Tamil\n telu: IndicShaper, // Telugu\n tel2: IndicShaper, // Telugu\n khmr: IndicShaper, // Khmer\n\n bali: UniversalShaper, // Balinese\n batk: UniversalShaper, // Batak\n brah: UniversalShaper, // Brahmi\n bugi: UniversalShaper, // Buginese\n buhd: UniversalShaper, // Buhid\n cakm: UniversalShaper, // Chakma\n cham: UniversalShaper, // Cham\n dupl: UniversalShaper, // Duployan\n egyp: UniversalShaper, // Egyptian Hieroglyphs\n gran: UniversalShaper, // Grantha\n hano: UniversalShaper, // Hanunoo\n java: UniversalShaper, // Javanese\n kthi: UniversalShaper, // Kaithi\n kali: UniversalShaper, // Kayah Li\n khar: UniversalShaper, // Kharoshthi\n khoj: UniversalShaper, // Khojki\n sind: UniversalShaper, // Khudawadi\n lepc: UniversalShaper, // Lepcha\n limb: UniversalShaper, // Limbu\n mahj: UniversalShaper, // Mahajani\n // mand: UniversalShaper, // Mandaic\n // mani: UniversalShaper, // Manichaean\n mtei: UniversalShaper, // Meitei Mayek\n modi: UniversalShaper, // Modi\n // mong: UniversalShaper, // Mongolian\n // 'nko ': UniversalShaper, // N’Ko\n hmng: UniversalShaper, // Pahawh Hmong\n // phag: UniversalShaper, // Phags-pa\n // phlp: UniversalShaper, // Psalter Pahlavi\n rjng: UniversalShaper, // Rejang\n saur: UniversalShaper, // Saurashtra\n shrd: UniversalShaper, // Sharada\n sidd: UniversalShaper, // Siddham\n sinh: IndicShaper, // Sinhala\n sund: UniversalShaper, // Sundanese\n sylo: UniversalShaper, // Syloti Nagri\n tglg: UniversalShaper, // Tagalog\n tagb: UniversalShaper, // Tagbanwa\n tale: UniversalShaper, // Tai Le\n lana: UniversalShaper, // Tai Tham\n tavt: UniversalShaper, // Tai Viet\n takr: UniversalShaper, // Takri\n tibt: UniversalShaper, // Tibetan\n tfng: UniversalShaper, // Tifinagh\n tirh: UniversalShaper, // Tirhuta\n\n latn: DefaultShaper, // Latin\n DFLT: DefaultShaper // Default\n};\n\nexport function choose(script) {\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n let shaper = SHAPERS[s];\n if (shaper) {\n return shaper;\n }\n }\n\n return DefaultShaper;\n}\n","import {isDigit} from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n ltr: ['ltra', 'ltrm'],\n rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n static zeroMarkWidths = 'AFTER_GPOS';\n static plan(plan, glyphs, features) {\n // Plan the features we want to apply\n this.planPreprocessing(plan);\n this.planFeatures(plan);\n this.planPostprocessing(plan, features);\n\n // Assign the global features to all the glyphs\n plan.assignGlobalFeatures(glyphs);\n\n // Assign local features to glyphs\n this.assignFeatures(plan, glyphs);\n }\n\n static planPreprocessing(plan) {\n plan.add({\n global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n local: FRACTIONAL_FEATURES\n });\n }\n\n static planFeatures(plan) {\n // Do nothing by default. Let subclasses override this.\n }\n\n static planPostprocessing(plan, userFeatures) {\n plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]);\n plan.setFeatureOverrides(userFeatures);\n }\n\n static assignFeatures(plan, glyphs) {\n // Enable contextual fractions\n for (let i = 0; i < glyphs.length; i++) {\n let glyph = glyphs[i];\n if (glyph.codePoints[0] === 0x2044) { // fraction slash\n let start = i;\n let end = i + 1;\n\n // Apply numerator\n while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) {\n glyphs[start - 1].features.numr = true;\n glyphs[start - 1].features.frac = true;\n start--;\n }\n\n // Apply denominator\n while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) {\n glyphs[end].features.dnom = true;\n glyphs[end].features.frac = true;\n end++;\n }\n\n // Apply fraction slash\n glyph.features.frac = true;\n i = end - 1;\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport {getCategory} from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\nimport { decodeBase64 } from '../../utils';\n\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/data.trie', 'base64')));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n Non_Joining: 0,\n Left_Joining: 1,\n Right_Joining: 2,\n Dual_Joining: 3,\n Join_Causing: 3,\n ALAPH: 4,\n 'DALATH RISH': 5,\n Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH\n // State 0: prev was U, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ],\n\n // State 1: prev was R or ISOL/ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ],\n\n // State 2: prev was D/L in ISOL form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ],\n\n // State 3: prev was D in FINA form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ],\n\n // State 4: prev was FINA ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ],\n\n // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ],\n\n // State 6: prev was DALATH/RISH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n static planFeatures(plan) {\n plan.add(['ccmp', 'locl']);\n for (let i = 0; i < FEATURES.length; i++) {\n let feature = FEATURES[i];\n plan.addStage(feature, false);\n }\n\n plan.addStage('mset');\n }\n\n static assignFeatures(plan, glyphs) {\n super.assignFeatures(plan, glyphs);\n\n let prev = -1;\n let state = 0;\n let actions = [];\n\n // Apply the state machine to map glyphs to features\n for (let i = 0; i < glyphs.length; i++) {\n let curAction, prevAction;\n var glyph = glyphs[i];\n let type = getShapingClass(glyph.codePoints[0]);\n if (type === ShapingClasses.Transparent) {\n actions[i] = NONE;\n continue;\n }\n\n [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n if (prevAction !== NONE && prev !== -1) {\n actions[prev] = prevAction;\n }\n\n actions[i] = curAction;\n prev = i;\n }\n\n // Apply the chosen features to their respective glyphs\n for (let index = 0; index < glyphs.length; index++) {\n let feature;\n var glyph = glyphs[index];\n if (feature = actions[index]) {\n glyph.features[feature] = true;\n }\n }\n }\n}\n\nfunction getShapingClass(codePoint) {\n let res = trie.get(codePoint);\n if (res) {\n return res - 1;\n }\n\n let category = getCategory(codePoint);\n if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n return ShapingClasses.Transparent;\n }\n\n return ShapingClasses.Non_Joining;\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n * - decompose if unsupported by the font:\n * -> \n * -> \n * -> \n *\n * - compose if supported by the font:\n * -> \n * -> \n * -> \n *\n * - reorder tone marks (S is any valid syllable):\n * -> \n *\n * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n }\n\n static assignFeatures(plan, glyphs) {\n let state = 0;\n let i = 0;\n while (i < glyphs.length) {\n let action;\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n let type = getType(code);\n\n [ action, state ] = STATE_TABLE[state][type];\n\n switch (action) {\n case DECOMPOSE:\n // Decompose the composed syllable if it is not supported by the font.\n if (!plan.font.hasGlyphForCodePoint(code)) {\n i = decompose(glyphs, i, plan.font);\n }\n break;\n\n case COMPOSE:\n // Found a decomposed syllable. Try to compose if supported by the font.\n i = compose(glyphs, i, plan.font);\n break;\n\n case TONE_MARK:\n // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n reorderToneMark(glyphs, i, plan.font);\n break;\n\n case INVALID:\n // Tone mark has no valid syllable to attach to, so insert a dotted circle\n i = insertDottedCircle(glyphs, i, plan.font);\n break;\n }\n\n i++;\n }\n }\n}\n\nconst HANGUL_BASE = 0xac00;\nconst HANGUL_END = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE = 0x1100; // lead\nconst V_BASE = 0x1161; // vowel\nconst T_BASE = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END = L_BASE + L_COUNT - 1;\nconst V_END = V_BASE + V_COUNT - 1;\nconst T_END = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X = 0; // Other character\nconst L = 1; // Leading consonant\nconst V = 2; // Medial vowel\nconst T = 3; // Trailing consonant\nconst LV = 4; // Composed syllable\nconst LVT = 5; // Composed syllable\nconst M = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n if (isL(code)) { return L; }\n if (isV(code)) { return V; }\n if (isT(code)) { return T; }\n if (isLV(code)) { return LV; }\n if (isLVT(code)) { return LVT; }\n if (isTone(code)) { return M; }\n return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE = 2;\nconst TONE_MARK = 4;\nconst INVALID = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n // X L V T LV LVT M\n // State 0: start state\n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 1: \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 2: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n // State 3: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n\n let s = code - HANGUL_BASE;\n let t = T_BASE + s % T_COUNT;\n s = s / T_COUNT | 0;\n let l = L_BASE + s / V_COUNT | 0;\n let v = V_BASE + s % V_COUNT;\n\n // Don't decompose if all of the components are not available\n if (!font.hasGlyphForCodePoint(l) ||\n !font.hasGlyphForCodePoint(v) ||\n (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n return i;\n }\n\n // Replace the current glyph with decomposed L, V, and T glyphs,\n // and apply the proper OpenType features to each component.\n let ljmo = getGlyph(font, l, glyph.features);\n ljmo.features.ljmo = true;\n\n let vjmo = getGlyph(font, v, glyph.features);\n vjmo.features.vjmo = true;\n\n let insert = [ ljmo, vjmo ];\n\n if (t > T_BASE) {\n let tjmo = getGlyph(font, t, glyph.features);\n tjmo.features.tjmo = true;\n insert.push(tjmo);\n }\n\n glyphs.splice(i, 1, ...insert);\n return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n let type = getType(code);\n\n let prev = glyphs[i - 1].codePoints[0];\n let prevType = getType(prev);\n\n // Figure out what type of syllable we're dealing with\n let lv, ljmo, vjmo, tjmo;\n if (prevType === LV && type === T) {\n // \n lv = prev;\n tjmo = glyph;\n } else {\n if (type === V) {\n // \n ljmo = glyphs[i - 1];\n vjmo = glyph;\n } else {\n // \n ljmo = glyphs[i - 2];\n vjmo = glyphs[i - 1];\n tjmo = glyph;\n }\n\n let l = ljmo.codePoints[0];\n let v = vjmo.codePoints[0];\n\n // Make sure L and V are combining characters\n if (isCombiningL(l) && isCombiningV(v)) {\n lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n }\n }\n\n let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n let s = lv + (t - T_BASE);\n\n // Replace with a composed glyph if supported by the font,\n // otherwise apply the proper OpenType features to each component.\n if (font.hasGlyphForCodePoint(s)) {\n let del = prevType === V ? 3 : 2;\n glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n return i - del + 1;\n }\n }\n\n // Didn't compose (either a non-combining component or unsupported by font).\n if (ljmo) { ljmo.features.ljmo = true; }\n if (vjmo) { vjmo.features.vjmo = true; }\n if (tjmo) { tjmo.features.tjmo = true; }\n\n if (prevType === LV) {\n // Sequence was originally , which got combined earlier.\n // Either the T was non-combining, or the LVT glyph wasn't supported.\n // Decompose the glyph again and apply OT features.\n decompose(glyphs, i - 1, font);\n return i + 1;\n }\n\n return i;\n}\n\nfunction getLength(code) {\n switch (getType(code)) {\n case LV:\n case LVT:\n return 1;\n case V:\n return 2;\n case T:\n return 3;\n }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n // Move tone mark to the beginning of the previous syllable, unless it is zero width\n if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n let prev = glyphs[i - 1].codePoints[0];\n let len = getLength(prev);\n\n glyphs.splice(i, 1);\n return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n // If the tone mark is zero width, insert the dotted circle before, otherwise after\n let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n glyphs.splice(idx, 0, dottedCircle);\n i++;\n }\n\n return i;\n}\n","import {isMark} from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n constructor(font, id, codePoints = [], features) {\n this._font = font;\n this.codePoints = codePoints;\n this.id = id;\n\n this.features = {};\n if (Array.isArray(features)) {\n for (let i = 0; i < features.length; i++) {\n let feature = features[i];\n this.features[feature] = true;\n }\n } else if (typeof features === 'object') {\n Object.assign(this.features, features);\n }\n\n this.ligatureID = null;\n this.ligatureComponent = null;\n this.isLigated = false;\n this.cursiveAttachment = null;\n this.markAttachment = null;\n this.shaperInfo = null;\n this.substituted = false;\n this.isMultiplied = false;\n }\n\n get id() {\n return this._id;\n }\n\n set id(id) {\n this._id = id;\n this.substituted = true;\n\n let GDEF = this._font.GDEF;\n if (GDEF && GDEF.glyphClassDef) {\n // TODO: clean this up\n let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);\n this.isBase = classID === 1;\n this.isLigature = classID === 2;\n this.isMark = classID === 3;\n this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;\n } else {\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isBase = !this.isMark;\n this.isLigature = this.codePoints.length > 1;\n this.markAttachmentType = 0;\n }\n }\n\n copy() {\n return new GlyphInfo(this._font, this.id, this.codePoints, this.features);\n }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n constructor(font, table) {\n this.font = font;\n this.table = table;\n\n this.script = null;\n this.scriptTag = null;\n\n this.language = null;\n this.languageTag = null;\n\n this.features = {};\n this.lookups = {};\n\n // Setup variation substitutions\n this.variationsIndex = font._variationProcessor\n ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n : -1;\n\n // initialize to default script + language\n this.selectScript();\n\n // current context (set by applyFeatures)\n this.glyphs = [];\n this.positions = []; // only used by GPOS\n this.ligatureID = 1;\n this.currentFeature = null;\n }\n\n findScript(script) {\n if (this.table.scriptList == null) {\n return null;\n }\n\n if (!Array.isArray(script)) {\n script = [script];\n }\n\n for (let s of script) {\n for (let entry of this.table.scriptList) {\n if (entry.tag === s) {\n return entry;\n }\n }\n }\n\n return null;\n }\n\n selectScript(script, language, direction) {\n let changed = false;\n let entry;\n if (!this.script || script !== this.scriptTag) {\n entry = this.findScript(script);\n if (!entry) {\n entry = this.findScript(DEFAULT_SCRIPTS);\n }\n\n if (!entry) {\n return this.scriptTag;\n }\n\n this.scriptTag = entry.tag;\n this.script = entry.script;\n this.language = null;\n this.languageTag = null;\n changed = true;\n }\n\n if (!direction || direction !== this.direction) {\n this.direction = direction || Script.direction(script);\n }\n\n if (language && language.length < 4) {\n language += ' '.repeat(4 - language.length);\n }\n\n if (!language || language !== this.languageTag) {\n this.language = null;\n\n for (let lang of this.script.langSysRecords) {\n if (lang.tag === language) {\n this.language = lang.langSys;\n this.languageTag = lang.tag;\n break;\n }\n }\n\n if (!this.language) {\n this.language = this.script.defaultLangSys;\n this.languageTag = null;\n }\n\n changed = true;\n }\n\n // Build a feature lookup table\n if (changed) {\n this.features = {};\n if (this.language) {\n for (let featureIndex of this.language.featureIndexes) {\n let record = this.table.featureList[featureIndex];\n let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n this.features[record.tag] = substituteFeature || record.feature;\n }\n }\n }\n\n return this.scriptTag;\n }\n\n lookupsForFeatures(userFeatures = [], exclude) {\n let lookups = [];\n for (let tag of userFeatures) {\n let feature = this.features[tag];\n if (!feature) {\n continue;\n }\n\n for (let lookupIndex of feature.lookupListIndexes) {\n if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n continue;\n }\n\n lookups.push({\n feature: tag,\n index: lookupIndex,\n lookup: this.table.lookupList.get(lookupIndex)\n });\n }\n }\n\n lookups.sort((a, b) => a.index - b.index);\n return lookups;\n }\n\n substituteFeatureForVariations(featureIndex) {\n if (this.variationsIndex === -1) {\n return null;\n }\n\n let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n let substitutions = record.featureTableSubstitution.substitutions;\n for (let substitution of substitutions) {\n if (substitution.featureIndex === featureIndex) {\n return substitution.alternateFeatureTable;\n }\n }\n\n return null;\n }\n\n findVariationsIndex(coords) {\n let variations = this.table.featureVariations;\n if (!variations) {\n return -1;\n }\n\n let records = variations.featureVariationRecords;\n for (let i = 0; i < records.length; i++) {\n let conditions = records[i].conditionSet.conditionTable;\n if (this.variationConditionsMatch(conditions, coords)) {\n return i;\n }\n }\n\n return -1;\n }\n\n variationConditionsMatch(conditions, coords) {\n return conditions.every(condition => {\n let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n });\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n let lookups = this.lookupsForFeatures(userFeatures);\n this.applyLookups(lookups, glyphs, advances);\n }\n\n applyLookups(lookups, glyphs, positions) {\n this.glyphs = glyphs;\n this.positions = positions;\n this.glyphIterator = new GlyphIterator(glyphs);\n\n for (let { feature, lookup } of lookups) {\n this.currentFeature = feature;\n this.glyphIterator.reset(lookup.flags);\n\n while (this.glyphIterator.index < glyphs.length) {\n if (!(feature in this.glyphIterator.cur.features)) {\n this.glyphIterator.next();\n continue;\n }\n\n for (let table of lookup.subTables) {\n let res = this.applyLookup(lookup.lookupType, table);\n if (res) {\n break;\n }\n }\n\n this.glyphIterator.next();\n }\n }\n }\n\n applyLookup(lookup, table) {\n throw new Error(\"applyLookup must be implemented by subclasses\");\n }\n\n applyLookupList(lookupRecords) {\n let options = this.glyphIterator.options;\n let glyphIndex = this.glyphIterator.index;\n\n for (let lookupRecord of lookupRecords) {\n // Reset flags and find glyph index for this lookup record\n this.glyphIterator.reset(options, glyphIndex);\n this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n // Get the lookup and setup flags for subtables\n let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n this.glyphIterator.reset(lookup.flags, this.glyphIterator.index);\n\n // Apply lookup subtables until one matches\n for (let table of lookup.subTables) {\n if (this.applyLookup(lookup.lookupType, table)) {\n break;\n }\n }\n }\n\n this.glyphIterator.reset(options, glyphIndex);\n return true;\n }\n\n coverageIndex(coverage, glyph) {\n if (glyph == null) {\n glyph = this.glyphIterator.cur.id;\n }\n\n switch (coverage.version) {\n case 1:\n return coverage.glyphs.indexOf(glyph);\n\n case 2:\n for (let range of coverage.rangeRecords) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.startCoverageIndex + glyph - range.start;\n }\n }\n\n break;\n }\n\n return -1;\n }\n\n match(sequenceIndex, sequence, fn, matched) {\n let pos = this.glyphIterator.index;\n let glyph = this.glyphIterator.increment(sequenceIndex);\n let idx = 0;\n\n while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {\n if (matched) {\n matched.push(this.glyphIterator.index);\n }\n\n idx++;\n glyph = this.glyphIterator.next();\n }\n\n this.glyphIterator.index = pos;\n if (idx < sequence.length) {\n return false;\n }\n\n return matched || true;\n }\n\n sequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id);\n }\n\n sequenceMatchIndices(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => {\n // If the current feature doesn't apply to this glyph,\n if (!(this.currentFeature in glyph.features)) {\n return false;\n }\n\n return component === glyph.id;\n }, []);\n }\n\n coverageSequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n this.coverageIndex(coverage, glyph.id) >= 0\n );\n }\n\n getClassID(glyph, classDef) {\n switch (classDef.version) {\n case 1: // Class array\n let i = glyph - classDef.startGlyph;\n if (i >= 0 && i < classDef.classValueArray.length) {\n return classDef.classValueArray[i];\n }\n\n break;\n\n case 2:\n for (let range of classDef.classRangeRecord) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.class;\n }\n }\n\n break;\n }\n\n return 0;\n }\n\n classSequenceMatches(sequenceIndex, sequence, classDef) {\n return this.match(sequenceIndex, sequence, (classID, glyph) =>\n classID === this.getClassID(glyph.id, classDef)\n );\n }\n\n applyContext(table) {\n let index, set;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n set = table.ruleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(1, rule.input)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n if (index === -1) {\n return false;\n }\n\n set = table.classSet[index];\n for (let rule of set) {\n if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(0, table.coverages)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n\n applyChainingContext(table) {\n let index;\n switch (table.version) {\n case 1:\n index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.chainRuleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n && this.sequenceMatches(1, rule.input)\n && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n let rules = table.chainClassSet[index];\n if (!rules) {\n return false;\n }\n\n for (let rule of rules) {\n if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n this.coverageSequenceMatches(0, table.inputCoverage) &&\n this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n}\n","export default class GlyphIterator {\n constructor(glyphs, options) {\n this.glyphs = glyphs;\n this.reset(options);\n }\n\n reset(options = {}, index = 0) {\n this.options = options;\n this.flags = options.flags || {};\n this.markAttachmentType = options.markAttachmentType || 0;\n this.index = index;\n }\n\n get cur() {\n return this.glyphs[this.index] || null;\n }\n\n shouldIgnore(glyph) {\n return (this.flags.ignoreMarks && glyph.isMark) ||\n (this.flags.ignoreBaseGlyphs && glyph.isBase) ||\n (this.flags.ignoreLigatures && glyph.isLigature) ||\n (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType);\n }\n\n move(dir) {\n this.index += dir;\n while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {\n this.index += dir;\n }\n\n if (0 > this.index || this.index >= this.glyphs.length) {\n return null;\n }\n\n return this.glyphs[this.index];\n }\n\n next() {\n return this.move(+1);\n }\n\n prev() {\n return this.move(-1);\n }\n\n peek(count = 1) {\n let idx = this.index;\n let res = this.increment(count);\n this.index = idx;\n return res;\n }\n\n peekIndex(count = 1) {\n let idx = this.index;\n this.increment(count);\n let res = this.index;\n this.index = idx;\n return res;\n }\n\n increment(count = 1) {\n let dir = count < 0 ? -1 : 1;\n count = Math.abs(count);\n while (count--) {\n this.move(dir);\n }\n\n return this.glyphs[this.index];\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport {getCategory} from 'unicode-properties';\nimport * as Script from '../../layout/Script';\nimport GlyphInfo from '../GlyphInfo';\nimport indicMachine from './indic.json';\nimport useData from './use.json';\nimport {\n CATEGORIES,\n POSITIONS,\n CONSONANT_FLAGS,\n JOINER_FLAGS,\n HALANT_OR_COENG_FLAGS, INDIC_CONFIGS,\n INDIC_DECOMPOSITIONS\n} from './indic-data';\nimport { decodeBase64 } from '../../utils';\n\nconst {decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/indic.trie', 'base64')));\nconst stateMachine = new StateMachine(indicMachine);\n\n/**\n * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.\n * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc\n */\nexport default class IndicShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n plan.addStage(['locl', 'ccmp']);\n\n plan.addStage(initialReordering);\n\n plan.addStage('nukt');\n plan.addStage('akhn');\n plan.addStage('rphf', false);\n plan.addStage('rkrf');\n plan.addStage('pref', false);\n plan.addStage('blwf', false);\n plan.addStage('abvf', false);\n plan.addStage('half', false);\n plan.addStage('pstf', false);\n plan.addStage('vatu');\n plan.addStage('cjct');\n plan.addStage('cfar', false);\n\n plan.addStage(finalReordering);\n\n plan.addStage({\n local: ['init'],\n global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']\n });\n\n // Setup the indic config for the selected script\n plan.unicodeScript = Script.fromOpenType(plan.script);\n plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;\n plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';\n\n // TODO: turn off kern (Khmer) and liga features.\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split matras\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];\n if (d) {\n let decomposed = d.map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction indicCategory(glyph) {\n return trie.get(glyph.codePoints[0]) >> 8;\n}\n\nfunction indicPosition(glyph) {\n return 1 << (trie.get(glyph.codePoints[0]) & 0xff);\n}\n\nclass IndicInfo {\n constructor(category, position, syllableType, syllable) {\n this.category = category;\n this.position = position;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n let last = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) {\n if (start > last) {\n ++syllable;\n for (let i = last; i < start; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new IndicInfo(\n 1 << indicCategory(glyphs[i]),\n indicPosition(glyphs[i]),\n tags[0],\n syllable\n );\n }\n\n last = end + 1;\n }\n\n if (last < glyphs.length) {\n ++syllable;\n for (let i = last; i < glyphs.length; i++) {\n glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n }\n }\n}\n\nfunction isConsonant(glyph) {\n return glyph.shaperInfo.category & CONSONANT_FLAGS;\n}\n\nfunction isJoiner(glyph) {\n return glyph.shaperInfo.category & JOINER_FLAGS;\n}\n\nfunction isHalantOrCoeng(glyph) {\n return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;\n}\n\nfunction wouldSubstitute(glyphs, feature) {\n for (let glyph of glyphs) {\n glyph.features = {[feature]: true};\n }\n\n let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;\n GSUB.applyFeatures([feature], glyphs);\n\n return glyphs.length === 1;\n}\n\nfunction consonantPosition(font, consonant, virama) {\n let glyphs = [virama, consonant, virama];\n if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {\n return POSITIONS.Below_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {\n return POSITIONS.Post_C;\n } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {\n return POSITIONS.Post_C;\n }\n\n return POSITIONS.Base_C;\n}\n\nfunction initialReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n let virama = font.glyphForCodePoint(indicConfig.virama).id;\n if (virama) {\n let info = new GlyphInfo(font, virama, [indicConfig.virama]);\n for (let i = 0; i < glyphs.length; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);\n }\n }\n }\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let {category, syllableType} = glyphs[start].shaperInfo;\n\n if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {\n continue;\n }\n\n if (syllableType === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = new IndicInfo(\n 1 << indicCategory(g),\n indicPosition(g),\n glyphs[start].shaperInfo.syllableType,\n glyphs[start].shaperInfo.syllable\n );\n\n // Insert after possible Repha.\n let i = start;\n while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) {\n i++;\n }\n\n glyphs.splice(i++, 0, g);\n end++;\n }\n\n // 1. Find base consonant:\n //\n // The shaping engine finds the base consonant of the syllable, using the\n // following algorithm: starting from the end of the syllable, move backwards\n // until a consonant is found that does not have a below-base or post-base\n // form (post-base forms have to follow below-base forms), or that is not a\n // pre-base reordering Ra, or arrive at the first consonant. The consonant\n // stopped at will be the base.\n\n let base = end;\n let limit = start;\n let hasReph = false;\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph &&\n features.rphf &&\n start + 3 <= end && (\n (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) ||\n (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)\n )\n ) {\n // See if it matches the 'rphf' feature.\n let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];\n if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) {\n limit += 2;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {\n limit++;\n while (limit < end && isJoiner(glyphs[limit])) {\n limit++;\n }\n base = start;\n hasReph = true;\n }\n\n switch (indicConfig.basePos) {\n case 'Last': {\n // starting from the end of the syllable, move backwards\n let i = end;\n let seenBelow = false;\n\n do {\n let info = glyphs[--i].shaperInfo;\n\n // until a consonant is found\n if (isConsonant(glyphs[i])) {\n // that does not have a below-base or post-base form\n // (post-base forms have to follow below-base forms),\n if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) {\n base = i;\n break;\n }\n\n // or that is not a pre-base reordering Ra,\n //\n // IMPLEMENTATION NOTES:\n //\n // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped\n // by the logic above already.\n //\n\n // or arrive at the first consonant. The consonant stopped at will\n // be the base.\n if (info.position === POSITIONS.Below_C) {\n seenBelow = true;\n }\n\n base = i;\n } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) {\n // A ZWJ after a Halant stops the base search, and requests an explicit\n // half form.\n // A ZWJ before a Halant, requests a subjoined form instead, and hence\n // search continues. This is particularly important for Bengali\n // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.\n break;\n }\n } while (i > limit);\n break;\n }\n\n case 'First': {\n // The first consonant is always the base.\n base = start;\n\n // Mark all subsequent consonants as below.\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n glyphs[i].shaperInfo.position = POSITIONS.Below_C;\n }\n }\n }\n }\n\n // If the syllable starts with Ra + Halant (in a script that has Reph)\n // and has more than one consonant, Ra is excluded from candidates for\n // base consonants.\n //\n // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)\n if (hasReph && base === start && limit - base <= 2) {\n hasReph = false;\n }\n\n // 2. Decompose and reorder Matras:\n //\n // Each matra and any syllable modifier sign in the cluster are moved to the\n // appropriate position relative to the consonant(s) in the cluster. The\n // shaping engine decomposes two- or three-part matras into their constituent\n // parts before any repositioning. Matra characters are classified by which\n // consonant in a conjunct they have affinity for and are reordered to the\n // following positions:\n //\n // o Before first half form in the syllable\n // o After subjoined consonants\n // o After post-form consonant\n // o After main consonant (for above marks)\n //\n // IMPLEMENTATION NOTES:\n //\n // The normalize() routine has already decomposed matras for us, so we don't\n // need to worry about that.\n\n // 3. Reorder marks to canonical order:\n //\n // Adjacent nukta and halant or nukta and vedic sign are always repositioned\n // if necessary, so that the nukta is first.\n //\n // IMPLEMENTATION NOTES:\n //\n // We don't need to do this: the normalize() routine already did this for us.\n\n // Reorder characters\n\n for (let i = start; i < base; i++) {\n let info = glyphs[i].shaperInfo;\n info.position = Math.min(POSITIONS.Pre_C, info.position);\n }\n\n if (base < end) {\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n\n // Mark final consonants. A final consonant is one appearing after a matra,\n // like in Khmer.\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n for (let j = i + 1; j < end; j++) {\n if (isConsonant(glyphs[j])) {\n glyphs[j].shaperInfo.position = POSITIONS.Final_C;\n break;\n }\n }\n break;\n }\n }\n\n // Handle beginning Ra\n if (hasReph) {\n glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;\n }\n\n // For old-style Indic script tags, move the first post-base Halant after\n // last consonant.\n //\n // Reports suggest that in some scripts Uniscribe does this only if there\n // is *not* a Halant after last consonant already (eg. Kannada), while it\n // does it unconditionally in other scripts (eg. Malayalam). We don't\n // currently know about other scripts, so we single out Malayalam for now.\n //\n // Kannada test case:\n // U+0C9A,U+0CCD,U+0C9A,U+0CCD\n // With some versions of Lohit Kannada.\n // https://bugs.freedesktop.org/show_bug.cgi?id=59118\n //\n // Malayalam test case:\n // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D\n // With lohit-ttf-20121122/Lohit-Malayalam.ttf\n if (plan.isOldSpec) {\n let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.H) {\n let j;\n for (j = end - 1; j > i; j--) {\n if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) {\n break;\n }\n }\n\n if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) {\n // Move Halant to after last consonant.\n let t = glyphs[i];\n glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i));\n glyphs[j] = t;\n }\n\n break;\n }\n }\n }\n\n // Attach misc marks to previous char to move with them.\n let lastPos = POSITIONS.Start;\n for (let i = start; i < end; i++) {\n let info = glyphs[i].shaperInfo;\n if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) {\n info.position = lastPos;\n if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) {\n // Uniscribe doesn't move the Halant with Left Matra.\n // TEST: U+092B,U+093F,U+094DE\n // We follow. This is important for the Sinhala\n // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA\n // where U+0DD9 is a left matra and U+0DCA is the virama.\n // We don't want to move the virama with the left matra.\n // TEST: U+0D9A,U+0DDA\n for (let j = i; j > start; j--) {\n if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) {\n info.position = glyphs[j - 1].shaperInfo.position;\n break;\n }\n }\n }\n } else if (info.position !== POSITIONS.SMVD) {\n lastPos = info.position;\n }\n }\n\n // For post-base consonants let them own anything before them\n // since the last consonant or matra.\n let last = base;\n for (let i = base + 1; i < end; i++) {\n if (isConsonant(glyphs[i])) {\n for (let j = last + 1; j < i; j++) {\n if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) {\n glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position;\n }\n }\n last = i;\n } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n last = i;\n }\n }\n\n let arr = glyphs.slice(start, end);\n arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position);\n glyphs.splice(start, arr.length, ...arr);\n\n // Find base again\n for (let i = start; i < end; i++) {\n if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n base = i;\n break;\n }\n }\n\n // Setup features now\n\n // Reph\n for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) {\n glyphs[i].features.rphf = true;\n }\n\n // Pre-base\n let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';\n for (let i = start; i < base; i++) {\n glyphs[i].features.half = true;\n if (blwf) {\n glyphs[i].features.blwf = true;\n }\n }\n\n // Post-base\n for (let i = base + 1; i < end; i++) {\n glyphs[i].features.abvf = true;\n glyphs[i].features.pstf = true;\n glyphs[i].features.blwf = true;\n }\n\n if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {\n // Old-spec eye-lash Ra needs special handling. From the\n // spec:\n //\n // \"The feature 'below-base form' is applied to consonants\n // having below-base forms and following the base consonant.\n // The exception is vattu, which may appear below half forms\n // as well as below the base glyph. The feature 'below-base\n // form' will be applied to all such occurrences of Ra as well.\"\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+0915\n // with Sanskrit 2003 font.\n //\n // However, note that Ra,Halant,ZWJ is the correct way to\n // request eyelash form of Ra, so we wouldbn't inhibit it\n // in that sequence.\n //\n // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915\n for (let i = start; i + 1 < base; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.Ra &&\n glyphs[i + 1].shaperInfo.category === CATEGORIES.H &&\n (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ)\n ) {\n glyphs[i].features.blwf = true;\n glyphs[i + 1].features.blwf = true;\n }\n }\n }\n\n let prefLen = 2;\n if (features.pref && base + prefLen < end) {\n // Find a Halant,Ra sequence and mark it for pre-base reordering processing.\n for (let i = base + 1; i + prefLen - 1 < end; i++) {\n let g = [glyphs[i].copy(), glyphs[i + 1].copy()];\n if (wouldSubstitute(g, 'pref')) {\n for (let j = 0; j < prefLen; j++) {\n glyphs[i++].features.pref = true;\n }\n\n // Mark the subsequent stuff with 'cfar'. Used in Khmer.\n // Read the feature spec.\n // This allows distinguishing the following cases with MS Khmer fonts:\n // U+1784,U+17D2,U+179A,U+17D2,U+1782\n // U+1784,U+17D2,U+1782,U+17D2,U+179A\n if (features.cfar) {\n for (; i < end; i++) {\n glyphs[i].features.cfar = true;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply ZWJ/ZWNJ effects\n for (let i = start + 1; i < end; i++) {\n if (isJoiner(glyphs[i])) {\n let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ;\n let j = i;\n\n do {\n j--;\n\n // ZWJ/ZWNJ should disable CJCT. They do that by simply\n // being there, since we don't skip them for the CJCT\n // feature (ie. F_MANUAL_ZWJ)\n\n // A ZWNJ disables HALF.\n if (nonJoiner) {\n delete glyphs[j].features.half;\n }\n } while (j > start && !isConsonant(glyphs[j]));\n }\n }\n }\n}\n\nfunction finalReordering(font, glyphs, plan) {\n let indicConfig = plan.indicConfig;\n let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n // 4. Final reordering:\n //\n // After the localized forms and basic shaping forms GSUB features have been\n // applied (see below), the shaping engine performs some final glyph\n // reordering before applying all the remaining font features to the entire\n // cluster.\n\n let tryPref = !!features.pref;\n\n // Find base again\n let base = start;\n for (; base < end; base++) {\n if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {\n // Ok, this was a 'pref' candidate but didn't form any.\n // Base is around here...\n base = i;\n while (base < end && isHalantOrCoeng(glyphs[base])) {\n base++;\n }\n glyphs[base].shaperInfo.position = POSITIONS.BASE_C;\n tryPref = false;\n }\n break;\n }\n }\n }\n\n // For Malayalam, skip over unformed below- (but NOT post-) forms.\n if (plan.unicodeScript === 'Malayalam') {\n for (let i = base + 1; i < end; i++) {\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i === end || !isHalantOrCoeng(glyphs[i])) {\n break;\n }\n\n i++; // Skip halant.\n while (i < end && isJoiner(glyphs[i])) {\n i++;\n }\n\n if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) {\n base = i;\n glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n }\n }\n }\n\n if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {\n base--;\n }\n break;\n }\n }\n\n if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {\n base--;\n }\n\n if (base < end) {\n while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {\n base--;\n }\n }\n\n // o Reorder matras:\n //\n // If a pre-base matra character had been reordered before applying basic\n // features, the glyph can be moved closer to the main consonant based on\n // whether half-forms had been formed. Actual position for the matra is\n // defined as “after last standalone halant glyph, after initial matra\n // position and before the main consonant”. If ZWJ or ZWNJ follow this\n // halant, position is moved after it.\n //\n\n if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters.\n // If we lost track of base, alas, position before last thingy.\n let newPos = base === end ? base - 2 : base - 1;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // If we found no Halant we are done.\n // Otherwise only proceed if the Halant does\n // not belong to the Matra itself!\n if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {\n newPos++;\n }\n } else {\n newPos = start; // No move.\n }\n }\n\n if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n // Now go see if there's actually any matras...\n for (let i = newPos; i > start; i--) {\n if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) {\n let oldPos = i - 1;\n if (oldPos < base && base <= newPos) { // Shouldn't actually happen.\n base--;\n }\n\n let tmp = glyphs[oldPos];\n glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos));\n glyphs[newPos] = tmp;\n\n newPos--;\n }\n }\n }\n }\n\n // o Reorder reph:\n //\n // Reph’s original position is always at the beginning of the syllable,\n // (i.e. it is not reordered at the character reordering stage). However,\n // it will be reordered according to the basic-forms shaping results.\n // Possible positions for reph, depending on the script, are; after main,\n // before post-base consonant forms, and after post-base consonant forms.\n\n // Two cases:\n //\n // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then\n // we should only move it if the sequence ligated to the repha form.\n //\n // - If repha is encoded separately and in the logical position, we should only\n // move it if it did NOT ligate. If it ligated, it's probably the font trying\n // to make it work without the reordering.\n if (start + 1 < end &&\n glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph &&\n (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)\n ) {\n let newRephPos;\n let rephPos = indicConfig.rephPos;\n let found = false;\n\n // 1. If reph should be positioned after post-base consonant forms,\n // proceed to step 5.\n if (rephPos !== POSITIONS.After_Post) {\n // 2. If the reph repositioning class is not after post-base: target\n // position is after the first explicit halant glyph between the\n // first post-reph consonant and last main consonant. If ZWJ or ZWNJ\n // are following this halant, position is moved after it. If such\n // position is found, this is the target position. Otherwise,\n // proceed to the next step.\n //\n // Note: in old-implementation fonts, where classifications were\n // fixed in shaping engine, there was no case where reph position\n // will be found on this step.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n\n // 3. If reph should be repositioned after the main consonant: find the\n // first consonant not ligated with main, or find the first\n // consonant that is not a potential pre-base reordering Ra.\n if (!found && rephPos === POSITIONS.After_Main) {\n newRephPos = base;\n while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n\n // 4. If reph should be positioned before post-base consonant, find\n // first post-base classified consonant not ligated with main. If no\n // consonant is found, the target position should be before the\n // first matra, syllable modifier sign or vedic sign.\n //\n // This is our take on what step 4 is trying to say (and failing, BADLY).\n if (!found && rephPos === POSITIONS.After_Sub) {\n newRephPos = base;\n while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {\n newRephPos++;\n }\n\n found = newRephPos < end;\n }\n }\n\n // 5. If no consonant is found in steps 3 or 4, move reph to a position\n // immediately before the first post-base matra, syllable modifier\n // sign or vedic sign that has a reordering class after the intended\n // reph position. For example, if the reordering position for reph\n // is post-main, it will skip above-base matras that also have a\n // post-main position.\n if (!found) {\n // Copied from step 2.\n newRephPos = start + 1;\n while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n newRephPos++;\n }\n\n if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n newRephPos++;\n }\n\n found = true;\n }\n }\n\n // 6. Otherwise, reorder reph to the end of the syllable.\n if (!found) {\n newRephPos = end - 1;\n while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {\n newRephPos--;\n }\n\n // If the Reph is to be ending up after a Matra,Halant sequence,\n // position it before that Halant so it can interact with the Matra.\n // However, if it's a plain Consonant,Halant we shouldn't do that.\n // Uniscribe doesn't do this.\n // TEST: U+0930,U+094D,U+0915,U+094B,U+094D\n if (isHalantOrCoeng(glyphs[newRephPos])) {\n for (let i = base + 1; i < newRephPos; i++) {\n if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n newRephPos--;\n }\n }\n }\n }\n\n let reph = glyphs[start];\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start));\n glyphs[newRephPos] = reph;\n\n if (start < base && base <= newRephPos) {\n base--;\n }\n }\n\n // o Reorder pre-base reordering consonants:\n //\n // If a pre-base reordering consonant is found, reorder it according to\n // the following rules:\n if (tryPref && base + 1 < end) {\n for (let i = base + 1; i < end; i++) {\n if (glyphs[i].features.pref) {\n // 1. Only reorder a glyph produced by substitution during application\n // of the feature. (Note that a font may shape a Ra consonant with\n // the feature generally but block it in certain contexts.)\n\n // Note: We just check that something got substituted. We don't check that\n // the feature actually did it...\n //\n // Reorder pref only if it ligated.\n if (glyphs[i].isLigated && !glyphs[i].isMultiplied) {\n // 2. Try to find a target position the same way as for pre-base matra.\n // If it is found, reorder pre-base consonant glyph.\n //\n // 3. If position is not found, reorder immediately before main\n // consonant.\n let newPos = base;\n\n // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n // We want to position matra after them.\n if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n newPos--;\n }\n\n // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a\n // split matra, it should be reordered to *before* the left part of such matra.\n if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) {\n let oldPos = i;\n for (let j = base + 1; j < oldPos; j++) {\n if (glyphs[j].shaperInfo.category === CATEGORIES.M) {\n newPos--;\n break;\n }\n }\n }\n }\n\n if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) {\n // -> If ZWJ or ZWNJ follow this halant, position is moved after it.\n if (newPos < end && isJoiner(glyphs[newPos])) {\n newPos++;\n }\n }\n\n let oldPos = i;\n let tmp = glyphs[oldPos];\n glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos));\n glyphs[newPos] = tmp;\n\n if (newPos <= base && base < oldPos) {\n base++;\n }\n }\n\n break;\n }\n }\n }\n\n // Apply 'init' to the Left Matra if it's a word start.\n if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) {\n glyphs[start].features.init = true;\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n","{\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],\"accepting\":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"symbol_cluster\"],[],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"broken_cluster\"],[\"symbol_cluster\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[\"standalone_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[],[],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[],[],[\"consonant_syllable\",\"broken_cluster\"],[\"consonant_syllable\",\"broken_cluster\"],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[],[],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"consonant_syllable\"],[],[\"consonant_syllable\"],[\"consonant_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"vowel_syllable\"],[],[\"vowel_syllable\"],[\"vowel_syllable\"],[\"broken_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"standalone_cluster\"],[\"standalone_cluster\"],[],[\"consonant_syllable\"],[\"vowel_syllable\"],[\"standalone_cluster\"]]}","{\"categories\":[\"O\",\"IND\",\"S\",\"GB\",\"B\",\"FM\",\"CGJ\",\"VMAbv\",\"VMPst\",\"VAbv\",\"VPst\",\"CMBlw\",\"VPre\",\"VBlw\",\"H\",\"VMBlw\",\"CMAbv\",\"MBlw\",\"CS\",\"R\",\"SUB\",\"MPst\",\"MPre\",\"FAbv\",\"FPst\",\"FBlw\",\"null\",\"SMAbv\",\"SMBlw\",\"VMPre\",\"ZWNJ\",\"ZWJ\",\"WJ\",\"M\",\"VS\",\"N\",\"HN\",\"MAbv\"],\"decompositions\":{\"2507\":[2503,2494],\"2508\":[2503,2519],\"2888\":[2887,2902],\"2891\":[2887,2878],\"2892\":[2887,2903],\"3018\":[3014,3006],\"3019\":[3015,3006],\"3020\":[3014,3031],\"3144\":[3142,3158],\"3264\":[3263,3285],\"3271\":[3270,3285],\"3272\":[3270,3286],\"3274\":[3270,3266],\"3275\":[3270,3266,3285],\"3402\":[3398,3390],\"3403\":[3399,3390],\"3404\":[3398,3415],\"3546\":[3545,3530],\"3548\":[3545,3535],\"3549\":[3545,3535,3530],\"3550\":[3545,3551],\"3635\":[3661,3634],\"3763\":[3789,3762],\"3955\":[3953,3954],\"3957\":[3953,3956],\"3958\":[4018,3968],\"3959\":[4018,3953,3968],\"3960\":[4019,3968],\"3961\":[4019,3953,3968],\"3969\":[3953,3968],\"6971\":[6970,6965],\"6973\":[6972,6965],\"6976\":[6974,6965],\"6977\":[6975,6965],\"6979\":[6978,6965],\"69934\":[69937,69927],\"69935\":[69938,69927],\"70475\":[70471,70462],\"70476\":[70471,70487],\"70843\":[70841,70842],\"70844\":[70841,70832],\"70846\":[70841,70845],\"71098\":[71096,71087],\"71099\":[71097,71087]},\"stateTable\":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],\"accepting\":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],\"tags\":[[],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"broken_cluster\"],[\"independent_cluster\"],[\"symbol_cluster\"],[\"symbol_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"virama_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"broken_cluster\"],[\"broken_cluster\"],[\"numeral_cluster\"],[\"number_joiner_terminated_cluster\"],[\"standard_cluster\"],[\"standard_cluster\"],[\"numeral_cluster\"]]}","// Cateories used in the OpenType spec:\n// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx\nexport const CATEGORIES = {\n X: 1 << 0,\n C: 1 << 1,\n V: 1 << 2,\n N: 1 << 3,\n H: 1 << 4,\n ZWNJ: 1 << 5,\n ZWJ: 1 << 6,\n M: 1 << 7,\n SM: 1 << 8,\n VD: 1 << 9,\n A: 1 << 10,\n Placeholder: 1 << 11,\n Dotted_Circle: 1 << 12,\n RS: 1 << 13, // Register Shifter, used in Khmer OT spec.\n Coeng: 1 << 14, // Khmer-style Virama.\n Repha: 1 << 15, // Atomically-encoded logical or visual repha.\n Ra: 1 << 16,\n CM: 1 << 17, // Consonant-Medial.\n Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).\n};\n\n// Visual positions in a syllable from left to right.\nexport const POSITIONS = {\n Start: 1 << 0,\n\n Ra_To_Become_Reph: 1 << 1,\n Pre_M: 1 << 2,\n Pre_C: 1 << 3,\n\n Base_C: 1 << 4,\n After_Main: 1 << 5,\n\n Above_C: 1 << 6,\n\n Before_Sub: 1 << 7,\n Below_C: 1 << 8,\n After_Sub: 1 << 9,\n\n Before_Post: 1 << 10,\n Post_C: 1 << 11,\n After_Post: 1 << 12,\n\n Final_C: 1 << 13,\n SMVD: 1 << 14,\n\n End: 1 << 15\n};\n\nexport const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;\nexport const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;\nexport const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;\n\nexport const INDIC_CONFIGS = {\n Default: {\n hasOldSpec: false,\n virama: 0,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Devanagari: {\n hasOldSpec: true,\n virama: 0x094D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Bengali: {\n hasOldSpec: true,\n virama: 0x09CD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gurmukhi: {\n hasOldSpec: true,\n virama: 0x0A4D,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Sub,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Gujarati: {\n hasOldSpec: true,\n virama: 0x0ACD,\n basePos: 'Last',\n rephPos: POSITIONS.Before_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Oriya: {\n hasOldSpec: true,\n virama: 0x0B4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Tamil: {\n hasOldSpec: true,\n virama: 0x0BCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Pre_And_Post'\n },\n\n Telugu: {\n hasOldSpec: true,\n virama: 0x0C4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Explicit',\n blwfMode: 'Post_Only'\n },\n\n Kannada: {\n hasOldSpec: true,\n virama: 0x0CCD,\n basePos: 'Last',\n rephPos: POSITIONS.After_Post,\n rephMode: 'Implicit',\n blwfMode: 'Post_Only'\n },\n\n Malayalam: {\n hasOldSpec: true,\n virama: 0x0D4D,\n basePos: 'Last',\n rephPos: POSITIONS.After_Main,\n rephMode: 'Log_Repha',\n blwfMode: 'Pre_And_Post'\n },\n\n // Handled by UniversalShaper\n // Sinhala: {\n // hasOldSpec: false,\n // virama: 0x0DCA,\n // basePos: 'Last_Sinhala',\n // rephPos: POSITIONS.After_Main,\n // rephMode: 'Explicit',\n // blwfMode: 'Pre_And_Post'\n // },\n\n Khmer: {\n hasOldSpec: false,\n virama: 0x17D2,\n basePos: 'First',\n rephPos: POSITIONS.Ra_To_Become_Reph,\n rephMode: 'Vis_Repha',\n blwfMode: 'Pre_And_Post'\n }\n};\n\n// Additional decompositions that aren't in Unicode\nexport const INDIC_DECOMPOSITIONS = {\n // Khmer\n 0x17BE: [0x17C1, 0x17BE],\n 0x17BF: [0x17C1, 0x17BF],\n 0x17C0: [0x17C1, 0x17C0],\n 0x17C4: [0x17C1, 0x17C4],\n 0x17C5: [0x17C1, 0x17C5]\n};\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\nimport { decodeBase64 } from '../../utils';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/use.trie', 'base64')));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n static zeroMarkWidths = 'BEFORE_GPOS';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n // Default glyph pre-processing group\n plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n // Reordering group\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['rphf'], false);\n plan.addStage(recordRphf);\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['pref']);\n plan.addStage(recordPref);\n\n // Orthographic unit shaping group\n plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n plan.addStage(reorder);\n\n // Topographical features\n // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n // Standard topographic presentation and positional feature application\n plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split vowels\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n if (decompositions[codepoint]) {\n let decomposed = decompositions[codepoint].map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction useCategory(glyph) {\n return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n constructor(category, syllableType, syllable) {\n this.category = category;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n }\n\n // Assign rphf feature\n let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n for (let i = start; i < start + limit; i++) {\n glyphs[i].features.rphf = true;\n }\n }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n for (let glyph of glyphs) {\n glyph.substituted = false;\n }\n}\n\nfunction recordRphf(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted && glyph.features.rphf) {\n // Mark a substituted repha.\n glyph.shaperInfo.category = 'R';\n }\n }\n}\n\nfunction recordPref(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted) {\n // Mark a substituted pref as VPre, as they behave the same way.\n glyph.shaperInfo.category = 'VPre';\n }\n }\n}\n\nfunction reorder(font, glyphs) {\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let i, j;\n let info = glyphs[start].shaperInfo;\n let type = info.syllableType;\n\n // Only a few syllable types need reordering.\n if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n continue;\n }\n\n // Insert a dotted circle glyph in broken clusters.\n if (type === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = info;\n\n // Insert after possible Repha.\n for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n glyphs.splice(++i, 0, g);\n end++;\n }\n\n // Move things forward.\n if (info.category === 'R' && end - start > 1) {\n // Got a repha. Reorder it to after first base, before first halant.\n for (i = start + 1; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move before it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n if (isHalant(glyphs[i])) {\n i--;\n }\n\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n break;\n }\n }\n }\n\n // Move things back.\n for (i = start, j = end; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move after it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n j = isHalant(glyphs[i]) ? i + 1 : i;\n } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n }\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n\nfunction isHalant(glyph) {\n return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n return info.category === 'B' || info.category === 'GB';\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let glyph = this.glyphIterator.cur;\n switch (table.version) {\n case 1:\n glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n break;\n\n case 2:\n glyph.id = table.substitute.get(index);\n break;\n }\n\n return true;\n }\n\n case 2: { // Multiple Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let sequence = table.sequences.get(index);\n\n if (sequence.length === 0) {\n // If the sequence length is zero, delete the glyph.\n // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.\n this.glyphs.splice(this.glyphIterator.index, 1);\n return true;\n }\n\n this.glyphIterator.cur.id = sequence[0];\n this.glyphIterator.cur.ligatureComponent = 0;\n\n let features = this.glyphIterator.cur.features;\n let curGlyph = this.glyphIterator.cur;\n let replacement = sequence.slice(1).map((gid, i) => {\n let glyph = new GlyphInfo(this.font, gid, undefined, features);\n glyph.shaperInfo = curGlyph.shaperInfo;\n glyph.isLigated = curGlyph.isLigated;\n glyph.ligatureComponent = i + 1;\n glyph.substituted = true;\n glyph.isMultiplied = true;\n return glyph;\n });\n\n this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n return true;\n }\n\n return false;\n }\n\n case 3: { // Alternate Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let USER_INDEX = 0; // TODO\n this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n return true;\n }\n\n return false;\n }\n\n case 4: { // Ligature Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n for (let ligature of table.ligatureSets.get(index)) {\n let matched = this.sequenceMatchIndices(1, ligature.components);\n if (!matched) {\n continue;\n }\n\n let curGlyph = this.glyphIterator.cur;\n\n // Concatenate all of the characters the new ligature will represent\n let characters = curGlyph.codePoints.slice();\n for (let index of matched) {\n characters.push(...this.glyphs[index].codePoints);\n }\n\n // Create the replacement ligature glyph\n let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n ligatureGlyph.isLigated = true;\n ligatureGlyph.substituted = true;\n\n // From Harfbuzz:\n // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n // the ligature to keep its old ligature id. This will allow it to attach to\n // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature\n // later, we don't want them to lose their ligature id/component, otherwise\n // GPOS will fail to correctly position the mark ligature on top of the\n // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n //\n // - If a ligature is formed of components that some of which are also ligatures\n // themselves, and those ligature components had marks attached to *their*\n // components, we have to attach the marks to the new ligature component\n // positions! Now *that*'s tricky! And these marks may be following the\n // last component of the whole sequence, so we should loop forward looking\n // for them and update them.\n //\n // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature\n // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to\n // the new ligature with a component value of 2.\n //\n // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n let isMarkLigature = curGlyph.isMark;\n for (let i = 0; i < matched.length && isMarkLigature; i++) {\n isMarkLigature = this.glyphs[matched[i]].isMark;\n }\n\n ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n let lastLigID = curGlyph.ligatureID;\n let lastNumComps = curGlyph.codePoints.length;\n let curComps = lastNumComps;\n let idx = this.glyphIterator.index + 1;\n\n // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n // This allows GPOS to attach marks to the correct ligature components.\n for (let matchIndex of matched) {\n // Don't assign new ligature components for mark ligatures (see above)\n if (isMarkLigature) {\n idx = matchIndex;\n } else {\n while (idx < matchIndex) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n this.glyphs[idx].ligatureComponent = ligatureComponent;\n idx++;\n }\n }\n\n lastLigID = this.glyphs[idx].ligatureID;\n lastNumComps = this.glyphs[idx].codePoints.length;\n curComps += lastNumComps;\n idx++; // skip base glyph\n }\n\n // Adjust ligature components for any marks following\n if (lastLigID && !isMarkLigature) {\n for (let i = idx; i < this.glyphs.length; i++) {\n if (this.glyphs[i].ligatureID === lastLigID) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n this.glyphs[i].ligatureComponent = ligatureComponent;\n } else {\n break;\n }\n }\n }\n\n // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n for (let i = matched.length - 1; i >= 0; i--) {\n this.glyphs.splice(matched[i], 1);\n }\n\n this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n return true;\n }\n\n return false;\n }\n\n case 5: // Contextual Substitution\n return this.applyContext(table);\n\n case 6: // Chaining Contextual Substitution\n return this.applyChainingContext(table);\n\n case 7: // Extension Substitution\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n }\n }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n applyPositionValue(sequenceIndex, value) {\n let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n if (value.xAdvance != null) {\n position.xAdvance += value.xAdvance;\n }\n\n if (value.yAdvance != null) {\n position.yAdvance += value.yAdvance;\n }\n\n if (value.xPlacement != null) {\n position.xOffset += value.xPlacement;\n }\n\n if (value.yPlacement != null) {\n position.yOffset += value.yPlacement;\n }\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (value.xPlaDevice) {\n position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);\n }\n\n if (value.yPlaDevice) {\n position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);\n }\n\n if (value.xAdvDevice) {\n position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);\n }\n\n if (value.yAdvDevice) {\n position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);\n }\n }\n\n // TODO: device tables\n }\n\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single positioning value\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1:\n this.applyPositionValue(0, table.value);\n break;\n\n case 2:\n this.applyPositionValue(0, table.values.get(index));\n break;\n }\n\n return true;\n }\n\n case 2: { // Pair Adjustment Positioning\n let nextGlyph = this.glyphIterator.peek();\n if (!nextGlyph) {\n return false;\n }\n\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1: // Adjustments for glyph pairs\n let set = table.pairSets.get(index);\n\n for (let pair of set) {\n if (pair.secondGlyph === nextGlyph.id) {\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n return false;\n\n case 2: // Class pair adjustment\n let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n if (class1 === -1 || class2 === -1) {\n return false;\n }\n\n var pair = table.classRecords.get(class1).get(class2);\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n case 3: { // Cursive Attachment Positioning\n let nextIndex = this.glyphIterator.peekIndex();\n let nextGlyph = this.glyphs[nextIndex];\n if (!nextGlyph) {\n return false;\n }\n\n let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n if (!curRecord || !curRecord.exitAnchor) {\n return false;\n }\n\n let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n if (!nextRecord || !nextRecord.entryAnchor) {\n return false;\n }\n\n let entry = this.getAnchor(nextRecord.entryAnchor);\n let exit = this.getAnchor(curRecord.exitAnchor);\n\n let cur = this.positions[this.glyphIterator.index];\n let next = this.positions[nextIndex];\n let d;\n\n switch (this.direction) {\n case 'ltr':\n cur.xAdvance = exit.x + cur.xOffset;\n\n d = entry.x + next.xOffset;\n next.xAdvance -= d;\n next.xOffset -= d;\n break;\n\n case 'rtl':\n d = exit.x + cur.xOffset;\n cur.xAdvance -= d;\n cur.xOffset -= d;\n next.xAdvance = entry.x + next.xOffset;\n break;\n }\n\n if (this.glyphIterator.flags.rightToLeft) {\n this.glyphIterator.cur.cursiveAttachment = nextIndex;\n cur.yOffset = entry.y - exit.y;\n } else {\n nextGlyph.cursiveAttachment = this.glyphIterator.index;\n cur.yOffset = exit.y - entry.y;\n }\n\n return true;\n }\n\n case 4: { // Mark to base positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0));\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n if (baseIndex === -1) {\n return false;\n }\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 5: { // Mark to ligature positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n if (ligIndex === -1) {\n return false;\n }\n\n let ligAttach = table.ligatureArray[ligIndex];\n let markGlyph = this.glyphIterator.cur;\n let ligGlyph = this.glyphs[baseGlyphIndex];\n let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0)\n ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n : ligGlyph.codePoints.length - 1;\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = ligAttach[compIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 6: { // Mark to mark positioning\n let mark1Index = this.coverageIndex(table.mark1Coverage);\n if (mark1Index === -1) {\n return false;\n }\n\n // get the previous mark to attach to\n let prevIndex = this.glyphIterator.peekIndex(-1);\n let prev = this.glyphs[prevIndex];\n if (!prev || !prev.isMark) {\n return false;\n }\n\n let cur = this.glyphIterator.cur;\n\n // The following logic was borrowed from Harfbuzz\n let good = false;\n if (cur.ligatureID === prev.ligatureID) {\n if (!cur.ligatureID) { // Marks belonging to the same base\n good = true;\n } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n good = true;\n }\n } else {\n // If ligature ids don't match, it may be the case that one of the marks\n // itself is a ligature, in which case match.\n if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n good = true;\n }\n }\n\n if (!good) {\n return false;\n }\n\n let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n if (mark2Index === -1) {\n return false;\n }\n\n let markRecord = table.mark1Array[mark1Index];\n let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, prevIndex);\n return true;\n }\n\n case 7: // Contextual positioning\n return this.applyContext(table);\n\n case 8: // Chaining contextual positioning\n return this.applyChainingContext(table);\n\n case 9: // Extension positioning\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`Unsupported GPOS table: ${lookupType}`);\n }\n }\n\n applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n let baseCoords = this.getAnchor(baseAnchor);\n let markCoords = this.getAnchor(markRecord.markAnchor);\n\n let basePos = this.positions[baseGlyphIndex];\n let markPos = this.positions[this.glyphIterator.index];\n\n markPos.xOffset = baseCoords.x - markCoords.x;\n markPos.yOffset = baseCoords.y - markCoords.y;\n this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n }\n\n getAnchor(anchor) {\n // TODO: contour point, device tables\n let x = anchor.xCoordinate;\n let y = anchor.yCoordinate;\n\n // Adjustments for font variations\n let variationProcessor = this.font._variationProcessor;\n let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n if (variationProcessor && variationStore) {\n if (anchor.xDeviceTable) {\n x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);\n }\n\n if (anchor.yDeviceTable) {\n y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);\n }\n }\n\n return { x, y };\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n super.applyFeatures(userFeatures, glyphs, advances);\n\n for (var i = 0; i < this.glyphs.length; i++) {\n this.fixCursiveAttachment(i);\n }\n\n this.fixMarkAttachment();\n }\n\n fixCursiveAttachment(i) {\n let glyph = this.glyphs[i];\n if (glyph.cursiveAttachment != null) {\n let j = glyph.cursiveAttachment;\n\n glyph.cursiveAttachment = null;\n this.fixCursiveAttachment(j);\n\n this.positions[i].yOffset += this.positions[j].yOffset;\n }\n }\n\n fixMarkAttachment() {\n for (let i = 0; i < this.glyphs.length; i++) {\n let glyph = this.glyphs[i];\n if (glyph.markAttachment != null) {\n let j = glyph.markAttachment;\n\n this.positions[i].xOffset += this.positions[j].xOffset;\n this.positions[i].yOffset += this.positions[j].yOffset;\n\n if (this.direction === 'ltr') {\n for (let k = j; k < i; k++) {\n this.positions[i].xOffset -= this.positions[k].xAdvance;\n this.positions[i].yOffset -= this.positions[k].yAdvance;\n }\n } else {\n for (let k = j + 1; k < i + 1; k++) {\n this.positions[i].xOffset += this.positions[k].xAdvance;\n this.positions[i].yOffset += this.positions[k].yAdvance;\n }\n }\n }\n }\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport * as r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS = 1 << 0;\nconst ARGS_ARE_XY_VALUES = 1 << 1;\nconst ROUND_XY_TO_GRID = 1 << 2;\nconst WE_HAVE_A_SCALE = 1 << 3;\nconst MORE_COMPONENTS = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS = 1 << 8;\nconst USE_MY_METRICS = 1 << 9;\nconst OVERLAP_COMPOUND = 1 << 10;\nconst SCALED_COMPONENT_OFFSET = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n constructor(onCurve, endContour, x = 0, y = 0) {\n this.onCurve = onCurve;\n this.endContour = endContour;\n this.x = x;\n this.y = y;\n }\n\n copy() {\n return new Point(this.onCurve, this.endContour, this.x, this.y);\n }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n constructor(glyphID, dx, dy) {\n this.glyphID = glyphID;\n this.dx = dx;\n this.dy = dy;\n this.pos = 0;\n this.scaleX = this.scaleY = 1;\n this.scale01 = this.scale10 = 0;\n }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n type = 'TTF';\n\n // Parses just the glyph header and returns the bounding box\n _getCBox(internal) {\n // We need to decode the glyph if variation processing is requested,\n // so it's easier just to recompute the path's cbox after decoding.\n if (this._font._variationProcessor && !internal) {\n return this.path.cbox;\n }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += this._font.loca.offsets[this.id];\n let glyph = GlyfHeader.decode(stream);\n\n let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n return Object.freeze(cbox);\n }\n\n // Parses a single glyph coordinate\n _parseGlyphCoord(stream, prev, short, same) {\n if (short) {\n var val = stream.readUInt8();\n if (!same) {\n val = -val;\n }\n\n val += prev;\n } else {\n if (same) {\n var val = prev;\n } else {\n var val = prev + stream.readInt16BE();\n }\n }\n\n return val;\n }\n\n // Decodes the glyph data into points for simple glyphs,\n // or components for composite glyphs\n _decode() {\n let glyfPos = this._font.loca.offsets[this.id];\n let nextPos = this._font.loca.offsets[this.id + 1];\n\n // Nothing to do if there is no data for this glyph\n if (glyfPos === nextPos) { return null; }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += glyfPos;\n let startPos = stream.pos;\n\n let glyph = GlyfHeader.decode(stream);\n\n if (glyph.numberOfContours > 0) {\n this._decodeSimple(glyph, stream);\n\n } else if (glyph.numberOfContours < 0) {\n this._decodeComposite(glyph, stream, startPos);\n }\n\n return glyph;\n }\n\n _decodeSimple(glyph, stream) {\n // this is a simple glyph\n glyph.points = [];\n\n let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n let flags = [];\n let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n while (flags.length < numCoords) {\n var flag = stream.readUInt8();\n flags.push(flag);\n\n // check for repeat flag\n if (flag & REPEAT) {\n let count = stream.readUInt8();\n for (let j = 0; j < count; j++) {\n flags.push(flag);\n }\n }\n }\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n glyph.points.push(point);\n }\n\n let px = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n }\n\n let py = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n }\n\n if (this._font._variationProcessor) {\n let points = glyph.points.slice();\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.slice(-4);\n }\n\n return;\n }\n\n _decodeComposite(glyph, stream, offset = 0) {\n // this is a composite glyph\n glyph.components = [];\n let haveInstructions = false;\n let flags = MORE_COMPONENTS;\n\n while (flags & MORE_COMPONENTS) {\n flags = stream.readUInt16BE();\n let gPos = stream.pos - offset;\n let glyphID = stream.readUInt16BE();\n if (!haveInstructions) {\n haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n }\n\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n var dx = stream.readInt16BE();\n var dy = stream.readInt16BE();\n } else {\n var dx = stream.readInt8();\n var dy = stream.readInt8();\n }\n\n var component = new Component(glyphID, dx, dy);\n component.pos = gPos;\n\n if (flags & WE_HAVE_A_SCALE) {\n // fixed number with 14 bits of fraction\n component.scaleX =\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n }\n\n glyph.components.push(component);\n }\n\n if (this._font._variationProcessor) {\n let points = [];\n for (let j = 0; j < glyph.components.length; j++) {\n var component = glyph.components[j];\n points.push(new Point(true, true, component.dx, component.dy));\n }\n\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.splice(-4, 4);\n\n for (let i = 0; i < points.length; i++) {\n let point = points[i];\n glyph.components[i].dx = point.x;\n glyph.components[i].dy = point.y;\n }\n }\n\n return haveInstructions;\n }\n\n _getPhantomPoints(glyph) {\n let cbox = this._getCBox(true);\n if (this._metrics == null) {\n this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n }\n\n let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n return [\n new Point(false, true, glyph.xMin - leftBearing, 0),\n new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n new Point(false, true, 0, glyph.yMax + topBearing),\n new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n ];\n }\n\n // Decodes font data, resolves composite glyphs, and returns an array of contours\n _getContours() {\n let glyph = this._decode();\n if (!glyph) {\n return [];\n }\n\n let points = [];\n\n if (glyph.numberOfContours < 0) {\n // resolve composite glyphs\n for (let component of glyph.components) {\n let contours = this._font.getGlyph(component.glyphID)._getContours();\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n for (let j = 0; j < contour.length; j++) {\n let point = contour[j];\n let x = point.x * component.scaleX + point.y * component.scale01 + component.dx;\n let y = point.y * component.scaleY + point.x * component.scale10 + component.dy;\n points.push(new Point(point.onCurve, point.endContour, x, y));\n }\n }\n }\n } else {\n points = glyph.points || [];\n }\n\n // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;\n this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;\n }\n\n let contours = [];\n let cur = [];\n for (let k = 0; k < points.length; k++) {\n var point = points[k];\n cur.push(point);\n if (point.endContour) {\n contours.push(cur);\n cur = [];\n }\n }\n\n return contours;\n }\n\n _getMetrics() {\n if (this._metrics) {\n return this._metrics;\n }\n\n let cbox = this._getCBox(true);\n super._getMetrics(cbox);\n\n if (this._font._variationProcessor && !this._font.HVAR) {\n // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n this.path;\n }\n\n return this._metrics;\n }\n\n // Converts contours to a Path object that can be rendered\n _getPath() {\n let contours = this._getContours();\n let path = new Path;\n\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n let firstPt = contour[0];\n let lastPt = contour[contour.length - 1];\n let start = 0;\n\n if (firstPt.onCurve) {\n // The first point will be consumed by the moveTo command, so skip in the loop\n var curvePt = null;\n start = 1;\n } else {\n if (lastPt.onCurve) {\n // Start at the last point if the first point is off curve and the last point is on curve\n firstPt = lastPt;\n } else {\n // Start at the middle if both the first and last points are off curve\n firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n }\n\n var curvePt = firstPt;\n }\n\n path.moveTo(firstPt.x, firstPt.y);\n\n for (let j = start; j < contour.length; j++) {\n let pt = contour[j];\n let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n if (prevPt.onCurve && pt.onCurve) {\n path.lineTo(pt.x, pt.y);\n\n } else if (prevPt.onCurve && !pt.onCurve) {\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && !pt.onCurve) {\n let midX = (prevPt.x + pt.x) / 2;\n let midY = (prevPt.y + pt.y) / 2;\n path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && pt.onCurve) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n var curvePt = null;\n\n } else {\n throw new Error(\"Unknown TTF path state\");\n }\n }\n\n // Connect the first and last points\n if (curvePt) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n }\n\n path.closePath();\n }\n\n return path;\n }\n}\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport {isMark} from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n constructor(id, codePoints, font) {\n /**\n * The glyph id in the font\n * @type {number}\n */\n this.id = id;\n\n /**\n * An array of unicode code points that are represented by this glyph.\n * There can be multiple code points in the case of ligatures and other glyphs\n * that represent multiple visual characters.\n * @type {number[]}\n */\n this.codePoints = codePoints;\n this._font = font;\n\n // TODO: get this info from GDEF if available\n this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n\n _getPath() {\n return new Path();\n }\n\n _getCBox() {\n return this.path.cbox;\n }\n\n _getBBox() {\n return this.path.bbox;\n }\n\n _getTableMetrics(table) {\n if (this.id < table.metrics.length) {\n return table.metrics.get(this.id);\n }\n\n let metric = table.metrics.get(table.metrics.length - 1);\n let res = {\n advance: metric ? metric.advance : 0,\n bearing: table.bearings.get(this.id - table.metrics.length) || 0\n };\n\n return res;\n }\n\n _getMetrics(cbox) {\n if (this._metrics) { return this._metrics; }\n\n let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n if (this._font.vmtx) {\n var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n } else {\n let os2;\n if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n if ((os2 = this._font['OS/2']) && os2.version > 0) {\n var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n var topBearing = os2.typoAscender - cbox.maxY;\n\n } else {\n let { hhea } = this._font;\n var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n var topBearing = hhea.ascent - cbox.maxY;\n }\n }\n\n if (this._font._variationProcessor && this._font.HVAR) {\n advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n }\n\n return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n }\n\n /**\n * The glyph’s control box.\n * This is often the same as the bounding box, but is faster to compute.\n * Because of the way bezier curves are defined, some of the control points\n * can be outside of the bounding box. Where `bbox` takes this into account,\n * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n * for a more detailed description.\n *\n * @type {BBox}\n */\n @cache\n get cbox() {\n return this._getCBox();\n }\n\n /**\n * The glyph’s bounding box, i.e. the rectangle that encloses the\n * glyph outline as tightly as possible.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return this._getBBox();\n }\n\n /**\n * A vector Path object representing the glyph outline.\n * @type {Path}\n */\n @cache\n get path() {\n // Cache the path so we only decode it once\n // Decoding is actually performed by subclasses\n return this._getPath();\n }\n\n /**\n * Returns a path scaled to the given font size.\n * @param {number} size\n * @return {Path}\n */\n getScaledPath(size) {\n let scale = 1 / this._font.unitsPerEm * size;\n return this.path.scale(scale);\n }\n\n /**\n * The glyph's advance width.\n * @type {number}\n */\n @cache\n get advanceWidth() {\n return this._getMetrics().advanceWidth;\n }\n\n /**\n * The glyph's advance height.\n * @type {number}\n */\n @cache\n get advanceHeight() {\n return this._getMetrics().advanceHeight;\n }\n\n get ligatureCaretPositions() {}\n\n _getName() {\n let { post } = this._font;\n if (!post) {\n return null;\n }\n\n switch (post.version) {\n case 1:\n return StandardNames[this.id];\n\n case 2:\n let id = post.glyphNameIndex[this.id];\n if (id < StandardNames.length) {\n return StandardNames[id];\n }\n\n return post.names[id - StandardNames.length];\n\n case 2.5:\n return StandardNames[this.id + post.offsets[this.id]];\n\n case 4:\n return String.fromCharCode(post.map[this.id]);\n }\n }\n\n /**\n * The glyph's name\n * @type {string}\n */\n @cache\n get name() {\n return this._getName();\n }\n\n /**\n * Renders the glyph to the given graphics context, at the specified font size.\n * @param {CanvasRenderingContext2d} ctx\n * @param {number} size\n */\n render(ctx, size) {\n ctx.save();\n\n let scale = 1 / this._font.head.unitsPerEm * size;\n ctx.scale(scale, scale);\n\n let fn = this.path.toFunction();\n fn(ctx);\n ctx.fill();\n\n ctx.restore();\n }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n moveTo: 'M',\n lineTo: 'L',\n quadraticCurveTo: 'Q',\n bezierCurveTo: 'C',\n closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n constructor() {\n this.commands = [];\n this._bbox = null;\n this._cbox = null;\n }\n\n /**\n * Compiles the path to a JavaScript function that can be applied with\n * a graphics context in order to render the path.\n * @return {string}\n */\n toFunction() {\n return ctx => {\n this.commands.forEach(c => {\n return ctx[c.command].apply(ctx, c.args)\n })\n };\n }\n\n /**\n * Converts the path to an SVG path data string\n * @return {string}\n */\n toSVG() {\n let cmds = this.commands.map(c => {\n let args = c.args.map(arg => Math.round(arg * 100) / 100);\n return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n });\n\n return cmds.join('');\n }\n\n /**\n * Gets the \"control box\" of a path.\n * This is like the bounding box, but it includes all points including\n * control points of bezier segments and is much faster to compute than\n * the real bounding box.\n * @type {BBox}\n */\n get cbox() {\n if (!this._cbox) {\n let cbox = new BBox;\n for (let command of this.commands) {\n for (let i = 0; i < command.args.length; i += 2) {\n cbox.addPoint(command.args[i], command.args[i + 1]);\n }\n }\n\n this._cbox = Object.freeze(cbox);\n }\n\n return this._cbox;\n }\n\n /**\n * Gets the exact bounding box of the path by evaluating curve segments.\n * Slower to compute than the control box, but more accurate.\n * @type {BBox}\n */\n get bbox() {\n if (this._bbox) {\n return this._bbox;\n }\n\n let bbox = new BBox;\n let cx = 0, cy = 0;\n\n let f = t => (\n Math.pow(1 - t, 3) * p0[i]\n + 3 * Math.pow(1 - t, 2) * t * p1[i]\n + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n + Math.pow(t, 3) * p3[i]\n );\n\n for (let c of this.commands) {\n switch (c.command) {\n case 'moveTo':\n case 'lineTo':\n let [x, y] = c.args;\n bbox.addPoint(x, y);\n cx = x;\n cy = y;\n break;\n\n case 'quadraticCurveTo':\n case 'bezierCurveTo':\n if (c.command === 'quadraticCurveTo') {\n // http://fontforge.org/bezier.html\n var [qp1x, qp1y, p3x, p3y] = c.args;\n var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)\n var cp1y = cy + 2 / 3 * (qp1y - cy);\n var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)\n var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n } else {\n var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n }\n\n // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n bbox.addPoint(p3x, p3y);\n\n var p0 = [cx, cy];\n var p1 = [cp1x, cp1y];\n var p2 = [cp2x, cp2y];\n var p3 = [p3x, p3y];\n\n for (var i = 0; i <= 1; i++) {\n let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n\n if (a === 0) {\n if (b === 0) {\n continue;\n }\n\n let t = -c / b;\n if (0 < t && t < 1) {\n if (i === 0) {\n bbox.addPoint(f(t), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t));\n }\n }\n\n continue;\n }\n\n let b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n continue;\n }\n\n let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t1), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t1));\n }\n }\n\n let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t2), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t2));\n }\n }\n }\n\n cx = p3x;\n cy = p3y;\n break;\n }\n }\n\n return this._bbox = Object.freeze(bbox);\n }\n\n /**\n * Applies a mapping function to each point in the path.\n * @param {function} fn\n * @return {Path}\n */\n mapPoints(fn) {\n let path = new Path;\n\n for (let c of this.commands) {\n let args = [];\n for (let i = 0; i < c.args.length; i += 2) {\n let [x, y] = fn(c.args[i], c.args[i + 1]);\n args.push(x, y);\n }\n\n path[c.command](...args);\n }\n\n return path;\n }\n\n /**\n * Transforms the path by the given matrix.\n */\n transform(m0, m1, m2, m3, m4, m5) {\n return this.mapPoints((x, y) => {\n const tx = m0 * x + m2 * y + m4;\n const ty = m1 * x + m3 * y + m5;\n return [tx, ty];\n });\n }\n\n /**\n * Translates the path by the given offset.\n */\n translate(x, y) {\n return this.transform(1, 0, 0, 1, x, y);\n }\n\n /**\n * Rotates the path by the given angle (in radians).\n */\n rotate(angle) {\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n return this.transform(cos, sin, -sin, cos, 0, 0);\n }\n\n /**\n * Scales the path.\n */\n scale(scaleX, scaleY = scaleX) {\n return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n Path.prototype[command] = function(...args) {\n this._bbox = this._cbox = null;\n this.commands.push({\n command,\n args\n });\n\n return this;\n };\n}\n","export default [\n '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n type = 'CFF';\n\n _getName() {\n if (this._font.CFF2) {\n return super._getName();\n }\n\n return this._font['CFF '].getGlyphName(this.id);\n }\n\n bias(s) {\n if (s.length < 1240) {\n return 107;\n } else if (s.length < 33900) {\n return 1131;\n } else {\n return 32768;\n }\n }\n\n _getPath() {\n let cff = this._font.CFF2 || this._font['CFF '];\n let { stream } = cff;\n let str = cff.topDict.CharStrings[this.id];\n let end = str.offset + str.length;\n stream.pos = str.offset;\n\n let path = new Path;\n let stack = [];\n let trans = [];\n\n let width = null;\n let nStems = 0;\n let x = 0, y = 0;\n let usedGsubrs;\n let usedSubrs;\n let open = false;\n\n this._usedGsubrs = usedGsubrs = {};\n this._usedSubrs = usedSubrs = {};\n\n let gsubrs = cff.globalSubrIndex || [];\n let gsubrsBias = this.bias(gsubrs);\n\n let privateDict = cff.privateDictForGlyph(this.id) || {};\n let subrs = privateDict.Subrs || [];\n let subrsBias = this.bias(subrs);\n\n let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n let vsindex = privateDict.vsindex;\n let variationProcessor = this._font._variationProcessor;\n\n function checkWidth() {\n if (width == null) {\n width = stack.shift() + privateDict.nominalWidthX;\n }\n }\n\n function parseStems() {\n if (stack.length % 2 !== 0) {\n checkWidth();\n }\n\n nStems += stack.length >> 1;\n return stack.length = 0;\n }\n\n function moveTo(x, y) {\n if (open) {\n path.closePath();\n }\n\n path.moveTo(x, y);\n open = true;\n }\n\n let parse = function () {\n while (stream.pos < end) {\n let op = stream.readUInt8();\n if (op < 32) {\n let index, subr, phase;\n let c1x, c1y, c2x, c2y, c3x, c3y;\n let c4x, c4y, c5x, c5y, c6x, c6y;\n let pts;\n\n switch (op) {\n case 1: // hstem\n case 3: // vstem\n case 18: // hstemhm\n case 23: // vstemhm\n parseStems();\n break;\n\n case 4: // vmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 5: // rlineto\n while (stack.length >= 2) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n break;\n\n case 6: // hlineto\n case 7: // vlineto\n phase = op === 6;\n while (stack.length >= 1) {\n if (phase) {\n x += stack.shift();\n } else {\n y += stack.shift();\n }\n\n path.lineTo(x, y);\n phase = !phase;\n }\n break;\n\n case 8: // rrcurveto\n while (stack.length > 0) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 10: // callsubr\n index = stack.pop() + subrsBias;\n subr = subrs[index];\n if (subr) {\n usedSubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 11: // return\n if (cff.version >= 2) {\n break;\n }\n return;\n\n case 14: // endchar\n if (cff.version >= 2) {\n break;\n }\n\n if (stack.length > 0) {\n checkWidth();\n }\n\n if (open) {\n path.closePath();\n open = false;\n }\n break;\n\n case 15: { // vsindex\n if (cff.version < 2) {\n throw new Error('vsindex operator not supported in CFF v1');\n }\n\n vsindex = stack.pop();\n break;\n }\n\n case 16: { // blend\n if (cff.version < 2) {\n throw new Error('blend operator not supported in CFF v1');\n }\n\n if (!variationProcessor) {\n throw new Error('blend operator in non-variation font');\n }\n\n let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n let numBlends = stack.pop();\n let numOperands = numBlends * blendVector.length;\n let delta = stack.length - numOperands;\n let base = delta - numBlends;\n\n for (let i = 0; i < numBlends; i++) {\n let sum = stack[base + i];\n for (let j = 0; j < blendVector.length; j++) {\n sum += blendVector[j] * stack[delta++];\n }\n\n stack[base + i] = sum;\n }\n\n while (numOperands--) {\n stack.pop();\n }\n\n break;\n }\n\n case 19: // hintmask\n case 20: // cntrmask\n parseStems();\n stream.pos += (nStems + 7) >> 3;\n break;\n\n case 21: // rmoveto\n if (stack.length > 2) {\n checkWidth();\n }\n\n x += stack.shift();\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 22: // hmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n x += stack.shift();\n moveTo(x, y);\n break;\n\n case 24: // rcurveline\n while (stack.length >= 8) {\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n break;\n\n case 25: // rlinecurve\n while (stack.length >= 8) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n break;\n\n case 26: // vvcurveto\n if (stack.length % 2) {\n x += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x;\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 27: // hhcurveto\n if (stack.length % 2) {\n y += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y;\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 28: // shortint\n stack.push(stream.readInt16BE());\n break;\n\n case 29: // callgsubr\n index = stack.pop() + gsubrsBias;\n subr = gsubrs[index];\n if (subr) {\n usedGsubrs[index] = true;\n let p = stream.pos;\n let e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 30: // vhcurveto\n case 31: // hvcurveto\n phase = op === 31;\n while (stack.length >= 4) {\n if (phase) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n y = c2y + stack.shift();\n x = c2x + (stack.length === 1 ? stack.shift() : 0);\n } else {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + (stack.length === 1 ? stack.shift() : 0);\n }\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n phase = !phase;\n }\n break;\n\n case 12:\n op = stream.readUInt8();\n switch (op) {\n case 3: // and\n let a = stack.pop();\n let b = stack.pop();\n stack.push(a && b ? 1 : 0);\n break;\n\n case 4: // or\n a = stack.pop();\n b = stack.pop();\n stack.push(a || b ? 1 : 0);\n break;\n\n case 5: // not\n a = stack.pop();\n stack.push(a ? 0 : 1);\n break;\n\n case 9: // abs\n a = stack.pop();\n stack.push(Math.abs(a));\n break;\n\n case 10: // add\n a = stack.pop();\n b = stack.pop();\n stack.push(a + b);\n break;\n\n case 11: // sub\n a = stack.pop();\n b = stack.pop();\n stack.push(a - b);\n break;\n\n case 12: // div\n a = stack.pop();\n b = stack.pop();\n stack.push(a / b);\n break;\n\n case 14: // neg\n a = stack.pop();\n stack.push(-a);\n break;\n\n case 15: // eq\n a = stack.pop();\n b = stack.pop();\n stack.push(a === b ? 1 : 0);\n break;\n\n case 18: // drop\n stack.pop();\n break;\n\n case 20: // put\n let val = stack.pop();\n let idx = stack.pop();\n trans[idx] = val;\n break;\n\n case 21: // get\n idx = stack.pop();\n stack.push(trans[idx] || 0);\n break;\n\n case 22: // ifelse\n let s1 = stack.pop();\n let s2 = stack.pop();\n let v1 = stack.pop();\n let v2 = stack.pop();\n stack.push(v1 <= v2 ? s1 : s2);\n break;\n\n case 23: // random\n stack.push(Math.random());\n break;\n\n case 24: // mul\n a = stack.pop();\n b = stack.pop();\n stack.push(a * b);\n break;\n\n case 26: // sqrt\n a = stack.pop();\n stack.push(Math.sqrt(a));\n break;\n\n case 27: // dup\n a = stack.pop();\n stack.push(a, a);\n break;\n\n case 28: // exch\n a = stack.pop();\n b = stack.pop();\n stack.push(b, a);\n break;\n\n case 29: // index\n idx = stack.pop();\n if (idx < 0) {\n idx = 0;\n } else if (idx > stack.length - 1) {\n idx = stack.length - 1;\n }\n\n stack.push(stack[idx]);\n break;\n\n case 30: // roll\n let n = stack.pop();\n let j = stack.pop();\n\n if (j >= 0) {\n while (j > 0) {\n var t = stack[n - 1];\n for (let i = n - 2; i >= 0; i--) {\n stack[i + 1] = stack[i];\n }\n\n stack[0] = t;\n j--;\n }\n } else {\n while (j < 0) {\n var t = stack[0];\n for (let i = 0; i <= n; i++) {\n stack[i] = stack[i + 1];\n }\n\n stack[n - 1] = t;\n j++;\n }\n }\n break;\n\n case 34: // hflex\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y;\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 35: // flex\n pts = [];\n\n for (let i = 0; i <= 5; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n stack.shift(); // fd\n break;\n\n case 36: // hflex1\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y + stack.shift();\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 37: // flex1\n let startx = x;\n let starty = y;\n\n pts = [];\n for (let i = 0; i <= 4; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n x += stack.shift();\n y = starty;\n } else {\n x = startx;\n y += stack.shift();\n }\n\n pts.push(x, y);\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n break;\n\n default:\n throw new Error(`Unknown op: 12 ${op}`);\n }\n break;\n\n default:\n throw new Error(`Unknown op: ${op}`);\n }\n\n } else if (op < 247) {\n stack.push(op - 139);\n } else if (op < 251) {\n var b1 = stream.readUInt8();\n stack.push((op - 247) * 256 + b1 + 108);\n } else if (op < 255) {\n var b1 = stream.readUInt8();\n stack.push(-(op - 251) * 256 - b1 - 108);\n } else {\n stack.push(stream.readInt32BE() / 65536);\n }\n }\n };\n\n parse();\n\n if (open) {\n path.closePath();\n }\n\n return path;\n }\n}\n","import TTFGlyph from './TTFGlyph';\nimport * as r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n originX: r.uint16,\n originY: r.uint16,\n type: new r.String(4),\n data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n type = 'SBIX';\n\n /**\n * Returns an object representing a glyph image at the given point size.\n * The object has a data property with a Buffer containing the actual image data,\n * along with the image type, and origin.\n *\n * @param {number} size\n * @return {object}\n */\n getImageForSize(size) {\n for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n var table = this._font.sbix.imageTables[i];\n if (table.ppem >= size) { break; }\n }\n\n let offsets = table.imageOffsets;\n let start = offsets[this.id];\n let end = offsets[this.id + 1];\n\n if (start === end) {\n return null;\n }\n\n this._font.stream.pos = start;\n return SBIXImage.decode(this._font.stream, {buflen: end - start});\n }\n\n render(ctx, size) {\n let img = this.getImageForSize(size);\n if (img != null) {\n let scale = size / this._font.unitsPerEm;\n ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n }\n\n if (this._font.sbix.flags.renderOutlines) {\n super.render(ctx, size);\n }\n }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n constructor(glyph, color) {\n this.glyph = glyph;\n this.color = color;\n }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n type = 'COLR';\n\n _getBBox() {\n let bbox = new BBox;\n for (let i = 0; i < this.layers.length; i++) {\n let layer = this.layers[i];\n let b = layer.glyph.bbox;\n bbox.addPoint(b.minX, b.minY);\n bbox.addPoint(b.maxX, b.maxY);\n }\n\n return bbox;\n }\n\n /**\n * Returns an array of objects containing the glyph and color for\n * each layer in the composite color glyph.\n * @type {object[]}\n */\n get layers() {\n let cpal = this._font.CPAL;\n let colr = this._font.COLR;\n let low = 0;\n let high = colr.baseGlyphRecord.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n var rec = colr.baseGlyphRecord[mid];\n\n if (this.id < rec.gid) {\n high = mid - 1;\n } else if (this.id > rec.gid) {\n low = mid + 1;\n } else {\n var baseLayer = rec;\n break;\n }\n }\n\n // if base glyph not found in COLR table,\n // default to normal glyph from glyf or CFF\n if (baseLayer == null) {\n var g = this._font._getBaseGlyph(this.id);\n var color = {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 255\n };\n\n return [new COLRLayer(g, color)];\n }\n\n // otherwise, return an array of all the layers\n let layers = [];\n for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n var rec = colr.layerRecords[i];\n var color = cpal.colorRecords[rec.paletteIndex];\n var g = this._font._getBaseGlyph(rec.gid);\n layers.push(new COLRLayer(g, color));\n }\n\n return layers;\n }\n\n render(ctx, size) {\n for (let {glyph, color} of this.layers) {\n ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n glyph.render(ctx, size);\n }\n\n return;\n }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK = 0x0fff;\nconst EMBEDDED_TUPLE_COORD = 0x8000;\nconst INTERMEDIATE_TUPLE = 0x4000;\nconst PRIVATE_POINT_NUMBERS = 0x2000;\nconst TUPLE_INDEX_MASK = 0x0fff;\nconst POINTS_ARE_WORDS = 0x80;\nconst POINT_RUN_COUNT_MASK = 0x7f;\nconst DELTAS_ARE_ZERO = 0x80;\nconst DELTAS_ARE_WORDS = 0x40;\nconst DELTA_RUN_COUNT_MASK = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n constructor(font, coords) {\n this.font = font;\n this.normalizedCoords = this.normalizeCoords(coords);\n this.blendVectors = new Map;\n }\n\n normalizeCoords(coords) {\n // the default mapping is linear along each axis, in two segments:\n // from the minValue to defaultValue, and from defaultValue to maxValue.\n let normalized = [];\n for (var i = 0; i < this.font.fvar.axis.length; i++) {\n let axis = this.font.fvar.axis[i];\n if (coords[i] < axis.defaultValue) {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n } else {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n }\n }\n\n // if there is an avar table, the normalized value is calculated\n // by interpolating between the two nearest mapped values.\n if (this.font.avar) {\n for (var i = 0; i < this.font.avar.segment.length; i++) {\n let segment = this.font.avar.segment[i];\n for (let j = 0; j < segment.correspondence.length; j++) {\n let pair = segment.correspondence[j];\n if (j >= 1 && normalized[i] < pair.fromCoord) {\n let prev = segment.correspondence[j - 1];\n normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n prev.toCoord;\n\n break;\n }\n }\n }\n }\n\n return normalized;\n }\n\n transformPoints(gid, glyphPoints) {\n if (!this.font.fvar || !this.font.gvar) { return; }\n\n let { gvar } = this.font;\n if (gid >= gvar.glyphCount) { return; }\n\n let offset = gvar.offsets[gid];\n if (offset === gvar.offsets[gid + 1]) { return; }\n\n // Read the gvar data for this glyph\n let { stream } = this.font;\n stream.pos = offset;\n if (stream.pos >= stream.length) {\n return;\n }\n\n let tupleCount = stream.readUInt16BE();\n let offsetToData = offset + stream.readUInt16BE();\n\n if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n var here = stream.pos;\n stream.pos = offsetToData;\n var sharedPoints = this.decodePoints();\n offsetToData = stream.pos;\n stream.pos = here;\n }\n\n let origPoints = glyphPoints.map(pt => pt.copy());\n\n tupleCount &= TUPLE_COUNT_MASK;\n for (let i = 0; i < tupleCount; i++) {\n let tupleDataSize = stream.readUInt16BE();\n let tupleIndex = stream.readUInt16BE();\n\n if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n var tupleCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n tupleCoords.push(stream.readInt16BE() / 16384);\n }\n\n } else {\n if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n throw new Error('Invalid gvar table');\n }\n\n var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n }\n\n if (tupleIndex & INTERMEDIATE_TUPLE) {\n var startCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n startCoords.push(stream.readInt16BE() / 16384);\n }\n\n var endCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n endCoords.push(stream.readInt16BE() / 16384);\n }\n }\n\n // Get the factor at which to apply this tuple\n let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n if (factor === 0) {\n offsetToData += tupleDataSize;\n continue;\n }\n\n var here = stream.pos;\n stream.pos = offsetToData;\n\n if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n var points = this.decodePoints();\n } else {\n var points = sharedPoints;\n }\n\n // points.length = 0 means there are deltas for all points\n let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n let xDeltas = this.decodeDeltas(nPoints);\n let yDeltas = this.decodeDeltas(nPoints);\n\n if (points.length === 0) { // all points\n for (let i = 0; i < glyphPoints.length; i++) {\n var point = glyphPoints[i];\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n } else {\n let outPoints = origPoints.map(pt => pt.copy());\n let hasDelta = glyphPoints.map(() => false);\n\n for (let i = 0; i < points.length; i++) {\n let idx = points[i];\n if (idx < glyphPoints.length) {\n let point = outPoints[idx];\n hasDelta[idx] = true;\n\n point.x += xDeltas[i] * factor;\n point.y += yDeltas[i] * factor;\n }\n }\n\n this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n for (let i = 0; i < glyphPoints.length; i++) {\n let deltaX = outPoints[i].x - origPoints[i].x;\n let deltaY = outPoints[i].y - origPoints[i].y;\n\n glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX);\n glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY);\n }\n }\n\n offsetToData += tupleDataSize;\n stream.pos = here;\n }\n }\n\n decodePoints() {\n let stream = this.font.stream;\n let count = stream.readUInt8();\n\n if (count & POINTS_ARE_WORDS) {\n count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n }\n\n let points = new Uint16Array(count);\n let i = 0;\n let point = 0;\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n for (let j = 0; j < runCount && i < count; j++) {\n point += fn.call(stream);\n points[i++] = point;\n }\n }\n\n return points;\n }\n\n decodeDeltas(count) {\n let stream = this.font.stream;\n let i = 0;\n let deltas = new Int16Array(count);\n\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n if (run & DELTAS_ARE_ZERO) {\n i += runCount;\n\n } else {\n let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n for (let j = 0; j < runCount && i < count; j++) {\n deltas[i++] = fn.call(stream);\n }\n }\n }\n\n return deltas;\n }\n\n tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n let normalized = this.normalizedCoords;\n let { gvar } = this.font;\n let factor = 1;\n\n for (let i = 0; i < gvar.axisCount; i++) {\n if (tupleCoords[i] === 0) {\n continue;\n }\n\n if (normalized[i] === 0) {\n return 0;\n }\n\n if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n (normalized[i] > Math.max(0, tupleCoords[i]))) {\n return 0;\n }\n\n factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n } else {\n if ((normalized[i] < startCoords[i]) ||\n (normalized[i] > endCoords[i])) {\n return 0;\n\n } else if (normalized[i] < tupleCoords[i]) {\n factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n } else {\n factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n }\n }\n }\n\n return factor;\n }\n\n // Interpolates points without delta values.\n // Needed for the Ø and Q glyphs in Skia.\n // Algorithm from Freetype.\n interpolateMissingDeltas(points, inPoints, hasDelta) {\n if (points.length === 0) {\n return;\n }\n\n let point = 0;\n while (point < points.length) {\n let firstPoint = point;\n\n // find the end point of the contour\n let endPoint = point;\n let pt = points[endPoint];\n while (!pt.endContour) {\n pt = points[++endPoint];\n }\n\n // find the first point that has a delta\n while (point <= endPoint && !hasDelta[point]) {\n point++;\n }\n\n if (point > endPoint) {\n continue;\n }\n\n let firstDelta = point;\n let curDelta = point;\n point++;\n\n while (point <= endPoint) {\n // find the next point with a delta, and interpolate intermediate points\n if (hasDelta[point]) {\n this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n curDelta = point;\n }\n\n point++;\n }\n\n // shift contour if we only have a single delta\n if (curDelta === firstDelta) {\n this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n } else {\n // otherwise, handle the remaining points at the end and beginning of the contour\n this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n if (firstDelta > 0) {\n this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n }\n }\n\n point = endPoint + 1;\n }\n }\n\n deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n if (p1 > p2) {\n return;\n }\n\n let iterable = ['x', 'y'];\n for (let i = 0; i < iterable.length; i++) {\n let k = iterable[i];\n if (inPoints[ref1][k] > inPoints[ref2][k]) {\n var p = ref1;\n ref1 = ref2;\n ref2 = p;\n }\n\n let in1 = inPoints[ref1][k];\n let in2 = inPoints[ref2][k];\n let out1 = outPoints[ref1][k];\n let out2 = outPoints[ref2][k];\n\n // If the reference points have the same coordinate but different\n // delta, inferred delta is zero. Otherwise interpolate.\n if (in1 !== in2 || out1 === out2) {\n let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n for (let p = p1; p <= p2; p++) {\n let out = inPoints[p][k];\n\n if (out <= in1) {\n out += out1 - in1;\n } else if (out >= in2) {\n out += out2 - in2;\n } else {\n out = out1 + (out - in1) * scale;\n }\n\n outPoints[p][k] = out;\n }\n }\n }\n }\n\n deltaShift(p1, p2, ref, inPoints, outPoints) {\n let deltaX = outPoints[ref].x - inPoints[ref].x;\n let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n for (let p = p1; p <= p2; p++) {\n if (p !== ref) {\n outPoints[p].x += deltaX;\n outPoints[p].y += deltaY;\n }\n }\n }\n\n getAdvanceAdjustment(gid, table) {\n let outerIndex, innerIndex;\n\n if (table.advanceWidthMapping) {\n let idx = gid;\n if (idx >= table.advanceWidthMapping.mapCount) {\n idx = table.advanceWidthMapping.mapCount - 1;\n }\n\n let entryFormat = table.advanceWidthMapping.entryFormat;\n ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n } else {\n outerIndex = 0;\n innerIndex = gid;\n }\n\n return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);\n }\n\n // See pseudo code from `Font Variations Overview'\n // in the OpenType specification.\n getDelta(itemStore, outerIndex, innerIndex) {\n if (outerIndex >= itemStore.itemVariationData.length) {\n return 0;\n }\n\n let varData = itemStore.itemVariationData[outerIndex];\n if (innerIndex >= varData.deltaSets.length) {\n return 0;\n }\n\n let deltaSet = varData.deltaSets[innerIndex];\n let blendVector = this.getBlendVector(itemStore, outerIndex);\n let netAdjustment = 0;\n\n for (let master = 0; master < varData.regionIndexCount; master++) {\n netAdjustment += deltaSet.deltas[master] * blendVector[master];\n }\n\n return netAdjustment;\n }\n\n getBlendVector(itemStore, outerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n if (this.blendVectors.has(varData)) {\n return this.blendVectors.get(varData);\n }\n\n let normalizedCoords = this.normalizedCoords;\n let blendVector = [];\n\n // outer loop steps through master designs to be blended\n for (let master = 0; master < varData.regionIndexCount; master++) {\n let scalar = 1;\n let regionIndex = varData.regionIndexes[master];\n let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n // inner loop steps through axes in this region\n for (let j = 0; j < axes.length; j++) {\n let axis = axes[j];\n let axisScalar;\n\n // compute the scalar contribution of this axis\n // ignore invalid ranges\n if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n axisScalar = 1;\n\n } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n axisScalar = 1;\n\n // peak of 0 means ignore this axis\n } else if (axis.peakCoord === 0) {\n axisScalar = 1;\n\n // ignore this region if coords are out of range\n } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n axisScalar = 0;\n\n // calculate a proportional factor\n } else {\n if (normalizedCoords[j] === axis.peakCoord) {\n axisScalar = 1;\n } else if (normalizedCoords[j] < axis.peakCoord) {\n axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n (axis.peakCoord - axis.startCoord + Number.EPSILON);\n } else {\n axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n (axis.endCoord - axis.peakCoord + Number.EPSILON);\n }\n }\n\n // take product of all the axis scalars\n scalar *= axisScalar;\n }\n\n blendVector[master] = scalar;\n }\n\n this.blendVectors.set(varData, blendVector);\n return blendVector;\n }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n constructor(font) {\n super(font);\n this.glyphEncoder = new TTFGlyphEncoder;\n }\n\n _addGlyph(gid) {\n let glyph = this.font.getGlyph(gid);\n let glyf = glyph._decode();\n\n // get the offset to the glyph from the loca table\n let curOffset = this.font.loca.offsets[gid];\n let nextOffset = this.font.loca.offsets[gid + 1];\n\n let stream = this.font._getTableStream('glyf');\n stream.pos += curOffset;\n\n let buffer = stream.readBuffer(nextOffset - curOffset);\n\n // if it is a compound glyph, include its components\n if (glyf && glyf.numberOfContours < 0) {\n buffer = new Uint8Array(buffer);\n let view = new DataView(buffer.buffer);\n for (let component of glyf.components) {\n gid = this.includeGlyph(component.glyphID);\n view.setUint16(component.pos, gid);\n }\n } else if (glyf && this.font._variationProcessor) {\n // If this is a TrueType variation glyph, re-encode the path\n buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n }\n\n this.glyf.push(buffer);\n this.loca.offsets.push(this.offset);\n\n this.hmtx.metrics.push({\n advance: glyph.advanceWidth,\n bearing: glyph._getMetrics().leftBearing\n });\n\n this.offset += buffer.length;\n return this.glyf.length - 1;\n }\n\n encode() {\n // tables required by PDF spec:\n // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n //\n // additional tables required for standalone fonts:\n // name, cmap, OS/2, post\n\n this.glyf = [];\n this.offset = 0;\n this.loca = {\n offsets: [],\n version: this.font.loca.version\n };\n\n this.hmtx = {\n metrics: [],\n bearings: []\n };\n\n // include all the glyphs\n // not using a for loop because we need to support adding more\n // glyphs to the array as we go, and CoffeeScript caches the length.\n let i = 0;\n while (i < this.glyphs.length) {\n this._addGlyph(this.glyphs[i++]);\n }\n\n let maxp = cloneDeep(this.font.maxp);\n maxp.numGlyphs = this.glyf.length;\n\n this.loca.offsets.push(this.offset);\n\n let head = cloneDeep(this.font.head);\n head.indexToLocFormat = this.loca.version;\n\n let hhea = cloneDeep(this.font.hhea);\n hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n // map = []\n // for index in [0...256]\n // if index < @numGlyphs\n // map[index] = index\n // else\n // map[index] = 0\n //\n // cmapTable =\n // version: 0\n // length: 262\n // language: 0\n // codeMap: map\n //\n // cmap =\n // version: 0\n // numSubtables: 1\n // tables: [\n // platformID: 1\n // encodingID: 0\n // table: cmapTable\n // ]\n\n // TODO: subset prep, cvt, fpgm?\n return Directory.toBuffer({\n tables: {\n head,\n hhea,\n loca: this.loca,\n maxp,\n 'cvt ': this.font['cvt '],\n prep: this.font.prep,\n glyf: this.glyf,\n hmtx: this.hmtx,\n fpgm: this.font.fpgm\n\n // name: clone @font.name\n // 'OS/2': clone @font['OS/2']\n // post: clone @font.post\n // cmap: cmap\n }\n });\n }\n}\n","import * as r from 'restructure';\n\nconst resolved = Promise.resolve();\n\nexport default class Subset {\n constructor(font) {\n this.font = font;\n this.glyphs = [];\n this.mapping = {};\n\n // always include the missing glyph\n this.includeGlyph(0);\n }\n\n includeGlyph(glyph) {\n if (typeof glyph === 'object') {\n glyph = glyph.id;\n }\n\n if (this.mapping[glyph] == null) {\n this.glyphs.push(glyph);\n this.mapping[glyph] = this.glyphs.length - 1;\n }\n\n return this.mapping[glyph];\n }\n}\n","import * as r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\nclass Point {\n static size(val) {\n return val >= 0 && val <= 255 ? 1 : 2;\n }\n \n static encode(stream, value) {\n if (value >= 0 && value <= 255) {\n stream.writeUInt8(value);\n } else {\n stream.writeInt16BE(value);\n }\n }\n}\n\nlet Glyf = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16,\n endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n instructions: new r.Array(r.uint8, r.uint16),\n flags: new r.Array(r.uint8, 0),\n xPoints: new r.Array(Point, 0),\n yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n encodeSimple(path, instructions = []) {\n let endPtsOfContours = [];\n let xPoints = [];\n let yPoints = [];\n let flags = [];\n let same = 0;\n let lastX = 0, lastY = 0, lastFlag = 0;\n let pointCount = 0;\n \n for (let i = 0; i < path.commands.length; i++) {\n let c = path.commands[i];\n \n for (let j = 0; j < c.args.length; j += 2) {\n let x = c.args[j];\n let y = c.args[j + 1];\n let flag = 0;\n \n // If the ending point of a quadratic curve is the midpoint\n // between the control point and the control point of the next\n // quadratic curve, we can omit the ending point.\n if (c.command === 'quadraticCurveTo' && j === 2) {\n let next = path.commands[i + 1];\n if (next && next.command === 'quadraticCurveTo') {\n let midX = (lastX + next.args[0]) / 2;\n let midY = (lastY + next.args[1]) / 2;\n \n if (x === midX && y === midY) {\n continue;\n }\n }\n }\n \n // All points except control points are on curve.\n if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n flag |= ON_CURVE;\n }\n \n flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n \n if (flag === lastFlag && same < 255) {\n flags[flags.length - 1] |= REPEAT;\n same++;\n } else {\n if (same > 0) {\n flags.push(same);\n same = 0;\n }\n \n flags.push(flag);\n lastFlag = flag;\n }\n \n lastX = x;\n lastY = y;\n pointCount++;\n }\n \n if (c.command === 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n }\n\n // Close the path if the last command didn't already\n if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n \n let bbox = path.bbox;\n let glyf = {\n numberOfContours: endPtsOfContours.length,\n xMin: bbox.minX,\n yMin: bbox.minY,\n xMax: bbox.maxX,\n yMax: bbox.maxY,\n endPtsOfContours: endPtsOfContours,\n instructions: instructions,\n flags: flags,\n xPoints: xPoints,\n yPoints: yPoints\n };\n \n let size = Glyf.size(glyf);\n let tail = 4 - (size % 4);\n \n let stream = new r.EncodeStream(size + tail);\n Glyf.encode(stream, glyf);\n \n // Align to 4-byte length\n if (tail !== 0) {\n stream.fill(0, tail);\n }\n \n return stream.buffer;\n }\n \n _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n let diff = value - last;\n \n if (value === last) {\n flag |= sameFlag;\n } else {\n if (-255 <= diff && diff <= 255) {\n flag |= shortFlag;\n if (diff < 0) {\n diff = -diff;\n } else {\n flag |= sameFlag;\n }\n }\n \n points.push(diff);\n }\n \n return flag;\n }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n constructor(font) {\n super(font);\n\n this.cff = this.font['CFF '];\n if (!this.cff) {\n throw new Error('Not a CFF Font');\n }\n }\n\n subsetCharstrings() {\n this.charstrings = [];\n let gsubrs = {};\n\n for (let gid of this.glyphs) {\n this.charstrings.push(this.cff.getCharString(gid));\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedGsubrs) {\n gsubrs[subr] = true;\n }\n }\n\n this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n }\n\n subsetSubrs(subrs, used) {\n let res = [];\n for (let i = 0; i < subrs.length; i++) {\n let subr = subrs[i];\n if (used[i]) {\n this.cff.stream.pos = subr.offset;\n res.push(this.cff.stream.readBuffer(subr.length));\n } else {\n res.push(new Uint8Array([11])); // return\n }\n }\n\n return res;\n }\n\n subsetFontdict(topDict) {\n topDict.FDArray = [];\n topDict.FDSelect = {\n version: 0,\n fds: []\n };\n\n let used_fds = {};\n let used_subrs = [];\n let fd_select = {};\n for (let gid of this.glyphs) {\n let fd = this.cff.fdForGlyph(gid);\n if (fd == null) {\n continue;\n }\n\n if (!used_fds[fd]) {\n topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n used_subrs.push({});\n fd_select[fd] = topDict.FDArray.length - 1;\n }\n\n used_fds[fd] = true;\n topDict.FDSelect.fds.push(fd_select[fd]);\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n for (let subr in glyph._usedSubrs) {\n used_subrs[fd_select[fd]][subr] = true;\n }\n }\n\n for (let i = 0; i < topDict.FDArray.length; i++) {\n let dict = topDict.FDArray[i];\n delete dict.FontName;\n if (dict.Private && dict.Private.Subrs) {\n dict.Private = Object.assign({}, dict.Private);\n dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n }\n }\n\n return;\n }\n\n createCIDFontdict(topDict) {\n let used_subrs = {};\n for (let gid of this.glyphs) {\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedSubrs) {\n used_subrs[subr] = true;\n }\n }\n\n let privateDict = Object.assign({}, this.cff.topDict.Private);\n if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {\n privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n }\n\n topDict.FDArray = [{ Private: privateDict }];\n return topDict.FDSelect = {\n version: 3,\n nRanges: 1,\n ranges: [{ first: 0, fd: 0 }],\n sentinel: this.charstrings.length\n };\n }\n\n addString(string) {\n if (!string) {\n return null;\n }\n\n if (!this.strings) {\n this.strings = [];\n }\n\n this.strings.push(string);\n return standardStrings.length + this.strings.length - 1;\n }\n\n encode() {\n this.subsetCharstrings();\n\n let charset = {\n version: this.charstrings.length > 255 ? 2 : 1,\n ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n };\n\n let topDict = Object.assign({}, this.cff.topDict);\n topDict.Private = null;\n topDict.charset = charset;\n topDict.Encoding = null;\n topDict.CharStrings = this.charstrings;\n\n for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n topDict[key] = this.addString(this.cff.string(topDict[key]));\n }\n\n topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n topDict.CIDCount = this.charstrings.length;\n\n if (this.cff.isCIDFont) {\n this.subsetFontdict(topDict);\n } else {\n this.createCIDFontdict(topDict);\n }\n\n let top = {\n version: 1,\n hdrSize: this.cff.hdrSize,\n offSize: 4,\n header: this.cff.header,\n nameIndex: [this.cff.postscriptName],\n topDictIndex: [topDict],\n stringIndex: this.strings,\n globalSubrIndex: this.gsubrs\n };\n\n return CFFTop.toBuffer(top);\n }\n}\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport * as r from 'restructure';\nimport { asciiDecoder } from './utils';\n\nexport default class WOFFFont extends TTFFont {\n type = 'WOFF';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOFF';\n }\n\n _decodeDirectory() {\n this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n\n if (table.compLength < table.length) {\n this.stream.pos += 2; // skip deflate header\n let outBuffer = new Uint8Array(table.length);\n let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n return new r.DecodeStream(buf);\n } else {\n return this.stream;\n }\n }\n\n return null;\n }\n}\n","import * as r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n tag: new r.String(4),\n offset: new r.Pointer(r.uint32, 'void', {type: 'global'}),\n compLength: r.uint32,\n length: r.uint32,\n origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n tag: new r.String(4), // should be 'wOFF'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import * as r from 'restructure';\nimport brotli from 'brotli/decompress.js';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\nimport { asciiDecoder } from './utils';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n type = 'WOFF2';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOF2';\n }\n\n _decodeDirectory() {\n this.directory = WOFF2Directory.decode(this.stream);\n this._dataPos = this.stream.pos;\n }\n\n _decompress() {\n // decompress data and setup table offsets if we haven't already\n if (!this._decompressed) {\n this.stream.pos = this._dataPos;\n let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n let decompressedSize = 0;\n for (let tag in this.directory.tables) {\n let entry = this.directory.tables[tag];\n entry.offset = decompressedSize;\n decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n }\n\n let decompressed = brotli(buffer, decompressedSize);\n if (!decompressed) {\n throw new Error('Error decoding compressed data in WOFF2');\n }\n\n this.stream = new r.DecodeStream(decompressed);\n this._decompressed = true;\n }\n }\n\n _decodeTable(table) {\n this._decompress();\n return super._decodeTable(table);\n }\n\n // Override this method to get a glyph and return our\n // custom subclass if there is a glyf table.\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n } else {\n return super._getBaseGlyph(glyph, characters);\n }\n }\n }\n\n _transformGlyfTable() {\n this._decompress();\n this.stream.pos = this.directory.tables.glyf.offset;\n let table = GlyfTable.decode(this.stream);\n let glyphs = [];\n\n for (let index = 0; index < table.numGlyphs; index++) {\n let glyph = {};\n let nContours = table.nContours.readInt16BE();\n glyph.numberOfContours = nContours;\n\n if (nContours > 0) { // simple glyph\n let nPoints = [];\n let totalPoints = 0;\n\n for (let i = 0; i < nContours; i++) {\n let r = read255UInt16(table.nPoints);\n totalPoints += r;\n nPoints.push(totalPoints);\n }\n\n glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n for (let i = 0; i < nContours; i++) {\n glyph.points[nPoints[i] - 1].endContour = true;\n }\n\n var instructionSize = read255UInt16(table.glyphs);\n\n } else if (nContours < 0) { // composite glyph\n let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n if (haveInstructions) {\n var instructionSize = read255UInt16(table.glyphs);\n }\n }\n\n glyphs.push(glyph);\n }\n\n this._transformedGlyphs = glyphs;\n }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n constructor(length) {\n this.length = length;\n this._buf = new r.Buffer(length);\n }\n\n decode(stream, parent) {\n return new r.DecodeStream(this._buf.decode(stream, parent));\n }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n version: r.uint32,\n numGlyphs: r.uint16,\n indexFormat: r.uint16,\n nContourStreamSize: r.uint32,\n nPointsStreamSize: r.uint32,\n flagStreamSize: r.uint32,\n glyphStreamSize: r.uint32,\n compositeStreamSize: r.uint32,\n bboxStreamSize: r.uint32,\n instructionStreamSize: r.uint32,\n nContours: new Substream('nContourStreamSize'),\n nPoints: new Substream('nPointsStreamSize'),\n flags: new Substream('flagStreamSize'),\n glyphs: new Substream('glyphStreamSize'),\n composites: new Substream('compositeStreamSize'),\n bboxes: new Substream('bboxStreamSize'),\n instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n let code = stream.readUInt8();\n\n if (code === WORD_CODE) {\n return stream.readUInt16BE();\n }\n\n if (code === ONE_MORE_BYTE_CODE1) {\n return stream.readUInt8() + LOWEST_U_CODE;\n }\n\n if (code === ONE_MORE_BYTE_CODE2) {\n return stream.readUInt8() + LOWEST_U_CODE * 2;\n }\n\n return code;\n}\n\nfunction withSign(flag, baseval) {\n return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n let y;\n let x = y = 0;\n let res = [];\n\n for (let i = 0; i < nPoints; i++) {\n let dx = 0, dy = 0;\n let flag = flags.readUInt8();\n let onCurve = !(flag >> 7);\n flag &= 0x7f;\n\n if (flag < 10) {\n dx = 0;\n dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n } else if (flag < 20) {\n dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n dy = 0;\n\n } else if (flag < 84) {\n var b0 = flag - 20;\n var b1 = glyphs.readUInt8();\n dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n } else if (flag < 120) {\n var b0 = flag - 84;\n dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n } else if (flag < 124) {\n var b1 = glyphs.readUInt8();\n let b2 = glyphs.readUInt8();\n dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n } else {\n dx = withSign(flag, glyphs.readUInt16BE());\n dy = withSign(flag >> 1, glyphs.readUInt16BE());\n }\n\n x += dx;\n y += dy;\n res.push(new Point(onCurve, false, x, y));\n }\n\n return res;\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n type = 'WOFF2';\n\n _decode() {\n // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n return this._font._transformedGlyphs[this.id];\n }\n\n _getCBox() {\n return this.path.bbox;\n }\n}\n","import * as r from 'restructure';\n\nconst Base128 = {\n decode(stream) {\n let result = 0;\n let iterable = [0, 1, 2, 3, 4];\n for (let j = 0; j < iterable.length; j++) {\n let i = iterable[j];\n let code = stream.readUInt8();\n\n // If any of the top seven bits are set then we're about to overflow.\n if (result & 0xe0000000) {\n throw new Error('Overflow');\n }\n\n result = (result << 7) | (code & 0x7f);\n if ((code & 0x80) === 0) {\n return result;\n }\n }\n\n throw new Error('Bad base 128 number');\n }\n};\n\nlet knownTags = [\n 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n flags: r.uint8,\n customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n length: Base128,\n transformVersion: t => (t.flags >>> 6) & 0x03,\n transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n tag: new r.String(4), // should be 'wOF2'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n totalCompressedSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n let tables = {};\n for (let i = 0; i < this.tables.length; i++) {\n let table = this.tables[i];\n tables[table.tag] = table;\n }\n\n return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport { asciiDecoder } from './utils';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n 0x00010000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts')\n },\n 0x00020000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts'),\n dsigTag: r.uint32,\n dsigLength: r.uint32,\n dsigOffset: r.uint32\n }\n});\n\nexport default class TrueTypeCollection {\n type = 'TTC';\n\n static probe(buffer) {\n return asciiDecoder.decode(buffer.slice(0, 4)) === 'ttcf';\n }\n\n constructor(stream) {\n this.stream = stream;\n if (stream.readString(4) !== 'ttcf') {\n throw new Error('Not a TrueType collection');\n }\n\n this.header = TTCHeader.decode(stream);\n }\n\n getFont(name) {\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import * as r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n len: r.uint32,\n buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n id: r.uint16,\n nameOffset: r.int16,\n attr: r.uint8,\n dataOffset: r.uint24,\n handle: r.uint32\n});\n\nlet Type = new r.Struct({\n name: new r.String(4),\n maxTypeIndex: r.uint16,\n refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n length: r.uint16,\n types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n reserved: new r.Reserved(r.uint8, 24),\n typeList: new r.Pointer(r.uint16, TypeList),\n nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n dataOffset: r.uint32,\n map: new r.Pointer(r.uint32, DFontMap),\n dataLength: r.uint32,\n mapLength: r.uint32\n});\n\nexport default class DFont {\n type = 'DFont';\n\n static probe(buffer) {\n let stream = new r.DecodeStream(buffer);\n\n try {\n var header = DFontHeader.decode(stream);\n } catch (e) {\n return false;\n }\n\n for (let type of header.map.typeList.types) {\n if (type.name === 'sfnt') {\n return true;\n }\n }\n\n return false;\n }\n\n constructor(stream) {\n this.stream = stream;\n this.header = DFontHeader.decode(this.stream);\n\n for (let type of this.header.map.typeList.types) {\n for (let ref of type.refList) {\n if (ref.nameOffset >= 0) {\n this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n ref.name = DFontName.decode(this.stream);\n } else {\n ref.name = null;\n }\n }\n\n if (type.name === 'sfnt') {\n this.sfnt = type;\n }\n }\n }\n\n getFont(name) {\n if (!this.sfnt) {\n return null;\n }\n\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n let font = new TTFFont(stream);\n if (\n font.postscriptName === name ||\n (\n font.postscriptName instanceof Uint8Array && \n name instanceof Uint8Array && \n font.postscriptName.every((v, i) => name[i] === v)\n )\n ) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n"],"names":[],"version":3,"file":"module.mjs.map"} \ No newline at end of file diff --git a/node_modules/fontkit/package.json b/node_modules/fontkit/package.json new file mode 100644 index 0000000..dff6f0f --- /dev/null +++ b/node_modules/fontkit/package.json @@ -0,0 +1,98 @@ +{ + "name": "fontkit", + "version": "2.0.4", + "description": "An advanced font engine for Node and the browser", + "keywords": [ + "opentype", + "font", + "typography", + "subset", + "emoji", + "glyph", + "layout" + ], + "scripts": { + "test": "run-s build mocha", + "mocha": "mocha", + "build": "parcel build", + "prepublish": "run-s clean trie:** build", + "trie:data": "node src/opentype/shapers/generate-data.js", + "trie:use": "node src/opentype/shapers/gen-use.js", + "trie:indic": "node src/opentype/shapers/gen-indic.js", + "clean": "shx rm -rf src/opentype/shapers/data.trie src/opentype/shapers/use.trie src/opentype/shapers/use.json src/opentype/shapers/indic.trie src/opentype/shapers/indic.json dist", + "coverage": "c8 mocha" + }, + "type": "module", + "main": "dist/main.cjs", + "node-module": "dist/module.mjs", + "browser": "dist/browser.cjs", + "module": "dist/browser-module.mjs", + "source": "src/index.js", + "exports": { + "node": { + "import": "./dist/module.mjs", + "require": "./dist/main.cjs" + }, + "import": "./dist/browser-module.mjs", + "require": "./dist/browser.cjs" + }, + "targets": { + "main": { + "source": "src/node.js", + "context": "browser", + "engines": { + "browsers": "chrome >= 70" + } + }, + "node-module": { + "source": "src/node.js", + "isLibrary": true, + "includeNodeModules": false, + "engines": { + "browsers": "chrome >= 70" + } + }, + "module": { + "source": "src/index.js", + "engines": { + "browsers": "chrome >= 70" + } + }, + "browser": { + "source": "src/index.js", + "engines": { + "browsers": "chrome >= 70" + } + } + }, + "files": [ + "src", + "dist" + ], + "author": "Devon Govett ", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/foliojs/fontkit.git" + }, + "dependencies": { + "@swc/helpers": "^0.5.12", + "brotli": "^1.3.2", + "clone": "^2.1.2", + "dfa": "^1.2.0", + "fast-deep-equal": "^3.1.3", + "restructure": "^3.0.0", + "tiny-inflate": "^1.0.3", + "unicode-properties": "^1.4.0", + "unicode-trie": "^2.0.0" + }, + "devDependencies": { + "c8": "^7.11.3", + "codepoints": "^1.2.0", + "concat-stream": "^2.0.0", + "mocha": "^10.0.0", + "npm-run-all": "^4.1.5", + "parcel": "2.0.0-canary.1713", + "shx": "^0.3.4" + } +} diff --git a/node_modules/fontkit/src/CmapProcessor.js b/node_modules/fontkit/src/CmapProcessor.js new file mode 100644 index 0000000..6acc501 --- /dev/null +++ b/node_modules/fontkit/src/CmapProcessor.js @@ -0,0 +1,286 @@ +import { binarySearch } from './utils'; +import { encodingExists, getEncoding, getEncodingMapping } from './encodings'; +import { cache } from './decorators'; +import { range } from './utils'; + +export default class CmapProcessor { + constructor(cmapTable) { + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [3, 10], + [0, 6], + [0, 4], + + // 16-bit subtables + [3, 1], + [0, 3], + [0, 2], + [0, 1], + [0, 0] + ]); + + // If not unicode cmap was found, take the first table with a supported encoding. + if (!this.cmap) { + for (let cmap of cmapTable.tables) { + let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + let mapping = getEncodingMapping(encoding); + if (mapping) { + this.cmap = cmap.table; + this.encoding = mapping; + } + } + } + + if (!this.cmap) { + throw new Error("Could not find a supported cmap table"); + } + + this.uvs = this.findSubtable(cmapTable, [[0, 5]]); + if (this.uvs && this.uvs.version !== 14) { + this.uvs = null; + } + } + + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs) { + for (let cmap of cmapTable.tables) { + if (cmap.platformID === platformID && cmap.encodingID === encodingID) { + return cmap.table; + } + } + } + + return null; + } + + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) { + codepoint = this.encoding.get(codepoint) || codepoint; + + // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided. + } else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) { + return gid; + } + } + + let cmap = this.cmap; + switch (cmap.version) { + case 0: + return cmap.codeMap.get(codepoint) || 0; + + case 4: { + let min = 0; + let max = cmap.segCount - 1; + while (min <= max) { + let mid = (min + max) >> 1; + + if (codepoint < cmap.startCode.get(mid)) { + max = mid - 1; + } else if (codepoint > cmap.endCode.get(mid)) { + min = mid + 1; + } else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + + if (rangeOffset === 0) { + gid = codepoint + cmap.idDelta.get(mid); + } else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) { + gid += cmap.idDelta.get(mid); + } + } + + return gid & 0xffff; + } + } + + return 0; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + + case 12: + case 13: { + let min = 0; + let max = cmap.nGroups - 1; + while (min <= max) { + let mid = (min + max) >> 1; + let group = cmap.groups.get(mid); + + if (codepoint < group.startCharCode) { + max = mid - 1; + } else if (codepoint > group.endCharCode) { + min = mid + 1; + } else { + if (cmap.version === 12) { + return group.glyphID + (codepoint - group.startCharCode); + } else { + return group.glyphID; + } + } + } + + return 0; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) { + return 0; + } + + let selectors = this.uvs.varSelectors.toArray(); + let i = binarySearch(selectors, x => variationSelector - x.varSelector); + let sel = selectors[i]; + + if (i !== -1 && sel.defaultUVS) { + i = binarySearch(sel.defaultUVS, x => + codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0 + ); + } + + if (i !== -1 && sel.nonDefaultUVS) { + i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue); + if (i !== -1) { + return sel.nonDefaultUVS[i].glyphID; + } + } + + return 0; + } + + @cache + getCharacterSet() { + let cmap = this.cmap; + switch (cmap.version) { + case 0: + return range(0, cmap.codeMap.length); + + case 4: { + let res = []; + let endCodes = cmap.endCode.toArray(); + for (let i = 0; i < endCodes.length; i++) { + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...range(start, tail)); + } + + return res; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + + case 12: + case 13: { + let res = []; + for (let group of cmap.groups.toArray()) { + res.push(...range(group.startCharCode, group.endCharCode + 1)); + } + + return res; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + + @cache + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch (cmap.version) { + case 0: { + let res = []; + for (let i = 0; i < 256; i++) { + if (cmap.codeMap.get(i) === gid) { + res.push(i); + } + } + + return res; + } + + case 4: { + let res = []; + for (let i = 0; i < cmap.segCount; i++) { + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + + for (var c = start; c <= end; c++) { + let g = 0; + if (rangeOffset === 0) { + g = c + delta; + } else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) { + g += delta; + } + } + + if (g === gid) { + res.push(c); + } + } + } + + return res; + } + + case 12: { + let res = []; + for (let group of cmap.groups.toArray()) { + if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) { + res.push(group.startCharCode + (gid - group.glyphID)); + } + } + + return res; + } + + case 13: { + let res = []; + for (let group of cmap.groups.toArray()) { + if (gid === group.glyphID) { + res.push(...range(group.startCharCode, group.endCharCode + 1)); + } + } + + return res; + } + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } +} diff --git a/node_modules/fontkit/src/DFont.js b/node_modules/fontkit/src/DFont.js new file mode 100644 index 0000000..5f606f6 --- /dev/null +++ b/node_modules/fontkit/src/DFont.js @@ -0,0 +1,117 @@ +import * as r from 'restructure'; +import TTFFont from './TTFFont'; + +let DFontName = new r.String(r.uint8); +let DFontData = new r.Struct({ + len: r.uint32, + buf: new r.Buffer('len') +}); + +let Ref = new r.Struct({ + id: r.uint16, + nameOffset: r.int16, + attr: r.uint8, + dataOffset: r.uint24, + handle: r.uint32 +}); + +let Type = new r.Struct({ + name: new r.String(4), + maxTypeIndex: r.uint16, + refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' }) +}); + +let TypeList = new r.Struct({ + length: r.uint16, + types: new r.Array(Type, t => t.length + 1) +}); + +let DFontMap = new r.Struct({ + reserved: new r.Reserved(r.uint8, 24), + typeList: new r.Pointer(r.uint16, TypeList), + nameListOffset: new r.Pointer(r.uint16, 'void') +}); + +let DFontHeader = new r.Struct({ + dataOffset: r.uint32, + map: new r.Pointer(r.uint32, DFontMap), + dataLength: r.uint32, + mapLength: r.uint32 +}); + +export default class DFont { + type = 'DFont'; + + static probe(buffer) { + let stream = new r.DecodeStream(buffer); + + try { + var header = DFontHeader.decode(stream); + } catch (e) { + return false; + } + + for (let type of header.map.typeList.types) { + if (type.name === 'sfnt') { + return true; + } + } + + return false; + } + + constructor(stream) { + this.stream = stream; + this.header = DFontHeader.decode(this.stream); + + for (let type of this.header.map.typeList.types) { + for (let ref of type.refList) { + if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = DFontName.decode(this.stream); + } else { + ref.name = null; + } + } + + if (type.name === 'sfnt') { + this.sfnt = type; + } + } + } + + getFont(name) { + if (!this.sfnt) { + return null; + } + + for (let ref of this.sfnt.refList) { + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + let font = new TTFFont(stream); + if ( + font.postscriptName === name || + ( + font.postscriptName instanceof Uint8Array && + name instanceof Uint8Array && + font.postscriptName.every((v, i) => name[i] === v) + ) + ) { + return font; + } + } + + return null; + } + + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList) { + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new TTFFont(stream)); + } + + return fonts; + } +} diff --git a/node_modules/fontkit/src/TTFFont.js b/node_modules/fontkit/src/TTFFont.js new file mode 100644 index 0000000..6aa0937 --- /dev/null +++ b/node_modules/fontkit/src/TTFFont.js @@ -0,0 +1,554 @@ +import * as r from 'restructure'; +import { cache } from './decorators'; +import * as fontkit from './base'; +import Directory from './tables/directory'; +import tables from './tables'; +import CmapProcessor from './CmapProcessor'; +import LayoutEngine from './layout/LayoutEngine'; +import TTFGlyph from './glyph/TTFGlyph'; +import CFFGlyph from './glyph/CFFGlyph'; +import SBIXGlyph from './glyph/SBIXGlyph'; +import COLRGlyph from './glyph/COLRGlyph'; +import GlyphVariationProcessor from './glyph/GlyphVariationProcessor'; +import TTFSubset from './subset/TTFSubset'; +import CFFSubset from './subset/CFFSubset'; +import BBox from './glyph/BBox'; +import { asciiDecoder } from './utils'; + +/** + * This is the base class for all SFNT-based font formats in fontkit. + * It supports TrueType, and PostScript glyphs, and several color glyph formats. + */ +export default class TTFFont { + type = 'TTF'; + + static probe(buffer) { + let format = asciiDecoder.decode(buffer.slice(0, 4)); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + + constructor(stream, variationCoords = null) { + this.defaultLanguage = null; + this.stream = stream; + this.variationCoords = variationCoords; + + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + + // define properties for each table to lazily parse + for (let tag in this.directory.tables) { + let table = this.directory.tables[tag]; + if (tables[tag] && table.length > 0) { + Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } + } + + setDefaultLanguage(lang = null) { + this.defaultLanguage = lang; + } + + _getTable(table) { + if (!(table.tag in this._tables)) { + try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if (fontkit.logErrors) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + } + + return this._tables[table.tag]; + } + + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + + return null; + } + + _decodeDirectory() { + return this.directory = Directory.decode(this.stream, {_startOffset: 0}); + } + + _decodeTable(table) { + let pos = this.stream.pos; + + let stream = this._getTableStream(table.tag); + let result = tables[table.tag].decode(stream, this, table.length); + + this.stream.pos = pos; + return result; + } + + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ + getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) { + let record = this.name && this.name.records[key]; + if (record) { + // Attempt to retrieve the entry, depending on which translation is available: + return ( + record[lang] + || record[this.defaultLanguage] + || record[fontkit.defaultLanguage] + || record['en'] + || record[Object.keys(record)[0]] // Seriously, ANY language would be fine + || null + ); + } + + return null; + } + + /** + * The unique PostScript name for this font, e.g. "Helvetica-Bold" + * @type {string} + */ + get postscriptName() { + return this.getName('postscriptName'); + } + + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ + get fullName() { + return this.getName('fullName'); + } + + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ + get familyName() { + return this.getName('fontFamily'); + } + + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ + get subfamilyName() { + return this.getName('fontSubfamily'); + } + + /** + * The font's copyright information + * @type {string} + */ + get copyright() { + return this.getName('copyright'); + } + + /** + * The font's version number + * @type {string} + */ + get version() { + return this.getName('version'); + } + + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ + get ascent() { + return this.hhea.ascent; + } + + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ + get descent() { + return this.hhea.descent; + } + + /** + * The amount of space that should be included between lines + * @type {number} + */ + get lineGap() { + return this.hhea.lineGap; + } + + /** + * The offset from the normal underline position that should be used + * @type {number} + */ + get underlinePosition() { + return this.post.underlinePosition; + } + + /** + * The weight of the underline that should be used + * @type {number} + */ + get underlineThickness() { + return this.post.underlineThickness; + } + + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ + get italicAngle() { + return this.post.italicAngle; + } + + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ + get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ + get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + + /** + * The number of glyphs in the font. + * @type {number} + */ + get numGlyphs() { + return this.maxp.numGlyphs; + } + + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ + get unitsPerEm() { + return this.head.unitsPerEm; + } + + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ + @cache + get bbox() { + return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + + @cache + get _cmapProcessor() { + return new CmapProcessor(this.cmap); + } + + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ + @cache + get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ + hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ + glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]); + } + + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ + glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + + while (idx <= len) { + let code = 0; + let nextState = 0; + + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0; + } else { + idx++; + } + + if (state === 0 && nextState === 1) { + // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code])); + } else if (state === 0 && nextState === 0) { + // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + } + + last = code; + state = nextState; + } + + return glyphs; + } + + @cache + get _layoutEngine() { + return new LayoutEngine(this); + } + + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @param {string} [direction] + * @return {GlyphRun} + */ + layout(string, userFeatures, script, language, direction) { + return this._layoutEngine.layout(string, userFeatures, script, language, direction); + } + + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ + stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ + get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + + getAvailableFeatures(script, language) { + return this._layoutEngine.getAvailableFeatures(script, language); + } + + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) { + this._glyphs[glyph] = new TTFGlyph(glyph, characters, this); + + } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) { + this._glyphs[glyph] = new CFFGlyph(glyph, characters, this); + } + } + + return this._glyphs[glyph] || null; + } + + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ + getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) { + this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this); + + } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) { + this._glyphs[glyph] = new COLRGlyph(glyph, characters, this); + + } else { + this._getBaseGlyph(glyph, characters); + } + } + + return this._glyphs[glyph] || null; + } + + /** + * Returns a Subset for this font. + * @return {Subset} + */ + createSubset() { + if (this.directory.tables['CFF ']) { + return new CFFSubset(this); + } + + return new TTFSubset(this); + } + + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ + @cache + get variationAxes() { + let res = {}; + if (!this.fvar) { + return res; + } + + for (let axis of this.fvar.axis) { + res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + } + + return res; + } + + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ + @cache + get namedVariations() { + let res = {}; + if (!this.fvar) { + return res; + } + + for (let instance of this.fvar.instance) { + let settings = {}; + for (let i = 0; i < this.fvar.axis.length; i++) { + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + + res[instance.name.en] = settings; + } + + return res; + } + + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ + getVariation(settings) { + if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) { + throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + } + + if (typeof settings === 'string') { + settings = this.namedVariations[settings]; + } + + if (typeof settings !== 'object') { + throw new Error('Variation settings must be either a variation name or settings object.'); + } + + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i) => { + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) { + return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + } else { + return axis.defaultValue; + } + }); + + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + + let font = new TTFFont(stream, coords); + font._tables = this._tables; + + return font; + } + + @cache + get _variationProcessor() { + if (!this.fvar) { + return null; + } + + let variationCoords = this.variationCoords; + + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) { + return null; + } + + if (!variationCoords) { + variationCoords = this.fvar.axis.map(axis => axis.defaultValue); + } + + return new GlyphVariationProcessor(this, variationCoords); + } + + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } +} diff --git a/node_modules/fontkit/src/TrueTypeCollection.js b/node_modules/fontkit/src/TrueTypeCollection.js new file mode 100644 index 0000000..2d27309 --- /dev/null +++ b/node_modules/fontkit/src/TrueTypeCollection.js @@ -0,0 +1,67 @@ +import * as r from 'restructure'; +import TTFFont from './TTFFont'; +import Directory from './tables/directory'; +import tables from './tables'; +import { asciiDecoder } from './utils'; + +let TTCHeader = new r.VersionedStruct(r.uint32, { + 0x00010000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts') + }, + 0x00020000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts'), + dsigTag: r.uint32, + dsigLength: r.uint32, + dsigOffset: r.uint32 + } +}); + +export default class TrueTypeCollection { + type = 'TTC'; + + static probe(buffer) { + return asciiDecoder.decode(buffer.slice(0, 4)) === 'ttcf'; + } + + constructor(stream) { + this.stream = stream; + if (stream.readString(4) !== 'ttcf') { + throw new Error('Not a TrueType collection'); + } + + this.header = TTCHeader.decode(stream); + } + + getFont(name) { + for (let offset of this.header.offsets) { + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new TTFFont(stream); + if ( + font.postscriptName === name || + ( + font.postscriptName instanceof Uint8Array && + name instanceof Uint8Array && + font.postscriptName.every((v, i) => name[i] === v) + ) + ) { + return font; + } + } + + return null; + } + + get fonts() { + let fonts = []; + for (let offset of this.header.offsets) { + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new TTFFont(stream)); + } + + return fonts; + } +} diff --git a/node_modules/fontkit/src/WOFF2Font.js b/node_modules/fontkit/src/WOFF2Font.js new file mode 100644 index 0000000..2cb327d --- /dev/null +++ b/node_modules/fontkit/src/WOFF2Font.js @@ -0,0 +1,216 @@ +import * as r from 'restructure'; +import brotli from 'brotli/decompress.js'; +import TTFFont from './TTFFont'; +import TTFGlyph, { Point } from './glyph/TTFGlyph'; +import WOFF2Glyph from './glyph/WOFF2Glyph'; +import WOFF2Directory from './tables/WOFF2Directory'; +import { asciiDecoder } from './utils'; + +/** + * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2 + * See spec here: http://www.w3.org/TR/WOFF2/ + */ +export default class WOFF2Font extends TTFFont { + type = 'WOFF2'; + + static probe(buffer) { + return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOF2'; + } + + _decodeDirectory() { + this.directory = WOFF2Directory.decode(this.stream); + this._dataPos = this.stream.pos; + } + + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + + let decompressedSize = 0; + for (let tag in this.directory.tables) { + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length; + } + + let decompressed = brotli(buffer, decompressedSize); + if (!decompressed) { + throw new Error('Error decoding compressed data in WOFF2'); + } + + this.stream = new r.DecodeStream(decompressed); + this._decompressed = true; + } + } + + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) { this._transformGlyfTable(); } + return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this); + + } else { + return super._getBaseGlyph(glyph, characters); + } + } + } + + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = GlyfTable.decode(this.stream); + let glyphs = []; + + for (let index = 0; index < table.numGlyphs; index++) { + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + + if (nContours > 0) { // simple glyph + let nPoints = []; + let totalPoints = 0; + + for (let i = 0; i < nContours; i++) { + let r = read255UInt16(table.nPoints); + totalPoints += r; + nPoints.push(totalPoints); + } + + glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints); + for (let i = 0; i < nContours; i++) { + glyph.points[nPoints[i] - 1].endContour = true; + } + + var instructionSize = read255UInt16(table.glyphs); + + } else if (nContours < 0) { // composite glyph + let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites); + if (haveInstructions) { + var instructionSize = read255UInt16(table.glyphs); + } + } + + glyphs.push(glyph); + } + + this._transformedGlyphs = glyphs; + } +} + +// Special class that accepts a length and returns a sub-stream for that data +class Substream { + constructor(length) { + this.length = length; + this._buf = new r.Buffer(length); + } + + decode(stream, parent) { + return new r.DecodeStream(this._buf.decode(stream, parent)); + } +} + +// This struct represents the entire glyf table +let GlyfTable = new r.Struct({ + version: r.uint32, + numGlyphs: r.uint16, + indexFormat: r.uint16, + nContourStreamSize: r.uint32, + nPointsStreamSize: r.uint32, + flagStreamSize: r.uint32, + glyphStreamSize: r.uint32, + compositeStreamSize: r.uint32, + bboxStreamSize: r.uint32, + instructionStreamSize: r.uint32, + nContours: new Substream('nContourStreamSize'), + nPoints: new Substream('nPointsStreamSize'), + flags: new Substream('flagStreamSize'), + glyphs: new Substream('glyphStreamSize'), + composites: new Substream('compositeStreamSize'), + bboxes: new Substream('bboxStreamSize'), + instructions: new Substream('instructionStreamSize') +}); + +const WORD_CODE = 253; +const ONE_MORE_BYTE_CODE2 = 254; +const ONE_MORE_BYTE_CODE1 = 255; +const LOWEST_U_CODE = 253; + +function read255UInt16(stream) { + let code = stream.readUInt8(); + + if (code === WORD_CODE) { + return stream.readUInt16BE(); + } + + if (code === ONE_MORE_BYTE_CODE1) { + return stream.readUInt8() + LOWEST_U_CODE; + } + + if (code === ONE_MORE_BYTE_CODE2) { + return stream.readUInt8() + LOWEST_U_CODE * 2; + } + + return code; +} + +function withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} + +function decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + + for (let i = 0; i < nPoints; i++) { + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + + if (flag < 10) { + dx = 0; + dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + + } else if (flag < 20) { + dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8()); + dy = 0; + + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + + } else if (flag < 120) { + var b0 = flag - 84; + dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8()); + dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8()); + + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + + } else { + dx = withSign(flag, glyphs.readUInt16BE()); + dy = withSign(flag >> 1, glyphs.readUInt16BE()); + } + + x += dx; + y += dy; + res.push(new Point(onCurve, false, x, y)); + } + + return res; +} diff --git a/node_modules/fontkit/src/WOFFFont.js b/node_modules/fontkit/src/WOFFFont.js new file mode 100644 index 0000000..6a2399a --- /dev/null +++ b/node_modules/fontkit/src/WOFFFont.js @@ -0,0 +1,36 @@ +import TTFFont from './TTFFont'; +import WOFFDirectory from './tables/WOFFDirectory'; +import tables from './tables'; +import inflate from 'tiny-inflate'; +import * as r from 'restructure'; +import { asciiDecoder } from './utils'; + +export default class WOFFFont extends TTFFont { + type = 'WOFF'; + + static probe(buffer) { + return asciiDecoder.decode(buffer.slice(0, 4)) === 'wOFF'; + } + + _decodeDirectory() { + this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 }); + } + + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Uint8Array(table.length); + let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new r.DecodeStream(buf); + } else { + return this.stream; + } + } + + return null; + } +} diff --git a/node_modules/fontkit/src/aat/AATFeatureMap.js b/node_modules/fontkit/src/aat/AATFeatureMap.js new file mode 100644 index 0000000..2aacffe --- /dev/null +++ b/node_modules/fontkit/src/aat/AATFeatureMap.js @@ -0,0 +1,543 @@ +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { // indices into ltag table + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; + +const feature = (name, selector) => [features[name].code, features[name][selector]]; + +const OTMapping = { + rlig: feature('ligatures', 'requiredLigatures'), + clig: feature('ligatures', 'contextualLigatures'), + dlig: feature('ligatures', 'rareLigatures'), + hlig: feature('ligatures', 'historicalLigatures'), + liga: feature('ligatures', 'commonLigatures'), + hist: feature('ligatures', 'historicalLigatures'), // ?? + + smcp: feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: feature('lowerCase', 'lowerCasePetiteCaps'), + + frac: feature('fractions', 'diagonalFractions'), + dnom: feature('fractions', 'diagonalFractions'), // ?? + numr: feature('fractions', 'diagonalFractions'), // ?? + afrc: feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + + case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing + ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition? + cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below + valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: feature('contextualAlternates', 'swashAlternates'), + cswh: feature('contextualAlternates', 'contextualSwashAlternates'), + curs: feature('cursiveConnection', 'cursive'), // ?? + c2pc: feature('upperCase', 'upperCasePetiteCaps'), + c2sc: feature('upperCase', 'upperCaseSmallCaps'), + + init: feature('smartSwash', 'wordInitialSwashes'), // ?? + fin2: feature('smartSwash', 'wordFinalSwashes'), // ?? + medi: feature('smartSwash', 'nonFinalSwashes'), // ?? + med2: feature('smartSwash', 'nonFinalSwashes'), // ?? + fin3: feature('smartSwash', 'wordFinalSwashes'), // ?? + fina: feature('smartSwash', 'wordFinalSwashes'), // ?? + + pkna: feature('kanaSpacing', 'proportionalKana'), + half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs? + halt: feature('textSpacing', 'altHalfWidthText'), + + hkna: feature('alternateKana', 'alternateHorizKana'), + vkna: feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + + ital: feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: feature('numberCase', 'upperCaseNumbers'), + onum: feature('numberCase', 'lowerCaseNumbers'), + mgrk: feature('mathematicalExtras', 'mathematicalGreek'), + + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + + calt: feature('contextualAlternates', 'contextualAlternates'), // or more? + vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below? + vert: feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: feature('numberSpacing', 'monospacedNumbers'), + pnum: feature('numberSpacing', 'proportionalNumbers'), + sups: feature('verticalPosition', 'superiors'), + subs: feature('verticalPosition', 'inferiors'), + ordn: feature('verticalPosition', 'ordinals'), + pwid: feature('textSpacing', 'proportionalText'), + hwid: feature('textSpacing', 'halfWidthText'), + qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers? + twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers? + fwid: feature('textSpacing', 'proportionalText'), //?? + palt: feature('textSpacing', 'altProportionalText'), + trad: feature('characterShape', 'traditionalCharacters'), + smpl: feature('characterShape', 'simplifiedCharacters'), + jp78: feature('characterShape', 'JIS1978Characters'), + jp83: feature('characterShape', 'JIS1983Characters'), + jp90: feature('characterShape', 'JIS1990Characters'), + jp04: feature('characterShape', 'JIS2004Characters'), + expt: feature('characterShape', 'expertCharacters'), + hojo: feature('characterShape', 'hojoCharacters'), + nlck: feature('characterShape', 'NLCCharacters'), + tnam: feature('characterShape', 'traditionalNamesCharacters'), + ruby: feature('rubyKana', 'rubyKana'), + titl: feature('styleOptions', 'titlingCaps'), + zero: feature('typographicExtras', 'slashedZero'), + + ss01: feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: feature('stylisticAlternatives', 'stylisticAltTwenty') +}; + + // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose + +// Add cv01-cv99 features +for (let i = 1; i <= 99; i++) { + OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i]; +} + +// create inverse mapping +let AATMapping = {}; +for (let ot in OTMapping) { + let aat = OTMapping[ot]; + if (AATMapping[aat[0]] == null) { + AATMapping[aat[0]] = {}; + } + + AATMapping[aat[0]][aat[1]] = ot; +} + +// Maps an array of OpenType features to AAT features +// in the form of {featureType:{featureSetting:true}} +export function mapOTToAAT(features) { + let res = {}; + for (let k in features) { + let r; + if (r = OTMapping[k]) { + if (res[r[0]] == null) { + res[r[0]] = {}; + } + + res[r[0]][r[1]] = features[k]; + } + } + + return res; +} + +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) { + var typeCode = features[type] && features[type].code; + } else { + var typeCode = type; + } + + if (isNaN(setting)) { + var settingCode = features[type] && features[type][setting]; + } else { + var settingCode = setting; + } + + return [typeCode, settingCode]; +} + +// Maps AAT features to an array of OpenType features +// Supports both arrays in the form of [[featureType, featureSetting]] +// and objects in the form of {featureType:{featureSetting:true}} +// featureTypes and featureSettings can be either strings or number codes +export function mapAATToOT(features) { + let res = {}; + if (Array.isArray(features)) { + for (let k = 0; k < features.length; k++) { + let r; + let f = mapFeatureStrings(features[k]); + if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) { + res[r] = true; + } + } + + } else if (typeof features === 'object') { + for (let type in features) { + let feature = features[type]; + for (let setting in feature) { + let r; + let f = mapFeatureStrings([type, setting]); + if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) { + res[r] = true; + } + } + } + } + + return Object.keys(res); +} diff --git a/node_modules/fontkit/src/aat/AATLayoutEngine.js b/node_modules/fontkit/src/aat/AATLayoutEngine.js new file mode 100644 index 0000000..1097e4a --- /dev/null +++ b/node_modules/fontkit/src/aat/AATLayoutEngine.js @@ -0,0 +1,49 @@ +import * as AATFeatureMap from './AATFeatureMap'; +import * as Script from '../layout/Script'; +import AATMorxProcessor from './AATMorxProcessor'; + +export default class AATLayoutEngine { + constructor(font) { + this.font = font; + this.morxProcessor = new AATMorxProcessor(font); + this.fallbackPosition = false; + } + + substitute(glyphRun) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + } + + this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features)); + } + + getAvailableFeatures(script, language) { + return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures()); + } + + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + + for (let glyphs of glyphStrings) { + this._addStrings(glyphs, 0, result, ''); + } + + return result; + } + + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + + for (let codePoint of codePoints) { + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) { + this._addStrings(glyphs, index + 1, strings, s); + } else { + strings.add(s); + } + } + } +} diff --git a/node_modules/fontkit/src/aat/AATLookupTable.js b/node_modules/fontkit/src/aat/AATLookupTable.js new file mode 100644 index 0000000..74f764c --- /dev/null +++ b/node_modules/fontkit/src/aat/AATLookupTable.js @@ -0,0 +1,125 @@ +import {cache} from '../decorators'; +import {range} from '../utils'; + +export default class AATLookupTable { + constructor(table) { + this.table = table; + } + + lookup(glyph) { + switch (this.table.version) { + case 0: // simple array format + return this.table.values.getItem(glyph); + + case 2: // segment format + case 4: { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + + while (min <= max) { + var mid = (min + max) >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.firstGlyph === 0xffff) { + return null; + } + + if (glyph < seg.firstGlyph) { + max = mid - 1; + } else if (glyph > seg.lastGlyph) { + min = mid + 1; + } else { + if (this.table.version === 2) { + return seg.value; + } else { + return seg.values[glyph - seg.firstGlyph]; + } + } + } + + return null; + } + + case 6: { // lookup single + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + + while (min <= max) { + var mid = (min + max) >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.glyph === 0xffff) { + return null; + } + + if (glyph < seg.glyph) { + max = mid - 1; + } else if (glyph > seg.glyph) { + min = mid + 1; + } else { + return seg.value; + } + } + + return null; + } + + case 8: // lookup trimmed + return this.table.values[glyph - this.table.firstGlyph]; + + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + + @cache + glyphsForValue(classValue) { + let res = []; + + switch (this.table.version) { + case 2: // segment format + case 4: { + for (let segment of this.table.segments) { + if ((this.table.version === 2 && segment.value === classValue)) { + res.push(...range(segment.firstGlyph, segment.lastGlyph + 1)); + } else { + for (let index = 0; index < segment.values.length; index++) { + if (segment.values[index] === classValue) { + res.push(segment.firstGlyph + index); + } + } + } + } + + break; + } + + case 6: { // lookup single + for (let segment of this.table.segments) { + if (segment.value === classValue) { + res.push(segment.glyph); + } + } + + break; + } + + case 8: { // lookup trimmed + for (let i = 0; i < this.table.values.length; i++) { + if (this.table.values[i] === classValue) { + res.push(this.table.firstGlyph + i); + } + } + + break; + } + + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + + return res; + } +} diff --git a/node_modules/fontkit/src/aat/AATMorxProcessor.js b/node_modules/fontkit/src/aat/AATMorxProcessor.js new file mode 100644 index 0000000..94744e1 --- /dev/null +++ b/node_modules/fontkit/src/aat/AATMorxProcessor.js @@ -0,0 +1,430 @@ +import AATStateMachine from './AATStateMachine'; +import AATLookupTable from './AATLookupTable'; +import {cache} from '../decorators'; + +// indic replacement flags +const MARK_FIRST = 0x8000; +const MARK_LAST = 0x2000; +const VERB = 0x000F; + +// contextual substitution and glyph insertion flag +const SET_MARK = 0x8000; + +// ligature entry flags +const SET_COMPONENT = 0x8000; +const PERFORM_ACTION = 0x2000; + +// ligature action masks +const LAST_MASK = 0x80000000; +const STORE_MASK = 0x40000000; +const OFFSET_MASK = 0x3FFFFFFF; + +const VERTICAL_ONLY = 0x800000; +const REVERSE_DIRECTION = 0x400000; +const HORIZONTAL_AND_VERTICAL = 0x200000; + +// glyph insertion flags +const CURRENT_IS_KASHIDA_LIKE = 0x2000; +const MARKED_IS_KASHIDA_LIKE = 0x1000; +const CURRENT_INSERT_BEFORE = 0x0800; +const MARKED_INSERT_BEFORE = 0x0400; +const CURRENT_INSERT_COUNT = 0x03E0; +const MARKED_INSERT_COUNT = 0x001F; + +export default class AATMorxProcessor { + constructor(font) { + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } + + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:boolean}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains) { + let flags = chain.defaultFlags; + + // enable/disable the requested features + for (let feature of chain.features) { + let f; + if (f = features[feature.featureType]) { + if (f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } else if (f[feature.featureSetting] === false) { + flags |= ~feature.disableFlags; + flags &= ~feature.enableFlags; + } + } + } + + for (let subtable of chain.subtables) { + if (subtable.subFeatureFlags & flags) { + this.processSubtable(subtable, glyphs); + } + } + } + + // remove deleted glyphs + let index = glyphs.length - 1; + while (index >= 0) { + if (glyphs[index].id === 0xffff) { + glyphs.splice(index, 1); + } + + index--; + } + + return glyphs; + } + + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + + let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + + @cache + getStateMachine(subtable) { + return new AATStateMachine(subtable.table.stateTable); + } + + getProcessor() { + switch (this.subtable.type) { + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + + processIndicRearragement(glyph, entry, index) { + if (entry.flags & MARK_FIRST) { + this.firstGlyph = index; + } + + if (entry.flags & MARK_LAST) { + this.lastGlyph = index; + } + + reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph); + } + + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new AATLookupTable(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new AATLookupTable(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.flags & SET_MARK) { + this.markedGlyph = index; + } + } + + processLigature(glyph, entry, index) { + if (entry.flags & SET_COMPONENT) { + this.ligatureStack.push(index); + } + + if (entry.flags & PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + + while (!last) { + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + + let action = actions.getItem(actionIndex++); + last = !!(action & LAST_MASK); + let store = !!(action & STORE_MASK); + let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + + let component = components.getItem(offset); + ligatureIndex += component; + + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else { + this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + } + + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new AATLookupTable(subtable.table.lookupTable); + + for (index = 0; index < glyphs.length; index++) { + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) { // 0 means do nothing + glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + } + + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while (count--) { + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + + if (!isBefore) { + glyphIndex++; + } + + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & SET_MARK) { + this.markedIndex = index; + } + + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains) { + for (let feature of chain.features) { + features.push([feature.featureType, feature.featureSetting]); + } + } + + return features; + } + + generateInputs(gid) { + if (!this.inputCache) { + this.generateInputCache(); + } + + return this.inputCache[gid] || []; + } + + generateInputCache() { + this.inputCache = {}; + + for (let chain of this.morx.chains) { + let flags = chain.defaultFlags; + + for (let subtable of chain.subtables) { + if (subtable.subFeatureFlags & flags) { + this.generateInputsForSubtable(subtable); + } + } + } + } + + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) { + return; + } + + let reverse = !!(subtable.coverage & REVERSE_DIRECTION); + if (reverse) { + throw new Error('Reverse subtable, not supported.'); + } + + this.subtable = subtable; + this.ligatureStack = []; + + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + + let input = []; + let stack = []; + this.glyphs = []; + + stateMachine.traverse({ + enter: (glyph, entry) => { + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for (let i = 0; i < glyphs.length && count <= 1; i++) { + if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + } + + if (count === 1) { + let result = input.map(g => g.id); + let cache = this.inputCache[found]; + if (cache) { + cache.push(result); + } else { + this.inputCache[found] = [result]; + } + } + }, + + exit: () => { + ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop()); + input.pop(); + } + }); + } +} + +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) { + end.reverse(); + } + + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) { + start.reverse(); + } + + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} + +function reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch (verb) { + case 0: // no change + return glyphs; + + case 1: // Ax => xA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]); + + case 2: // xD => Dx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]); + + case 3: // AxD => DxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]); + + case 4: // ABx => xAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]); + + case 5: // ABx => xBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false); + + case 6: // xCD => CDx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]); + + case 7: // xCD => DCx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true); + + case 8: // AxCD => CDxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]); + + case 9: // AxCD => DCxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true); + + case 10: // ABxD => DxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]); + + case 11: // ABxD => DxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false); + + case 12: // ABxCD => CDxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]); + + case 13: // ABxCD => CDxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false); + + case 14: // ABxCD => DCxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true); + + case 15: // ABxCD => DCxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true); + + default: + throw new Error(`Unknown verb: ${verb}`); + } +} diff --git a/node_modules/fontkit/src/aat/AATStateMachine.js b/node_modules/fontkit/src/aat/AATStateMachine.js new file mode 100644 index 0000000..77d31ef --- /dev/null +++ b/node_modules/fontkit/src/aat/AATStateMachine.js @@ -0,0 +1,96 @@ +import AATLookupTable from './AATLookupTable'; + +const START_OF_TEXT_STATE = 0; +const START_OF_LINE_STATE = 1; + +const END_OF_TEXT_CLASS = 0; +const OUT_OF_BOUNDS_CLASS = 1; +const DELETED_GLYPH_CLASS = 2; +const END_OF_LINE_CLASS = 3; + +const DONT_ADVANCE = 0x4000; + +export default class AATStateMachine { + constructor(stateTable) { + this.stateTable = stateTable; + this.lookupTable = new AATLookupTable(stateTable.classTable); + } + + process(glyphs, reverse, processEntry) { + let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + + while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) { + let glyph = null; + let classCode = OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + + if (index === glyphs.length || index === -1) { + classCode = END_OF_TEXT_CLASS; + } else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) { // deleted glyph + classCode = DELETED_GLYPH_CLASS; + } else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) { + classCode = OUT_OF_BOUNDS_CLASS; + } + } + } + + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + + if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & DONT_ADVANCE); + } + + currentState = entry.newState; + if (shouldAdvance) { + index += dir; + } + } + + return glyphs; + } + + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ + traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) { + return; + } + + visited.add(state); + + let {nClasses, stateArray, entryTable} = this.stateTable; + let row = stateArray.getItem(state); + + // Skip predefined classes + for (let classCode = 4; classCode < nClasses; classCode++) { + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)) { + if (opts.enter) { + opts.enter(glyph, entry); + } + + if (entry.newState !== 0) { + this.traverse(opts, entry.newState, visited); + } + + if (opts.exit) { + opts.exit(glyph, entry); + } + } + } + } +} diff --git a/node_modules/fontkit/src/base.js b/node_modules/fontkit/src/base.js new file mode 100644 index 0000000..1f9d40b --- /dev/null +++ b/node_modules/fontkit/src/base.js @@ -0,0 +1,29 @@ +import {DecodeStream} from 'restructure'; + +export let logErrors = false; + +let formats = []; +export function registerFormat(format) { + formats.push(format); +}; + +export function create(buffer, postscriptName) { + for (let i = 0; i < formats.length; i++) { + let format = formats[i]; + if (format.probe(buffer)) { + let font = new format(new DecodeStream(buffer)); + if (postscriptName) { + return font.getFont(postscriptName); + } + + return font; + } + } + + throw new Error('Unknown font format'); +}; + +export let defaultLanguage = 'en'; +export function setDefaultLanguage(lang = 'en') { + defaultLanguage = lang; +}; diff --git a/node_modules/fontkit/src/cff/CFFCharsets.js b/node_modules/fontkit/src/cff/CFFCharsets.js new file mode 100644 index 0000000..b7a9874 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFCharsets.js @@ -0,0 +1,99 @@ +export let ISOAdobeCharset = [ + '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', + 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', + 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', + 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', + 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', + 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', + 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', + 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', + 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', + 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', + 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', + 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', + 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', + 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', + 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', + 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', + 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', + 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', + 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', + 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', + 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', + 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', + 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', + 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', + 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', + 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', + 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', + 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', + 'ugrave', 'yacute', 'ydieresis', 'zcaron' +]; + +export let ExpertCharset = [ + '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', + 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', + 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', + 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', + 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', + 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', + 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', + 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', + 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', + 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', + 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', + 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', + 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', + 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', + 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', + 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', + 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', + 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', + 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', + 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', + 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', + 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', + 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', + 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', + 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', + 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', + 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', + 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', + 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', + 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', + 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', + 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', + 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', + 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', + 'Ydieresissmall' +]; + +export let ExpertSubsetCharset = [ + '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', + 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', + 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', + 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', + 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', + 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', + 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', + 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', + 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', + 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', + 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', + 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', + 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', + 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', + 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', + 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', + 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', + 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', + 'periodinferior', 'commainferior' +]; diff --git a/node_modules/fontkit/src/cff/CFFDict.js b/node_modules/fontkit/src/cff/CFFDict.js new file mode 100644 index 0000000..569c106 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFDict.js @@ -0,0 +1,167 @@ +import isEqual from 'fast-deep-equal'; +import * as r from 'restructure'; +import CFFOperand from './CFFOperand'; +import { PropertyDescriptor } from 'restructure'; + +export default class CFFDict { + constructor(ops = []) { + this.ops = ops; + this.fields = {}; + for (let field of ops) { + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } + + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) { + return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op])); + } else if (type.decode != null) { + return type.decode(stream, ret, operands); + } else { + switch (type) { + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + } + + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) { + return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]); + } else if (type.encode != null) { + return type.encode(stream, operands, ctx); + } else if (typeof operands === 'number') { + return [operands]; + } else if (typeof operands === 'boolean') { + return [+operands]; + } else if (Array.isArray(operands)) { + return operands; + } else { + return [operands]; + } + } + + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + + // define hidden properties + Object.defineProperties(ret, { + parent: { value: parent }, + _startOffset: { value: stream.pos } + }); + + // fill in defaults + for (let key in this.fields) { + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + + while (stream.pos < end) { + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) { + b = (b << 8) | stream.readUInt8(); + } + + let field = this.fields[b]; + if (!field) { + throw new Error(`Unknown operator ${b}`); + } + + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof PropertyDescriptor) { + Object.defineProperty(ret, field[1], val); + } else { + ret[field[1]] = val; + } + } + + operands = []; + } else { + operands.push(CFFOperand.decode(stream, b)); + } + } + + return ret; + } + + size(dict, parent, includePointers = true) { + let ctx = { + parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + + let len = 0; + + for (let k in this.fields) { + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands) { + len += CFFOperand.size(op); + } + + let key = Array.isArray(field[0]) ? field[0] : [field[0]]; + len += key.length; + } + + if (includePointers) { + len += ctx.pointerSize; + } + + return len; + } + + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent, + val: dict, + pointerSize: 0 + }; + + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + + for (let field of this.ops) { + let val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands) { + CFFOperand.encode(stream, op); + } + + let key = Array.isArray(field[0]) ? field[0] : [field[0]]; + for (let op of key) { + stream.writeUInt8(op); + } + } + + let i = 0; + while (i < ctx.pointers.length) { + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + + return; + } +} diff --git a/node_modules/fontkit/src/cff/CFFEncodings.js b/node_modules/fontkit/src/cff/CFFEncodings.js new file mode 100644 index 0000000..5465bb4 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFEncodings.js @@ -0,0 +1,48 @@ +export let StandardEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', + 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', + 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', + 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', + 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', + 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', + 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', + 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', + 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', + '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', + 'lslash', 'oslash', 'oe', 'germandbls' +]; + +export let ExpertEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', + 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', + 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', + 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', + 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', + 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', + 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', + 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', + 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', + 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', + 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', + 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', + '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', + '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', + 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', + 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', + 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', + 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', + 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', + 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', + 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall' +]; diff --git a/node_modules/fontkit/src/cff/CFFFont.js b/node_modules/fontkit/src/cff/CFFFont.js new file mode 100644 index 0000000..c6c6809 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFFont.js @@ -0,0 +1,159 @@ +import * as r from 'restructure'; +import CFFIndex from './CFFIndex'; +import CFFTop from './CFFTop'; +import CFFPrivateDict from './CFFPrivateDict'; +import standardStrings from './CFFStandardStrings'; + +class CFFFont { + constructor(stream) { + this.stream = stream; + this.decode(); + } + + static decode(stream) { + return new CFFFont(stream); + } + + decode() { + let start = this.stream.pos; + let top = CFFTop.decode(this.stream); + for (let key in top) { + let val = top[key]; + this[key] = val; + } + + if (this.version < 2) { + if (this.topDictIndex.length !== 1) { + throw new Error("Only a single font is allowed in CFF"); + } + + this.topDict = this.topDictIndex[0]; + } + + this.isCIDFont = this.topDict.ROS != null; + return this; + } + + string(sid) { + if (this.version >= 2) { + return null; + } + + if (sid < standardStrings.length) { + return standardStrings[sid]; + } + + return this.stringIndex[sid - standardStrings.length]; + } + + get postscriptName() { + if (this.version < 2) { + return this.nameIndex[0]; + } + + return null; + } + + get fullName() { + return this.string(this.topDict.FullName); + } + + get familyName() { + return this.string(this.topDict.FamilyName); + } + + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) { + return null; + } + + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) { + return null; + } + + let { charset } = this.topDict; + if (Array.isArray(charset)) { + return charset[gid]; + } + + if (gid === 0) { + return '.notdef'; + } + + gid -= 1; + + switch (charset.version) { + case 0: + return this.string(charset.glyphs[gid]); + + case 1: + case 2: + for (let i = 0; i < charset.ranges.length; i++) { + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) { + return this.string(range.first + (gid - range.offset)); + } + } + break; + } + + return null; + } + + fdForGlyph(gid) { + if (!this.topDict.FDSelect) { + return null; + } + + switch (this.topDict.FDSelect.version) { + case 0: + return this.topDict.FDSelect.fds[gid]; + + case 3: + case 4: + let { ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + + while (low <= high) { + let mid = (low + high) >> 1; + + if (gid < ranges[mid].first) { + high = mid - 1; + } else if (mid < high && gid >= ranges[mid + 1].first) { + low = mid + 1; + } else { + return ranges[mid].fd; + } + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) { + return this.topDict.FDArray[fd].Private; + } + + return null; + } + + if (this.version < 2) { + return this.topDict.Private; + } + + return this.topDict.FDArray[0].Private; + } +} + +export default CFFFont; diff --git a/node_modules/fontkit/src/cff/CFFIndex.js b/node_modules/fontkit/src/cff/CFFIndex.js new file mode 100644 index 0000000..fea5eaf --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFIndex.js @@ -0,0 +1,150 @@ +import * as r from 'restructure'; + +export default class CFFIndex { + constructor(type) { + this.type = type; + } + + getCFFVersion(ctx) { + while (ctx && !ctx.hdrSize) { + ctx = ctx.parent; + } + + return ctx ? ctx.version : -1; + } + + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 + ? stream.readUInt32BE() + : stream.readUInt16BE(); + + if (count === 0) { + return []; + } + + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) { + offsetType = r.uint8; + } else if (offSize === 2) { + offsetType = r.uint16; + } else if (offSize === 3) { + offsetType = r.uint24; + } else if (offSize === 4) { + offsetType = r.uint32; + } else { + throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + } + + let ret = []; + let startPos = stream.pos + ((count + 1) * offSize) - 1; + + let start = offsetType.decode(stream); + for (let i = 0; i < count; i++) { + let end = offsetType.decode(stream); + + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else { + ret.push({ + offset: startPos + start, + length: end - start + }); + } + + start = end; + } + + stream.pos = startPos + start; + return ret; + } + + size(arr, parent) { + let size = 2; + if (arr.length === 0) { + return size; + } + + let type = this.type || new r.Buffer; + + // find maximum offset to detminine offset type + let offset = 1; + for (let i = 0; i < arr.length; i++) { + let item = arr[i]; + offset += type.size(item, parent); + } + + let offsetType; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + + return size; + } + + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) { + return; + } + + let type = this.type || new r.Buffer; + + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr) { + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + + let offsetType; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + // write offset size + stream.writeUInt8(offsetType.size()); + + // write elements + offset = 1; + offsetType.encode(stream, offset); + + for (let size of sizes) { + offset += size; + offsetType.encode(stream, offset); + } + + for (let item of arr) { + type.encode(stream, item, parent); + } + + return; + } +} diff --git a/node_modules/fontkit/src/cff/CFFOperand.js b/node_modules/fontkit/src/cff/CFFOperand.js new file mode 100644 index 0000000..28f858c --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFOperand.js @@ -0,0 +1,134 @@ +const FLOAT_EOF = 0xf; +const FLOAT_LOOKUP = [ + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '.', 'E', 'E-', null, '-' +]; + +const FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; + +export default class CFFOperand { + static decode(stream, value) { + if (32 <= value && value <= 246) { + return value - 139; + } + + if (247 <= value && value <= 250) { + return (value - 247) * 256 + stream.readUInt8() + 108; + } + + if (251 <= value && value <= 254) { + return -(value - 251) * 256 - stream.readUInt8() - 108; + } + + if (value === 28) { + return stream.readInt16BE(); + } + + if (value === 29) { + return stream.readInt32BE(); + } + + if (value === 30) { + let str = ''; + while (true) { + let b = stream.readUInt8(); + + let n1 = b >> 4; + if (n1 === FLOAT_EOF) { break; } + str += FLOAT_LOOKUP[n1]; + + let n2 = b & 15; + if (n2 === FLOAT_EOF) { break; } + str += FLOAT_LOOKUP[n2]; + } + + return parseFloat(str); + } + + return null; + } + + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) { + value = 32768; + } + + if ((value | 0) !== value) { // floating point + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + + } else if (-107 <= value && value <= 107) { + return 1; + + } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) { + return 2; + + } else if (-32768 <= value && value <= 32767) { + return 3; + + } else { + return 5; + } + } + + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + + } else if ((val | 0) !== val) { // floating point + stream.writeUInt8(30); + + let str = '' + val; + for (let i = 0; i < str.length; i += 2) { + let c1 = str[i]; + let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1; + + if (i === str.length - 1) { + var n2 = FLOAT_EOF; + } else { + let c2 = str[i + 1]; + var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + + stream.writeUInt8((n1 << 4) | (n2 & 15)); + } + + if (n2 !== FLOAT_EOF) { + return stream.writeUInt8((FLOAT_EOF << 4)); + } + + } else if (-107 <= val && val <= 107) { + return stream.writeUInt8(val + 139); + + } else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} diff --git a/node_modules/fontkit/src/cff/CFFPointer.js b/node_modules/fontkit/src/cff/CFFPointer.js new file mode 100644 index 0000000..771e834 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFPointer.js @@ -0,0 +1,50 @@ +import * as r from 'restructure'; + +export default class CFFPointer extends r.Pointer { + constructor(type, options = {}) { + if (options.type == null) { + options.type = 'global'; + } + + super(null, type, options); + } + + decode(stream, parent, operands) { + this.offsetType = { + decode: () => operands[0] + }; + + return super.decode(stream, parent, operands); + } + + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: () => 0 + }; + + this.size(value, ctx); + return [new Ptr(0)]; + } + + let ptr = null; + this.offsetType = { + encode: (stream, val) => ptr = val + }; + + super.encode(stream, value, ctx); + return [new Ptr(ptr)]; + } +} + +class Ptr { + constructor(val) { + this.val = val; + this.forceLarge = true; + } + + valueOf() { + return this.val; + } +} diff --git a/node_modules/fontkit/src/cff/CFFPrivateDict.js b/node_modules/fontkit/src/cff/CFFPrivateDict.js new file mode 100644 index 0000000..59fcab6 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFPrivateDict.js @@ -0,0 +1,39 @@ +import CFFDict from './CFFDict'; +import CFFIndex from './CFFIndex'; +import CFFPointer from './CFFPointer'; + +class CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while (operands.length > numBlends) { + operands.pop(); + } + } +} + +export default new CFFDict([ + // key name type default + [6, 'BlueValues', 'delta', null], + [7, 'OtherBlues', 'delta', null], + [8, 'FamilyBlues', 'delta', null], + [9, 'FamilyOtherBlues', 'delta', null], + [[12, 9], 'BlueScale', 'number', 0.039625], + [[12, 10], 'BlueShift', 'number', 7], + [[12, 11], 'BlueFuzz', 'number', 1], + [10, 'StdHW', 'number', null], + [11, 'StdVW', 'number', null], + [[12, 12], 'StemSnapH', 'delta', null], + [[12, 13], 'StemSnapV', 'delta', null], + [[12, 14], 'ForceBold', 'boolean', false], + [[12, 17], 'LanguageGroup', 'number', 0], + [[12, 18], 'ExpansionFactor', 'number', 0.06], + [[12, 19], 'initialRandomSeed', 'number', 0], + [20, 'defaultWidthX', 'number', 0], + [21, 'nominalWidthX', 'number', 0], + [22, 'vsindex', 'number', 0], + [23, 'blend', CFFBlendOp, null], + [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null] +]); diff --git a/node_modules/fontkit/src/cff/CFFStandardStrings.js b/node_modules/fontkit/src/cff/CFFStandardStrings.js new file mode 100644 index 0000000..b5d5956 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFStandardStrings.js @@ -0,0 +1,71 @@ +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +export default [ + ".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", + "percent", "ampersand", "quoteright", "parenleft", "parenright", + "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", + "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", + "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", + "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", + "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", + "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", + "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", + "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", + "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", + "florin", "section", "currency", "quotesingle", "quotedblleft", + "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", + "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", + "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", + "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", + "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", + "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", + "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", + "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", + "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", + "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", + "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", + "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", + "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", + "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", + "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", + "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", + "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", + "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", + "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", + "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", + "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", + "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", + "parenleftsuperior", "parenrightsuperior", "twodotenleader", + "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", + "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", + "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", + "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", + "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", + "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", + "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", + "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", + "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", + "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", + "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", + "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", + "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", + "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", + "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", + "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", + "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", + "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", + "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", + "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", + "threeinferior", "fourinferior", "fiveinferior", "sixinferior", + "seveninferior", "eightinferior", "nineinferior", "centinferior", + "dollarinferior", "periodinferior", "commainferior", "Agravesmall", + "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", + "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", + "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", + "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", + "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", + "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", + "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", + "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", + "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold" +]; diff --git a/node_modules/fontkit/src/cff/CFFTop.js b/node_modules/fontkit/src/cff/CFFTop.js new file mode 100644 index 0000000..efdba72 --- /dev/null +++ b/node_modules/fontkit/src/cff/CFFTop.js @@ -0,0 +1,237 @@ +import * as r from 'restructure'; +import { resolveLength } from 'restructure'; +import CFFDict from './CFFDict'; +import CFFIndex from './CFFIndex'; +import CFFPointer from './CFFPointer'; +import CFFPrivateDict from './CFFPrivateDict'; +import StandardStrings from './CFFStandardStrings'; +import { StandardEncoding, ExpertEncoding } from './CFFEncodings'; +import { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets'; +import { ItemVariationStore } from '../tables/variations'; + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class PredefinedOp { + constructor(predefinedOps, type) { + this.predefinedOps = predefinedOps; + this.type = type; + } + + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) { + return this.predefinedOps[operands[0]]; + } + + return this.type.decode(stream, parent, operands); + } + + size(value, ctx) { + return this.type.size(value, ctx); + } + + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) { + return index; + } + + return this.type.encode(stream, value, ctx); + } +} + +class CFFEncodingVersion extends r.Number { + constructor() { + super('UInt8'); + } + + decode(stream) { + return r.uint8.decode(stream) & 0x7f; + } +} + +let Range1 = new r.Struct({ + first: r.uint16, + nLeft: r.uint8 +}); + +let Range2 = new r.Struct({ + first: r.uint16, + nLeft: r.uint16 +}); + +let CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), { + 0: { + nCodes: r.uint8, + codes: new r.Array(r.uint8, 'nCodes') + }, + + 1: { + nRanges: r.uint8, + ranges: new r.Array(Range1, 'nRanges') + } + + // TODO: supplement? +}); + +let CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true })); + +// Decodes an array of ranges until the total +// length is equal to the provided length. +class RangeArray extends r.Array { + decode(stream, parent) { + let length = resolveLength(this.length, stream, parent); + let count = 0; + let res = []; + while (count < length) { + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + + return res; + } +} + +let CFFCustomCharset = new r.VersionedStruct(r.uint8, { + 0: { + glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1) + }, + + 1: { + ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1) + }, + + 2: { + ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1) + } +}); + +let CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true})); + +let FDRange3 = new r.Struct({ + first: r.uint16, + fd: r.uint8 +}); + +let FDRange4 = new r.Struct({ + first: r.uint32, + fd: r.uint16 +}); + +let FDSelect = new r.VersionedStruct(r.uint8, { + 0: { + fds: new r.Array(r.uint8, t => t.parent.CharStrings.length) + }, + + 3: { + nRanges: r.uint16, + ranges: new r.Array(FDRange3, 'nRanges'), + sentinel: r.uint16 + }, + + 4: { + nRanges: r.uint32, + ranges: new r.Array(FDRange4, 'nRanges'), + sentinel: r.uint32 + } +}); + +let ptr = new CFFPointer(CFFPrivateDict); +class CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return ptr.decode(stream, parent, [operands[1]]); + } + + size(dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]]; + } + + encode(stream, dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]]; + } +} + +let FontDict = new CFFDict([ + // key name type(s) default + [18, 'Private', new CFFPrivateOp, null], + [[12, 38], 'FontName', 'sid', null], + [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], + [[12, 5], 'PaintType', 'number', 0], +]); + +let CFFTopDict = new CFFDict([ + // key name type(s) default + [[12, 30], 'ROS', ['sid', 'sid', 'number'], null], + + [0, 'version', 'sid', null], + [1, 'Notice', 'sid', null], + [[12, 0], 'Copyright', 'sid', null], + [2, 'FullName', 'sid', null], + [3, 'FamilyName', 'sid', null], + [4, 'Weight', 'sid', null], + [[12, 1], 'isFixedPitch', 'boolean', false], + [[12, 2], 'ItalicAngle', 'number', 0], + [[12, 3], 'UnderlinePosition', 'number', -100], + [[12, 4], 'UnderlineThickness', 'number', 50], + [[12, 5], 'PaintType', 'number', 0], + [[12, 6], 'CharstringType', 'number', 2], + [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], + [13, 'UniqueID', 'number', null], + [5, 'FontBBox', 'array', [0, 0, 0, 0]], + [[12, 8], 'StrokeWidth', 'number', 0], + [14, 'XUID', 'array', null], + [15, 'charset', CFFCharset, ISOAdobeCharset], + [16, 'Encoding', CFFEncoding, StandardEncoding], + [17, 'CharStrings', new CFFPointer(new CFFIndex), null], + [18, 'Private', new CFFPrivateOp, null], + [[12, 20], 'SyntheticBase', 'number', null], + [[12, 21], 'PostScript', 'sid', null], + [[12, 22], 'BaseFontName', 'sid', null], + [[12, 23], 'BaseFontBlend', 'delta', null], + + // CID font specific + [[12, 31], 'CIDFontVersion', 'number', 0], + [[12, 32], 'CIDFontRevision', 'number', 0], + [[12, 33], 'CIDFontType', 'number', 0], + [[12, 34], 'CIDCount', 'number', 8720], + [[12, 35], 'UIDBase', 'number', null], + [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], + [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], + [[12, 38], 'FontName', 'sid', null] +]); + +let VariationStore = new r.Struct({ + length: r.uint16, + itemVariationStore: ItemVariationStore +}) + +let CFF2TopDict = new CFFDict([ + [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], + [17, 'CharStrings', new CFFPointer(new CFFIndex), null], + [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], + [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], + [24, 'vstore', new CFFPointer(VariationStore), null], + [25, 'maxstack', 'number', 193] +]); + +let CFFTop = new r.VersionedStruct(r.fixed16, { + 1: { + hdrSize: r.uint8, + offSize: r.uint8, + nameIndex: new CFFIndex(new r.String('length')), + topDictIndex: new CFFIndex(CFFTopDict), + stringIndex: new CFFIndex(new r.String('length')), + globalSubrIndex: new CFFIndex + }, + + 2: { + hdrSize: r.uint8, + length: r.uint16, + topDict: CFF2TopDict, + globalSubrIndex: new CFFIndex + } +}); + +export default CFFTop; diff --git a/node_modules/fontkit/src/decorators.js b/node_modules/fontkit/src/decorators.js new file mode 100644 index 0000000..ce0d90b --- /dev/null +++ b/node_modules/fontkit/src/decorators.js @@ -0,0 +1,36 @@ +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ +export function cache(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { value }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + + return { + get() { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) { + return cache.get(key); + } + + let result = fn.apply(this, args); + cache.set(key, result); + return result; + }; + + Object.defineProperty(this, key, {value: memoized}); + return memoized; + } + }; + } +} diff --git a/node_modules/fontkit/src/encodings.js b/node_modules/fontkit/src/encodings.js new file mode 100644 index 0000000..83b785e --- /dev/null +++ b/node_modules/fontkit/src/encodings.js @@ -0,0 +1,219 @@ +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ +export function getEncoding(platformID, encodingID, languageID = 0) { + if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) { + return MAC_LANGUAGE_ENCODINGS[languageID]; + } + + return ENCODINGS[platformID][encodingID]; +} + +const SINGLE_BYTE_ENCODINGS = new Set(['x-mac-roman', 'x-mac-cyrillic', 'iso-8859-6', 'iso-8859-8']); +const MAC_ENCODINGS = { + 'x-mac-croatian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ', + 'x-mac-gaelic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ', + 'x-mac-greek': 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\u00AD', + 'x-mac-icelandic': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-inuit': 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł', + 'x-mac-ce': 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ', + 'x-mac-romanian': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-turkish': 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ' +}; + +const encodingCache = new Map(); + +export function getEncodingMapping(encoding) { + let cached = encodingCache.get(encoding); + if (cached) { + return cached; + } + + // These encodings aren't supported by TextDecoder. + let mapping = MAC_ENCODINGS[encoding]; + if (mapping) { + let res = new Map(); + for (let i = 0; i < mapping.length; i++) { + res.set(mapping.charCodeAt(i), 0x80 + i); + } + + encodingCache.set(encoding, res); + return res; + } + + // Only single byte encodings can be mapped 1:1. + if (SINGLE_BYTE_ENCODINGS.has(encoding)) { + // TextEncoder only supports utf8, whereas TextDecoder supports legacy encodings. + // Use this to create a mapping of code points. + let decoder = new TextDecoder(encoding); + let mapping = new Uint8Array(0x80); + for (let i = 0; i < 0x80; i++) { + mapping[i] = 0x80 + i; + } + + let res = new Map(); + let s = decoder.decode(mapping); + for (let i = 0; i < 0x80; i++) { + res.set(s.charCodeAt(i), 0x80 + i); + } + + encodingCache.set(encoding, res); + return res; + } +} + +// Map of platform ids to encoding ids. +export const ENCODINGS = [ + // unicode + ['utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be', 'utf-16be'], + + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + ['x-mac-roman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8', + 'x-mac-greek', 'x-mac-cyrillic', 'x-mac-symbol', 'x-mac-devanagari', 'x-mac-gurmukhi', 'x-mac-gujarati', + 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese', + 'Burmese', 'Khmer', 'iso-8859-11', 'Laotian', 'Georgian', 'Armenian', 'gbk', + 'Tibetan', 'Mongolian', 'Geez', 'x-mac-ce', 'Vietnamese', 'Sindhi'], + + // ISO (deprecated) + ['ascii', null, 'iso-8859-1'], + + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + ['symbol', 'utf-16be', 'shift-jis', 'gb18030', 'big5', 'euc-kr', 'johab', null, null, null, 'utf-16be'] +]; + +// Overrides for Mac scripts by language id. +// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +export const MAC_LANGUAGE_ENCODINGS = { + 15: 'x-mac-icelandic', + 17: 'x-mac-turkish', + 18: 'x-mac-croatian', + 24: 'x-mac-ce', + 25: 'x-mac-ce', + 26: 'x-mac-ce', + 27: 'x-mac-ce', + 28: 'x-mac-ce', + 30: 'x-mac-icelandic', + 37: 'x-mac-romanian', + 38: 'x-mac-ce', + 39: 'x-mac-ce', + 40: 'x-mac-ce', + 143: 'x-mac-inuit', + 146: 'x-mac-gaelic' +}; + +// Map of platform ids to BCP-47 language codes. +export const LANGUAGES = [ + // unicode + [], + + { // macintosh + 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw', + 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn', + 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny', + 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg', + 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo', + 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy', + 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu', + 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca', + 8: 'pt', 38: 'cz', 68: 'as', 131: 'la', + 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu', + 10: 'he', 40: 'si', 70: 'pa', 133: 'gn', + 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay', + 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt', + 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug', + 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz', + 15: 'is', 45: 'uk', 75: 'te', 138: 'jv', + 16: 'mt', 46: 'be', 76: 'si', 139: 'su', + 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl', + 18: 'hr', 48: 'kk', 78: 'km', 141: 'af', + 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br', + 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu', + 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd', + 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv', + 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga', + 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to', + 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton', + 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl', + 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az', + 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn', + 29: 'se', 59: 'ps', 89: 'sw', + }, + + // ISO (deprecated) + [], + + { // windows + 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', + 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', + 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', + 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', + 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', + 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', + 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', + 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', + 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', + 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', + 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', + 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', + 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', + 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', + 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', + 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', + 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', + 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', + 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', + 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', + 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', + 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', + 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', + 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', + 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', + 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', + 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', + 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', + 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', + 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', + 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', + 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', + 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', + 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', + 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', + 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', + 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', + 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', + 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', + 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', + 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', + 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', + 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', + 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', + 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', + 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', + 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', + } +]; diff --git a/node_modules/fontkit/src/fs.js b/node_modules/fontkit/src/fs.js new file mode 100644 index 0000000..5dab995 --- /dev/null +++ b/node_modules/fontkit/src/fs.js @@ -0,0 +1,17 @@ +import { create } from './base'; +import fs from 'fs'; + +export function openSync(filename, postscriptName) { + let buffer = fs.readFileSync(filename); + return create(buffer, postscriptName); +} + +export async function open(filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + + let buffer = await fs.promises.readFile(filename); + return create(buffer, postscriptName); +} diff --git a/node_modules/fontkit/src/glyph/BBox.js b/node_modules/fontkit/src/glyph/BBox.js new file mode 100644 index 0000000..bba7237 --- /dev/null +++ b/node_modules/fontkit/src/glyph/BBox.js @@ -0,0 +1,72 @@ +/** + * Represents a glyph bounding box + */ +export default class BBox { + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) { + /** + * The minimum X position in the bounding box + * @type {number} + */ + this.minX = minX; + + /** + * The minimum Y position in the bounding box + * @type {number} + */ + this.minY = minY; + + /** + * The maxmimum X position in the bounding box + * @type {number} + */ + this.maxX = maxX; + + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ + this.maxY = maxY; + } + + /** + * The width of the bounding box + * @type {number} + */ + get width() { + return this.maxX - this.minX; + } + + /** + * The height of the bounding box + * @type {number} + */ + get height() { + return this.maxY - this.minY; + } + + addPoint(x, y) { + if (Math.abs(x) !== Infinity) { + if (x < this.minX) { + this.minX = x; + } + + if (x > this.maxX) { + this.maxX = x; + } + } + + if (Math.abs(y) !== Infinity) { + if (y < this.minY) { + this.minY = y; + } + + if (y > this.maxY) { + this.maxY = y; + } + } + } + + copy() { + return new BBox(this.minX, this.minY, this.maxX, this.maxY); + } +} diff --git a/node_modules/fontkit/src/glyph/CFFGlyph.js b/node_modules/fontkit/src/glyph/CFFGlyph.js new file mode 100644 index 0000000..1ac182f --- /dev/null +++ b/node_modules/fontkit/src/glyph/CFFGlyph.js @@ -0,0 +1,604 @@ +import Glyph from './Glyph'; +import Path from './Path'; + +/** + * Represents an OpenType PostScript glyph, in the Compact Font Format. + */ +export default class CFFGlyph extends Glyph { + type = 'CFF'; + + _getName() { + if (this._font.CFF2) { + return super._getName(); + } + + return this._font['CFF '].getGlyphName(this.id); + } + + bias(s) { + if (s.length < 1240) { + return 107; + } else if (s.length < 33900) { + return 1131; + } else { + return 32768; + } + } + + _getPath() { + let cff = this._font.CFF2 || this._font['CFF ']; + let { stream } = cff; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + + let path = new Path; + let stack = []; + let trans = []; + + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + + let privateDict = cff.privateDictForGlyph(this.id) || {}; + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + + function checkWidth() { + if (width == null) { + width = stack.shift() + privateDict.nominalWidthX; + } + } + + function parseStems() { + if (stack.length % 2 !== 0) { + checkWidth(); + } + + nStems += stack.length >> 1; + return stack.length = 0; + } + + function moveTo(x, y) { + if (open) { + path.closePath(); + } + + path.moveTo(x, y); + open = true; + } + + let parse = function () { + while (stream.pos < end) { + let op = stream.readUInt8(); + if (op < 32) { + let index, subr, phase; + let c1x, c1y, c2x, c2y, c3x, c3y; + let c4x, c4y, c5x, c5y, c6x, c6y; + let pts; + + switch (op) { + case 1: // hstem + case 3: // vstem + case 18: // hstemhm + case 23: // vstemhm + parseStems(); + break; + + case 4: // vmoveto + if (stack.length > 1) { + checkWidth(); + } + + y += stack.shift(); + moveTo(x, y); + break; + + case 5: // rlineto + while (stack.length >= 2) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + + case 6: // hlineto + case 7: // vlineto + phase = op === 6; + while (stack.length >= 1) { + if (phase) { + x += stack.shift(); + } else { + y += stack.shift(); + } + + path.lineTo(x, y); + phase = !phase; + } + break; + + case 8: // rrcurveto + while (stack.length > 0) { + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 10: // callsubr + index = stack.pop() + subrsBias; + subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 11: // return + if (cff.version >= 2) { + break; + } + return; + + case 14: // endchar + if (cff.version >= 2) { + break; + } + + if (stack.length > 0) { + checkWidth(); + } + + if (open) { + path.closePath(); + open = false; + } + break; + + case 15: { // vsindex + if (cff.version < 2) { + throw new Error('vsindex operator not supported in CFF v1'); + } + + vsindex = stack.pop(); + break; + } + + case 16: { // blend + if (cff.version < 2) { + throw new Error('blend operator not supported in CFF v1'); + } + + if (!variationProcessor) { + throw new Error('blend operator in non-variation font'); + } + + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + + for (let i = 0; i < numBlends; i++) { + let sum = stack[base + i]; + for (let j = 0; j < blendVector.length; j++) { + sum += blendVector[j] * stack[delta++]; + } + + stack[base + i] = sum; + } + + while (numOperands--) { + stack.pop(); + } + + break; + } + + case 19: // hintmask + case 20: // cntrmask + parseStems(); + stream.pos += (nStems + 7) >> 3; + break; + + case 21: // rmoveto + if (stack.length > 2) { + checkWidth(); + } + + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + + case 22: // hmoveto + if (stack.length > 1) { + checkWidth(); + } + + x += stack.shift(); + moveTo(x, y); + break; + + case 24: // rcurveline + while (stack.length >= 8) { + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + + case 25: // rlinecurve + while (stack.length >= 8) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + + case 26: // vvcurveto + if (stack.length % 2) { + x += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 27: // hhcurveto + if (stack.length % 2) { + y += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 28: // shortint + stack.push(stream.readInt16BE()); + break; + + case 29: // callgsubr + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + let p = stream.pos; + let e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 30: // vhcurveto + case 31: // hvcurveto + phase = op === 31; + while (stack.length >= 4) { + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + + case 12: + op = stream.readUInt8(); + switch (op) { + case 3: // and + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + + case 4: // or + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + + case 5: // not + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + + case 9: // abs + a = stack.pop(); + stack.push(Math.abs(a)); + break; + + case 10: // add + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + + case 11: // sub + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + + case 12: // div + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + + case 14: // neg + a = stack.pop(); + stack.push(-a); + break; + + case 15: // eq + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + + case 18: // drop + stack.pop(); + break; + + case 20: // put + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + + case 21: // get + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + + case 22: // ifelse + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + + case 23: // random + stack.push(Math.random()); + break; + + case 24: // mul + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + + case 26: // sqrt + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + + case 27: // dup + a = stack.pop(); + stack.push(a, a); + break; + + case 28: // exch + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + + case 29: // index + idx = stack.pop(); + if (idx < 0) { + idx = 0; + } else if (idx > stack.length - 1) { + idx = stack.length - 1; + } + + stack.push(stack[idx]); + break; + + case 30: // roll + let n = stack.pop(); + let j = stack.pop(); + + if (j >= 0) { + while (j > 0) { + var t = stack[n - 1]; + for (let i = n - 2; i >= 0; i--) { + stack[i + 1] = stack[i]; + } + + stack[0] = t; + j--; + } + } else { + while (j < 0) { + var t = stack[0]; + for (let i = 0; i <= n; i++) { + stack[i] = stack[i + 1]; + } + + stack[n - 1] = t; + j++; + } + } + break; + + case 34: // hflex + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y; + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 35: // flex + pts = []; + + for (let i = 0; i <= 5; i++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + + case 36: // hflex1 + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 37: // flex1 + let startx = x; + let starty = y; + + pts = []; + for (let i = 0; i <= 4; i++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + + default: + throw new Error(`Unknown op: ${op}`); + } + + } else if (op < 247) { + stack.push(op - 139); + } else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else { + stack.push(stream.readInt32BE() / 65536); + } + } + }; + + parse(); + + if (open) { + path.closePath(); + } + + return path; + } +} diff --git a/node_modules/fontkit/src/glyph/COLRGlyph.js b/node_modules/fontkit/src/glyph/COLRGlyph.js new file mode 100644 index 0000000..85d594b --- /dev/null +++ b/node_modules/fontkit/src/glyph/COLRGlyph.js @@ -0,0 +1,90 @@ +import Glyph from './Glyph'; +import BBox from './BBox'; + +class COLRLayer { + constructor(glyph, color) { + this.glyph = glyph; + this.color = color; + } +} + +/** + * Represents a color (e.g. emoji) glyph in Microsoft's COLR format. + * Each glyph in this format contain a list of colored layers, each + * of which is another vector glyph. + */ +export default class COLRGlyph extends Glyph { + type = 'COLR'; + + _getBBox() { + let bbox = new BBox; + for (let i = 0; i < this.layers.length; i++) { + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + + return bbox; + } + + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ + get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + + while (low <= high) { + let mid = (low + high) >> 1; + var rec = colr.baseGlyphRecord[mid]; + + if (this.id < rec.gid) { + high = mid - 1; + } else if (this.id > rec.gid) { + low = mid + 1; + } else { + var baseLayer = rec; + break; + } + } + + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + + return [new COLRLayer(g, color)]; + } + + // otherwise, return an array of all the layers + let layers = []; + for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) { + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new COLRLayer(g, color)); + } + + return layers; + } + + render(ctx, size) { + for (let {glyph, color} of this.layers) { + ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + + return; + } +} diff --git a/node_modules/fontkit/src/glyph/Glyph.js b/node_modules/fontkit/src/glyph/Glyph.js new file mode 100644 index 0000000..3592150 --- /dev/null +++ b/node_modules/fontkit/src/glyph/Glyph.js @@ -0,0 +1,212 @@ +import { cache } from '../decorators'; +import Path from './Path'; +import {isMark} from 'unicode-properties'; +import StandardNames from './StandardNames'; + +/** + * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and + * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context. + * + * You do not create glyph objects directly. They are created by various methods on the font object. + * There are several subclasses of the base Glyph class internally that may be returned depending + * on the font format, but they all inherit from this class. + */ +export default class Glyph { + constructor(id, codePoints, font) { + /** + * The glyph id in the font + * @type {number} + */ + this.id = id; + + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ + this.codePoints = codePoints; + this._font = font; + + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark); + this.isLigature = this.codePoints.length > 1; + } + + _getPath() { + return new Path(); + } + + _getCBox() { + return this.path.cbox; + } + + _getBBox() { + return this.path.bbox; + } + + _getTableMetrics(table) { + if (this.id < table.metrics.length) { + return table.metrics.get(this.id); + } + + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + + return res; + } + + _getMetrics(cbox) { + if (this._metrics) { return this._metrics; } + + let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx); + + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) { + var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx); + + } else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); } + + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + + } else { + let { hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + + if (this._font._variationProcessor && this._font.HVAR) { + advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + } + + return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing }; + } + + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ + @cache + get cbox() { + return this._getCBox(); + } + + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ + @cache + get bbox() { + return this._getBBox(); + } + + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ + @cache + get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ + getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + + /** + * The glyph's advance width. + * @type {number} + */ + @cache + get advanceWidth() { + return this._getMetrics().advanceWidth; + } + + /** + * The glyph's advance height. + * @type {number} + */ + @cache + get advanceHeight() { + return this._getMetrics().advanceHeight; + } + + get ligatureCaretPositions() {} + + _getName() { + let { post } = this._font; + if (!post) { + return null; + } + + switch (post.version) { + case 1: + return StandardNames[this.id]; + + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < StandardNames.length) { + return StandardNames[id]; + } + + return post.names[id - StandardNames.length]; + + case 2.5: + return StandardNames[this.id + post.offsets[this.id]]; + + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + + /** + * The glyph's name + * @type {string} + */ + @cache + get name() { + return this._getName(); + } + + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ + render(ctx, size) { + ctx.save(); + + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + + ctx.restore(); + } +} diff --git a/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js b/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js new file mode 100644 index 0000000..7866279 --- /dev/null +++ b/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js @@ -0,0 +1,486 @@ +const TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const TUPLE_COUNT_MASK = 0x0fff; +const EMBEDDED_TUPLE_COORD = 0x8000; +const INTERMEDIATE_TUPLE = 0x4000; +const PRIVATE_POINT_NUMBERS = 0x2000; +const TUPLE_INDEX_MASK = 0x0fff; +const POINTS_ARE_WORDS = 0x80; +const POINT_RUN_COUNT_MASK = 0x7f; +const DELTAS_ARE_ZERO = 0x80; +const DELTAS_ARE_WORDS = 0x40; +const DELTA_RUN_COUNT_MASK = 0x3f; + +/** + * This class is transforms TrueType glyphs according to the data from + * the Apple Advanced Typography variation tables (fvar, gvar, and avar). + * These tables allow infinite adjustments to glyph weight, width, slant, + * and optical size without the designer needing to specify every exact style. + * + * Apple's documentation for these tables is not great, so thanks to the + * Freetype project for figuring much of this out. + * + * @private + */ +export default class GlyphVariationProcessor { + constructor(font, coords) { + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } + + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for (var i = 0; i < this.font.fvar.axis.length; i++) { + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) { + normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + } else { + normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + } + + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) { + for (var i = 0; i < this.font.avar.segment.length; i++) { + let segment = this.font.avar.segment[i]; + for (let j = 0; j < segment.correspondence.length; j++) { + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / + (pair.fromCoord - prev.fromCoord + Number.EPSILON) + + prev.toCoord; + + break; + } + } + } + } + + return normalized; + } + + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) { return; } + + let { gvar } = this.font; + if (gid >= gvar.glyphCount) { return; } + + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) { return; } + + // Read the gvar data for this glyph + let { stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) { + return; + } + + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + + if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + + let origPoints = glyphPoints.map(pt => pt.copy()); + + tupleCount &= TUPLE_COUNT_MASK; + for (let i = 0; i < tupleCount; i++) { + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + + if (tupleIndex & EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + tupleCoords.push(stream.readInt16BE() / 16384); + } + + } else { + if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) { + throw new Error('Invalid gvar table'); + } + + var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK]; + } + + if (tupleIndex & INTERMEDIATE_TUPLE) { + var startCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + startCoords.push(stream.readInt16BE() / 16384); + } + + var endCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + endCoords.push(stream.readInt16BE() / 16384); + } + } + + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + + var here = stream.pos; + stream.pos = offsetToData; + + if (tupleIndex & PRIVATE_POINT_NUMBERS) { + var points = this.decodePoints(); + } else { + var points = sharedPoints; + } + + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + + if (points.length === 0) { // all points + for (let i = 0; i < glyphPoints.length; i++) { + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + } else { + let outPoints = origPoints.map(pt => pt.copy()); + let hasDelta = glyphPoints.map(() => false); + + for (let i = 0; i < points.length; i++) { + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + + point.x += xDeltas[i] * factor; + point.y += yDeltas[i] * factor; + } + } + + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + + for (let i = 0; i < glyphPoints.length; i++) { + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + + glyphPoints[i].x = Math.round(glyphPoints[i].x + deltaX); + glyphPoints[i].y = Math.round(glyphPoints[i].y + deltaY); + } + } + + offsetToData += tupleDataSize; + stream.pos = here; + } + } + + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + + if (count & POINTS_ARE_WORDS) { + count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + } + + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while (i < count) { + let run = stream.readUInt8(); + let runCount = (run & POINT_RUN_COUNT_MASK) + 1; + let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + + for (let j = 0; j < runCount && i < count; j++) { + point += fn.call(stream); + points[i++] = point; + } + } + + return points; + } + + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + + while (i < count) { + let run = stream.readUInt8(); + let runCount = (run & DELTA_RUN_COUNT_MASK) + 1; + + if (run & DELTAS_ARE_ZERO) { + i += runCount; + + } else { + let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for (let j = 0; j < runCount && i < count; j++) { + deltas[i++] = fn.call(stream); + } + } + } + + return deltas; + } + + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar } = this.font; + let factor = 1; + + for (let i = 0; i < gvar.axisCount; i++) { + if (tupleCoords[i] === 0) { + continue; + } + + if (normalized[i] === 0) { + return 0; + } + + if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) { + if ((normalized[i] < Math.min(0, tupleCoords[i])) || + (normalized[i] > Math.max(0, tupleCoords[i]))) { + return 0; + } + + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if ((normalized[i] < startCoords[i]) || + (normalized[i] > endCoords[i])) { + return 0; + + } else if (normalized[i] < tupleCoords[i]) { + factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + + } else { + factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + } + + return factor; + } + + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) { + return; + } + + let point = 0; + while (point < points.length) { + let firstPoint = point; + + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while (!pt.endContour) { + pt = points[++endPoint]; + } + + // find the first point that has a delta + while (point <= endPoint && !hasDelta[point]) { + point++; + } + + if (point > endPoint) { + continue; + } + + let firstDelta = point; + let curDelta = point; + point++; + + while (point <= endPoint) { + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + + point++; + } + + // shift contour if we only have a single delta + if (curDelta === firstDelta) { + this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + } else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + + if (firstDelta > 0) { + this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + } + + point = endPoint + 1; + } + } + + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) { + return; + } + + let iterable = ['x', 'y']; + for (let i = 0; i < iterable.length; i++) { + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + + for (let p = p1; p <= p2; p++) { + let out = inPoints[p][k]; + + if (out <= in1) { + out += out1 - in1; + } else if (out >= in2) { + out += out2 - in2; + } else { + out = out1 + (out - in1) * scale; + } + + outPoints[p][k] = out; + } + } + } + } + + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + + if (deltaX === 0 && deltaY === 0) { + return; + } + + for (let p = p1; p <= p2; p++) { + if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + } + + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) { + idx = table.advanceWidthMapping.mapCount - 1; + } + + let entryFormat = table.advanceWidthMapping.entryFormat; + ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + + return this.getDelta(table.itemVariationStore, outerIndex, innerIndex); + } + + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getDelta(itemStore, outerIndex, innerIndex) { + if (outerIndex >= itemStore.itemVariationData.length) { + return 0; + } + + let varData = itemStore.itemVariationData[outerIndex]; + if (innerIndex >= varData.deltaSets.length) { + return 0; + } + + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + + for (let master = 0; master < varData.regionIndexCount; master++) { + netAdjustment += deltaSet.deltas[master] * blendVector[master]; + } + + return netAdjustment; + } + + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) { + return this.blendVectors.get(varData); + } + + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + + // outer loop steps through master designs to be blended + for (let master = 0; master < varData.regionIndexCount; master++) { + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + + // inner loop steps through axes in this region + for (let j = 0; j < axes.length; j++) { + let axis = axes[j]; + let axisScalar; + + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) { + axisScalar = 1; + + } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) { + axisScalar = 1; + + // peak of 0 means ignore this axis + } else if (axis.peakCoord === 0) { + axisScalar = 1; + + // ignore this region if coords are out of range + } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) { + axisScalar = 0; + + // calculate a proportional factor + } else { + if (normalizedCoords[j] === axis.peakCoord) { + axisScalar = 1; + } else if (normalizedCoords[j] < axis.peakCoord) { + axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / + (axis.peakCoord - axis.startCoord + Number.EPSILON); + } else { + axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / + (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + } + + // take product of all the axis scalars + scalar *= axisScalar; + } + + blendVector[master] = scalar; + } + + this.blendVectors.set(varData, blendVector); + return blendVector; + } +} diff --git a/node_modules/fontkit/src/glyph/Path.js b/node_modules/fontkit/src/glyph/Path.js new file mode 100644 index 0000000..a119fb2 --- /dev/null +++ b/node_modules/fontkit/src/glyph/Path.js @@ -0,0 +1,244 @@ +import BBox from './BBox'; + +const SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; + +/** + * Path objects are returned by glyphs and represent the actual + * vector outlines for each glyph in the font. Paths can be converted + * to SVG path data strings, or to functions that can be applied to + * render the path to a graphics context. + */ +export default class Path { + constructor() { + this.commands = []; + this._bbox = null; + this._cbox = null; + } + + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ + toFunction() { + return ctx => { + this.commands.forEach(c => { + return ctx[c.command].apply(ctx, c.args) + }) + }; + } + + /** + * Converts the path to an SVG path data string + * @return {string} + */ + toSVG() { + let cmds = this.commands.map(c => { + let args = c.args.map(arg => Math.round(arg * 100) / 100); + return `${SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + + return cmds.join(''); + } + + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ + get cbox() { + if (!this._cbox) { + let cbox = new BBox; + for (let command of this.commands) { + for (let i = 0; i < command.args.length; i += 2) { + cbox.addPoint(command.args[i], command.args[i + 1]); + } + } + + this._cbox = Object.freeze(cbox); + } + + return this._cbox; + } + + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ + get bbox() { + if (this._bbox) { + return this._bbox; + } + + let bbox = new BBox; + let cx = 0, cy = 0; + + let f = t => ( + Math.pow(1 - t, 3) * p0[i] + + 3 * Math.pow(1 - t, 2) * t * p1[i] + + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + + Math.pow(t, 3) * p3[i] + ); + + for (let c of this.commands) { + switch (c.command) { + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else { + var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + } + + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + + var p0 = [cx, cy]; + var p1 = [cp1x, cp1y]; + var p2 = [cp2x, cp2y]; + var p3 = [p3x, p3y]; + + for (var i = 0; i <= 1; i++) { + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + + if (a === 0) { + if (b === 0) { + continue; + } + + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) { + bbox.addPoint(f(t), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t)); + } + } + + continue; + } + + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) { + continue; + } + + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) { + bbox.addPoint(f(t1), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t1)); + } + } + + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) { + bbox.addPoint(f(t2), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t2)); + } + } + } + + cx = p3x; + cy = p3y; + break; + } + } + + return this._bbox = Object.freeze(bbox); + } + + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ + mapPoints(fn) { + let path = new Path; + + for (let c of this.commands) { + let args = []; + for (let i = 0; i < c.args.length; i += 2) { + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + + path[c.command](...args); + } + + return path; + } + + /** + * Transforms the path by the given matrix. + */ + transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y) => { + const tx = m0 * x + m2 * y + m4; + const ty = m1 * x + m3 * y + m5; + return [tx, ty]; + }); + } + + /** + * Translates the path by the given offset. + */ + translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + + /** + * Rotates the path by the given angle (in radians). + */ + rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + + /** + * Scales the path. + */ + scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } +} + +for (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) { + Path.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command, + args + }); + + return this; + }; +} diff --git a/node_modules/fontkit/src/glyph/SBIXGlyph.js b/node_modules/fontkit/src/glyph/SBIXGlyph.js new file mode 100644 index 0000000..fda3b89 --- /dev/null +++ b/node_modules/fontkit/src/glyph/SBIXGlyph.js @@ -0,0 +1,54 @@ +import TTFGlyph from './TTFGlyph'; +import * as r from 'restructure'; + +let SBIXImage = new r.Struct({ + originX: r.uint16, + originY: r.uint16, + type: new r.String(4), + data: new r.Buffer(t => t.parent.buflen - t._currentOffset) +}); + +/** + * Represents a color (e.g. emoji) glyph in Apple's SBIX format. + */ +export default class SBIXGlyph extends TTFGlyph { + type = 'SBIX'; + + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ + getImageForSize(size) { + for (let i = 0; i < this._font.sbix.imageTables.length; i++) { + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) { break; } + } + + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + + if (start === end) { + return null; + } + + this._font.stream.pos = start; + return SBIXImage.decode(this._font.stream, {buflen: end - start}); + } + + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale}); + } + + if (this._font.sbix.flags.renderOutlines) { + super.render(ctx, size); + } + } +} diff --git a/node_modules/fontkit/src/glyph/StandardNames.js b/node_modules/fontkit/src/glyph/StandardNames.js new file mode 100644 index 0000000..7c024a1 --- /dev/null +++ b/node_modules/fontkit/src/glyph/StandardNames.js @@ -0,0 +1,27 @@ +export default [ + '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', + 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', + 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', + 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', + 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', + 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', + 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', + 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', + 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', + 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', + 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', + 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', + 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', + 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', + 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', + 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', + 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', + 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', + 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', + 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', + 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', + 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', + 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat' +]; diff --git a/node_modules/fontkit/src/glyph/TTFGlyph.js b/node_modules/fontkit/src/glyph/TTFGlyph.js new file mode 100644 index 0000000..8dc1c75 --- /dev/null +++ b/node_modules/fontkit/src/glyph/TTFGlyph.js @@ -0,0 +1,393 @@ +import Glyph from './Glyph'; +import Path from './Path'; +import BBox from './BBox'; +import * as r from 'restructure'; + +// The header for both simple and composite glyphs +let GlyfHeader = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16 +}); + +// Flags for simple glyphs +const ON_CURVE = 1 << 0; +const X_SHORT_VECTOR = 1 << 1; +const Y_SHORT_VECTOR = 1 << 2; +const REPEAT = 1 << 3; +const SAME_X = 1 << 4; +const SAME_Y = 1 << 5; + +// Flags for composite glyphs +const ARG_1_AND_2_ARE_WORDS = 1 << 0; +const ARGS_ARE_XY_VALUES = 1 << 1; +const ROUND_XY_TO_GRID = 1 << 2; +const WE_HAVE_A_SCALE = 1 << 3; +const MORE_COMPONENTS = 1 << 5; +const WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6; +const WE_HAVE_A_TWO_BY_TWO = 1 << 7; +const WE_HAVE_INSTRUCTIONS = 1 << 8; +const USE_MY_METRICS = 1 << 9; +const OVERLAP_COMPOUND = 1 << 10; +const SCALED_COMPONENT_OFFSET = 1 << 11; +const UNSCALED_COMPONENT_OFFSET = 1 << 12; + +// Represents a point in a simple glyph +export class Point { + constructor(onCurve, endContour, x = 0, y = 0) { + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } + + copy() { + return new Point(this.onCurve, this.endContour, this.x, this.y); + } +} + +// Represents a component in a composite glyph +class Component { + constructor(glyphID, dx, dy) { + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} + +/** + * Represents a TrueType glyph. + */ +export default class TTFGlyph extends Glyph { + type = 'TTF'; + + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) { + return this.path.cbox; + } + + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = GlyfHeader.decode(stream); + + let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) { + val = -val; + } + + val += prev; + } else { + if (same) { + var val = prev; + } else { + var val = prev + stream.readInt16BE(); + } + } + + return val; + } + + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) { return null; } + + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + + let glyph = GlyfHeader.decode(stream); + + if (glyph.numberOfContours > 0) { + this._decodeSimple(glyph, stream); + + } else if (glyph.numberOfContours < 0) { + this._decodeComposite(glyph, stream, startPos); + } + + return glyph; + } + + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + + let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream); + + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + + while (flags.length < numCoords) { + var flag = stream.readUInt8(); + flags.push(flag); + + // check for repeat flag + if (flag & REPEAT) { + let count = stream.readUInt8(); + for (let j = 0; j < count; j++) { + flags.push(flag); + } + } + } + + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + + let px = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X); + } + + let py = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y); + } + + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + + return; + } + + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = MORE_COMPONENTS; + + while (flags & MORE_COMPONENTS) { + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) { + haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0; + } + + if (flags & ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + + var component = new Component(glyphID, dx, dy); + component.pos = gPos; + + if (flags & WE_HAVE_A_SCALE) { + // fixed number with 14 bits of fraction + component.scaleX = + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + + } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + + } else if (flags & WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + } + + glyph.components.push(component); + } + + if (this._font._variationProcessor) { + let points = []; + for (let j = 0; j < glyph.components.length; j++) { + var component = glyph.components[j]; + points.push(new Point(true, true, component.dx, component.dy)); + } + + points.push(...this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + + for (let i = 0; i < points.length; i++) { + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + + return haveInstructions; + } + + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) { + this._metrics = Glyph.prototype._getMetrics.call(this, cbox); + } + + let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics; + + return [ + new Point(false, true, glyph.xMin - leftBearing, 0), + new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new Point(false, true, 0, glyph.yMax + topBearing), + new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) { + return []; + } + + let points = []; + + if (glyph.numberOfContours < 0) { + // resolve composite glyphs + for (let component of glyph.components) { + let contours = this._font.getGlyph(component.glyphID)._getContours(); + for (let i = 0; i < contours.length; i++) { + let contour = contours[i]; + for (let j = 0; j < contour.length; j++) { + let point = contour[j]; + let x = point.x * component.scaleX + point.y * component.scale01 + component.dx; + let y = point.y * component.scaleY + point.x * component.scale10 + component.dy; + points.push(new Point(point.onCurve, point.endContour, x, y)); + } + } + } + } else { + points = glyph.points || []; + } + + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + + let contours = []; + let cur = []; + for (let k = 0; k < points.length; k++) { + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + + return contours; + } + + _getMetrics() { + if (this._metrics) { + return this._metrics; + } + + let cbox = this._getCBox(true); + super._getMetrics(cbox); + + if (this._font._variationProcessor && !this._font.HVAR) { + // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + } + + return this._metrics; + } + + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new Path; + + for (let i = 0; i < contours.length; i++) { + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) { + // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + } else { + // Start at the middle if both the first and last points are off curve + firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + } + + var curvePt = firstPt; + } + + path.moveTo(firstPt.x, firstPt.y); + + for (let j = start; j < contour.length; j++) { + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + + if (prevPt.onCurve && pt.onCurve) { + path.lineTo(pt.x, pt.y); + + } else if (prevPt.onCurve && !pt.onCurve) { + var curvePt = pt; + + } else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + + } else { + throw new Error("Unknown TTF path state"); + } + } + + // Connect the first and last points + if (curvePt) { + path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + } + + path.closePath(); + } + + return path; + } +} diff --git a/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js b/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js new file mode 100644 index 0000000..6ab8b73 --- /dev/null +++ b/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js @@ -0,0 +1,158 @@ +import * as r from 'restructure'; + +// Flags for simple glyphs +const ON_CURVE = 1 << 0; +const X_SHORT_VECTOR = 1 << 1; +const Y_SHORT_VECTOR = 1 << 2; +const REPEAT = 1 << 3; +const SAME_X = 1 << 4; +const SAME_Y = 1 << 5; + +class Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + + static encode(stream, value) { + if (value >= 0 && value <= 255) { + stream.writeUInt8(value); + } else { + stream.writeInt16BE(value); + } + } +} + +let Glyf = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16, + endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'), + instructions: new r.Array(r.uint8, r.uint16), + flags: new r.Array(r.uint8, 0), + xPoints: new r.Array(Point, 0), + yPoints: new r.Array(Point, 0) +}); + +/** + * Encodes TrueType glyph outlines + */ +export default class TTFGlyphEncoder { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + + for (let i = 0; i < path.commands.length; i++) { + let c = path.commands[i]; + + for (let j = 0; j < c.args.length; j += 2) { + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + + if (x === midX && y === midY) { + continue; + } + } + } + + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) { + flag |= ON_CURVE; + } + + flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y); + + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + + flags.push(flag); + lastFlag = flag; + } + + lastX = x; + lastY = y; + pointCount++; + } + + if (c.command === 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + } + + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + + let size = Glyf.size(glyf); + let tail = 4 - (size % 4); + + let stream = new r.EncodeStream(size + tail); + Glyf.encode(stream, glyf); + + // Align to 4-byte length + if (tail !== 0) { + stream.fill(0, tail); + } + + return stream.buffer; + } + + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + + if (value === last) { + flag |= sameFlag; + } else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) { + diff = -diff; + } else { + flag |= sameFlag; + } + } + + points.push(diff); + } + + return flag; + } +} diff --git a/node_modules/fontkit/src/glyph/WOFF2Glyph.js b/node_modules/fontkit/src/glyph/WOFF2Glyph.js new file mode 100644 index 0000000..9b451c1 --- /dev/null +++ b/node_modules/fontkit/src/glyph/WOFF2Glyph.js @@ -0,0 +1,17 @@ +import TTFGlyph from './TTFGlyph'; + +/** + * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently. + */ +export default class WOFF2Glyph extends TTFGlyph { + type = 'WOFF2'; + + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + + _getCBox() { + return this.path.bbox; + } +} diff --git a/node_modules/fontkit/src/index.js b/node_modules/fontkit/src/index.js new file mode 100644 index 0000000..e27a7b2 --- /dev/null +++ b/node_modules/fontkit/src/index.js @@ -0,0 +1,15 @@ +import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base'; +import TTFFont from './TTFFont'; +import WOFFFont from './WOFFFont'; +import WOFF2Font from './WOFF2Font'; +import TrueTypeCollection from './TrueTypeCollection'; +import DFont from './DFont'; + +// Register font formats +registerFormat(TTFFont); +registerFormat(WOFFFont); +registerFormat(WOFF2Font); +registerFormat(TrueTypeCollection); +registerFormat(DFont); + +export * from './base'; diff --git a/node_modules/fontkit/src/layout/GlyphPosition.js b/node_modules/fontkit/src/layout/GlyphPosition.js new file mode 100644 index 0000000..79a4422 --- /dev/null +++ b/node_modules/fontkit/src/layout/GlyphPosition.js @@ -0,0 +1,30 @@ +/** + * Represents positioning information for a glyph in a GlyphRun. + */ +export default class GlyphPosition { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) { + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ + this.xAdvance = xAdvance; + + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ + this.yAdvance = yAdvance; + + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ + this.xOffset = xOffset; + + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ + this.yOffset = yOffset; + } +} diff --git a/node_modules/fontkit/src/layout/GlyphRun.js b/node_modules/fontkit/src/layout/GlyphRun.js new file mode 100644 index 0000000..18e2f23 --- /dev/null +++ b/node_modules/fontkit/src/layout/GlyphRun.js @@ -0,0 +1,108 @@ +import BBox from '../glyph/BBox'; +import * as Script from '../layout/Script'; + +/** + * Represents a run of Glyph and GlyphPosition objects. + * Returned by the font layout method. + */ +export default class GlyphRun { + constructor(glyphs, features, script, language, direction) { + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ + this.glyphs = glyphs; + + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ + this.positions = null; + + /** + * The script that was requested for shaping. This was either passed in or detected automatically. + * @type {string} + */ + this.script = script; + + /** + * The language requested for shaping, as passed in. If `null`, the default language for the + * script was used. + * @type {string} + */ + this.language = language || null; + + /** + * The direction requested for shaping, as passed in (either ltr or rtl). + * If `null`, the default direction of the script is used. + * @type {string} + */ + this.direction = direction || Script.direction(script); + + /** + * The features requested during shaping. This is a combination of user + * specified features and features chosen by the shaper. + * @type {object} + */ + this.features = {}; + + // Convert features to an object + if (Array.isArray(features)) { + for (let tag of features) { + this.features[tag] = true; + } + } else if (typeof features === 'object') { + this.features = features; + } + } + + /** + * The total advance width of the run. + * @type {number} + */ + get advanceWidth() { + let width = 0; + for (let position of this.positions) { + width += position.xAdvance; + } + + return width; + } + + /** + * The total advance height of the run. + * @type {number} + */ + get advanceHeight() { + let height = 0; + for (let position of this.positions) { + height += position.yAdvance; + } + + return height; + } + + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ + get bbox() { + let bbox = new BBox; + + let x = 0; + let y = 0; + for (let index = 0; index < this.glyphs.length; index++) { + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + + x += p.xAdvance; + y += p.yAdvance; + } + + return bbox; + } +} diff --git a/node_modules/fontkit/src/layout/KernProcessor.js b/node_modules/fontkit/src/layout/KernProcessor.js new file mode 100644 index 0000000..4d4f6db --- /dev/null +++ b/node_modules/fontkit/src/layout/KernProcessor.js @@ -0,0 +1,94 @@ +import {binarySearch} from '../utils'; + +export default class KernProcessor { + constructor(font) { + this.kern = font.kern; + } + + process(glyphs, positions) { + for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) { + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + + getKerning(left, right) { + let res = 0; + + for (let table of this.kern.tables) { + if (table.coverage.crossStream) { + continue; + } + + switch (table.version) { + case 0: + if (!table.coverage.horizontal) { + continue; + } + + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) { + continue; + } + + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + + let val = 0; + let s = table.subtable; + switch (table.format) { + case 0: + let pairIdx = binarySearch(s.pairs, function (pair) { + return (left - pair.left) || (right - pair.right); + }); + + if (pairIdx >= 0) { + val = s.pairs[pairIdx].value; + } + + break; + + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) { + leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + } else { + leftOffset = s.array.off; + } + + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) { + rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + } + + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) { + return 0; + } + + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) { + res = val; + } else { + res += val; + } + } + + return res; + } +} diff --git a/node_modules/fontkit/src/layout/LayoutEngine.js b/node_modules/fontkit/src/layout/LayoutEngine.js new file mode 100644 index 0000000..1b035a7 --- /dev/null +++ b/node_modules/fontkit/src/layout/LayoutEngine.js @@ -0,0 +1,189 @@ +import KernProcessor from './KernProcessor'; +import UnicodeLayoutEngine from './UnicodeLayoutEngine'; +import GlyphRun from './GlyphRun'; +import GlyphPosition from './GlyphPosition'; +import * as Script from './Script'; +import AATLayoutEngine from '../aat/AATLayoutEngine'; +import OTLayoutEngine from '../opentype/OTLayoutEngine'; + +export default class LayoutEngine { + constructor(font) { + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) { + this.engine = new AATLayoutEngine(this.font); + + } else if (this.font.GSUB || this.font.GPOS) { + this.engine = new OTLayoutEngine(this.font); + } + } + + layout(string, features, script, language, direction) { + // Make the features parameter optional + if (typeof features === 'string') { + direction = language; + language = script; + script = features; + features = []; + } + + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) { + script = Script.forString(string); + } + + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string) { + codePoints.push(...glyph.codePoints); + } + + script = Script.forCodePoints(codePoints); + } + + var glyphs = string; + } + + let glyphRun = new GlyphRun(glyphs, features, script, language, direction); + + // Return early if there are no glyphs + if (glyphs.length === 0) { + glyphRun.positions = []; + return glyphRun; + } + + // Setup the advanced layout engine + if (this.engine && this.engine.setup) { + this.engine.setup(glyphRun); + } + + // Substitute and position the glyphs + this.substitute(glyphRun); + this.position(glyphRun); + + this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); + + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) { + this.engine.cleanup(); + } + + return glyphRun; + } + + substitute(glyphRun) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) { + this.engine.substitute(glyphRun); + } + } + + position(glyphRun) { + // Get initial glyph positions + glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth)); + let positioned = null; + + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) { + positioned = this.engine.position(glyphRun); + } + + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned && (!this.engine || this.engine.fallbackPosition)) { + if (!this.unicodeLayoutEngine) { + this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font); + } + + this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions); + } + + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) { + if (!this.kernProcessor) { + this.kernProcessor = new KernProcessor(this.font); + } + + this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions); + glyphRun.features.kern = true; + } + } + + hideDefaultIgnorables(glyphs, positions) { + let space = this.font.glyphForCodePoint(0x20); + for (let i = 0; i < glyphs.length; i++) { + if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) { + glyphs[i] = space; + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + } + + isDefaultIgnorable(ch) { + // From DerivedCoreProperties.txt in the Unicode database, + // minus U+115F, U+1160, U+3164 and U+FFA0, which is what + // Harfbuzz and Uniscribe do. + let plane = ch >> 16; + if (plane === 0) { + // BMP + switch (ch >> 8) { + case 0x00: return ch === 0x00AD; + case 0x03: return ch === 0x034F; + case 0x06: return ch === 0x061C; + case 0x17: return 0x17B4 <= ch && ch <= 0x17B5; + case 0x18: return 0x180B <= ch && ch <= 0x180E; + case 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F); + case 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF; + case 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8; + default: return false; + } + } else { + // Other planes + switch (plane) { + case 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A); + case 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF; + default: return false; + } + } + } + + getAvailableFeatures(script, language) { + let features = []; + + if (this.engine) { + features.push(...this.engine.getAvailableFeatures(script, language)); + } + + if (this.font.kern && features.indexOf('kern') === -1) { + features.push('kern'); + } + + return features; + } + + stringsForGlyph(gid) { + let result = new Set; + + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints) { + result.add(String.fromCodePoint(codePoint)); + } + + if (this.engine && this.engine.stringsForGlyph) { + for (let string of this.engine.stringsForGlyph(gid)) { + result.add(string); + } + } + + return Array.from(result); + } +} diff --git a/node_modules/fontkit/src/layout/Script.js b/node_modules/fontkit/src/layout/Script.js new file mode 100644 index 0000000..80106b6 --- /dev/null +++ b/node_modules/fontkit/src/layout/Script.js @@ -0,0 +1,231 @@ +import {getScript} from 'unicode-properties'; + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: ['bng2', 'beng'], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: ['dev2', 'deva'], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: ['gjr2', 'gujr'], + Gurmukhi: ['gur2', 'guru'], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: ['knd2', 'knda'], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: ['mlm2', 'mlym'], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: ['mym2', 'mymr'], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: ['ory2', 'orya'], + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: ['tml2', 'taml'], + Tai_Viet: 'tavt', + Telugu: ['tel2', 'telu'], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; + +const OPENTYPE_SCRIPTS = {}; +for (let script in UNICODE_SCRIPTS) { + let tag = UNICODE_SCRIPTS[script]; + if (Array.isArray(tag)) { + for (let t of tag) { + OPENTYPE_SCRIPTS[t] = script; + } + } else { + OPENTYPE_SCRIPTS[tag] = script; + } +} + +export function fromUnicode(script) { + return UNICODE_SCRIPTS[script]; +} + +export function fromOpenType(tag) { + return OPENTYPE_SCRIPTS[tag]; +} + +export function forString(string) { + let len = string.length; + let idx = 0; + while (idx < len) { + let code = string.charCodeAt(idx++); + + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + + let script = getScript(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +export function forCodePoints(codePoints) { + for (let i = 0; i < codePoints.length; i++) { + let codePoint = codePoints[i]; + let script = getScript(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +// The scripts in this map are written from right to left +const RTL = { + arab: true, // Arabic + hebr: true, // Hebrew + syrc: true, // Syriac + thaa: true, // Thaana + cprt: true, // Cypriot Syllabary + khar: true, // Kharosthi + phnx: true, // Phoenician + 'nko ': true, // N'Ko + lydi: true, // Lydian + avst: true, // Avestan + armi: true, // Imperial Aramaic + phli: true, // Inscriptional Pahlavi + prti: true, // Inscriptional Parthian + sarb: true, // Old South Arabian + orkh: true, // Old Turkic, Orkhon Runic + samr: true, // Samaritan + mand: true, // Mandaic, Mandaean + merc: true, // Meroitic Cursive + mero: true, // Meroitic Hieroglyphs + + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, // Manichaean + mend: true, // Mende Kikakui + nbat: true, // Nabataean + narb: true, // Old North Arabian + palm: true, // Palmyrene + phlp: true // Psalter Pahlavi +}; + +export function direction(script) { + if (RTL[script]) { + return 'rtl'; + } + + return 'ltr'; +} diff --git a/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js b/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js new file mode 100644 index 0000000..68d5b9a --- /dev/null +++ b/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js @@ -0,0 +1,250 @@ +import {getCombiningClass} from 'unicode-properties'; + +/** + * This class is used when GPOS does not define 'mark' or 'mkmk' features + * for positioning marks relative to base glyphs. It uses the unicode + * combining class property to position marks. + * + * Based on code from Harfbuzz, thanks! + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc + */ +export default class UnicodeLayoutEngine { + constructor(font) { + this.font = font; + } + + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for (let index = 0; index < glyphs.length; index++) { + let glyph = glyphs[index]; + if (glyph.isMark) { // TODO: handle ligatures + clusterEnd = index; + } else { + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + clusterStart = clusterEnd = index; + } + } + + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + return positions; + } + + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) { + // LTR. TODO: RTL support. + baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length; + } + + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + + // position each of the mark glyphs relative to the base glyph + for (let index = clusterStart + 1; index <= clusterEnd; index++) { + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + + // x positioning + switch (combiningClass) { + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + + default: // Attached_Below, Attached_Above, Below, Above, other + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + + // y positioning + switch (combiningClass) { + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') { + baseBox.minY += yGap; + } + + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') { + baseBox.maxY += yGap; + } + + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + + return; + } + + getCombiningClass(codePoint) { + let combiningClass = getCombiningClass(codePoint); + + // Thai / Lao need some per-character work + if ((codePoint & ~0xff) === 0x0e00) { + if (combiningClass === 'Not_Reordered') { + switch (codePoint) { + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + + case 0x0ebc: + return 'Below'; + } + } else if (codePoint === 0x0e3a) { // virama + return 'Below_Right'; + } + } + + switch (combiningClass) { + // Hebrew + + case 'CCC10': // sheva + case 'CCC11': // hataf segol + case 'CCC12': // hataf patah + case 'CCC13': // hataf qamats + case 'CCC14': // hiriq + case 'CCC15': // tsere + case 'CCC16': // segol + case 'CCC17': // patah + case 'CCC18': // qamats + case 'CCC20': // qubuts + case 'CCC22': // meteg + return 'Below'; + + case 'CCC23': // rafe + return 'Attached_Above'; + + case 'CCC24': // shin dot + return 'Above_Right'; + + case 'CCC25': // sin dot + case 'CCC19': // holam + return 'Above_Left'; + + case 'CCC26': // point varika + return 'Above'; + + case 'CCC21': // dagesh + break; + + // Arabic and Syriac + + case 'CCC27': // fathatan + case 'CCC28': // dammatan + case 'CCC30': // fatha + case 'CCC31': // damma + case 'CCC33': // shadda + case 'CCC34': // sukun + case 'CCC35': // superscript alef + case 'CCC36': // superscript alaph + return 'Above'; + + case 'CCC29': // kasratan + case 'CCC32': // kasra + return 'Below'; + + // Thai + + case 'CCC103': // sara u / sara uu + return 'Below_Right'; + + case 'CCC107': // mai + return 'Above_Right'; + + // Lao + + case 'CCC118': // sign u / sign uu + return 'Below'; + + case 'CCC122': // mai + return 'Above'; + + // Tibetan + + case 'CCC129': // sign aa + case 'CCC132': // sign u + return 'Below'; + + case 'CCC130': // sign i + return 'Above'; + } + + return combiningClass; + } +} diff --git a/node_modules/fontkit/src/node.js b/node_modules/fontkit/src/node.js new file mode 100644 index 0000000..f496ea0 --- /dev/null +++ b/node_modules/fontkit/src/node.js @@ -0,0 +1,17 @@ +import { registerFormat, create, defaultLanguage, setDefaultLanguage } from './base'; +import { open, openSync } from './fs'; +import TTFFont from './TTFFont'; +import WOFFFont from './WOFFFont'; +import WOFF2Font from './WOFF2Font'; +import TrueTypeCollection from './TrueTypeCollection'; +import DFont from './DFont'; + +// Register font formats +registerFormat(TTFFont); +registerFormat(WOFFFont); +registerFormat(WOFF2Font); +registerFormat(TrueTypeCollection); +registerFormat(DFont); + +export * from './base'; +export * from './fs'; diff --git a/node_modules/fontkit/src/opentype/GPOSProcessor.js b/node_modules/fontkit/src/opentype/GPOSProcessor.js new file mode 100644 index 0000000..6a2c1f9 --- /dev/null +++ b/node_modules/fontkit/src/opentype/GPOSProcessor.js @@ -0,0 +1,353 @@ +import OTProcessor from './OTProcessor'; + +export default class GPOSProcessor extends OTProcessor { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) { + position.xAdvance += value.xAdvance; + } + + if (value.yAdvance != null) { + position.yAdvance += value.yAdvance; + } + + if (value.xPlacement != null) { + position.xOffset += value.xPlacement; + } + + if (value.yPlacement != null) { + position.yOffset += value.yPlacement; + } + + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (value.xPlaDevice) { + position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b); + } + + if (value.yPlaDevice) { + position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b); + } + + if (value.xAdvDevice) { + position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b); + } + + if (value.yAdvDevice) { + position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b); + } + } + + // TODO: device tables + } + + applyLookup(lookupType, table) { + switch (lookupType) { + case 1: { // Single positioning value + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + switch (table.version) { + case 1: + this.applyPositionValue(0, table.value); + break; + + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + + return true; + } + + case 2: { // Pair Adjustment Positioning + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) { + return false; + } + + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + switch (table.version) { + case 1: // Adjustments for glyph pairs + let set = table.pairSets.get(index); + + for (let pair of set) { + if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + + return false; + + case 2: // Class pair adjustment + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) { + return false; + } + + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + + case 3: { // Cursive Attachment Positioning + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) { + return false; + } + + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) { + return false; + } + + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) { + return false; + } + + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + let d; + + switch (this.direction) { + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + + d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + + return true; + } + + case 4: { // Mark to base positioning + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) { + return false; + } + + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)); + + if (baseGlyphIndex < 0) { + return false; + } + + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) { + return false; + } + + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + + case 5: { // Mark to ligature positioning + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) { + return false; + } + + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + + if (baseGlyphIndex < 0) { + return false; + } + + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) { + return false; + } + + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0) + ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 + : ligGlyph.codePoints.length - 1; + + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + + case 6: { // Mark to mark positioning + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) { + return false; + } + + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) { + return false; + } + + let cur = this.glyphIterator.cur; + + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) { // Marks belonging to the same base + good = true; + } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component + good = true; + } + } else { + // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) { + good = true; + } + } + + if (!good) { + return false; + } + + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) { + return false; + } + + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + + case 7: // Contextual positioning + return this.applyContext(table); + + case 8: // Chaining contextual positioning + return this.applyChainingContext(table); + + case 9: // Extension positioning + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + + getAnchor(anchor) { + // TODO: contour point, device tables + let x = anchor.xCoordinate; + let y = anchor.yCoordinate; + + // Adjustments for font variations + let variationProcessor = this.font._variationProcessor; + let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore; + if (variationProcessor && variationStore) { + if (anchor.xDeviceTable) { + x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b); + } + + if (anchor.yDeviceTable) { + y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b); + } + } + + return { x, y }; + } + + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + + for (var i = 0; i < this.glyphs.length; i++) { + this.fixCursiveAttachment(i); + } + + this.fixMarkAttachment(); + } + + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + + fixMarkAttachment() { + for (let i = 0; i < this.glyphs.length; i++) { + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + + if (this.direction === 'ltr') { + for (let k = j; k < i; k++) { + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + } else { + for (let k = j + 1; k < i + 1; k++) { + this.positions[i].xOffset += this.positions[k].xAdvance; + this.positions[i].yOffset += this.positions[k].yAdvance; + } + } + } + } + } +} diff --git a/node_modules/fontkit/src/opentype/GSUBProcessor.js b/node_modules/fontkit/src/opentype/GSUBProcessor.js new file mode 100644 index 0000000..f5672d5 --- /dev/null +++ b/node_modules/fontkit/src/opentype/GSUBProcessor.js @@ -0,0 +1,192 @@ +import OTProcessor from './OTProcessor'; +import GlyphInfo from './GlyphInfo'; + +export default class GSUBProcessor extends OTProcessor { + applyLookup(lookupType, table) { + switch (lookupType) { + case 1: { // Single Substitution + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + let glyph = this.glyphIterator.cur; + switch (table.version) { + case 1: + glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff; + break; + + case 2: + glyph.id = table.substitute.get(index); + break; + } + + return true; + } + + case 2: { // Multiple Substitution + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + + if (sequence.length === 0) { + // If the sequence length is zero, delete the glyph. + // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it. + this.glyphs.splice(this.glyphIterator.index, 1); + return true; + } + + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i) => { + let glyph = new GlyphInfo(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + glyph.isMultiplied = true; + return glyph; + }); + + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + + return false; + } + + case 3: { // Alternate Substitution + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + + return false; + } + + case 4: { // Ligature Substitution + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + for (let ligature of table.ligatureSets.get(index)) { + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) { + continue; + } + + let curGlyph = this.glyphIterator.cur; + + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched) { + characters.push(...this.glyphs[index].codePoints); + } + + // Create the replacement ligature glyph + let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for (let i = 0; i < matched.length && isMarkLigature; i++) { + isMarkLigature = this.glyphs[matched[i]].isMark; + } + + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched) { + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) { + idx = matchIndex; + } else { + while (idx < matchIndex) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + } + + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) { + for (let i = idx; i < this.glyphs.length; i++) { + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else { + break; + } + } + } + + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for (let i = matched.length - 1; i >= 0; i--) { + this.glyphs.splice(matched[i], 1); + } + + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + + return false; + } + + case 5: // Contextual Substitution + return this.applyContext(table); + + case 6: // Chaining Contextual Substitution + return this.applyChainingContext(table); + + case 7: // Extension Substitution + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} diff --git a/node_modules/fontkit/src/opentype/GlyphInfo.js b/node_modules/fontkit/src/opentype/GlyphInfo.js new file mode 100644 index 0000000..644a3a8 --- /dev/null +++ b/node_modules/fontkit/src/opentype/GlyphInfo.js @@ -0,0 +1,57 @@ +import {isMark} from 'unicode-properties'; +import OTProcessor from './OTProcessor'; + +export default class GlyphInfo { + constructor(font, id, codePoints = [], features) { + this._font = font; + this.codePoints = codePoints; + this.id = id; + + this.features = {}; + if (Array.isArray(features)) { + for (let i = 0; i < features.length; i++) { + let feature = features[i]; + this.features[feature] = true; + } + } else if (typeof features === 'object') { + Object.assign(this.features, features); + } + + this.ligatureID = null; + this.ligatureComponent = null; + this.isLigated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + this.isMultiplied = false; + } + + get id() { + return this._id; + } + + set id(id) { + this._id = id; + this.substituted = true; + + let GDEF = this._font.GDEF; + if (GDEF && GDEF.glyphClassDef) { + // TODO: clean this up + let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef); + this.isBase = classID === 1; + this.isLigature = classID === 2; + this.isMark = classID === 3; + this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0; + } else { + this.isMark = this.codePoints.length > 0 && this.codePoints.every(isMark); + this.isBase = !this.isMark; + this.isLigature = this.codePoints.length > 1; + this.markAttachmentType = 0; + } + } + + copy() { + return new GlyphInfo(this._font, this.id, this.codePoints, this.features); + } +} diff --git a/node_modules/fontkit/src/opentype/GlyphIterator.js b/node_modules/fontkit/src/opentype/GlyphIterator.js new file mode 100644 index 0000000..b22ad30 --- /dev/null +++ b/node_modules/fontkit/src/opentype/GlyphIterator.js @@ -0,0 +1,70 @@ +export default class GlyphIterator { + constructor(glyphs, options) { + this.glyphs = glyphs; + this.reset(options); + } + + reset(options = {}, index = 0) { + this.options = options; + this.flags = options.flags || {}; + this.markAttachmentType = options.markAttachmentType || 0; + this.index = index; + } + + get cur() { + return this.glyphs[this.index] || null; + } + + shouldIgnore(glyph) { + return (this.flags.ignoreMarks && glyph.isMark) || + (this.flags.ignoreBaseGlyphs && glyph.isBase) || + (this.flags.ignoreLigatures && glyph.isLigature) || + (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType); + } + + move(dir) { + this.index += dir; + while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) { + this.index += dir; + } + + if (0 > this.index || this.index >= this.glyphs.length) { + return null; + } + + return this.glyphs[this.index]; + } + + next() { + return this.move(+1); + } + + prev() { + return this.move(-1); + } + + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while (count--) { + this.move(dir); + } + + return this.glyphs[this.index]; + } +} diff --git a/node_modules/fontkit/src/opentype/OTLayoutEngine.js b/node_modules/fontkit/src/opentype/OTLayoutEngine.js new file mode 100644 index 0000000..15cf362 --- /dev/null +++ b/node_modules/fontkit/src/opentype/OTLayoutEngine.js @@ -0,0 +1,113 @@ +import ShapingPlan from './ShapingPlan'; +import * as Shapers from './shapers'; +import GlyphInfo from './GlyphInfo'; +import GSUBProcessor from './GSUBProcessor'; +import GPOSProcessor from './GPOSProcessor'; + +export default class OTLayoutEngine { + constructor(font) { + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + this.fallbackPosition = true; + + if (font.GSUB) { + this.GSUBProcessor = new GSUBProcessor(font, font.GSUB); + } + + if (font.GPOS) { + this.GPOSProcessor = new GPOSProcessor(font, font.GPOS); + } + } + + setup(glyphRun) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints])); + + // Select a script based on what is available in GSUB/GPOS. + let script = null; + if (this.GPOSProcessor) { + script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + } + + if (this.GSUBProcessor) { + script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction); + } + + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = Shapers.choose(script); + this.plan = new ShapingPlan(this.font, script, glyphRun.direction); + this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); + + // Assign chosen features to output glyph run + for (let key in this.plan.allFeatures) { + glyphRun.features[key] = true; + } + } + + substitute(glyphRun) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + + // Map glyph infos back to normal Glyph objects + glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + } + + position(glyphRun) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') { + this.zeroMarkAdvances(glyphRun.positions); + } + + if (this.GPOSProcessor) { + this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions); + } + + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') { + this.zeroMarkAdvances(glyphRun.positions); + } + + // Reverse the glyphs and positions if the script is right-to-left + if (glyphRun.direction === 'rtl') { + glyphRun.glyphs.reverse(); + glyphRun.positions.reverse(); + } + + return this.GPOSProcessor && this.GPOSProcessor.features; + } + + zeroMarkAdvances(positions) { + for (let i = 0; i < this.glyphInfos.length; i++) { + if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + } + + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + + getAvailableFeatures(script, language) { + let features = []; + + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + + return features; + } +} diff --git a/node_modules/fontkit/src/opentype/OTProcessor.js b/node_modules/fontkit/src/opentype/OTProcessor.js new file mode 100644 index 0000000..80d1ce6 --- /dev/null +++ b/node_modules/fontkit/src/opentype/OTProcessor.js @@ -0,0 +1,438 @@ +import GlyphIterator from './GlyphIterator'; +import * as Script from '../layout/Script'; + +const DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn']; + +export default class OTProcessor { + constructor(font, table) { + this.font = font; + this.table = table; + + this.script = null; + this.scriptTag = null; + + this.language = null; + this.languageTag = null; + + this.features = {}; + this.lookups = {}; + + // Setup variation substitutions + this.variationsIndex = font._variationProcessor + ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) + : -1; + + // initialize to default script + language + this.selectScript(); + + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + this.currentFeature = null; + } + + findScript(script) { + if (this.table.scriptList == null) { + return null; + } + + if (!Array.isArray(script)) { + script = [script]; + } + + for (let s of script) { + for (let entry of this.table.scriptList) { + if (entry.tag === s) { + return entry; + } + } + } + + return null; + } + + selectScript(script, language, direction) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (!entry) { + entry = this.findScript(DEFAULT_SCRIPTS); + } + + if (!entry) { + return this.scriptTag; + } + + this.scriptTag = entry.tag; + this.script = entry.script; + this.language = null; + this.languageTag = null; + changed = true; + } + + if (!direction || direction !== this.direction) { + this.direction = direction || Script.direction(script); + } + + if (language && language.length < 4) { + language += ' '.repeat(4 - language.length); + } + + if (!language || language !== this.languageTag) { + this.language = null; + + for (let lang of this.script.langSysRecords) { + if (lang.tag === language) { + this.language = lang.langSys; + this.languageTag = lang.tag; + break; + } + } + + if (!this.language) { + this.language = this.script.defaultLangSys; + this.languageTag = null; + } + + changed = true; + } + + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) { + for (let featureIndex of this.language.featureIndexes) { + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + } + + return this.scriptTag; + } + + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures) { + let feature = this.features[tag]; + if (!feature) { + continue; + } + + for (let lookupIndex of feature.lookupListIndexes) { + if (exclude && exclude.indexOf(lookupIndex) !== -1) { + continue; + } + + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + + lookups.sort((a, b) => a.index - b.index); + return lookups; + } + + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) { + return null; + } + + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions) { + if (substitution.featureIndex === featureIndex) { + return substitution.alternateFeatureTable; + } + } + + return null; + } + + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) { + return -1; + } + + let records = variations.featureVariationRecords; + for (let i = 0; i < records.length; i++) { + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) { + return i; + } + } + + return -1; + } + + variationConditionsMatch(conditions, coords) { + return conditions.every(condition => { + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new GlyphIterator(glyphs); + + for (let { feature, lookup } of lookups) { + this.currentFeature = feature; + this.glyphIterator.reset(lookup.flags); + + while (this.glyphIterator.index < glyphs.length) { + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + + for (let table of lookup.subTables) { + let res = this.applyLookup(lookup.lookupType, table); + if (res) { + break; + } + } + + this.glyphIterator.next(); + } + } + } + + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + + applyLookupList(lookupRecords) { + let options = this.glyphIterator.options; + let glyphIndex = this.glyphIterator.index; + + for (let lookupRecord of lookupRecords) { + // Reset flags and find glyph index for this lookup record + this.glyphIterator.reset(options, glyphIndex); + this.glyphIterator.increment(lookupRecord.sequenceIndex); + + // Get the lookup and setup flags for subtables + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); + + // Apply lookup subtables until one matches + for (let table of lookup.subTables) { + if (this.applyLookup(lookup.lookupType, table)) { + break; + } + } + } + + this.glyphIterator.reset(options, glyphIndex); + return true; + } + + coverageIndex(coverage, glyph) { + if (glyph == null) { + glyph = this.glyphIterator.cur.id; + } + + switch (coverage.version) { + case 1: + return coverage.glyphs.indexOf(glyph); + + case 2: + for (let range of coverage.rangeRecords) { + if (range.start <= glyph && glyph <= range.end) { + return range.startCoverageIndex + glyph - range.start; + } + } + + break; + } + + return -1; + } + + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + + while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) { + if (matched) { + matched.push(this.glyphIterator.index); + } + + idx++; + glyph = this.glyphIterator.next(); + } + + this.glyphIterator.index = pos; + if (idx < sequence.length) { + return false; + } + + return matched || true; + } + + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id); + } + + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph) => { + // If the current feature doesn't apply to this glyph, + if (!(this.currentFeature in glyph.features)) { + return false; + } + + return component === glyph.id; + }, []); + } + + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph) => + this.coverageIndex(coverage, glyph.id) >= 0 + ); + } + + getClassID(glyph, classDef) { + switch (classDef.version) { + case 1: // Class array + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) { + return classDef.classValueArray[i]; + } + + break; + + case 2: + for (let range of classDef.classRangeRecord) { + if (range.start <= glyph && glyph <= range.end) { + return range.class; + } + } + + break; + } + + return 0; + } + + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph) => + classID === this.getClassID(glyph.id, classDef) + ); + } + + applyContext(table) { + let index, set; + switch (table.version) { + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + set = table.ruleSets[index]; + for (let rule of set) { + if (this.sequenceMatches(1, rule.input)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) { + return false; + } + + set = table.classSet[index]; + for (let rule of set) { + if (this.classSequenceMatches(1, rule.classes, table.classDef)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + } + + applyChainingContext(table) { + let index; + switch (table.version) { + case 1: + index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + let set = table.chainRuleSets[index]; + for (let rule of set) { + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) + && this.sequenceMatches(1, rule.input) + && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) { + return false; + } + + for (let rule of rules) { + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && + this.classSequenceMatches(1, rule.input, table.inputClassDef) && + this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && + this.coverageSequenceMatches(0, table.inputCoverage) && + this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + } +} diff --git a/node_modules/fontkit/src/opentype/ShapingPlan.js b/node_modules/fontkit/src/opentype/ShapingPlan.js new file mode 100644 index 0000000..121a793 --- /dev/null +++ b/node_modules/fontkit/src/opentype/ShapingPlan.js @@ -0,0 +1,118 @@ +import * as Script from '../layout/Script'; + +/** + * ShapingPlans are used by the OpenType shapers to store which + * features should by applied, and in what order to apply them. + * The features are applied in groups called stages. A feature + * can be applied globally to all glyphs, or locally to only + * specific glyphs. + * + * @private + */ +export default class ShapingPlan { + constructor(font, script, direction) { + this.font = font; + this.script = script; + this.direction = direction; + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } + + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ + _addFeatures(features, global) { + let stageIndex = this.stages.length - 1; + let stage = this.stages[stageIndex]; + for (let feature of features) { + if (this.allFeatures[feature] == null) { + stage.push(feature); + this.allFeatures[feature] = stageIndex; + + if (global) { + this.globalFeatures[feature] = true; + } + } + } + } + + /** + * Add features to the last stage + */ + add(arg, global = true) { + if (this.stages.length === 0) { + this.stages.push([]); + } + + if (typeof arg === 'string') { + arg = [arg]; + } + + if (Array.isArray(arg)) { + this._addFeatures(arg, global); + } else if (typeof arg === 'object') { + this._addFeatures(arg.global || [], true); + this._addFeatures(arg.local || [], false); + } else { + throw new Error("Unsupported argument to ShapingPlan#add"); + } + } + + /** + * Add a new stage + */ + addStage(arg, global) { + if (typeof arg === 'function') { + this.stages.push(arg, []); + } else { + this.stages.push([]); + this.add(arg, global); + } + } + + setFeatureOverrides(features) { + if (Array.isArray(features)) { + this.add(features); + } else if (typeof features === 'object') { + for (let tag in features) { + if (features[tag]) { + this.add(tag); + } else if (this.allFeatures[tag] != null) { + let stage = this.stages[this.allFeatures[tag]]; + stage.splice(stage.indexOf(tag), 1); + delete this.allFeatures[tag]; + delete this.globalFeatures[tag]; + } + } + } + } + + /** + * Assigns the global features to the given glyphs + */ + assignGlobalFeatures(glyphs) { + for (let glyph of glyphs) { + for (let feature in this.globalFeatures) { + glyph.features[feature] = true; + } + } + } + + /** + * Executes the planned stages using the given OTProcessor + */ + process(processor, glyphs, positions) { + for (let stage of this.stages) { + if (typeof stage === 'function') { + if (!positions) { + stage(this.font, glyphs, this); + } + + } else if (stage.length > 0) { + processor.applyFeatures(stage, glyphs, positions); + } + } + } +} diff --git a/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js b/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js new file mode 100644 index 0000000..fb6d20e --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js @@ -0,0 +1,123 @@ +import DefaultShaper from './DefaultShaper'; +import {getCategory} from 'unicode-properties'; +import UnicodeTrie from 'unicode-trie'; +import { decodeBase64 } from '../../utils'; + +const trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/data.trie', 'base64'))); +const FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init']; + +const ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; + +const ISOL = 'isol'; +const FINA = 'fina'; +const FIN2 = 'fin2'; +const FIN3 = 'fin3'; +const MEDI = 'medi'; +const MED2 = 'med2'; +const INIT = 'init'; +const NONE = null; + +// Each entry is [prevAction, curAction, nextState] +const STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ], + + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ], + + // State 2: prev was D/L in ISOL form, willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ], + + // State 3: prev was D in FINA form, willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ], + + // State 4: prev was FINA ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ], + + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ], + + // State 6: prev was DALATH/RISH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ] +]; + +/** + * This is a shaper for Arabic, and other cursive scripts. + * It uses data from ArabicShaping.txt in the Unicode database, + * compiled to a UnicodeTrie by generate-data.coffee. + * + * The shaping state machine was ported from Harfbuzz. + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc + */ +export default class ArabicShaper extends DefaultShaper { + static planFeatures(plan) { + plan.add(['ccmp', 'locl']); + for (let i = 0; i < FEATURES.length; i++) { + let feature = FEATURES[i]; + plan.addStage(feature, false); + } + + plan.addStage('mset'); + } + + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + + let prev = -1; + let state = 0; + let actions = []; + + // Apply the state machine to map glyphs to features + for (let i = 0; i < glyphs.length; i++) { + let curAction, prevAction; + var glyph = glyphs[i]; + let type = getShapingClass(glyph.codePoints[0]); + if (type === ShapingClasses.Transparent) { + actions[i] = NONE; + continue; + } + + [prevAction, curAction, state] = STATE_TABLE[state][type]; + + if (prevAction !== NONE && prev !== -1) { + actions[prev] = prevAction; + } + + actions[i] = curAction; + prev = i; + } + + // Apply the chosen features to their respective glyphs + for (let index = 0; index < glyphs.length; index++) { + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) { + glyph.features[feature] = true; + } + } + } +} + +function getShapingClass(codePoint) { + let res = trie.get(codePoint); + if (res) { + return res - 1; + } + + let category = getCategory(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') { + return ShapingClasses.Transparent; + } + + return ShapingClasses.Non_Joining; +} diff --git a/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js b/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js new file mode 100644 index 0000000..e02e4d3 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js @@ -0,0 +1,72 @@ +import {isDigit} from 'unicode-properties'; + +const VARIATION_FEATURES = ['rvrn']; +const COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk']; +const FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom']; +const HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern']; +const VERTICAL_FEATURES = ['vert']; +const DIRECTIONAL_FEATURES = { + ltr: ['ltra', 'ltrm'], + rtl: ['rtla', 'rtlm'] +}; + +export default class DefaultShaper { + static zeroMarkWidths = 'AFTER_GPOS'; + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + + static planPreprocessing(plan) { + plan.add({ + global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]], + local: FRACTIONAL_FEATURES + }); + } + + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + + static planPostprocessing(plan, userFeatures) { + plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]); + plan.setFeatureOverrides(userFeatures); + } + + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + for (let i = 0; i < glyphs.length; i++) { + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { // fraction slash + let start = i; + let end = i + 1; + + // Apply numerator + while (start > 0 && isDigit(glyphs[start - 1].codePoints[0])) { + glyphs[start - 1].features.numr = true; + glyphs[start - 1].features.frac = true; + start--; + } + + // Apply denominator + while (end < glyphs.length && isDigit(glyphs[end].codePoints[0])) { + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } + } + } +} diff --git a/node_modules/fontkit/src/opentype/shapers/HangulShaper.js b/node_modules/fontkit/src/opentype/shapers/HangulShaper.js new file mode 100644 index 0000000..789fb76 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/HangulShaper.js @@ -0,0 +1,285 @@ +import DefaultShaper from './DefaultShaper'; +import GlyphInfo from '../GlyphInfo'; + +/** + * This is a shaper for the Hangul script, used by the Korean language. + * It does the following: + * - decompose if unsupported by the font: + * -> + * -> + * -> + * + * - compose if supported by the font: + * -> + * -> + * -> + * + * - reorder tone marks (S is any valid syllable): + * -> + * + * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences. + * + * This logic is based on the following documents: + * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm + * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf + */ +export default class HangulShaper extends DefaultShaper { + static zeroMarkWidths = 'NONE'; + static planFeatures(plan) { + plan.add(['ljmo', 'vjmo', 'tjmo'], false); + } + + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while (i < glyphs.length) { + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = getType(code); + + [ action, state ] = STATE_TABLE[state][type]; + + switch (action) { + case DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) { + i = decompose(glyphs, i, plan.font); + } + break; + + case COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = compose(glyphs, i, plan.font); + break; + + case TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + reorderToneMark(glyphs, i, plan.font); + break; + + case INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = insertDottedCircle(glyphs, i, plan.font); + break; + } + + i++; + } + } +} + +const HANGUL_BASE = 0xac00; +const HANGUL_END = 0xd7a4; +const HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1; +const L_BASE = 0x1100; // lead +const V_BASE = 0x1161; // vowel +const T_BASE = 0x11a7; // trail +const L_COUNT = 19; +const V_COUNT = 21; +const T_COUNT = 28; +const L_END = L_BASE + L_COUNT - 1; +const V_END = V_BASE + V_COUNT - 1; +const T_END = T_BASE + T_COUNT - 1; +const DOTTED_CIRCLE = 0x25cc; + +const isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const isTone = code => 0x302e <= code && code <= 0x302f; +const isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END; +const isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0; +const isCombiningL = code => L_BASE <= code && code <= L_END; +const isCombiningV = code => V_BASE <= code && code <= V_END; +const isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END; + +// Character categories +const X = 0; // Other character +const L = 1; // Leading consonant +const V = 2; // Medial vowel +const T = 3; // Trailing consonant +const LV = 4; // Composed syllable +const LVT = 5; // Composed syllable +const M = 6; // Tone mark + +// This function classifies a character using the above categories. +function getType(code) { + if (isL(code)) { return L; } + if (isV(code)) { return V; } + if (isT(code)) { return T; } + if (isLV(code)) { return LV; } + if (isLVT(code)) { return LVT; } + if (isTone(code)) { return M; } + return X; +} + +// State machine actions +const NO_ACTION = 0; +const DECOMPOSE = 1; +const COMPOSE = 2; +const TONE_MARK = 4; +const INVALID = 5; + +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ], + + // State 1: + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ], + + // State 2: or + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ], + + // State 3: or + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ] +]; + +function getGlyph(font, code, features) { + return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features); +} + +function decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + + let s = code - HANGUL_BASE; + let t = T_BASE + s % T_COUNT; + s = s / T_COUNT | 0; + let l = L_BASE + s / V_COUNT | 0; + let v = V_BASE + s % V_COUNT; + + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || + !font.hasGlyphForCodePoint(v) || + (t !== T_BASE && !font.hasGlyphForCodePoint(t))) { + return i; + } + + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + + let vjmo = getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + + let insert = [ ljmo, vjmo ]; + + if (t > T_BASE) { + let tjmo = getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} + +function compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = getType(code); + + let prev = glyphs[i - 1].codePoints[0]; + let prevType = getType(prev); + + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === LV && type === T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + + // Make sure L and V are combining characters + if (isCombiningL(l) && isCombiningV(v)) { + lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT; + } + } + + let t = (tjmo && tjmo.codePoints[0]) || T_BASE; + if ((lv != null) && (t === T_BASE || isCombiningT(t))) { + let s = lv + (t - T_BASE); + + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === V ? 3 : 2; + glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) { ljmo.features.ljmo = true; } + if (vjmo) { vjmo.features.vjmo = true; } + if (tjmo) { tjmo.features.tjmo = true; } + + if (prevType === LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + decompose(glyphs, i - 1, font); + return i + 1; + } + + return i; +} + +function getLength(code) { + switch (getType(code)) { + case LV: + case LVT: + return 1; + case V: + return 2; + case T: + return 3; + } +} + +function reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) { return; } + + let prev = glyphs[i - 1].codePoints[0]; + let len = getLength(prev); + + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} + +function insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + + if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) { + let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features); + + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + + return i; +} diff --git a/node_modules/fontkit/src/opentype/shapers/IndicShaper.js b/node_modules/fontkit/src/opentype/shapers/IndicShaper.js new file mode 100644 index 0000000..104198c --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/IndicShaper.js @@ -0,0 +1,911 @@ +import DefaultShaper from './DefaultShaper'; +import StateMachine from 'dfa'; +import UnicodeTrie from 'unicode-trie'; +import {getCategory} from 'unicode-properties'; +import * as Script from '../../layout/Script'; +import GlyphInfo from '../GlyphInfo'; +import indicMachine from './indic.json'; +import useData from './use.json'; +import { + CATEGORIES, + POSITIONS, + CONSONANT_FLAGS, + JOINER_FLAGS, + HALANT_OR_COENG_FLAGS, INDIC_CONFIGS, + INDIC_DECOMPOSITIONS +} from './indic-data'; +import { decodeBase64 } from '../../utils'; + +const {decompositions} = useData; +const trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/indic.trie', 'base64'))); +const stateMachine = new StateMachine(indicMachine); + +/** + * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc. + * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc + */ +export default class IndicShaper extends DefaultShaper { + static zeroMarkWidths = 'NONE'; + static planFeatures(plan) { + plan.addStage(setupSyllables); + + plan.addStage(['locl', 'ccmp']); + + plan.addStage(initialReordering); + + plan.addStage('nukt'); + plan.addStage('akhn'); + plan.addStage('rphf', false); + plan.addStage('rkrf'); + plan.addStage('pref', false); + plan.addStage('blwf', false); + plan.addStage('abvf', false); + plan.addStage('half', false); + plan.addStage('pstf', false); + plan.addStage('vatu'); + plan.addStage('cjct'); + plan.addStage('cfar', false); + + plan.addStage(finalReordering); + + plan.addStage({ + local: ['init'], + global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig'] + }); + + // Setup the indic config for the selected script + plan.unicodeScript = Script.fromOpenType(plan.script); + plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default; + plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; + + // TODO: turn off kern (Khmer) and liga features. + } + + static assignFeatures(plan, glyphs) { + // Decompose split matras + // TODO: do this in a more general unicode normalizer + for (let i = glyphs.length - 1; i >= 0; i--) { + let codepoint = glyphs[i].codePoints[0]; + let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint]; + if (d) { + let decomposed = d.map(c => { + let g = plan.font.glyphForCodePoint(c); + return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features); + }); + + glyphs.splice(i, 1, ...decomposed); + } + } + } +} + +function indicCategory(glyph) { + return trie.get(glyph.codePoints[0]) >> 8; +} + +function indicPosition(glyph) { + return 1 << (trie.get(glyph.codePoints[0]) & 0xff); +} + +class IndicInfo { + constructor(category, position, syllableType, syllable) { + this.category = category; + this.position = position; + this.syllableType = syllableType; + this.syllable = syllable; + } +} + +function setupSyllables(font, glyphs) { + let syllable = 0; + let last = 0; + for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) { + if (start > last) { + ++syllable; + for (let i = last; i < start; i++) { + glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable); + } + } + + ++syllable; + + // Create shaper info + for (let i = start; i <= end; i++) { + glyphs[i].shaperInfo = new IndicInfo( + 1 << indicCategory(glyphs[i]), + indicPosition(glyphs[i]), + tags[0], + syllable + ); + } + + last = end + 1; + } + + if (last < glyphs.length) { + ++syllable; + for (let i = last; i < glyphs.length; i++) { + glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable); + } + } +} + +function isConsonant(glyph) { + return glyph.shaperInfo.category & CONSONANT_FLAGS; +} + +function isJoiner(glyph) { + return glyph.shaperInfo.category & JOINER_FLAGS; +} + +function isHalantOrCoeng(glyph) { + return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS; +} + +function wouldSubstitute(glyphs, feature) { + for (let glyph of glyphs) { + glyph.features = {[feature]: true}; + } + + let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor; + GSUB.applyFeatures([feature], glyphs); + + return glyphs.length === 1; +} + +function consonantPosition(font, consonant, virama) { + let glyphs = [virama, consonant, virama]; + if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) { + return POSITIONS.Below_C; + } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) { + return POSITIONS.Post_C; + } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) { + return POSITIONS.Post_C; + } + + return POSITIONS.Base_C; +} + +function initialReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + let virama = font.glyphForCodePoint(indicConfig.virama).id; + if (virama) { + let info = new GlyphInfo(font, virama, [indicConfig.virama]); + for (let i = 0; i < glyphs.length; i++) { + if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) { + glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info); + } + } + } + + for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) { + let {category, syllableType} = glyphs[start].shaperInfo; + + if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') { + continue; + } + + if (syllableType === 'broken_cluster' && dottedCircle) { + let g = new GlyphInfo(font, dottedCircle, [0x25cc]); + g.shaperInfo = new IndicInfo( + 1 << indicCategory(g), + indicPosition(g), + glyphs[start].shaperInfo.syllableType, + glyphs[start].shaperInfo.syllable + ); + + // Insert after possible Repha. + let i = start; + while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) { + i++; + } + + glyphs.splice(i++, 0, g); + end++; + } + + // 1. Find base consonant: + // + // The shaping engine finds the base consonant of the syllable, using the + // following algorithm: starting from the end of the syllable, move backwards + // until a consonant is found that does not have a below-base or post-base + // form (post-base forms have to follow below-base forms), or that is not a + // pre-base reordering Ra, or arrive at the first consonant. The consonant + // stopped at will be the base. + + let base = end; + let limit = start; + let hasReph = false; + + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph && + features.rphf && + start + 3 <= end && ( + (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) || + (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ) + ) + ) { + // See if it matches the 'rphf' feature. + let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()]; + if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) { + limit += 2; + while (limit < end && isJoiner(glyphs[limit])) { + limit++; + } + base = start; + hasReph = true; + } + } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) { + limit++; + while (limit < end && isJoiner(glyphs[limit])) { + limit++; + } + base = start; + hasReph = true; + } + + switch (indicConfig.basePos) { + case 'Last': { + // starting from the end of the syllable, move backwards + let i = end; + let seenBelow = false; + + do { + let info = glyphs[--i].shaperInfo; + + // until a consonant is found + if (isConsonant(glyphs[i])) { + // that does not have a below-base or post-base form + // (post-base forms have to follow below-base forms), + if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) { + base = i; + break; + } + + // or that is not a pre-base reordering Ra, + // + // IMPLEMENTATION NOTES: + // + // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped + // by the logic above already. + // + + // or arrive at the first consonant. The consonant stopped at will + // be the base. + if (info.position === POSITIONS.Below_C) { + seenBelow = true; + } + + base = i; + } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) { + // A ZWJ after a Halant stops the base search, and requests an explicit + // half form. + // A ZWJ before a Halant, requests a subjoined form instead, and hence + // search continues. This is particularly important for Bengali + // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya. + break; + } + } while (i > limit); + break; + } + + case 'First': { + // The first consonant is always the base. + base = start; + + // Mark all subsequent consonants as below. + for (let i = base + 1; i < end; i++) { + if (isConsonant(glyphs[i])) { + glyphs[i].shaperInfo.position = POSITIONS.Below_C; + } + } + } + } + + // If the syllable starts with Ra + Halant (in a script that has Reph) + // and has more than one consonant, Ra is excluded from candidates for + // base consonants. + // + // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ) + if (hasReph && base === start && limit - base <= 2) { + hasReph = false; + } + + // 2. Decompose and reorder Matras: + // + // Each matra and any syllable modifier sign in the cluster are moved to the + // appropriate position relative to the consonant(s) in the cluster. The + // shaping engine decomposes two- or three-part matras into their constituent + // parts before any repositioning. Matra characters are classified by which + // consonant in a conjunct they have affinity for and are reordered to the + // following positions: + // + // o Before first half form in the syllable + // o After subjoined consonants + // o After post-form consonant + // o After main consonant (for above marks) + // + // IMPLEMENTATION NOTES: + // + // The normalize() routine has already decomposed matras for us, so we don't + // need to worry about that. + + // 3. Reorder marks to canonical order: + // + // Adjacent nukta and halant or nukta and vedic sign are always repositioned + // if necessary, so that the nukta is first. + // + // IMPLEMENTATION NOTES: + // + // We don't need to do this: the normalize() routine already did this for us. + + // Reorder characters + + for (let i = start; i < base; i++) { + let info = glyphs[i].shaperInfo; + info.position = Math.min(POSITIONS.Pre_C, info.position); + } + + if (base < end) { + glyphs[base].shaperInfo.position = POSITIONS.Base_C; + } + + // Mark final consonants. A final consonant is one appearing after a matra, + // like in Khmer. + for (let i = base + 1; i < end; i++) { + if (glyphs[i].shaperInfo.category === CATEGORIES.M) { + for (let j = i + 1; j < end; j++) { + if (isConsonant(glyphs[j])) { + glyphs[j].shaperInfo.position = POSITIONS.Final_C; + break; + } + } + break; + } + } + + // Handle beginning Ra + if (hasReph) { + glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph; + } + + // For old-style Indic script tags, move the first post-base Halant after + // last consonant. + // + // Reports suggest that in some scripts Uniscribe does this only if there + // is *not* a Halant after last consonant already (eg. Kannada), while it + // does it unconditionally in other scripts (eg. Malayalam). We don't + // currently know about other scripts, so we single out Malayalam for now. + // + // Kannada test case: + // U+0C9A,U+0CCD,U+0C9A,U+0CCD + // With some versions of Lohit Kannada. + // https://bugs.freedesktop.org/show_bug.cgi?id=59118 + // + // Malayalam test case: + // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D + // With lohit-ttf-20121122/Lohit-Malayalam.ttf + if (plan.isOldSpec) { + let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam'; + for (let i = base + 1; i < end; i++) { + if (glyphs[i].shaperInfo.category === CATEGORIES.H) { + let j; + for (j = end - 1; j > i; j--) { + if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) { + break; + } + } + + if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) { + // Move Halant to after last consonant. + let t = glyphs[i]; + glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i)); + glyphs[j] = t; + } + + break; + } + } + } + + // Attach misc marks to previous char to move with them. + let lastPos = POSITIONS.Start; + for (let i = start; i < end; i++) { + let info = glyphs[i].shaperInfo; + if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) { + info.position = lastPos; + if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) { + // Uniscribe doesn't move the Halant with Left Matra. + // TEST: U+092B,U+093F,U+094DE + // We follow. This is important for the Sinhala + // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA + // where U+0DD9 is a left matra and U+0DCA is the virama. + // We don't want to move the virama with the left matra. + // TEST: U+0D9A,U+0DDA + for (let j = i; j > start; j--) { + if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) { + info.position = glyphs[j - 1].shaperInfo.position; + break; + } + } + } + } else if (info.position !== POSITIONS.SMVD) { + lastPos = info.position; + } + } + + // For post-base consonants let them own anything before them + // since the last consonant or matra. + let last = base; + for (let i = base + 1; i < end; i++) { + if (isConsonant(glyphs[i])) { + for (let j = last + 1; j < i; j++) { + if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) { + glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position; + } + } + last = i; + } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) { + last = i; + } + } + + let arr = glyphs.slice(start, end); + arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position); + glyphs.splice(start, arr.length, ...arr); + + // Find base again + for (let i = start; i < end; i++) { + if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) { + base = i; + break; + } + } + + // Setup features now + + // Reph + for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) { + glyphs[i].features.rphf = true; + } + + // Pre-base + let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post'; + for (let i = start; i < base; i++) { + glyphs[i].features.half = true; + if (blwf) { + glyphs[i].features.blwf = true; + } + } + + // Post-base + for (let i = base + 1; i < end; i++) { + glyphs[i].features.abvf = true; + glyphs[i].features.pstf = true; + glyphs[i].features.blwf = true; + } + + if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') { + // Old-spec eye-lash Ra needs special handling. From the + // spec: + // + // "The feature 'below-base form' is applied to consonants + // having below-base forms and following the base consonant. + // The exception is vattu, which may appear below half forms + // as well as below the base glyph. The feature 'below-base + // form' will be applied to all such occurrences of Ra as well." + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+0915 + // with Sanskrit 2003 font. + // + // However, note that Ra,Halant,ZWJ is the correct way to + // request eyelash form of Ra, so we wouldbn't inhibit it + // in that sequence. + // + // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915 + for (let i = start; i + 1 < base; i++) { + if (glyphs[i].shaperInfo.category === CATEGORIES.Ra && + glyphs[i + 1].shaperInfo.category === CATEGORIES.H && + (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ) + ) { + glyphs[i].features.blwf = true; + glyphs[i + 1].features.blwf = true; + } + } + } + + let prefLen = 2; + if (features.pref && base + prefLen < end) { + // Find a Halant,Ra sequence and mark it for pre-base reordering processing. + for (let i = base + 1; i + prefLen - 1 < end; i++) { + let g = [glyphs[i].copy(), glyphs[i + 1].copy()]; + if (wouldSubstitute(g, 'pref')) { + for (let j = 0; j < prefLen; j++) { + glyphs[i++].features.pref = true; + } + + // Mark the subsequent stuff with 'cfar'. Used in Khmer. + // Read the feature spec. + // This allows distinguishing the following cases with MS Khmer fonts: + // U+1784,U+17D2,U+179A,U+17D2,U+1782 + // U+1784,U+17D2,U+1782,U+17D2,U+179A + if (features.cfar) { + for (; i < end; i++) { + glyphs[i].features.cfar = true; + } + } + + break; + } + } + } + + // Apply ZWJ/ZWNJ effects + for (let i = start + 1; i < end; i++) { + if (isJoiner(glyphs[i])) { + let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ; + let j = i; + + do { + j--; + + // ZWJ/ZWNJ should disable CJCT. They do that by simply + // being there, since we don't skip them for the CJCT + // feature (ie. F_MANUAL_ZWJ) + + // A ZWNJ disables HALF. + if (nonJoiner) { + delete glyphs[j].features.half; + } + } while (j > start && !isConsonant(glyphs[j])); + } + } + } +} + +function finalReordering(font, glyphs, plan) { + let indicConfig = plan.indicConfig; + let features = font._layoutEngine.engine.GSUBProcessor.features; + + for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) { + // 4. Final reordering: + // + // After the localized forms and basic shaping forms GSUB features have been + // applied (see below), the shaping engine performs some final glyph + // reordering before applying all the remaining font features to the entire + // cluster. + + let tryPref = !!features.pref; + + // Find base again + let base = start; + for (; base < end; base++) { + if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) { + if (tryPref && base + 1 < end) { + for (let i = base + 1; i < end; i++) { + if (glyphs[i].features.pref) { + if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) { + // Ok, this was a 'pref' candidate but didn't form any. + // Base is around here... + base = i; + while (base < end && isHalantOrCoeng(glyphs[base])) { + base++; + } + glyphs[base].shaperInfo.position = POSITIONS.BASE_C; + tryPref = false; + } + break; + } + } + } + + // For Malayalam, skip over unformed below- (but NOT post-) forms. + if (plan.unicodeScript === 'Malayalam') { + for (let i = base + 1; i < end; i++) { + while (i < end && isJoiner(glyphs[i])) { + i++; + } + + if (i === end || !isHalantOrCoeng(glyphs[i])) { + break; + } + + i++; // Skip halant. + while (i < end && isJoiner(glyphs[i])) { + i++; + } + + if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) { + base = i; + glyphs[base].shaperInfo.position = POSITIONS.Base_C; + } + } + } + + if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) { + base--; + } + break; + } + } + + if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) { + base--; + } + + if (base < end) { + while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) { + base--; + } + } + + // o Reorder matras: + // + // If a pre-base matra character had been reordered before applying basic + // features, the glyph can be moved closer to the main consonant based on + // whether half-forms had been formed. Actual position for the matra is + // defined as “after last standalone halant glyph, after initial matra + // position and before the main consonant”. If ZWJ or ZWNJ follow this + // halant, position is moved after it. + // + + if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters. + // If we lost track of base, alas, position before last thingy. + let newPos = base === end ? base - 2 : base - 1; + + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) { + newPos--; + } + + // If we found no Halant we are done. + // Otherwise only proceed if the Halant does + // not belong to the Matra itself! + if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) { + // If ZWJ or ZWNJ follow this halant, position is moved after it. + if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) { + newPos++; + } + } else { + newPos = start; // No move. + } + } + + if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) { + // Now go see if there's actually any matras... + for (let i = newPos; i > start; i--) { + if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) { + let oldPos = i - 1; + if (oldPos < base && base <= newPos) { // Shouldn't actually happen. + base--; + } + + let tmp = glyphs[oldPos]; + glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos)); + glyphs[newPos] = tmp; + + newPos--; + } + } + } + } + + // o Reorder reph: + // + // Reph’s original position is always at the beginning of the syllable, + // (i.e. it is not reordered at the character reordering stage). However, + // it will be reordered according to the basic-forms shaping results. + // Possible positions for reph, depending on the script, are; after main, + // before post-base consonant forms, and after post-base consonant forms. + + // Two cases: + // + // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then + // we should only move it if the sequence ligated to the repha form. + // + // - If repha is encoded separately and in the logical position, we should only + // move it if it did NOT ligate. If it ligated, it's probably the font trying + // to make it work without the reordering. + if (start + 1 < end && + glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph && + (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied) + ) { + let newRephPos; + let rephPos = indicConfig.rephPos; + let found = false; + + // 1. If reph should be positioned after post-base consonant forms, + // proceed to step 5. + if (rephPos !== POSITIONS.After_Post) { + // 2. If the reph repositioning class is not after post-base: target + // position is after the first explicit halant glyph between the + // first post-reph consonant and last main consonant. If ZWJ or ZWNJ + // are following this halant, position is moved after it. If such + // position is found, this is the target position. Otherwise, + // proceed to the next step. + // + // Note: in old-implementation fonts, where classifications were + // fixed in shaping engine, there was no case where reph position + // will be found on this step. + newRephPos = start + 1; + while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) { + newRephPos++; + } + + if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) { + newRephPos++; + } + + found = true; + } + + // 3. If reph should be repositioned after the main consonant: find the + // first consonant not ligated with main, or find the first + // consonant that is not a potential pre-base reordering Ra. + if (!found && rephPos === POSITIONS.After_Main) { + newRephPos = base; + while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) { + newRephPos++; + } + + found = newRephPos < end; + } + + // 4. If reph should be positioned before post-base consonant, find + // first post-base classified consonant not ligated with main. If no + // consonant is found, the target position should be before the + // first matra, syllable modifier sign or vedic sign. + // + // This is our take on what step 4 is trying to say (and failing, BADLY). + if (!found && rephPos === POSITIONS.After_Sub) { + newRephPos = base; + while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) { + newRephPos++; + } + + found = newRephPos < end; + } + } + + // 5. If no consonant is found in steps 3 or 4, move reph to a position + // immediately before the first post-base matra, syllable modifier + // sign or vedic sign that has a reordering class after the intended + // reph position. For example, if the reordering position for reph + // is post-main, it will skip above-base matras that also have a + // post-main position. + if (!found) { + // Copied from step 2. + newRephPos = start + 1; + while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) { + newRephPos++; + } + + if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) { + // ->If ZWJ or ZWNJ are following this halant, position is moved after it. + if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) { + newRephPos++; + } + + found = true; + } + } + + // 6. Otherwise, reorder reph to the end of the syllable. + if (!found) { + newRephPos = end - 1; + while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) { + newRephPos--; + } + + // If the Reph is to be ending up after a Matra,Halant sequence, + // position it before that Halant so it can interact with the Matra. + // However, if it's a plain Consonant,Halant we shouldn't do that. + // Uniscribe doesn't do this. + // TEST: U+0930,U+094D,U+0915,U+094B,U+094D + if (isHalantOrCoeng(glyphs[newRephPos])) { + for (let i = base + 1; i < newRephPos; i++) { + if (glyphs[i].shaperInfo.category === CATEGORIES.M) { + newRephPos--; + } + } + } + } + + let reph = glyphs[start]; + glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start)); + glyphs[newRephPos] = reph; + + if (start < base && base <= newRephPos) { + base--; + } + } + + // o Reorder pre-base reordering consonants: + // + // If a pre-base reordering consonant is found, reorder it according to + // the following rules: + if (tryPref && base + 1 < end) { + for (let i = base + 1; i < end; i++) { + if (glyphs[i].features.pref) { + // 1. Only reorder a glyph produced by substitution during application + // of the feature. (Note that a font may shape a Ra consonant with + // the feature generally but block it in certain contexts.) + + // Note: We just check that something got substituted. We don't check that + // the feature actually did it... + // + // Reorder pref only if it ligated. + if (glyphs[i].isLigated && !glyphs[i].isMultiplied) { + // 2. Try to find a target position the same way as for pre-base matra. + // If it is found, reorder pre-base consonant glyph. + // + // 3. If position is not found, reorder immediately before main + // consonant. + let newPos = base; + + // Malayalam / Tamil do not have "half" forms or explicit virama forms. + // The glyphs formed by 'half' are Chillus or ligated explicit viramas. + // We want to position matra after them. + if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') { + while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) { + newPos--; + } + + // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a + // split matra, it should be reordered to *before* the left part of such matra. + if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) { + let oldPos = i; + for (let j = base + 1; j < oldPos; j++) { + if (glyphs[j].shaperInfo.category === CATEGORIES.M) { + newPos--; + break; + } + } + } + } + + if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) { + // -> If ZWJ or ZWNJ follow this halant, position is moved after it. + if (newPos < end && isJoiner(glyphs[newPos])) { + newPos++; + } + } + + let oldPos = i; + let tmp = glyphs[oldPos]; + glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos)); + glyphs[newPos] = tmp; + + if (newPos <= base && base < oldPos) { + base++; + } + } + + break; + } + } + } + + // Apply 'init' to the Left Matra if it's a word start. + if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(getCategory(glyphs[start - 1].codePoints[0])))) { + glyphs[start].features.init = true; + } + } +} + +function nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} diff --git a/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js b/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js new file mode 100644 index 0000000..3057dd1 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js @@ -0,0 +1,185 @@ +import DefaultShaper from './DefaultShaper'; +import StateMachine from 'dfa'; +import UnicodeTrie from 'unicode-trie'; +import GlyphInfo from '../GlyphInfo'; +import useData from './use.json'; +import { decodeBase64 } from '../../utils'; + +const {categories, decompositions} = useData; +const trie = new UnicodeTrie(decodeBase64(require('fs').readFileSync(__dirname + '/use.trie', 'base64'))); +const stateMachine = new StateMachine(useData); + +/** + * This shaper is an implementation of the Universal Shaping Engine, which + * uses Unicode data to shape a number of scripts without a dedicated shaping engine. + * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm. + */ +export default class UniversalShaper extends DefaultShaper { + static zeroMarkWidths = 'BEFORE_GPOS'; + static planFeatures(plan) { + plan.addStage(setupSyllables); + + // Default glyph pre-processing group + plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']); + + // Reordering group + plan.addStage(clearSubstitutionFlags); + plan.addStage(['rphf'], false); + plan.addStage(recordRphf); + plan.addStage(clearSubstitutionFlags); + plan.addStage(['pref']); + plan.addStage(recordPref); + + // Orthographic unit shaping group + plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']); + plan.addStage(reorder); + + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + + // Standard topographic presentation and positional feature application + plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']); + } + + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for (let i = glyphs.length - 1; i >= 0; i--) { + let codepoint = glyphs[i].codePoints[0]; + if (decompositions[codepoint]) { + let decomposed = decompositions[codepoint].map(c => { + let g = plan.font.glyphForCodePoint(c); + return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features); + }); + + glyphs.splice(i, 1, ...decomposed); + } + } + } +} + +function useCategory(glyph) { + return trie.get(glyph.codePoints[0]); +} + +class USEInfo { + constructor(category, syllableType, syllable) { + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} + +function setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) { + ++syllable; + + // Create shaper info + for (let i = start; i <= end; i++) { + glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable); + } + + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for (let i = start; i < start + limit; i++) { + glyphs[i].features.rphf = true; + } + } +} + +function clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs) { + glyph.substituted = false; + } +} + +function recordRphf(font, glyphs) { + for (let glyph of glyphs) { + if (glyph.substituted && glyph.features.rphf) { + // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; + } + } +} + +function recordPref(font, glyphs) { + for (let glyph of glyphs) { + if (glyph.substituted) { + // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; + } + } +} + +function reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + + for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) { + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') { + continue; + } + + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new GlyphInfo(font, dottedCircle, [0x25cc]); + g.shaperInfo = info; + + // Insert after possible Repha. + for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + + // Move things forward. + if (info.category === 'R' && end - start > 1) { + // Got a repha. Reorder it to after first base, before first halant. + for (i = start + 1; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if (isHalant(glyphs[i])) { + i--; + } + + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + } + + // Move things back. + for (i = start, j = end; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = isHalant(glyphs[i]) ? i + 1 : i; + } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) { + glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } + } +} + +function nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + +function isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} + +function isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} diff --git a/node_modules/fontkit/src/opentype/shapers/data.trie b/node_modules/fontkit/src/opentype/shapers/data.trie new file mode 100644 index 0000000..14e3519 Binary files /dev/null and b/node_modules/fontkit/src/opentype/shapers/data.trie differ diff --git a/node_modules/fontkit/src/opentype/shapers/gen-indic.js b/node_modules/fontkit/src/opentype/shapers/gen-indic.js new file mode 100644 index 0000000..7cd3989 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/gen-indic.js @@ -0,0 +1,208 @@ +import codepoints from 'codepoints'; +import fs from 'fs'; +import UnicodeTrieBuilder from 'unicode-trie/builder.js'; +import dfa from 'dfa/compile.js'; +import { CATEGORIES, POSITIONS, CONSONANT_FLAGS } from './indic-data.js'; + +const compile = dfa.default; + +const CATEGORY_MAP = { + Avagraha: 'Symbol', + Bindu: 'SM', + Brahmi_Joining_Number: 'Placeholder', + Cantillation_Mark: 'A', + Consonant: 'C', + Consonant_Dead: 'C', + Consonant_Final: 'CM', + Consonant_Head_Letter: 'C', + Consonant_Killer: 'M', + Consonant_Medial: 'CM', + Consonant_Placeholder: 'Placeholder', + Consonant_Preceding_Repha: 'Repha', + Consonant_Prefixed: 'X', + Consonant_Subjoined: 'CM', + Consonant_Succeeding_Repha: 'N', + Consonant_With_Stacker: 'Repha', + Gemination_Mark: 'SM', + Invisible_Stacker: 'Coeng', + Joiner: 'ZWJ', + Modifying_Letter: 'X', + Non_Joiner: 'ZWNJ', + Nukta: 'N', + Number: 'Placeholder', + Number_Joiner: 'Placeholder', + Pure_Killer: 'M', + Register_Shifter: 'RS', + Syllable_Modifier: 'M', + Tone_Letter: 'X', + Tone_Mark: 'N', + Virama: 'H', + Visarga: 'SM', + Vowel: 'V', + Vowel_Dependent: 'M', + Vowel_Independent: 'V' +}; + +const OVERRIDES = { + 0x0953: 'SM', + 0x0954: 'SM', + 0x0A72: 'C', + 0x0A73: 'C', + 0x1CF5: 'C', + 0x1CF6: 'C', + 0x1CE2: 'A', + 0x1CE3: 'A', + 0x1CE4: 'A', + 0x1CE5: 'A', + 0x1CE6: 'A', + 0x1CE7: 'A', + 0x1CE8: 'A', + 0x1CED: 'A', + 0xA8F2: 'Symbol', + 0xA8F3: 'Symbol', + 0xA8F4: 'Symbol', + 0xA8F5: 'Symbol', + 0xA8F6: 'Symbol', + 0xA8F7: 'Symbol', + 0x1CE9: 'Symbol', + 0x1CEA: 'Symbol', + 0x1CEB: 'Symbol', + 0x1CEC: 'Symbol', + 0x1CEE: 'Symbol', + 0x1CEF: 'Symbol', + 0x1CF0: 'Symbol', + 0x1CF1: 'Symbol', + 0x17C6: 'N', + 0x2010: 'Placeholder', + 0x2011: 'Placeholder', + 0x25CC: 'Dotted_Circle', + + // Ra + 0x0930: 'Ra', // Devanagari + 0x09B0: 'Ra', // Bengali + 0x09F0: 'Ra', // Bengali + 0x0A30: 'Ra', // Gurmukhi - No Reph + 0x0AB0: 'Ra', // Gujarati + 0x0B30: 'Ra', // Oriya + 0x0BB0: 'Ra', // Tamil - No Reph + 0x0C30: 'Ra', // Telugu - Reph formed only with ZWJ + 0x0CB0: 'Ra', // Kannada + 0x0D30: 'Ra', // Malayalam - No Reph, Logical Repha + 0x0DBB: 'Ra', // Sinhala - Reph formed only with ZWJ + 0x179A: 'Ra', // Khmer - No Reph, Visual Repha +}; + +const POSITION_MAP = { + Left: 'Pre_C', + Top: 'Above_C', + Bottom: 'Below_C', + Right: 'Post_C', + + // These should resolve to the position of the last part of the split sequence. + Bottom_And_Right: 'Post_C', + Left_And_Right: 'Post_C', + Top_And_Bottom: 'Below_C', + Top_And_Bottom_And_Right: 'Post_C', + Top_And_Left: 'Above_C', + Top_And_Left_And_Right: 'Post_C', + Top_And_Right: 'Post_C', + + Overstruck: 'After_Main', + Visual_Order_Left: 'Pre_M' +}; + +function matraPosition(c, pos) { + switch (pos) { + case 'Pre_C': + return 'Pre_M'; + + case 'Post_C': + switch (c.block) { + case 'Devanagari': return 'After_Sub'; + case 'Bengali': return 'After_Post'; + case 'Gurmukhi': return 'After_Post'; + case 'Gujarati': return 'After_Post'; + case 'Oriya': return 'After_Post'; + case 'Tamil': return 'After_Post'; + case 'Telugu': return c.code <= 0x0C42 ? 'Before_Sub' : 'After_Sub'; + case 'Kannada': return c.code < 0x0CC3 || c.code > 0xCD6 ? 'Before_Sub' : 'After_Sub'; + case 'Malayalam': return 'After_Post'; + case 'Sinhala': return 'After_Sub'; + case 'Khmer': return 'After_Post'; + default: return 'After_Sub'; + } + + case 'Above_C': + switch (c.block) { + case 'Devanagari': return 'After_Sub'; + case 'Gurmukhi': return 'After_Post'; // Deviate from spec + case 'Gujarati': return 'After_Sub'; + case 'Oriya': return 'After_Main'; + case 'Tamil': return 'After_Sub'; + case 'Telugu': return 'Before_Sub'; + case 'Kannada': return 'Before_Sub'; + case 'Sinhala': return 'After_Sub'; + case 'Khmer': return 'After_Post'; + default: return 'After_Sub'; + } + + case 'Below_C': + switch (c.block) { + case 'Devanagari': return 'After_Sub'; + case 'Bengali': return 'After_Sub'; + case 'Gurmukhi': return 'After_Post'; + case 'Gujarati': return 'After_Post'; + case 'Oriya': return 'After_Sub'; + case 'Tamil': return 'After_Post'; + case 'Telugu': return 'Before_Sub'; + case 'Kannada': return 'Before_Sub'; + case 'Malayalam': return 'After_Post'; + case 'Sinhala': return 'After_Sub'; + case 'Khmer': return 'After_Post'; + default: return 'After_Sub'; + } + + default: + return pos; + } +} + +function getPosition(codepoint, category) { + let position = POSITION_MAP[codepoint.indicPositionalCategory] || 'End'; + + if (CATEGORIES[category] & CONSONANT_FLAGS) { + position = 'Base_C'; + } else if (category === 'M') { + position = matraPosition(codepoint, position); + } else if (category === 'SM' || category === 'VD' || category === 'A' || category === 'Symbol') { + position = 'SMVD'; + } + + // Oriya Bindu is Before_Sub in the spec. + if (codepoint.code === 0x0B01) { + position = 'Before_Sub'; + } + + return Math.log2(POSITIONS[position]); +} + +let symbols = {}; +for (let c in CATEGORIES) { + symbols[c] = Math.log2(CATEGORIES[c]); +} + +let trie = new UnicodeTrieBuilder; +for (let i = 0; i < codepoints.length; i++) { + let codepoint = codepoints[i]; + if (codepoint) { + let category = OVERRIDES[codepoint.code] || CATEGORY_MAP[codepoint.indicSyllabicCategory] || 'X'; + let position = getPosition(codepoint, category); + + trie.set(codepoint.code, (symbols[category] << 8) | position); + } +} + +fs.writeFileSync(new URL('indic.trie', import.meta.url), trie.toBuffer()); + +let stateMachine = compile(fs.readFileSync(new URL('indic.machine', import.meta.url), 'utf8'), symbols); +fs.writeFileSync(new URL('indic.json', import.meta.url), JSON.stringify(stateMachine)); diff --git a/node_modules/fontkit/src/opentype/shapers/gen-use.js b/node_modules/fontkit/src/opentype/shapers/gen-use.js new file mode 100644 index 0000000..cb7eda5 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/gen-use.js @@ -0,0 +1,287 @@ +import codepoints from 'codepoints'; +import fs from 'fs'; +import UnicodeTrieBuilder from 'unicode-trie/builder.js'; +import dfa from 'dfa/compile.js'; + +const compile = dfa.default; + +const CATEGORIES = { + B: [ + {UISC: 'Number'}, + {UISC: 'Avagraha', UGC: 'Lo'}, + {UISC: 'Bindu', UGC: 'Lo'}, + {UISC: 'Consonant'}, + {UISC: 'Consonant_Final', UGC: 'Lo'}, + {UISC: 'Consonant_Head_Letter'}, + {UISC: 'Consonant_Medial', UGC: 'Lo'}, + {UISC: 'Consonant_Subjoined', UGC: 'Lo'}, + {UISC: 'Tone_Letter'}, + {UISC: 'Vowel', UGC: 'Lo'}, + {UISC: 'Vowel_Independent'}, + {UISC: 'Vowel_Dependent', UGC: 'Lo'} + ], + CGJ: [0x034f], + CM: [ + 'Nukta', + 'Gemination_Mark', + 'Consonant_Killer' + ], + CS: [ + 'Consonant_With_Stacker' + ], + F: [ + {UISC: 'Consonant_Final', UGC: {not: 'Lo'}}, + {UISC: 'Consonant_Succeeding_Repha'} + ], + FM: [ + 'Syllable_Modifier' + ], + GB: [ + 'Consonant_Placeholder', + 0x2015, + 0x2022, + 0x25fb, + 0x25fc, + 0x25fd, + 0x25fe + ], + H: [ + 'Virama', + 'Invisible_Stacker' + ], + HN: [ + 'Number_Joiner' + ], + IND: [ + 'Consonant_Dead', + 'Modifying_Letter', + {UGC: 'Po', U: {not: [0x104e, 0x2022]}} + ], + M: [ + {UISC: 'Consonant_Medial', UGC: {not: 'Lo'}} + ], + N: [ + 'Brahmi_Joining_Number' + ], + R: [ + 'Consonant_Preceding_Repha', + 'Consonant_Prefixed' + ], + Rsv: [ + {UGC: 'Cn'} // TODO + ], + S: [ + {UGC: 'So', U: {not: 0x25cc}}, + {UGC: 'Sc'} + ], + SM: [ + 0x1b6b, + 0x1b6c, + 0x1b6d, + 0x1b6e, + 0x1b6f, + 0x1b70, + 0x1b71, + 0x1b72, + 0x1b73 + ], + SUB: [ + {UISC: 'Consonant_Subjoined', UGC: {not: 'Lo'}} + ], + V: [ + {UISC: 'Vowel', UGC: {not: 'Lo'}}, + {UISC: 'Vowel_Dependent', UGC: {not: 'Lo'}}, + {UISC: 'Pure_Killer'} + ], + VM: [ + {UISC: 'Bindu', UGC: {not: 'Lo'}}, + 'Tone_Mark', + 'Cantillation_Mark', + 'Register_Shifter', + 'Visarga' + ], + VS: [ + 0xfe00, 0xfe01, 0xfe02, 0xfe03, 0xfe04, 0xfe05, 0xfe06, 0xfe07, + 0xfe08, 0xfe09, 0xfe0a, 0xfe0b, 0xfe0c, 0xfe0d, 0xfe0e, 0xfe0f + ], + WJ: [0x2060], + ZWJ: [ + 'Joiner' + ], + ZWNJ: [ + 'Non_Joiner' + ], + O: [ + 'Other' + ] +}; + +const USE_POSITIONS = { + F: { + Abv: ['Top'], + Blw: ['Bottom'], + Pst: ['Right'], + }, + M: { + Abv: ['Top'], + Blw: ['Bottom'], + Pst: ['Right'], + Pre: ['Left'], + }, + CM: { + Abv: ['Top'], + Blw: ['Bottom'], + }, + V: { + Abv: ['Top', 'Top_And_Bottom', 'Top_And_Bottom_And_Right', 'Top_And_Right'], + Blw: ['Bottom', 'Overstruck', 'Bottom_And_Right'], + Pst: ['Right'], + Pre: ['Left', 'Top_And_Left', 'Top_And_Left_And_Right', 'Left_And_Right'], + }, + VM: { + Abv: ['Top'], + Blw: ['Bottom', 'Overstruck'], + Pst: ['Right'], + Pre: ['Left'], + }, + SM: { + Abv: ['Top'], + Blw: ['Bottom'], + } +}; + +const UISC_OVERRIDE = { + 0x17dd: 'Vowel_Dependent', + 0x1ce2: 'Cantillation_Mark', + 0x1ce3: 'Cantillation_Mark', + 0x1ce4: 'Cantillation_Mark', + 0x1ce5: 'Cantillation_Mark', + 0x1ce6: 'Cantillation_Mark', + 0x1ce7: 'Cantillation_Mark', + 0x1ce8: 'Cantillation_Mark', + 0x1ced: 'Tone_Mark' +}; + +const UIPC_OVERRIDE = { + 0x1b6c: 'Bottom', + 0x953: 'Not_Applicable', + 0x954: 'Not_Applicable', + 0x103c: 'Left', + 0xa926: 'Top', + 0xa927: 'Top', + 0xa928: 'Top', + 0xa929: 'Top', + 0xa92a: 'Top', + 0x111ca: 'Bottom', + 0x11300: 'Top', + 0x1133c: 'Bottom', + 0x1171e: 'Left', + 0x1cf2: 'Right', + 0x1cf3: 'Right', + 0x1cf8: 'Top', + 0x1cf9: 'Top' +}; + +function check(pattern, value) { + if (typeof pattern === 'object' && pattern.not) { + if (Array.isArray(pattern.not)) { + return pattern.not.indexOf(value) === -1; + } else { + return value !== pattern.not; + } + } + + return value === pattern; +} + +function matches(pattern, code) { + if (typeof pattern === 'number') { + pattern = {U: pattern}; + } else if (typeof pattern === 'string') { + pattern = {UISC: pattern}; + } + + for (let key in pattern) { + if (!check(pattern[key], code[key])) { + return false; + } + } + + return true; +} + +function getUISC(code) { + return UISC_OVERRIDE[code.code] || code.indicSyllabicCategory || 'Other'; +} + +function getUIPC(code) { + return UIPC_OVERRIDE[code.code] || code.indicPositionalCategory; +} + +function getPositionalCategory(code, USE) { + let UIPC = getUIPC(code); + let pos = USE_POSITIONS[USE]; + if (pos) { + for (let key in pos) { + if (pos[key].indexOf(UIPC) !== -1) { + return USE + key; + } + } + } + + return USE; +} + +function getCategory(code) { + for (let category in CATEGORIES) { + for (let pattern of CATEGORIES[category]) { + if (matches(pattern, {UISC: getUISC(code), UGC: code.category, U: code.code})) { + return getPositionalCategory(code, category); + } + } + } + + return null; +} + +let trie = new UnicodeTrieBuilder; +let symbols = {}; +let numSymbols = 0; +let decompositions = {}; +for (let i = 0; i < codepoints.length; i++) { + let codepoint = codepoints[i]; + if (codepoint) { + let category = getCategory(codepoint); + if (!(category in symbols)) { + symbols[category] = numSymbols++; + } + + trie.set(codepoint.code, symbols[category]); + + if (codepoint.indicSyllabicCategory === 'Vowel_Dependent' && codepoint.decomposition.length > 0) { + decompositions[codepoint.code] = decompose(codepoint.code); + } + } +} + +function decompose(code) { + let decomposition = []; + let codepoint = codepoints[code]; + for (let c of codepoint.decomposition) { + let codes = decompose(c); + codes = codes.length > 0 ? codes : [c]; + decomposition.push(...codes); + } + + return decomposition; +} + +fs.writeFileSync(new URL('use.trie', import.meta.url), trie.toBuffer()); + +let stateMachine = compile(fs.readFileSync(new URL('use.machine', import.meta.url), 'utf8'), symbols); +let json = Object.assign({ + categories: Object.keys(symbols), + decompositions: decompositions +}, stateMachine); + +fs.writeFileSync(new URL('use.json', import.meta.url), JSON.stringify(json)); diff --git a/node_modules/fontkit/src/opentype/shapers/generate-data.js b/node_modules/fontkit/src/opentype/shapers/generate-data.js new file mode 100644 index 0000000..e8ad55b --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/generate-data.js @@ -0,0 +1,33 @@ +// +// This script generates a UnicodeTrie containing shaping data derived +// from Unicode properties (currently just for the Arabic shaper). +// +import codepoints from 'codepoints'; +import fs from 'fs'; +import UnicodeTrieBuilder from 'unicode-trie/builder.js'; + +let ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; + +let trie = new UnicodeTrieBuilder; +for (let i = 0; i < codepoints.length; i++) { + let codepoint = codepoints[i]; + if (codepoint) { + if (codepoint.joiningGroup === 'ALAPH' || codepoint.joiningGroup === 'DALATH RISH') { + trie.set(codepoint.code, ShapingClasses[codepoint.joiningGroup] + 1); + + } else if (codepoint.joiningType) { + trie.set(codepoint.code, ShapingClasses[codepoint.joiningType] + 1); + } + } +} + +fs.writeFileSync(new URL('data.trie', import.meta.url), trie.toBuffer()); diff --git a/node_modules/fontkit/src/opentype/shapers/index.js b/node_modules/fontkit/src/opentype/shapers/index.js new file mode 100644 index 0000000..b22ebdd --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/index.js @@ -0,0 +1,102 @@ +import DefaultShaper from './DefaultShaper'; +import ArabicShaper from './ArabicShaper'; +import HangulShaper from './HangulShaper'; +import IndicShaper from './IndicShaper'; +import UniversalShaper from './UniversalShaper'; + +const SHAPERS = { + arab: ArabicShaper, // Arabic + mong: ArabicShaper, // Mongolian + syrc: ArabicShaper, // Syriac + 'nko ': ArabicShaper, // N'Ko + phag: ArabicShaper, // Phags Pa + mand: ArabicShaper, // Mandaic + mani: ArabicShaper, // Manichaean + phlp: ArabicShaper, // Psalter Pahlavi + + hang: HangulShaper, // Hangul + + bng2: IndicShaper, // Bengali + beng: IndicShaper, // Bengali + dev2: IndicShaper, // Devanagari + deva: IndicShaper, // Devanagari + gjr2: IndicShaper, // Gujarati + gujr: IndicShaper, // Gujarati + guru: IndicShaper, // Gurmukhi + gur2: IndicShaper, // Gurmukhi + knda: IndicShaper, // Kannada + knd2: IndicShaper, // Kannada + mlm2: IndicShaper, // Malayalam + mlym: IndicShaper, // Malayalam + ory2: IndicShaper, // Oriya + orya: IndicShaper, // Oriya + taml: IndicShaper, // Tamil + tml2: IndicShaper, // Tamil + telu: IndicShaper, // Telugu + tel2: IndicShaper, // Telugu + khmr: IndicShaper, // Khmer + + bali: UniversalShaper, // Balinese + batk: UniversalShaper, // Batak + brah: UniversalShaper, // Brahmi + bugi: UniversalShaper, // Buginese + buhd: UniversalShaper, // Buhid + cakm: UniversalShaper, // Chakma + cham: UniversalShaper, // Cham + dupl: UniversalShaper, // Duployan + egyp: UniversalShaper, // Egyptian Hieroglyphs + gran: UniversalShaper, // Grantha + hano: UniversalShaper, // Hanunoo + java: UniversalShaper, // Javanese + kthi: UniversalShaper, // Kaithi + kali: UniversalShaper, // Kayah Li + khar: UniversalShaper, // Kharoshthi + khoj: UniversalShaper, // Khojki + sind: UniversalShaper, // Khudawadi + lepc: UniversalShaper, // Lepcha + limb: UniversalShaper, // Limbu + mahj: UniversalShaper, // Mahajani + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: UniversalShaper, // Meitei Mayek + modi: UniversalShaper, // Modi + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: UniversalShaper, // Pahawh Hmong + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: UniversalShaper, // Rejang + saur: UniversalShaper, // Saurashtra + shrd: UniversalShaper, // Sharada + sidd: UniversalShaper, // Siddham + sinh: IndicShaper, // Sinhala + sund: UniversalShaper, // Sundanese + sylo: UniversalShaper, // Syloti Nagri + tglg: UniversalShaper, // Tagalog + tagb: UniversalShaper, // Tagbanwa + tale: UniversalShaper, // Tai Le + lana: UniversalShaper, // Tai Tham + tavt: UniversalShaper, // Tai Viet + takr: UniversalShaper, // Takri + tibt: UniversalShaper, // Tibetan + tfng: UniversalShaper, // Tifinagh + tirh: UniversalShaper, // Tirhuta + + latn: DefaultShaper, // Latin + DFLT: DefaultShaper // Default +}; + +export function choose(script) { + if (!Array.isArray(script)) { + script = [script]; + } + + for (let s of script) { + let shaper = SHAPERS[s]; + if (shaper) { + return shaper; + } + } + + return DefaultShaper; +} diff --git a/node_modules/fontkit/src/opentype/shapers/indic-data.js b/node_modules/fontkit/src/opentype/shapers/indic-data.js new file mode 100644 index 0000000..30feff2 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/indic-data.js @@ -0,0 +1,175 @@ +// Cateories used in the OpenType spec: +// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx +export const CATEGORIES = { + X: 1 << 0, + C: 1 << 1, + V: 1 << 2, + N: 1 << 3, + H: 1 << 4, + ZWNJ: 1 << 5, + ZWJ: 1 << 6, + M: 1 << 7, + SM: 1 << 8, + VD: 1 << 9, + A: 1 << 10, + Placeholder: 1 << 11, + Dotted_Circle: 1 << 12, + RS: 1 << 13, // Register Shifter, used in Khmer OT spec. + Coeng: 1 << 14, // Khmer-style Virama. + Repha: 1 << 15, // Atomically-encoded logical or visual repha. + Ra: 1 << 16, + CM: 1 << 17, // Consonant-Medial. + Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD). +}; + +// Visual positions in a syllable from left to right. +export const POSITIONS = { + Start: 1 << 0, + + Ra_To_Become_Reph: 1 << 1, + Pre_M: 1 << 2, + Pre_C: 1 << 3, + + Base_C: 1 << 4, + After_Main: 1 << 5, + + Above_C: 1 << 6, + + Before_Sub: 1 << 7, + Below_C: 1 << 8, + After_Sub: 1 << 9, + + Before_Post: 1 << 10, + Post_C: 1 << 11, + After_Post: 1 << 12, + + Final_C: 1 << 13, + SMVD: 1 << 14, + + End: 1 << 15 +}; + +export const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle; +export const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ; +export const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng; + +export const INDIC_CONFIGS = { + Default: { + hasOldSpec: false, + virama: 0, + basePos: 'Last', + rephPos: POSITIONS.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Devanagari: { + hasOldSpec: true, + virama: 0x094D, + basePos: 'Last', + rephPos: POSITIONS.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Bengali: { + hasOldSpec: true, + virama: 0x09CD, + basePos: 'Last', + rephPos: POSITIONS.After_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Gurmukhi: { + hasOldSpec: true, + virama: 0x0A4D, + basePos: 'Last', + rephPos: POSITIONS.Before_Sub, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Gujarati: { + hasOldSpec: true, + virama: 0x0ACD, + basePos: 'Last', + rephPos: POSITIONS.Before_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Oriya: { + hasOldSpec: true, + virama: 0x0B4D, + basePos: 'Last', + rephPos: POSITIONS.After_Main, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Tamil: { + hasOldSpec: true, + virama: 0x0BCD, + basePos: 'Last', + rephPos: POSITIONS.After_Post, + rephMode: 'Implicit', + blwfMode: 'Pre_And_Post' + }, + + Telugu: { + hasOldSpec: true, + virama: 0x0C4D, + basePos: 'Last', + rephPos: POSITIONS.After_Post, + rephMode: 'Explicit', + blwfMode: 'Post_Only' + }, + + Kannada: { + hasOldSpec: true, + virama: 0x0CCD, + basePos: 'Last', + rephPos: POSITIONS.After_Post, + rephMode: 'Implicit', + blwfMode: 'Post_Only' + }, + + Malayalam: { + hasOldSpec: true, + virama: 0x0D4D, + basePos: 'Last', + rephPos: POSITIONS.After_Main, + rephMode: 'Log_Repha', + blwfMode: 'Pre_And_Post' + }, + + // Handled by UniversalShaper + // Sinhala: { + // hasOldSpec: false, + // virama: 0x0DCA, + // basePos: 'Last_Sinhala', + // rephPos: POSITIONS.After_Main, + // rephMode: 'Explicit', + // blwfMode: 'Pre_And_Post' + // }, + + Khmer: { + hasOldSpec: false, + virama: 0x17D2, + basePos: 'First', + rephPos: POSITIONS.Ra_To_Become_Reph, + rephMode: 'Vis_Repha', + blwfMode: 'Pre_And_Post' + } +}; + +// Additional decompositions that aren't in Unicode +export const INDIC_DECOMPOSITIONS = { + // Khmer + 0x17BE: [0x17C1, 0x17BE], + 0x17BF: [0x17C1, 0x17BF], + 0x17C0: [0x17C1, 0x17C0], + 0x17C4: [0x17C1, 0x17C4], + 0x17C5: [0x17C1, 0x17C5] +}; diff --git a/node_modules/fontkit/src/opentype/shapers/indic.json b/node_modules/fontkit/src/opentype/shapers/indic.json new file mode 100644 index 0000000..dd3a3f9 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/indic.json @@ -0,0 +1 @@ +{"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],"accepting":[false,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,false,false,true,true,true,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,true,true,true,false,true,false,true,true,false,false,true,true,true,true,true,true,true,false,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,false,true,false,true,true,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,false,true,false,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,true,false,true,true,false,false,false,false,true,true,false,false,true,true,true,false,true,true,false,false,true,false,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,false,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,false,false,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,false,false,false,false,false,false,false,true,true,false,false,true,true,false,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,true,true,false,true,true,true,true,true,true,false,true,true,false,true,false,true,true,true,true,true,true,false,true,true,true,true,true,true,false,true,true,false,false,false,false,false,true,true,false,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,false,false,false,true,false,true,true,true,true,true,false,true,true,true,false,true,true,true,true,true,false,true,true,true,true,false,true,true,true,true,true,false,true,true,false,true,true,true],"tags":[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]} \ No newline at end of file diff --git a/node_modules/fontkit/src/opentype/shapers/indic.machine b/node_modules/fontkit/src/opentype/shapers/indic.machine new file mode 100644 index 0000000..9c9c649 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/indic.machine @@ -0,0 +1,31 @@ +c = C | Ra; # is_consonant +n = (ZWNJ? RS)? (N N?)?; # is_consonant_modifier +z = ZWJ | ZWNJ; # is_joiner +h = H | Coeng; # is_halant_or_coeng +reph = Ra H | Repha; # possible reph + +cn = c ZWJ? n?; +forced_rakar = ZWJ H ZWJ Ra; +symbol = Symbol N?; +matra_group = z{0,3} M N? (H | forced_rakar)?; +# syllable_tail = (z? SM SM? ZWNJ?)? A{0,3} VD{0,2}; +syllable_tail = (z? SM SM? ZWNJ?)? A{0,3}; +place_holder = Placeholder | Dotted_Circle; +halant_group = z? h (ZWJ N?)?; +final_halant_group = halant_group | h ZWNJ; +medial_group = CM?; +halant_or_matra_group = (final_halant_group | (h ZWJ)? matra_group{0,4}) (Coeng (cn | V))?; + +consonant_syllable = Repha? (cn halant_group){0,4} cn medial_group halant_or_matra_group syllable_tail; +vowel_syllable = reph? V n? (ZWJ | (halant_group cn){0,4} medial_group halant_or_matra_group syllable_tail); +standalone_cluster = (Repha? Placeholder | reph? Dotted_Circle) n? (halant_group cn){0,4} medial_group halant_or_matra_group syllable_tail; +symbol_cluster = symbol syllable_tail; +broken_cluster = reph? n? (halant_group cn){0,4} medial_group halant_or_matra_group syllable_tail; + +main = + consonant_syllable:consonant_syllable + | vowel_syllable:vowel_syllable + | standalone_cluster:standalone_cluster + | symbol_cluster:symbol_cluster + | broken_cluster:broken_cluster +; diff --git a/node_modules/fontkit/src/opentype/shapers/indic.trie b/node_modules/fontkit/src/opentype/shapers/indic.trie new file mode 100644 index 0000000..511b5a1 Binary files /dev/null and b/node_modules/fontkit/src/opentype/shapers/indic.trie differ diff --git a/node_modules/fontkit/src/opentype/shapers/use.json b/node_modules/fontkit/src/opentype/shapers/use.json new file mode 100644 index 0000000..68581e1 --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/use.json @@ -0,0 +1 @@ +{"categories":["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],"decompositions":{"2507":[2503,2494],"2508":[2503,2519],"2888":[2887,2902],"2891":[2887,2878],"2892":[2887,2903],"3018":[3014,3006],"3019":[3015,3006],"3020":[3014,3031],"3144":[3142,3158],"3264":[3263,3285],"3271":[3270,3285],"3272":[3270,3286],"3274":[3270,3266],"3275":[3270,3266,3285],"3402":[3398,3390],"3403":[3399,3390],"3404":[3398,3415],"3546":[3545,3530],"3548":[3545,3535],"3549":[3545,3535,3530],"3550":[3545,3551],"3635":[3661,3634],"3763":[3789,3762],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"6971":[6970,6965],"6973":[6972,6965],"6976":[6974,6965],"6977":[6975,6965],"6979":[6978,6965],"69934":[69937,69927],"69935":[69938,69927],"70475":[70471,70462],"70476":[70471,70487],"70843":[70841,70842],"70844":[70841,70832],"70846":[70841,70845],"71098":[71096,71087],"71099":[71097,71087]},"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],"accepting":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],"tags":[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]} \ No newline at end of file diff --git a/node_modules/fontkit/src/opentype/shapers/use.machine b/node_modules/fontkit/src/opentype/shapers/use.machine new file mode 100644 index 0000000..603001c --- /dev/null +++ b/node_modules/fontkit/src/opentype/shapers/use.machine @@ -0,0 +1,44 @@ +consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*; +medial_consonants = MPre? MAbv? MBlw? MPst?; +dependent_vowels = VPre* VAbv* VBlw* VPst*; +vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*; +final_consonants = FAbv* FBlw* FPst* FM?; + +virama_terminated_cluster = + R? (B | GB) VS? + consonant_modifiers + H +; + +standard_cluster = + R? (B | GB) VS? + consonant_modifiers + medial_consonants + dependent_vowels + vowel_modifiers + final_consonants +; + +broken_cluster = + R? + consonant_modifiers + medial_consonants + dependent_vowels + vowel_modifiers + final_consonants +; + +number_joiner_terminated_cluster = N VS? (HN N VS?)* HN; +numeral_cluster = N VS? (HN N VS?)*; +symbol_cluster = S VS? SMAbv* SMBlw*; +independent_cluster = (IND | O | WJ) VS?; + +main = + independent_cluster:independent_cluster + | virama_terminated_cluster:virama_terminated_cluster + | standard_cluster:standard_cluster + | number_joiner_terminated_cluster:number_joiner_terminated_cluster + | numeral_cluster:numeral_cluster + | symbol_cluster:symbol_cluster + | broken_cluster:broken_cluster +; diff --git a/node_modules/fontkit/src/opentype/shapers/use.trie b/node_modules/fontkit/src/opentype/shapers/use.trie new file mode 100644 index 0000000..518e74d Binary files /dev/null and b/node_modules/fontkit/src/opentype/shapers/use.trie differ diff --git a/node_modules/fontkit/src/subset/CFFSubset.js b/node_modules/fontkit/src/subset/CFFSubset.js new file mode 100644 index 0000000..d4506e7 --- /dev/null +++ b/node_modules/fontkit/src/subset/CFFSubset.js @@ -0,0 +1,171 @@ +import Subset from './Subset'; +import CFFTop from '../cff/CFFTop'; +import CFFPrivateDict from '../cff/CFFPrivateDict'; +import standardStrings from '../cff/CFFStandardStrings'; + +export default class CFFSubset extends Subset { + constructor(font) { + super(font); + + this.cff = this.font['CFF ']; + if (!this.cff) { + throw new Error('Not a CFF Font'); + } + } + + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + + for (let gid of this.glyphs) { + this.charstrings.push(this.cff.getCharString(gid)); + + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + + for (let subr in glyph._usedGsubrs) { + gsubrs[subr] = true; + } + } + + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + + subsetSubrs(subrs, used) { + let res = []; + for (let i = 0; i < subrs.length; i++) { + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else { + res.push(new Uint8Array([11])); // return + } + } + + return res; + } + + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + + let used_fds = {}; + let used_subrs = []; + let fd_select = {}; + for (let gid of this.glyphs) { + let fd = this.cff.fdForGlyph(gid); + if (fd == null) { + continue; + } + + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + fd_select[fd] = topDict.FDArray.length - 1; + } + + used_fds[fd] = true; + topDict.FDSelect.fds.push(fd_select[fd]); + + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for (let subr in glyph._usedSubrs) { + used_subrs[fd_select[fd]][subr] = true; + } + } + + for (let i = 0; i < topDict.FDArray.length; i++) { + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + + return; + } + + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs) { + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + + for (let subr in glyph._usedSubrs) { + used_subrs[subr] = true; + } + } + + let privateDict = Object.assign({}, this.cff.topDict.Private); + if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) { + privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + } + + topDict.FDArray = [{ Private: privateDict }]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [{ first: 0, fd: 0 }], + sentinel: this.charstrings.length + }; + } + + addString(string) { + if (!string) { + return null; + } + + if (!this.strings) { + this.strings = []; + } + + this.strings.push(string); + return standardStrings.length + this.strings.length - 1; + } + + encode() { + this.subsetCharstrings(); + + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }] + }; + + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + + for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) { + topDict[key] = this.addString(this.cff.string(topDict[key])); + } + + topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0]; + topDict.CIDCount = this.charstrings.length; + + if (this.cff.isCIDFont) { + this.subsetFontdict(topDict); + } else { + this.createCIDFontdict(topDict); + } + + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: 4, + header: this.cff.header, + nameIndex: [this.cff.postscriptName], + topDictIndex: [topDict], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + + return CFFTop.toBuffer(top); + } +} diff --git a/node_modules/fontkit/src/subset/Subset.js b/node_modules/fontkit/src/subset/Subset.js new file mode 100644 index 0000000..06692b5 --- /dev/null +++ b/node_modules/fontkit/src/subset/Subset.js @@ -0,0 +1,27 @@ +import * as r from 'restructure'; + +const resolved = Promise.resolve(); + +export default class Subset { + constructor(font) { + this.font = font; + this.glyphs = []; + this.mapping = {}; + + // always include the missing glyph + this.includeGlyph(0); + } + + includeGlyph(glyph) { + if (typeof glyph === 'object') { + glyph = glyph.id; + } + + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + + return this.mapping[glyph]; + } +} diff --git a/node_modules/fontkit/src/subset/TTFSubset.js b/node_modules/fontkit/src/subset/TTFSubset.js new file mode 100644 index 0000000..f13e5ce --- /dev/null +++ b/node_modules/fontkit/src/subset/TTFSubset.js @@ -0,0 +1,131 @@ +import cloneDeep from 'clone'; +import Subset from './Subset'; +import Directory from '../tables/directory'; +import Tables from '../tables'; +import TTFGlyphEncoder from '../glyph/TTFGlyphEncoder'; + +export default class TTFSubset extends Subset { + constructor(font) { + super(font); + this.glyphEncoder = new TTFGlyphEncoder; + } + + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + + let buffer = stream.readBuffer(nextOffset - curOffset); + + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Uint8Array(buffer); + let view = new DataView(buffer.buffer); + for (let component of glyf.components) { + gid = this.includeGlyph(component.glyphID); + view.setUint16(component.pos, gid); + } + } else if (glyf && this.font._variationProcessor) { + // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + } + + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + + this.offset += buffer.length; + return this.glyf.length - 1; + } + + encode() { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [], + version: this.font.loca.version + }; + + this.hmtx = { + metrics: [], + bearings: [] + }; + + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while (i < this.glyphs.length) { + this._addGlyph(this.glyphs[i++]); + } + + let maxp = cloneDeep(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + + this.loca.offsets.push(this.offset); + + let head = cloneDeep(this.font.head); + head.indexToLocFormat = this.loca.version; + + let hhea = cloneDeep(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + + // TODO: subset prep, cvt, fpgm? + return Directory.toBuffer({ + tables: { + head, + hhea, + loca: this.loca, + maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + + // name: clone @font.name + // 'OS/2': clone @font['OS/2'] + // post: clone @font.post + // cmap: cmap + } + }); + } +} diff --git a/node_modules/fontkit/src/tables/BASE.js b/node_modules/fontkit/src/tables/BASE.js new file mode 100644 index 0000000..bbb84cf --- /dev/null +++ b/node_modules/fontkit/src/tables/BASE.js @@ -0,0 +1,78 @@ +import * as r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype'; +import {ItemVariationStore} from './variations'; + +let BaseCoord = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 // X or Y value, in design units + }, + + 2: { // Design units plus contour point + coordinate: r.int16, // X or Y value, in design units + referenceGlyph: r.uint16, // GlyphID of control glyph + baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph + }, + + 3: { // Design units plus Device table + coordinate: r.int16, // X or Y value, in design units + deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value + } +}); + +let BaseValues = new r.Struct({ + defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList + baseCoordCount: r.uint16, + baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount') +}); + +let FeatMinMaxRecord = new r.Struct({ + tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList + minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL +}); + +let MinMax = new r.Struct({ + minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + featMinMaxCount: r.uint16, // May be 0 + featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); + +let BaseLangSysRecord = new r.Struct({ + tag: new r.String(4), // 4-byte language system identification tag + minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'}) +}); + +let BaseScript = new r.Struct({ + baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL + defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL + baseLangSysCount: r.uint16, // May be 0 + baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); + +let BaseScriptRecord = new r.Struct({ + tag: new r.String(4), // 4-byte script identification tag + script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'}) +}); + +let BaseScriptList = new r.Array(BaseScriptRecord, r.uint16); + +// Array of 4-byte baseline identification tags-must be in alphabetical order +let BaseTagList = new r.Array(new r.String(4), r.uint16); + +let Axis = new r.Struct({ + baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL + baseScriptList: new r.Pointer(r.uint16, BaseScriptList) +}); + +export default new r.VersionedStruct(r.uint32, { + header: { + horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL + vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL + }, + + 0x00010000: {}, + 0x00010001: { + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore) + } +}); diff --git a/node_modules/fontkit/src/tables/COLR.js b/node_modules/fontkit/src/tables/COLR.js new file mode 100644 index 0000000..6a4b169 --- /dev/null +++ b/node_modules/fontkit/src/tables/COLR.js @@ -0,0 +1,25 @@ +import * as r from 'restructure'; + +let LayerRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top). + paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for + // the special case noted below. Each palette entry is 16 bits. + // A palette index of 0xFFFF is a special case indicating that + // the text foreground color should be used. + +let BaseGlyphRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only + // and is not rendered for color. + firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record. + // There will be numLayers consecutive entries for this base glyph. + numLayers: r.uint16 +}); + +export default new r.Struct({ + version: r.uint16, + numBaseGlyphRecords: r.uint16, + baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }), + numLayerRecords: r.uint16 +}); diff --git a/node_modules/fontkit/src/tables/CPAL.js b/node_modules/fontkit/src/tables/CPAL.js new file mode 100644 index 0000000..2b4fd9e --- /dev/null +++ b/node_modules/fontkit/src/tables/CPAL.js @@ -0,0 +1,24 @@ +import * as r from 'restructure'; + +let ColorRecord = new r.Struct({ + blue: r.uint8, + green: r.uint8, + red: r.uint8, + alpha: r.uint8 +}); + +export default new r.VersionedStruct(r.uint16, { + header: { + numPaletteEntries: r.uint16, + numPalettes: r.uint16, + numColorRecords: r.uint16, + colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')), + colorRecordIndices: new r.Array(r.uint16, 'numPalettes'), + }, + 0: {}, + 1: { + offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')), + offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')), + offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries')) + } +}); diff --git a/node_modules/fontkit/src/tables/DSIG.js b/node_modules/fontkit/src/tables/DSIG.js new file mode 100644 index 0000000..660be0c --- /dev/null +++ b/node_modules/fontkit/src/tables/DSIG.js @@ -0,0 +1,21 @@ +import * as r from 'restructure'; + +let Signature = new r.Struct({ + format: r.uint32, + length: r.uint32, + offset: r.uint32 +}); + +let SignatureBlock = new r.Struct({ + reserved: new r.Reserved(r.uint16, 2), + cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature + signature: new r.Buffer('cbSignature') +}); + +export default new r.Struct({ + ulVersion: r.uint32, // Version number of the DSIG table (0x00000001) + usNumSigs: r.uint16, // Number of signatures in the table + usFlag: r.uint16, // Permission flags + signatures: new r.Array(Signature, 'usNumSigs'), + signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs') +}); diff --git a/node_modules/fontkit/src/tables/EBDT.js b/node_modules/fontkit/src/tables/EBDT.js new file mode 100644 index 0000000..c4aa596 --- /dev/null +++ b/node_modules/fontkit/src/tables/EBDT.js @@ -0,0 +1,91 @@ +import * as r from 'restructure'; + +export let BigMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + horiBearingX: r.int8, + horiBearingY: r.int8, + horiAdvance: r.uint8, + vertBearingX: r.int8, + vertBearingY: r.int8, + vertAdvance: r.uint8 +}); + +export let SmallMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + bearingX: r.int8, + bearingY: r.int8, + advance: r.uint8 +}); + +let EBDTComponent = new r.Struct({ + glyph: r.uint16, + xOffset: r.int8, + yOffset: r.int8 +}); + +class ByteAligned {} + +class BitAligned {} + +export let glyph = new r.VersionedStruct('version', { + 1: { + metrics: SmallMetrics, + data: ByteAligned + }, + + 2: { + metrics: SmallMetrics, + data: BitAligned + }, + + // format 3 is deprecated + // format 4 is not supported by Microsoft + + 5: { + data: BitAligned + }, + + 6: { + metrics: BigMetrics, + data: ByteAligned + }, + + 7: { + metrics: BigMetrics, + data: BitAligned + }, + + 8: { + metrics: SmallMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 9: { + metrics: BigMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 17: { + metrics: SmallMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 18: { + metrics: BigMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 19: { + dataLen: r.uint32, + data: new r.Buffer('dataLen') + } +}); + diff --git a/node_modules/fontkit/src/tables/EBLC.js b/node_modules/fontkit/src/tables/EBLC.js new file mode 100644 index 0000000..90705ef --- /dev/null +++ b/node_modules/fontkit/src/tables/EBLC.js @@ -0,0 +1,80 @@ +import * as r from 'restructure'; +import {BigMetrics} from './EBDT'; + +let SBitLineMetrics = new r.Struct({ + ascender: r.int8, + descender: r.int8, + widthMax: r.uint8, + caretSlopeNumerator: r.int8, + caretSlopeDenominator: r.int8, + caretOffset: r.int8, + minOriginSB: r.int8, + minAdvanceSB: r.int8, + maxBeforeBL: r.int8, + minAfterBL: r.int8, + pad: new r.Reserved(r.int8, 2) +}); + +let CodeOffsetPair = new r.Struct({ + glyphCode: r.uint16, + offset: r.uint16 +}); + +let IndexSubtable = new r.VersionedStruct(r.uint16, { + header: { + imageFormat: r.uint16, + imageDataOffset: r.uint32 + }, + + 1: { + offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + + 2: { + imageSize: r.uint32, + bigMetrics: BigMetrics + }, + + 3: { + offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + + 4: { + numGlyphs: r.uint32, + glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1) + }, + + 5: { + imageSize: r.uint32, + bigMetrics: BigMetrics, + numGlyphs: r.uint32, + glyphCodeArray: new r.Array(r.uint16, 'numGlyphs') + } +}); + +let IndexSubtableArray = new r.Struct({ + firstGlyphIndex: r.uint16, + lastGlyphIndex: r.uint16, + subtable: new r.Pointer(r.uint32, IndexSubtable) +}); + +let BitmapSizeTable = new r.Struct({ + indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }), + indexTablesSize: r.uint32, + numberOfIndexSubTables: r.uint32, + colorRef: r.uint32, + hori: SBitLineMetrics, + vert: SBitLineMetrics, + startGlyphIndex: r.uint16, + endGlyphIndex: r.uint16, + ppemX: r.uint8, + ppemY: r.uint8, + bitDepth: r.uint8, + flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical']) +}); + +export default new r.Struct({ + version: r.uint32, // 0x00020000 + numSizes: r.uint32, + sizes: new r.Array(BitmapSizeTable, 'numSizes') +}); diff --git a/node_modules/fontkit/src/tables/GDEF.js b/node_modules/fontkit/src/tables/GDEF.js new file mode 100644 index 0000000..a1be863 --- /dev/null +++ b/node_modules/fontkit/src/tables/GDEF.js @@ -0,0 +1,57 @@ +import * as r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype'; +import {ItemVariationStore} from './variations'; + +let AttachPoint = new r.Array(r.uint16, r.uint16); +let AttachList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount') +}); + +let CaretValue = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 + }, + + 2: { // Contour point + caretValuePoint: r.uint16 + }, + + 3: { // Design units plus Device table + coordinate: r.int16, + deviceTable: new r.Pointer(r.uint16, Device) + } +}); + +let LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16); + +let LigCaretList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + ligGlyphCount: r.uint16, + ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount') +}); + +let MarkGlyphSetsDef = new r.Struct({ + markSetTableFormat: r.uint16, + markSetCount: r.uint16, + coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount') +}); + +export default new r.VersionedStruct(r.uint32, { + header: { + glyphClassDef: new r.Pointer(r.uint16, ClassDef), + attachList: new r.Pointer(r.uint16, AttachList), + ligCaretList: new r.Pointer(r.uint16, LigCaretList), + markAttachClassDef: new r.Pointer(r.uint16, ClassDef) + }, + + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef), + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore) + } +}); diff --git a/node_modules/fontkit/src/tables/GPOS.js b/node_modules/fontkit/src/tables/GPOS.js new file mode 100644 index 0000000..3fc7cc3 --- /dev/null +++ b/node_modules/fontkit/src/tables/GPOS.js @@ -0,0 +1,209 @@ +import * as r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype'; +import {FeatureVariations} from './variations'; + +let ValueFormat = new r.Bitfield(r.uint16, [ + 'xPlacement', 'yPlacement', + 'xAdvance', 'yAdvance', + 'xPlaDevice', 'yPlaDevice', + 'xAdvDevice', 'yAdvDevice' +]); + +let types = { + xPlacement: r.int16, + yPlacement: r.int16, + xAdvance: r.int16, + yAdvance: r.int16, + xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }), + yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }), + xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }), + yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: ctx => ctx.rel }) +}; + +class ValueRecord { + constructor(key = 'valueFormat') { + this.key = key; + } + + buildStruct(parent) { + let struct = parent; + while (!struct[this.key] && struct.parent) { + struct = struct.parent; + } + + if (!struct[this.key]) return; + + let fields = {}; + fields.rel = () => struct._startOffset; + + let format = struct[this.key]; + for (let key in format) { + if (format[key]) { + fields[key] = types[key]; + } + } + + return new r.Struct(fields); + } + + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } +} + +let PairValueRecord = new r.Struct({ + secondGlyph: r.uint16, + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +let PairSet = new r.Array(PairValueRecord, r.uint16); + +let Class2Record = new r.Struct({ + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +let Anchor = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + xCoordinate: r.int16, + yCoordinate: r.int16 + }, + + 2: { // Design units plus contour point + xCoordinate: r.int16, + yCoordinate: r.int16, + anchorPoint: r.uint16 + }, + + 3: { // Design units plus Device tables + xCoordinate: r.int16, + yCoordinate: r.int16, + xDeviceTable: new r.Pointer(r.uint16, Device), + yDeviceTable: new r.Pointer(r.uint16, Device) + } +}); + +let EntryExitRecord = new r.Struct({ + entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}), + exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}) +}); + +let MarkRecord = new r.Struct({ + class: r.uint16, + markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}) +}); + +let MarkArray = new r.Array(MarkRecord, r.uint16); + +let BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount); +let BaseArray = new r.Array(BaseRecord, r.uint16); + +let ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount); +let LigatureAttach = new r.Array(ComponentRecord, r.uint16); +let LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16); + +let GPOSLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, { // Single Adjustment + 1: { // Single positioning value + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + value: new ValueRecord() + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + valueCount: r.uint16, + values: new r.LazyArray(new ValueRecord(), 'valueCount') + } + }), + + 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning + 1: { // Adjustments for glyph pairs + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + pairSetCount: r.uint16, + pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount') + }, + + 2: { // Class pair adjustment + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + classDef1: new r.Pointer(r.uint16, ClassDef), + classDef2: new r.Pointer(r.uint16, ClassDef), + class1Count: r.uint16, + class2Count: r.uint16, + classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count') + } + }), + + 3: { // Cursive Attachment Positioning + format: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + entryExitCount: r.uint16, + entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount') + }, + + 4: { // MarkToBase Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + baseCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + baseArray: new r.Pointer(r.uint16, BaseArray) + }, + + 5: { // MarkToLigature Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + ligatureCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + ligatureArray: new r.Pointer(r.uint16, LigatureArray) + }, + + 6: { // MarkToMark Attachment Positioning + format: r.uint16, + mark1Coverage: new r.Pointer(r.uint16, Coverage), + mark2Coverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + mark1Array: new r.Pointer(r.uint16, MarkArray), + mark2Array: new r.Pointer(r.uint16, BaseArray) + }, + + 7: Context, // Contextual positioning + 8: ChainingContext, // Chaining contextual positioning + + 9: { // Extension Positioning + posFormat: r.uint16, + lookupType: r.uint16, // cannot also be 9 + extension: new r.Pointer(r.uint32, null) + } +}); + +// Fix circular reference +GPOSLookup.versions[9].extension.type = GPOSLookup; + +export default new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); + +// export GPOSLookup for JSTF table +export { GPOSLookup }; diff --git a/node_modules/fontkit/src/tables/GSUB.js b/node_modules/fontkit/src/tables/GSUB.js new file mode 100644 index 0000000..757bf5a --- /dev/null +++ b/node_modules/fontkit/src/tables/GSUB.js @@ -0,0 +1,84 @@ +import * as r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype'; +import {FeatureVariations} from './variations'; + +let Sequence = new r.Array(r.uint16, r.uint16); +let AlternateSet = Sequence; + +let Ligature = new r.Struct({ + glyph: r.uint16, + compCount: r.uint16, + components: new r.Array(r.uint16, t => t.compCount - 1) +}); + +let LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16); + +let GSUBLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, {// Single Substitution + 1: { + coverage: new r.Pointer(r.uint16, Coverage), + deltaGlyphID: r.int16 + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + substitute: new r.LazyArray(r.uint16, 'glyphCount') + } + }), + + 2: { // Multiple Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count') + }, + + 3: { // Alternate Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count') + }, + + 4: { // Ligature Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count') + }, + + 5: Context, // Contextual Substitution + 6: ChainingContext, // Chaining Contextual Substitution + + 7: { // Extension Substitution + substFormat: r.uint16, + lookupType: r.uint16, // cannot also be 7 + extension: new r.Pointer(r.uint32, null) + }, + + 8: { // Reverse Chaining Contextual Single Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + glyphCount: r.uint16, + substitutes: new r.Array(r.uint16, 'glyphCount') + } +}); + +// Fix circular reference +GSUBLookup.versions[7].extension.type = GSUBLookup; + +export default new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); diff --git a/node_modules/fontkit/src/tables/HVAR.js b/node_modules/fontkit/src/tables/HVAR.js new file mode 100644 index 0000000..0b45e95 --- /dev/null +++ b/node_modules/fontkit/src/tables/HVAR.js @@ -0,0 +1,44 @@ +import * as r from 'restructure'; +import { resolveLength } from 'restructure'; +import { ItemVariationStore } from './variations'; + +// TODO: add this to restructure +class VariableSizeNumber { + constructor(size) { + this._size = size; + } + + decode(stream, parent) { + switch (this.size(0, parent)) { + case 1: return stream.readUInt8(); + case 2: return stream.readUInt16BE(); + case 3: return stream.readUInt24BE(); + case 4: return stream.readUInt32BE(); + } + } + + size(val, parent) { + return resolveLength(this._size, null, parent); + } +} + +let MapDataEntry = new r.Struct({ + entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1), + innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1) +}); + +let DeltaSetIndexMap = new r.Struct({ + entryFormat: r.uint16, + mapCount: r.uint16, + mapData: new r.Array(MapDataEntry, 'mapCount') +}); + +export default new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore), + advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap) +}); diff --git a/node_modules/fontkit/src/tables/JSTF.js b/node_modules/fontkit/src/tables/JSTF.js new file mode 100644 index 0000000..abfbe94 --- /dev/null +++ b/node_modules/fontkit/src/tables/JSTF.js @@ -0,0 +1,43 @@ +import * as r from 'restructure'; +import { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype'; +import { GPOSLookup } from './GPOS'; + +let JstfGSUBModList = new r.Array(r.uint16, r.uint16); + +let JstfPriority = new r.Struct({ + shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)), + extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) +}); + +let JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16); + +let JstfLangSysRecord = new r.Struct({ + tag: new r.String(4), + jstfLangSys: new r.Pointer(r.uint16, JstfLangSys) +}); + +let JstfScript = new r.Struct({ + extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length + defaultLangSys: new r.Pointer(r.uint16, JstfLangSys), + langSysCount: r.uint16, + langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount') +}); + +let JstfScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'}) +}); + +export default new r.Struct({ + version: r.uint32, // should be 0x00010000 + scriptCount: r.uint16, + scriptList: new r.Array(JstfScriptRecord, 'scriptCount') +}); diff --git a/node_modules/fontkit/src/tables/LTSH.js b/node_modules/fontkit/src/tables/LTSH.js new file mode 100644 index 0000000..8a7c29a --- /dev/null +++ b/node_modules/fontkit/src/tables/LTSH.js @@ -0,0 +1,10 @@ +import * as r from 'restructure'; + +// Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +export default new r.Struct({ + version: r.uint16, + numGlyphs: r.uint16, + yPels: new r.Array(r.uint8, 'numGlyphs') +}); diff --git a/node_modules/fontkit/src/tables/OS2.js b/node_modules/fontkit/src/tables/OS2.js new file mode 100644 index 0000000..931a0e9 --- /dev/null +++ b/node_modules/fontkit/src/tables/OS2.js @@ -0,0 +1,84 @@ +import * as r from 'restructure'; + +var OS2 = new r.VersionedStruct(r.uint16, { + header: { + xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space + usWeightClass: r.uint16, // visual weight of stroke in glyphs + usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio) + fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights + null, 'noEmbedding', 'viewOnly', 'editable', null, + null, null, null, 'noSubsetting', 'bitmapOnly' + ]), + ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts + ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts + ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts + ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts + ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts + ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts + ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts + ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts + yStrikeoutSize: r.int16, // width of the strikeout stroke + yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline + sFamilyClass: r.int16, // classification of font-family design + panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface + ulCharRange: new r.Array(r.uint32, 4), + vendorID: new r.String(4), // four character identifier for the font vendor + fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font + 'italic', 'underscore', 'negative', 'outlined', 'strikeout', + 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique' + ]), + usFirstCharIndex: r.uint16, // The minimum Unicode index in this font + usLastCharIndex: r.uint16 // The maximum Unicode index in this font + }, + + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + + 1: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2) + }, + + 2: { + // these should be common with version 1 somehow + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16 + }, + + 5: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16, + + usLowerOpticalPointSize: r.uint16, + usUpperOpticalPointSize: r.uint16 + } +}); + +let versions = OS2.versions; +versions[3] = versions[4] = versions[2]; + +export default OS2; diff --git a/node_modules/fontkit/src/tables/PCLT.js b/node_modules/fontkit/src/tables/PCLT.js new file mode 100644 index 0000000..5df584d --- /dev/null +++ b/node_modules/fontkit/src/tables/PCLT.js @@ -0,0 +1,21 @@ +import * as r from 'restructure'; + +// PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +export default new r.Struct({ + version: r.uint16, + fontNumber: r.uint32, + pitch: r.uint16, + xHeight: r.uint16, + style: r.uint16, + typeFamily: r.uint16, + capHeight: r.uint16, + symbolSet: r.uint16, + typeface: new r.String(16), + characterComplement: new r.String(8), + fileName: new r.String(6), + strokeWeight: new r.String(1), + widthType: new r.String(1), + serifStyle: r.uint8, + reserved: new r.Reserved(r.uint8) +}); diff --git a/node_modules/fontkit/src/tables/VDMX.js b/node_modules/fontkit/src/tables/VDMX.js new file mode 100644 index 0000000..c65e658 --- /dev/null +++ b/node_modules/fontkit/src/tables/VDMX.js @@ -0,0 +1,33 @@ +import * as r from 'restructure'; + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. + +let Ratio = new r.Struct({ + bCharSet: r.uint8, // Character set + xRatio: r.uint8, // Value to use for x-Ratio + yStartRatio: r.uint8, // Starting y-Ratio value + yEndRatio: r.uint8 // Ending y-Ratio value +}); + +let vTable = new r.Struct({ + yPelHeight: r.uint16, // yPelHeight to which values apply + yMax: r.int16, // Maximum value (in pels) for this yPelHeight + yMin: r.int16 // Minimum value (in pels) for this yPelHeight +}); + +let VdmxGroup = new r.Struct({ + recs: r.uint16, // Number of height records in this group + startsz: r.uint8, // Starting yPelHeight + endsz: r.uint8, // Ending yPelHeight + entries: new r.Array(vTable, 'recs') // The VDMX records +}); + +export default new r.Struct({ + version: r.uint16, // Version number (0 or 1) + numRecs: r.uint16, // Number of VDMX groups present + numRatios: r.uint16, // Number of aspect ratio groupings + ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges + offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range + groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings +}); diff --git a/node_modules/fontkit/src/tables/VORG.js b/node_modules/fontkit/src/tables/VORG.js new file mode 100644 index 0000000..2a4f440 --- /dev/null +++ b/node_modules/fontkit/src/tables/VORG.js @@ -0,0 +1,14 @@ +import * as r from 'restructure'; + +let VerticalOrigin = new r.Struct({ + glyphIndex: r.uint16, + vertOriginY: r.int16 +}); + +export default new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + defaultVertOriginY: r.int16, + numVertOriginYMetrics: r.uint16, + metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics') +}); diff --git a/node_modules/fontkit/src/tables/WOFF2Directory.js b/node_modules/fontkit/src/tables/WOFF2Directory.js new file mode 100644 index 0000000..91b1053 --- /dev/null +++ b/node_modules/fontkit/src/tables/WOFF2Directory.js @@ -0,0 +1,74 @@ +import * as r from 'restructure'; + +const Base128 = { + decode(stream) { + let result = 0; + let iterable = [0, 1, 2, 3, 4]; + for (let j = 0; j < iterable.length; j++) { + let i = iterable[j]; + let code = stream.readUInt8(); + + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) { + throw new Error('Overflow'); + } + + result = (result << 7) | (code & 0x7f); + if ((code & 0x80) === 0) { + return result; + } + } + + throw new Error('Bad base 128 number'); + } +}; + +let knownTags = [ + 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ', + 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp', + 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF', + 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL', + 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc', + 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx', + 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill' +]; + +let WOFF2DirectoryEntry = new r.Struct({ + flags: r.uint8, + customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f), + tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); }, + length: Base128, + transformVersion: t => (t.flags >>> 6) & 0x03, + transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new r.Optional(Base128, t => t.transformed) +}); + +let WOFF2Directory = new r.Struct({ + tag: new r.String(4), // should be 'wOF2' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + totalCompressedSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFF2DirectoryEntry, 'numTables') +}); + +WOFF2Directory.process = function() { + let tables = {}; + for (let i = 0; i < this.tables.length; i++) { + let table = this.tables[i]; + tables[table.tag] = table; + } + + return this.tables = tables; +}; + +export default WOFF2Directory; diff --git a/node_modules/fontkit/src/tables/WOFFDirectory.js b/node_modules/fontkit/src/tables/WOFFDirectory.js new file mode 100644 index 0000000..dfd5d55 --- /dev/null +++ b/node_modules/fontkit/src/tables/WOFFDirectory.js @@ -0,0 +1,38 @@ +import * as r from 'restructure'; +import tables from './'; + +let WOFFDirectoryEntry = new r.Struct({ + tag: new r.String(4), + offset: new r.Pointer(r.uint32, 'void', {type: 'global'}), + compLength: r.uint32, + length: r.uint32, + origChecksum: r.uint32 +}); + +let WOFFDirectory = new r.Struct({ + tag: new r.String(4), // should be 'wOFF' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFFDirectoryEntry, 'numTables') +}); + +WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables) { + tables[table.tag] = table; + } + + this.tables = tables; +}; + +export default WOFFDirectory; diff --git a/node_modules/fontkit/src/tables/aat.js b/node_modules/fontkit/src/tables/aat.js new file mode 100644 index 0000000..299621b --- /dev/null +++ b/node_modules/fontkit/src/tables/aat.js @@ -0,0 +1,157 @@ +import * as r from 'restructure'; + +class UnboundedArrayAccessor { + constructor(type, stream, parent) { + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } + + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + + return this._items[index]; + } + + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } +} + +export class UnboundedArray extends r.Array { + constructor(type) { + super(type, 0); + } + + decode(stream, parent) { + return new UnboundedArrayAccessor(this.type, stream, parent); + } +} + +export let LookupTable = function(ValueType = r.uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + constructor(type) { + this.type = type; + } + + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + } + + ValueType = new Shadow(ValueType); + + let BinarySearchHeader = new r.Struct({ + unitSize: r.uint16, + nUnits: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16 + }); + + let LookupSegmentSingle = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + value: ValueType + }); + + let LookupSegmentArray = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'}) + }); + + let LookupSingle = new r.Struct({ + glyph: r.uint16, + value: ValueType + }); + + return new r.VersionedStruct(r.uint16, { + 0: { + values: new UnboundedArray(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: r.uint16, + count: r.uint16, + values: new r.Array(ValueType, 'count') + } + }); +}; + +export function StateTable(entryData = {}, lookupType = r.uint16) { + let entry = Object.assign({ + newState: r.uint16, + flags: r.uint16 + }, entryData); + + let Entry = new r.Struct(entry); + let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses)); + + let StateHeader = new r.Struct({ + nClasses: r.uint32, + classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)), + stateArray: new r.Pointer(r.uint32, StateArray), + entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry)) + }); + + return StateHeader; +} + +// This is the old version of the StateTable structure +export function StateTable1(entryData = {}, lookupType = r.uint16) { + let ClassLookupTable = new r.Struct({ + version() { return 8; }, // simulate LookupTable + firstGlyph: r.uint16, + values: new r.Array(r.uint8, r.uint16) + }); + + let entry = Object.assign({ + newStateOffset: r.uint16, + // convert offset to stateArray index + newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: r.uint16 + }, entryData); + + let Entry = new r.Struct(entry); + let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses)); + + let StateHeader1 = new r.Struct({ + nClasses: r.uint16, + classTable: new r.Pointer(r.uint16, ClassLookupTable), + stateArray: new r.Pointer(r.uint16, StateArray), + entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry)) + }); + + return StateHeader1; +} diff --git a/node_modules/fontkit/src/tables/avar.js b/node_modules/fontkit/src/tables/avar.js new file mode 100644 index 0000000..d2e5aef --- /dev/null +++ b/node_modules/fontkit/src/tables/avar.js @@ -0,0 +1,19 @@ +import * as r from 'restructure'; + +let shortFrac = new r.Fixed(16, 'BE', 14); + +let Correspondence = new r.Struct({ + fromCoord: shortFrac, + toCoord: shortFrac +}); + +let Segment = new r.Struct({ + pairCount: r.uint16, + correspondence: new r.Array(Correspondence, 'pairCount') +}); + +export default new r.Struct({ + version: r.fixed32, + axisCount: r.uint32, + segment: new r.Array(Segment, 'axisCount') +}); diff --git a/node_modules/fontkit/src/tables/bsln.js b/node_modules/fontkit/src/tables/bsln.js new file mode 100644 index 0000000..21d5754 --- /dev/null +++ b/node_modules/fontkit/src/tables/bsln.js @@ -0,0 +1,31 @@ +import * as r from 'restructure'; +import { LookupTable } from './aat'; + +let BslnSubtable = new r.VersionedStruct('format', { + 0: { // Distance-based, no mapping + deltas: new r.Array(r.int16, 32) + }, + + 1: { // Distance-based, with mapping + deltas: new r.Array(r.int16, 32), + mappingData: new LookupTable(r.uint16) + }, + + 2: { // Control point-based, no mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32) + }, + + 3: { // Control point-based, with mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32), + mappingData: new LookupTable(r.uint16) + } +}); + +export default new r.Struct({ + version: r.fixed32, + format: r.uint16, + defaultBaseline: r.uint16, + subtable: BslnSubtable +}); diff --git a/node_modules/fontkit/src/tables/cmap.js b/node_modules/fontkit/src/tables/cmap.js new file mode 100644 index 0000000..0049e45 --- /dev/null +++ b/node_modules/fontkit/src/tables/cmap.js @@ -0,0 +1,127 @@ +import * as r from 'restructure'; + +let SubHeader = new r.Struct({ + firstCode: r.uint16, + entryCount: r.uint16, + idDelta: r.int16, + idRangeOffset: r.uint16 +}); + +let CmapGroup = new r.Struct({ + startCharCode: r.uint32, + endCharCode: r.uint32, + glyphID: r.uint32 +}); + +let UnicodeValueRange = new r.Struct({ + startUnicodeValue: r.uint24, + additionalCount: r.uint8 +}); + +let UVSMapping = new r.Struct({ + unicodeValue: r.uint24, + glyphID: r.uint16 +}); + +let DefaultUVS = new r.Array(UnicodeValueRange, r.uint32); +let NonDefaultUVS = new r.Array(UVSMapping, r.uint32); + +let VarSelectorRecord = new r.Struct({ + varSelector: r.uint24, + defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}), + nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'}) +}); + +let CmapSubtable = new r.VersionedStruct(r.uint16, { + 0: { // Byte encoding + length: r.uint16, // Total table length in bytes (set to 262 for format 0) + language: r.uint16, // Language code for this encoding subtable, or zero if language-independent + codeMap: new r.LazyArray(r.uint8, 256) + }, + + 2: { // High-byte mapping (CJK) + length: r.uint16, + language: r.uint16, + subHeaderKeys: new r.Array(r.uint16, 256), + subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'), + glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount') + }, + + 4: { // Segment mapping to delta values + length: r.uint16, // Total table length in bytes + language: r.uint16, // Language code + segCountX2: r.uint16, + segCount: t => t.segCountX2 >> 1, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + endCode: new r.LazyArray(r.uint16, 'segCount'), + reservedPad: new r.Reserved(r.uint16), // This value should be zero + startCode: new r.LazyArray(r.uint16, 'segCount'), + idDelta: new r.LazyArray(r.int16, 'segCount'), + idRangeOffset: new r.LazyArray(r.uint16, 'segCount'), + glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2) + }, + + 6: { // Trimmed table + length: r.uint16, + language: r.uint16, + firstCode: r.uint16, + entryCount: r.uint16, + glyphIndices: new r.LazyArray(r.uint16, 'entryCount') + }, + + 8: { // mixed 16-bit and 32-bit coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint16, + is32: new r.LazyArray(r.uint8, 8192), + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 10: { // Trimmed Array + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + firstCode: r.uint32, + entryCount: r.uint32, + glyphIndices: new r.LazyArray(r.uint16, 'numChars') + }, + + 12: { // Segmented coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID) + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 14: { // Unicode Variation Sequences + length: r.uint32, + numRecords: r.uint32, + varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords') + } +}); + +let CmapEntry = new r.Struct({ + platformID: r.uint16, // Platform identifier + encodingID: r.uint16, // Platform-specific encoding identifier + table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true}) +}); + +// character to glyph mapping +export default new r.Struct({ + version: r.uint16, + numSubtables: r.uint16, + tables: new r.Array(CmapEntry, 'numSubtables') +}); diff --git a/node_modules/fontkit/src/tables/cvt.js b/node_modules/fontkit/src/tables/cvt.js new file mode 100644 index 0000000..48eecc3 --- /dev/null +++ b/node_modules/fontkit/src/tables/cvt.js @@ -0,0 +1,6 @@ +import * as r from 'restructure'; + +// An array of predefined values accessible by instructions +export default new r.Struct({ + controlValues: new r.Array(r.int16) +}); diff --git a/node_modules/fontkit/src/tables/directory.js b/node_modules/fontkit/src/tables/directory.js new file mode 100644 index 0000000..c95b8c6 --- /dev/null +++ b/node_modules/fontkit/src/tables/directory.js @@ -0,0 +1,58 @@ +import * as r from 'restructure'; +import Tables from './'; + +let TableEntry = new r.Struct({ + tag: new r.String(4), + checkSum: r.uint32, + offset: new r.Pointer(r.uint32, 'void', { type: 'global' }), + length: r.uint32 +}); + +let Directory = new r.Struct({ + tag: new r.String(4), + numTables: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + tables: new r.Array(TableEntry, 'numTables') +}); + +Directory.process = function() { + let tables = {}; + for (let table of this.tables) { + tables[table.tag] = table; + } + + this.tables = tables; +}; + +Directory.preEncode = function() { + if (!Array.isArray(this.tables)) { + let tables = []; + for (let tag in this.tables) { + let table = this.tables[tag]; + if (table) { + tables.push({ + tag: tag, + checkSum: 0, + offset: new r.VoidPointer(Tables[tag], table), + length: Tables[tag].size(table) + }); + } + } + + this.tables = tables; + } + + this.tag = 'true'; + this.numTables = this.tables.length; + + let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2)); + let maxPowerOf2 = Math.pow(2, maxExponentFor2); + + this.searchRange = maxPowerOf2 * 16; + this.entrySelector = Math.log(maxPowerOf2) / Math.LN2; + this.rangeShift = this.numTables * 16 - this.searchRange; +}; + +export default Directory; diff --git a/node_modules/fontkit/src/tables/feat.js b/node_modules/fontkit/src/tables/feat.js new file mode 100644 index 0000000..bfbbfb2 --- /dev/null +++ b/node_modules/fontkit/src/tables/feat.js @@ -0,0 +1,28 @@ +import * as r from 'restructure'; + +let Setting = new r.Struct({ + setting: r.uint16, + nameIndex: r.int16, + name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); + +let FeatureName = new r.Struct({ + feature: r.uint16, + nSettings: r.uint16, + settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }), + featureFlags: new r.Bitfield(r.uint8, [ + null, null, null, null, null, null, + 'hasDefault', 'exclusive' + ]), + defaultSetting: r.uint8, + nameIndex: r.int16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); + +export default new r.Struct({ + version: r.fixed32, + featureNameCount: r.uint16, + reserved1: new r.Reserved(r.uint16), + reserved2: new r.Reserved(r.uint32), + featureNames: new r.Array(FeatureName, 'featureNameCount') +}); diff --git a/node_modules/fontkit/src/tables/fpgm.js b/node_modules/fontkit/src/tables/fpgm.js new file mode 100644 index 0000000..fde3e4d --- /dev/null +++ b/node_modules/fontkit/src/tables/fpgm.js @@ -0,0 +1,8 @@ +import * as r from 'restructure'; + +// A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +export default new r.Struct({ + instructions: new r.Array(r.uint8) +}); diff --git a/node_modules/fontkit/src/tables/fvar.js b/node_modules/fontkit/src/tables/fvar.js new file mode 100644 index 0000000..d4187ed --- /dev/null +++ b/node_modules/fontkit/src/tables/fvar.js @@ -0,0 +1,31 @@ +import * as r from 'restructure'; + +let Axis = new r.Struct({ + axisTag: new r.String(4), + minValue: r.fixed32, + defaultValue: r.fixed32, + maxValue: r.fixed32, + flags: r.uint16, + nameID: r.uint16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameID] +}); + +let Instance = new r.Struct({ + nameID: r.uint16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameID], + flags: r.uint16, + coord: new r.Array(r.fixed32, t => t.parent.axisCount), + postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0) +}); + +export default new r.Struct({ + version: r.fixed32, + offsetToData: r.uint16, + countSizePairs: r.uint16, + axisCount: r.uint16, + axisSize: r.uint16, + instanceCount: r.uint16, + instanceSize: r.uint16, + axis: new r.Array(Axis, 'axisCount'), + instance: new r.Array(Instance, 'instanceCount') +}); diff --git a/node_modules/fontkit/src/tables/gasp.js b/node_modules/fontkit/src/tables/gasp.js new file mode 100644 index 0000000..d0925b2 --- /dev/null +++ b/node_modules/fontkit/src/tables/gasp.js @@ -0,0 +1,15 @@ +import * as r from 'restructure'; + +let GaspRange = new r.Struct({ + rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem + rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior + 'grayscale', 'gridfit', + 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); + +export default new r.Struct({ + version: r.uint16, // set to 0 + numRanges: r.uint16, + gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem +}); diff --git a/node_modules/fontkit/src/tables/glyf.js b/node_modules/fontkit/src/tables/glyf.js new file mode 100644 index 0000000..207bb3c --- /dev/null +++ b/node_modules/fontkit/src/tables/glyf.js @@ -0,0 +1,4 @@ +import * as r from 'restructure'; + +// only used for encoding +export default new r.Array(new r.Buffer); diff --git a/node_modules/fontkit/src/tables/gvar.js b/node_modules/fontkit/src/tables/gvar.js new file mode 100644 index 0000000..8b4b1a4 --- /dev/null +++ b/node_modules/fontkit/src/tables/gvar.js @@ -0,0 +1,27 @@ +import * as r from 'restructure'; + +let shortFrac = new r.Fixed(16, 'BE', 14); +class Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags + ? stream.readUInt32BE() + : stream.readUInt16BE() * 2; + } +} + +let gvar = new r.Struct({ + version: r.uint16, + reserved: new r.Reserved(r.uint16), + axisCount: r.uint16, + globalCoordCount: r.uint16, + globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: r.uint16, + flags: r.uint16, + offsetToData: r.uint32, + offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: ctx => ctx.offsetToData, allowNull: false }), t => t.glyphCount + 1) +}); + +export default gvar; diff --git a/node_modules/fontkit/src/tables/hdmx.js b/node_modules/fontkit/src/tables/hdmx.js new file mode 100644 index 0000000..511f089 --- /dev/null +++ b/node_modules/fontkit/src/tables/hdmx.js @@ -0,0 +1,15 @@ +import * as r from 'restructure'; + +let DeviceRecord = new r.Struct({ + pixelSize: r.uint8, + maximumWidth: r.uint8, + widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs) +}); + +// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +export default new r.Struct({ + version: r.uint16, + numRecords: r.int16, + sizeDeviceRecord: r.int32, + records: new r.Array(DeviceRecord, 'numRecords') +}); diff --git a/node_modules/fontkit/src/tables/head.js b/node_modules/fontkit/src/tables/head.js new file mode 100644 index 0000000..88f7a51 --- /dev/null +++ b/node_modules/fontkit/src/tables/head.js @@ -0,0 +1,25 @@ +import * as r from 'restructure'; + +// font header +export default new r.Struct({ + version: r.int32, // 0x00010000 (version 1.0) + revision: r.int32, // set by font manufacturer + checkSumAdjustment: r.uint32, + magicNumber: r.uint32, // set to 0x5F0F3CF5 + flags: r.uint16, + unitsPerEm: r.uint16, // range from 64 to 16384 + created: new r.Array(r.int32, 2), + modified: new r.Array(r.int32, 2), + xMin: r.int16, // for all glyph bounding boxes + yMin: r.int16, // for all glyph bounding boxes + xMax: r.int16, // for all glyph bounding boxes + yMax: r.int16, // for all glyph bounding boxes + macStyle: new r.Bitfield(r.uint16, [ + 'bold', 'italic', 'underline', 'outline', + 'shadow', 'condensed', 'extended' + ]), + lowestRecPPEM: r.uint16, // smallest readable size in pixels + fontDirectionHint: r.int16, + indexToLocFormat: r.int16, // 0 for short offsets, 1 for long + glyphDataFormat: r.int16 // 0 for current format +}); diff --git a/node_modules/fontkit/src/tables/hhea.js b/node_modules/fontkit/src/tables/hhea.js new file mode 100644 index 0000000..af47604 --- /dev/null +++ b/node_modules/fontkit/src/tables/hhea.js @@ -0,0 +1,19 @@ +import * as r from 'restructure'; + +// horizontal header +export default new r.Struct({ + version: r.int32, + ascent: r.int16, // Distance from baseline of highest ascender + descent: r.int16, // Distance from baseline of lowest descender + lineGap: r.int16, // Typographic line gap + advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table + minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table + minRightSideBearing: r.int16, // Minimum right sidebearing value + xMaxExtent: r.int16, + caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical + caretSlopeRun: r.int16, // 0 for vertical + caretOffset: r.int16, // Set to 0 for non-slanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // 0 for current format + numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table +}); diff --git a/node_modules/fontkit/src/tables/hmtx.js b/node_modules/fontkit/src/tables/hmtx.js new file mode 100644 index 0000000..6df2ae5 --- /dev/null +++ b/node_modules/fontkit/src/tables/hmtx.js @@ -0,0 +1,11 @@ +import * as r from 'restructure'; + +let HmtxEntry = new r.Struct({ + advance: r.uint16, + bearing: r.int16 +}); + +export default new r.Struct({ + metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics), + bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); diff --git a/node_modules/fontkit/src/tables/index.js b/node_modules/fontkit/src/tables/index.js new file mode 100644 index 0000000..438bb48 --- /dev/null +++ b/node_modules/fontkit/src/tables/index.js @@ -0,0 +1,117 @@ +let tables = {}; +export default tables; + +// Required Tables +import cmap from './cmap'; +import head from './head'; +import hhea from './hhea'; +import hmtx from './hmtx'; +import maxp from './maxp'; +import name from './name'; +import OS2 from './OS2'; +import post from './post'; + +tables.cmap = cmap; +tables.head = head; +tables.hhea = hhea; +tables.hmtx = hmtx; +tables.maxp = maxp; +tables.name = name; +tables['OS/2'] = OS2; +tables.post = post; + + +// TrueType Outlines +import cvt from './cvt'; +import fpgm from './fpgm'; +import loca from './loca'; +import prep from './prep'; +import glyf from './glyf'; + +tables.fpgm = fpgm; +tables.loca = loca; +tables.prep = prep; +tables['cvt '] = cvt; +tables.glyf = glyf; + + +// PostScript Outlines +import CFFFont from '../cff/CFFFont'; +import VORG from './VORG'; + +tables['CFF '] = CFFFont; +tables['CFF2'] = CFFFont; +tables.VORG = VORG; + + +// Bitmap Glyphs +import EBLC from './EBLC'; +import sbix from './sbix'; +import COLR from './COLR'; +import CPAL from './CPAL'; + +tables.EBLC = EBLC; +tables.CBLC = tables.EBLC; +tables.sbix = sbix; +tables.COLR = COLR; +tables.CPAL = CPAL; + + +// Advanced OpenType Tables +import BASE from './BASE'; +import GDEF from './GDEF'; +import GPOS from './GPOS'; +import GSUB from './GSUB'; +import JSTF from './JSTF'; + +tables.BASE = BASE; +tables.GDEF = GDEF; +tables.GPOS = GPOS; +tables.GSUB = GSUB; +tables.JSTF = JSTF; + +// OpenType variations tables +import HVAR from './HVAR'; + +tables.HVAR = HVAR; + +// Other OpenType Tables +import DSIG from './DSIG'; +import gasp from './gasp'; +import hdmx from './hdmx'; +import kern from './kern'; +import LTSH from './LTSH'; +import PCLT from './PCLT'; +import VDMX from './VDMX'; +import vhea from './vhea'; +import vmtx from './vmtx'; + +tables.DSIG = DSIG; +tables.gasp = gasp; +tables.hdmx = hdmx; +tables.kern = kern; +tables.LTSH = LTSH; +tables.PCLT = PCLT; +tables.VDMX = VDMX; +tables.vhea = vhea; +tables.vmtx = vmtx; + + +// Apple Advanced Typography Tables +import avar from './avar'; +import bsln from './bsln'; +import feat from './feat'; +import fvar from './fvar'; +import gvar from './gvar'; +import just from './just'; +import morx from './morx'; +import opbd from './opbd'; + +tables.avar = avar; +tables.bsln = bsln; +tables.feat = feat; +tables.fvar = fvar; +tables.gvar = gvar; +tables.just = just; +tables.morx = morx; +tables.opbd = opbd; diff --git a/node_modules/fontkit/src/tables/just.js b/node_modules/fontkit/src/tables/just.js new file mode 100644 index 0000000..198be1b --- /dev/null +++ b/node_modules/fontkit/src/tables/just.js @@ -0,0 +1,81 @@ +import * as r from 'restructure'; +import { LookupTable, StateTable1 } from './aat'; + +let ClassTable = new r.Struct({ + length: r.uint16, + coverage: r.uint16, + subFeatureFlags: r.uint32, + stateTable: new StateTable1 +}); + +let WidthDeltaRecord = new r.Struct({ + justClass: r.uint32, + beforeGrowLimit: r.fixed32, + beforeShrinkLimit: r.fixed32, + afterGrowLimit: r.fixed32, + afterShrinkLimit: r.fixed32, + growFlags: r.uint16, + shrinkFlags: r.uint16 +}); + +let WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32); + +let ActionData = new r.VersionedStruct('actionType', { + 0: { // Decomposition action + lowerLimit: r.fixed32, + upperLimit: r.fixed32, + order: r.uint16, + glyphs: new r.Array(r.uint16, r.uint16) + }, + + 1: { // Unconditional add glyph action + addGlyph: r.uint16 + }, + + 2: { // Conditional add glyph action + substThreshold: r.fixed32, + addGlyph: r.uint16, + substGlyph: r.uint16 + }, + + 3: {}, // Stretch glyph action (no data, not supported by CoreText) + + 4: { // Ductile glyph action (not supported by CoreText) + variationAxis: r.uint32, + minimumLimit: r.fixed32, + noStretchValue: r.fixed32, + maximumLimit: r.fixed32 + }, + + 5: { // Repeated add glyph action + flags: r.uint16, + glyph: r.uint16 + } +}); + +let Action = new r.Struct({ + actionClass: r.uint16, + actionType: r.uint16, + actionLength: r.uint32, + actionData: ActionData, + padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset) +}); + +let PostcompensationAction = new r.Array(Action, r.uint32); +let PostCompensationTable = new r.Struct({ + lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction)) +}); + +let JustificationTable = new r.Struct({ + classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }), + wdcOffset: r.uint16, + postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }), + widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: ctx => ctx.wdcOffset })) +}); + +export default new r.Struct({ + version: r.uint32, + format: r.uint16, + horizontal: new r.Pointer(r.uint16, JustificationTable), + vertical: new r.Pointer(r.uint16, JustificationTable) +}); diff --git a/node_modules/fontkit/src/tables/kern.js b/node_modules/fontkit/src/tables/kern.js new file mode 100644 index 0000000..9ce4d90 --- /dev/null +++ b/node_modules/fontkit/src/tables/kern.js @@ -0,0 +1,91 @@ +import * as r from 'restructure'; + +let KernPair = new r.Struct({ + left: r.uint16, + right: r.uint16, + value: r.int16 +}); + +let ClassTable = new r.Struct({ + firstGlyph: r.uint16, + nGlyphs: r.uint16, + offsets: new r.Array(r.uint16, 'nGlyphs'), + max: t => t.offsets.length && Math.max.apply(Math, t.offsets) +}); + +let Kern2Array = new r.Struct({ + off: t => t._startOffset - t.parent.parent._startOffset, + len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2), + values: new r.LazyArray(r.int16, 'len') +}); + +let KernSubtable = new r.VersionedStruct('format', { + 0: { + nPairs: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + pairs: new r.Array(KernPair, 'nPairs') + }, + + 2: { + rowWidth: r.uint16, + leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}), + rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}), + array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'}) + }, + + 3: { + glyphCount: r.uint16, + kernValueCount: r.uint8, + leftClassCount: r.uint8, + rightClassCount: r.uint8, + flags: r.uint8, + kernValue: new r.Array(r.int16, 'kernValueCount'), + leftClass: new r.Array(r.uint8, 'glyphCount'), + rightClass: new r.Array(r.uint8, 'glyphCount'), + kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount) + } +}); + +let KernTable = new r.VersionedStruct('version', { + 0: { // Microsoft uses this format + subVersion: r.uint16, // Microsoft has an extra sub-table version number + length: r.uint16, // Length of the subtable, in bytes + format: r.uint8, // Format of subtable + coverage: new r.Bitfield(r.uint8, [ + 'horizontal', // 1 if table has horizontal data, 0 if vertical + 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values. + 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) + }, + 1: { // Apple uses this format + length: r.uint32, + coverage: new r.Bitfield(r.uint8, [ + null, null, null, null, null, + 'variation', // Set if table has variation kerning values + 'crossStream', // Set if table has cross-stream kerning values + 'vertical' // Set if table has vertical kerning values + ]), + format: r.uint8, + tupleIndex: r.uint16, + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) + } +}); + +export default new r.VersionedStruct(r.uint16, { + 0: { // Microsoft Version + nTables: r.uint16, + tables: new r.Array(KernTable, 'nTables') + }, + + 1: { // Apple Version + reserved: new r.Reserved(r.uint16), // the other half of the version number + nTables: r.uint32, + tables: new r.Array(KernTable, 'nTables') + } +}); diff --git a/node_modules/fontkit/src/tables/loca.js b/node_modules/fontkit/src/tables/loca.js new file mode 100644 index 0000000..8d1ea6a --- /dev/null +++ b/node_modules/fontkit/src/tables/loca.js @@ -0,0 +1,30 @@ +import * as r from 'restructure'; + +let loca = new r.VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new r.Array(r.uint16) + }, + 1: { + offsets: new r.Array(r.uint32) + } +}); + +loca.process = function() { + if (this.version === 0 && !this._processed) { + for (let i = 0; i < this.offsets.length; i++) { + this.offsets[i] <<= 1; + } + this._processed = true; + } +}; + +loca.preEncode = function() { + if (this.version === 0 && this._processed !== false) { + for (let i = 0; i < this.offsets.length; i++) { + this.offsets[i] >>>= 1; + } + this._processed = false; + } +}; + +export default loca; diff --git a/node_modules/fontkit/src/tables/maxp.js b/node_modules/fontkit/src/tables/maxp.js new file mode 100644 index 0000000..3e21138 --- /dev/null +++ b/node_modules/fontkit/src/tables/maxp.js @@ -0,0 +1,20 @@ +import * as r from 'restructure'; + +// maxiumum profile +export default new r.Struct({ + version: r.int32, + numGlyphs: r.uint16, // The number of glyphs in the font + maxPoints: r.uint16, // Maximum points in a non-composite glyph + maxContours: r.uint16, // Maximum contours in a non-composite glyph + maxComponentPoints: r.uint16, // Maximum points in a composite glyph + maxComponentContours: r.uint16, // Maximum contours in a composite glyph + maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise + maxTwilightPoints: r.uint16, // Maximum points used in Z0 + maxStorage: r.uint16, // Number of Storage Area locations + maxFunctionDefs: r.uint16, // Number of FDEFs + maxInstructionDefs: r.uint16, // Number of IDEFs + maxStackElements: r.uint16, // Maximum stack depth + maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions + maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph + maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components +}); diff --git a/node_modules/fontkit/src/tables/morx.js b/node_modules/fontkit/src/tables/morx.js new file mode 100644 index 0000000..73bc296 --- /dev/null +++ b/node_modules/fontkit/src/tables/morx.js @@ -0,0 +1,79 @@ +import * as r from 'restructure'; +import { UnboundedArray, LookupTable, StateTable } from './aat'; + +let LigatureData = { + action: r.uint16 +}; + +let ContextualData = { + markIndex: r.uint16, + currentIndex: r.uint16 +}; + +let InsertionData = { + currentInsertIndex: r.uint16, + markedInsertIndex: r.uint16 +}; + +let SubstitutionTable = new r.Struct({ + items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable)) +}); + +let SubtableData = new r.VersionedStruct('type', { + 0: { // Indic Rearrangement Subtable + stateTable: new StateTable + }, + + 1: { // Contextual Glyph Substitution Subtable + stateTable: new StateTable(ContextualData), + substitutionTable: new r.Pointer(r.uint32, SubstitutionTable) + }, + + 2: { // Ligature subtable + stateTable: new StateTable(LigatureData), + ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)), + components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)), + ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + }, + + 4: { // Non-contextual Glyph Substitution Subtable + lookupTable: new LookupTable + }, + + 5: { // Glyph Insertion Subtable + stateTable: new StateTable(InsertionData), + insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + } +}); + +let Subtable = new r.Struct({ + length: r.uint32, + coverage: r.uint24, + type: r.uint8, + subFeatureFlags: r.uint32, + table: SubtableData, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) +}); + +let FeatureEntry = new r.Struct({ + featureType: r.uint16, + featureSetting: r.uint16, + enableFlags: r.uint32, + disableFlags: r.uint32 +}); + +let MorxChain = new r.Struct({ + defaultFlags: r.uint32, + chainLength: r.uint32, + nFeatureEntries: r.uint32, + nSubtables: r.uint32, + features: new r.Array(FeatureEntry, 'nFeatureEntries'), + subtables: new r.Array(Subtable, 'nSubtables') +}); + +export default new r.Struct({ + version: r.uint16, + unused: new r.Reserved(r.uint16), + nChains: r.uint32, + chains: new r.Array(MorxChain, 'nChains') +}); diff --git a/node_modules/fontkit/src/tables/name.js b/node_modules/fontkit/src/tables/name.js new file mode 100644 index 0000000..c5542d2 --- /dev/null +++ b/node_modules/fontkit/src/tables/name.js @@ -0,0 +1,130 @@ +import * as r from 'restructure'; +import {getEncoding, LANGUAGES} from '../encodings'; + +let NameRecord = new r.Struct({ + platformID: r.uint16, + encodingID: r.uint16, + languageID: r.uint16, + nameID: r.uint16, + length: r.uint16, + string: new r.Pointer(r.uint16, + new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)), + { type: 'parent', relativeTo: ctx => ctx.parent.stringOffset, allowNull: false } + ) +}); + +let LangTagRecord = new r.Struct({ + length: r.uint16, + tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: ctx => ctx.stringOffset}) +}); + +var NameTable = new r.VersionedStruct(r.uint16, { + 0: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count') + }, + 1: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count'), + langTagCount: r.uint16, + langTags: new r.Array(LangTagRecord, 'langTagCount') + } +}); + +export default NameTable; + +const NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII. + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, // reserved + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; + +NameTable.process = function(stream) { + var records = {}; + for (let record of this.records) { + // find out what language this is for + let language = LANGUAGES[record.platformID][record.languageID]; + + if (language == null && this.langTags != null && record.languageID >= 0x8000) { + language = this.langTags[record.languageID - 0x8000].tag; + } + + if (language == null) { + language = record.platformID + '-' + record.languageID; + } + + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID); + if (records[key] == null) { + records[key] = {}; + } + + let obj = records[key]; + if (record.nameID >= 256) { + obj = obj[record.nameID] || (obj[record.nameID] = {}); + } + + if (typeof record.string === 'string' || typeof obj[language] !== 'string') { + obj[language] = record.string; + } + } + + this.records = records; +}; + +NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + + let records = []; + for (let key in this.records) { + let val = this.records[key]; + if (key === 'fontFeatures') continue; + + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: NAMES.indexOf(key), + length: val.en.length * 2, + string: val.en + }); + + if (key === 'postscriptName') { + records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + } + + this.records = records; + this.count = records.length; + this.stringOffset = NameTable.size(this, null, false); +}; diff --git a/node_modules/fontkit/src/tables/opbd.js b/node_modules/fontkit/src/tables/opbd.js new file mode 100644 index 0000000..7c614f2 --- /dev/null +++ b/node_modules/fontkit/src/tables/opbd.js @@ -0,0 +1,15 @@ +import * as r from 'restructure'; +import { LookupTable } from './aat'; + +let OpticalBounds = new r.Struct({ + left: r.int16, + top: r.int16, + right: r.int16, + bottom: r.int16 +}); + +export default new r.Struct({ + version: r.fixed32, + format: r.uint16, + lookupTable: new LookupTable(OpticalBounds) +}); diff --git a/node_modules/fontkit/src/tables/opentype.js b/node_modules/fontkit/src/tables/opentype.js new file mode 100644 index 0000000..867cf5c --- /dev/null +++ b/node_modules/fontkit/src/tables/opentype.js @@ -0,0 +1,217 @@ +import * as r from 'restructure'; + +//######################## +// Scripts and Languages # +//######################## + +let LangSysTable = new r.Struct({ + reserved: new r.Reserved(r.uint16), + reqFeatureIndex: r.uint16, + featureCount: r.uint16, + featureIndexes: new r.Array(r.uint16, 'featureCount') +}); + +let LangSysRecord = new r.Struct({ + tag: new r.String(4), + langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' }) +}); + +let Script = new r.Struct({ + defaultLangSys: new r.Pointer(r.uint16, LangSysTable), + count: r.uint16, + langSysRecords: new r.Array(LangSysRecord, 'count') +}); + +let ScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, Script, { type: 'parent' }) +}); + +export let ScriptList = new r.Array(ScriptRecord, r.uint16); + +//####################### +// Features and Lookups # +//####################### + +let FeatureParams = new r.Struct({ + version: r.uint16, // should be set to 0 according OT spec + nameID: r.uint16, //OT spec: UI Name ID or uiLabelNameId +}); + +export let Feature = new r.Struct({ + featureParams: new r.Pointer(r.uint16, FeatureParams), + lookupCount: r.uint16, + lookupListIndexes: new r.Array(r.uint16, 'lookupCount') +}); + +let FeatureRecord = new r.Struct({ + tag: new r.String(4), + feature: new r.Pointer(r.uint16, Feature, { type: 'parent' }) +}); + +export let FeatureList = new r.Array(FeatureRecord, r.uint16); + +let LookupFlags = new r.Struct({ + markAttachmentType: r.uint8, + flags: new r.Bitfield(r.uint8, [ + 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures', + 'ignoreMarks', 'useMarkFilteringSet' + ]) +}); + +export function LookupList(SubTable) { + let Lookup = new r.Struct({ + lookupType: r.uint16, + flags: LookupFlags, + subTableCount: r.uint16, + subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'), + markFilteringSet: new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet) + }); + + return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16); +} + +//################# +// Coverage Table # +//################# + +let RangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + startCoverageIndex: r.uint16 +}); + +export let Coverage = new r.VersionedStruct(r.uint16, { + 1: { + glyphCount: r.uint16, + glyphs: new r.Array(r.uint16, 'glyphCount') + }, + 2: { + rangeCount: r.uint16, + rangeRecords: new r.Array(RangeRecord, 'rangeCount') + } +}); + +//######################### +// Class Definition Table # +//######################### + +let ClassRangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + class: r.uint16 +}); + +export let ClassDef = new r.VersionedStruct(r.uint16, { + 1: { // Class array + startGlyph: r.uint16, + glyphCount: r.uint16, + classValueArray: new r.Array(r.uint16, 'glyphCount') + }, + 2: { // Class ranges + classRangeCount: r.uint16, + classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount') + } +}); + +//############### +// Device Table # +//############### + +export let Device = new r.Struct({ + a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex + b: r.uint16, // endSize for Device, innerIndex for VariationIndex + deltaFormat: r.uint16 +}); + +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# + +let LookupRecord = new r.Struct({ + sequenceIndex: r.uint16, + lookupListIndex: r.uint16 +}); + +let Rule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + input: new r.Array(r.uint16, t => t.glyphCount - 1), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16); + +let ClassRule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + classes: new r.Array(r.uint16, t => t.glyphCount - 1), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16); + +export let Context = new r.VersionedStruct(r.uint16, { + 1: { // Simple context + coverage: new r.Pointer(r.uint16, Coverage), + ruleSetCount: r.uint16, + ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount') + }, + 2: { // Class-based context + coverage: new r.Pointer(r.uint16, Coverage), + classDef: new r.Pointer(r.uint16, ClassDef), + classSetCnt: r.uint16, + classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: r.uint16, + lookupCount: r.uint16, + coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); + +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### + +let ChainRule = new r.Struct({ + backtrackGlyphCount: r.uint16, + backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + input: new r.Array(r.uint16, t => t.inputGlyphCount - 1), + lookaheadGlyphCount: r.uint16, + lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16); + +export let ChainingContext = new r.VersionedStruct(r.uint16, { + 1: { // Simple context glyph substitution + coverage: new r.Pointer(r.uint16, Coverage), + chainCount: r.uint16, + chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 2: { // Class-based chaining context + coverage: new r.Pointer(r.uint16, Coverage), + backtrackClassDef: new r.Pointer(r.uint16, ClassDef), + inputClassDef: new r.Pointer(r.uint16, ClassDef), + lookaheadClassDef: new r.Pointer(r.uint16, ClassDef), + chainCount: r.uint16, + chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 3: { // Coverage-based chaining context + backtrackGlyphCount: r.uint16, + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); diff --git a/node_modules/fontkit/src/tables/post.js b/node_modules/fontkit/src/tables/post.js new file mode 100644 index 0000000..04fdeab --- /dev/null +++ b/node_modules/fontkit/src/tables/post.js @@ -0,0 +1,34 @@ +import * as r from 'restructure'; + +// PostScript information +export default new r.VersionedStruct(r.fixed32, { + header: { // these fields exist at the top of all versions + italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical. + underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline + underlineThickness: r.int16, // Suggested values for the underline thickness + isFixedPitch: r.uint32, // Whether the font is monospaced + minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font + maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font + minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font + maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + + 1: {}, // version 1 has no additional fields + + 2: { + numberOfGlyphs: r.uint16, + glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'), + names: new r.Array(new r.String(r.uint8)) + }, + + 2.5: { + numberOfGlyphs: r.uint16, + offsets: new r.Array(r.uint8, 'numberOfGlyphs') + }, + + 3: {}, // version 3 has no additional fields + + 4: { + map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs) + } +}); diff --git a/node_modules/fontkit/src/tables/prep.js b/node_modules/fontkit/src/tables/prep.js new file mode 100644 index 0000000..4b784a5 --- /dev/null +++ b/node_modules/fontkit/src/tables/prep.js @@ -0,0 +1,6 @@ +import * as r from 'restructure'; + +// Set of instructions executed whenever the point size or font transformation change +export default new r.Struct({ + controlValueProgram: new r.Array(r.uint8) +}); diff --git a/node_modules/fontkit/src/tables/sbix.js b/node_modules/fontkit/src/tables/sbix.js new file mode 100644 index 0000000..140824c --- /dev/null +++ b/node_modules/fontkit/src/tables/sbix.js @@ -0,0 +1,17 @@ +import * as r from 'restructure'; + +let ImageTable = new r.Struct({ + ppem: r.uint16, + resolution: r.uint16, + imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1) +}); + +// This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +export default new r.Struct({ + version: r.uint16, + flags: new r.Bitfield(r.uint16, ['renderOutlines']), + numImgTables: r.uint32, + imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables') +}); diff --git a/node_modules/fontkit/src/tables/variations.js b/node_modules/fontkit/src/tables/variations.js new file mode 100644 index 0000000..0aae61c --- /dev/null +++ b/node_modules/fontkit/src/tables/variations.js @@ -0,0 +1,81 @@ +import {Feature} from './opentype'; +import * as r from 'restructure'; + +/******************* + * Variation Store * + *******************/ + +let F2DOT14 = new r.Fixed(16, 'BE', 14); +let RegionAxisCoordinates = new r.Struct({ + startCoord: F2DOT14, + peakCoord: F2DOT14, + endCoord: F2DOT14 +}); + +let VariationRegionList = new r.Struct({ + axisCount: r.uint16, + regionCount: r.uint16, + variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); + +let DeltaSet = new r.Struct({ + shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount), + regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: t => t.shortDeltas.concat(t.regionDeltas) +}); + +let ItemVariationData = new r.Struct({ + itemCount: r.uint16, + shortDeltaCount: r.uint16, + regionIndexCount: r.uint16, + regionIndexes: new r.Array(r.uint16, 'regionIndexCount'), + deltaSets: new r.Array(DeltaSet, 'itemCount') +}); + +export let ItemVariationStore = new r.Struct({ + format: r.uint16, + variationRegionList: new r.Pointer(r.uint32, VariationRegionList), + variationDataCount: r.uint16, + itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount') +}); + +/********************** + * Feature Variations * + **********************/ + +let ConditionTable = new r.VersionedStruct(r.uint16, { + 1: { + axisIndex: r.uint16, + axisIndex: r.uint16, + filterRangeMinValue: F2DOT14, + filterRangeMaxValue: F2DOT14 + } +}); + +let ConditionSet = new r.Struct({ + conditionCount: r.uint16, + conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount') +}); + +let FeatureTableSubstitutionRecord = new r.Struct({ + featureIndex: r.uint16, + alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'}) +}); + +let FeatureTableSubstitution = new r.Struct({ + version: r.fixed32, + substitutionCount: r.uint16, + substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount') +}); + +let FeatureVariationRecord = new r.Struct({ + conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}), + featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'}) +}); + +export let FeatureVariations = new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + featureVariationRecordCount: r.uint32, + featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount') +}); diff --git a/node_modules/fontkit/src/tables/vhea.js b/node_modules/fontkit/src/tables/vhea.js new file mode 100644 index 0000000..004cdf9 --- /dev/null +++ b/node_modules/fontkit/src/tables/vhea.js @@ -0,0 +1,19 @@ +import * as r from 'restructure'; + +// Vertical Header Table +export default new r.Struct({ + version: r.uint16, // Version number of the Vertical Header Table + ascent: r.int16, // The vertical typographic ascender for this font + descent: r.int16, // The vertical typographic descender for this font + lineGap: r.int16, // The vertical typographic line gap for this font + advanceHeightMax: r.int16, // The maximum advance height measurement found in the font + minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font + minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font + yMaxExtent: r.int16, + caretSlopeRise: r.int16, // Caret slope (rise/run) + caretSlopeRun: r.int16, + caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // Set to 0 + numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table +}); diff --git a/node_modules/fontkit/src/tables/vmtx.js b/node_modules/fontkit/src/tables/vmtx.js new file mode 100644 index 0000000..579da6b --- /dev/null +++ b/node_modules/fontkit/src/tables/vmtx.js @@ -0,0 +1,12 @@ +import * as r from 'restructure'; + +let VmtxEntry = new r.Struct({ + advance: r.uint16, // The advance height of the glyph + bearing: r.int16 // The top sidebearing of the glyph +}); + +// Vertical Metrics Table +export default new r.Struct({ + metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics), + bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); diff --git a/node_modules/fontkit/src/utils.js b/node_modules/fontkit/src/utils.js new file mode 100644 index 0000000..72db576 --- /dev/null +++ b/node_modules/fontkit/src/utils.js @@ -0,0 +1,62 @@ +export function binarySearch(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while (min <= max) { + let mid = (min + max) >> 1; + let res = cmp(arr[mid]); + + if (res < 0) { + max = mid - 1; + } else if (res > 0) { + min = mid + 1; + } else { + return mid; + } + } + + return -1; +} + +export function range(index, end) { + let range = []; + while (index < end) { + range.push(index++); + } + return range; +} + +export const asciiDecoder = new TextDecoder('ascii'); + +// Based on https://github.com/niklasvh/base64-arraybuffer. MIT license. +const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const LOOKUP = new Uint8Array(256); +for (let i = 0; i < CHARS.length; i++) { + LOOKUP[CHARS.charCodeAt(i)] = i; +} + +export function decodeBase64(base64) { + let bufferLength = base64.length * 0.75; + + if (base64[base64.length - 1] === '=') { + bufferLength--; + if (base64[base64.length - 2] === '=') { + bufferLength--; + } + } + + let bytes = new Uint8Array(bufferLength); + let p = 0; + + for (let i = 0, len = base64.length; i < len; i += 4) { + let encoded1 = LOOKUP[base64.charCodeAt(i)]; + let encoded2 = LOOKUP[base64.charCodeAt(i + 1)]; + let encoded3 = LOOKUP[base64.charCodeAt(i + 2)]; + let encoded4 = LOOKUP[base64.charCodeAt(i + 3)]; + + bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); + bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); + bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); + } + + return bytes; +} diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md new file mode 100644 index 0000000..bf3e1c0 --- /dev/null +++ b/node_modules/get-caller-file/LICENSE.md @@ -0,0 +1,6 @@ +ISC License (ISC) +Copyright 2018 Stefan Penner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md new file mode 100644 index 0000000..a7d8c07 --- /dev/null +++ b/node_modules/get-caller-file/README.md @@ -0,0 +1,41 @@ +# get-caller-file + +[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) +[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) + +This is a utility, which allows a function to figure out from which file it was invoked. It does so by inspecting v8's stack trace at the time it is invoked. + +Inspired by http://stackoverflow.com/questions/13227489 + +*note: this relies on Node/V8 specific APIs, as such other runtimes may not work* + +## Installation + +```bash +yarn add get-caller-file +``` + +## Usage + +Given: + +```js +// ./foo.js +const getCallerFile = require('get-caller-file'); + +module.exports = function() { + return getCallerFile(); // figures out who called it +}; +``` + +```js +// index.js +const foo = require('./foo'); + +foo() // => /full/path/to/this/file/index.js +``` + + +## Options: + +* `getCallerFile(position = 2)`: where position is stack frame whos fileName we want. diff --git a/node_modules/get-caller-file/index.d.ts b/node_modules/get-caller-file/index.d.ts new file mode 100644 index 0000000..babed69 --- /dev/null +++ b/node_modules/get-caller-file/index.d.ts @@ -0,0 +1,2 @@ +declare const _default: (position?: number) => any; +export = _default; diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js new file mode 100644 index 0000000..57304f8 --- /dev/null +++ b/node_modules/get-caller-file/index.js @@ -0,0 +1,22 @@ +"use strict"; +// Call this function in a another function to find out the file from +// which that function was called from. (Inspects the v8 stack trace) +// +// Inspired by http://stackoverflow.com/questions/13227489 +module.exports = function getCallerFile(position) { + if (position === void 0) { position = 2; } + if (position >= Error.stackTraceLimit) { + throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); + } + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + if (stack !== null && typeof stack === 'object') { + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; + } +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/get-caller-file/index.js.map b/node_modules/get-caller-file/index.js.map new file mode 100644 index 0000000..89c655c --- /dev/null +++ b/node_modules/get-caller-file/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,0DAA0D;AAE1D,iBAAS,SAAS,aAAa,CAAC,QAAY;IAAZ,yBAAA,EAAA,YAAY;IAC1C,IAAI,QAAQ,IAAI,KAAK,CAAC,eAAe,EAAE;QACrC,MAAM,IAAI,SAAS,CAAC,kGAAkG,GAAG,QAAQ,GAAG,oCAAoC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;KACzM;IAED,IAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,UAAC,CAAC,EAAE,KAAK,IAAM,OAAA,KAAK,EAAL,CAAK,CAAC;IAC/C,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAChC,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAG/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC/C,2BAA2B;QAC3B,gDAAgD;QAChD,8CAA8C;QAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,CAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json new file mode 100644 index 0000000..b0dd571 --- /dev/null +++ b/node_modules/get-caller-file/package.json @@ -0,0 +1,42 @@ +{ + "name": "get-caller-file", + "version": "2.0.5", + "description": "", + "main": "index.js", + "directories": { + "test": "tests" + }, + "files": [ + "index.js", + "index.js.map", + "index.d.ts" + ], + "scripts": { + "prepare": "tsc", + "test": "mocha test", + "test:debug": "mocha test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "author": "Stefan Penner", + "license": "ISC", + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "devDependencies": { + "@types/chai": "^4.1.7", + "@types/ensure-posix-path": "^1.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^11.10.5", + "chai": "^4.1.2", + "ensure-posix-path": "^1.0.1", + "mocha": "^5.2.0", + "typescript": "^3.3.3333" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } +} diff --git a/node_modules/is-fullwidth-code-point/index.d.ts b/node_modules/is-fullwidth-code-point/index.d.ts new file mode 100644 index 0000000..729d202 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/index.d.ts @@ -0,0 +1,17 @@ +/** +Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms). + +@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. + +@example +``` +import isFullwidthCodePoint from 'is-fullwidth-code-point'; + +isFullwidthCodePoint('谢'.codePointAt(0)); +//=> true + +isFullwidthCodePoint('a'.codePointAt(0)); +//=> false +``` +*/ +export default function isFullwidthCodePoint(codePoint: number): boolean; diff --git a/node_modules/is-fullwidth-code-point/index.js b/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..671f97f --- /dev/null +++ b/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,50 @@ +/* eslint-disable yoda */ +'use strict'; + +const isFullwidthCodePoint = codePoint => { + if (Number.isNaN(codePoint)) { + return false; + } + + // Code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + codePoint >= 0x1100 && ( + codePoint <= 0x115F || // Hangul Jamo + codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET + codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= codePoint && codePoint <= 0x4DBF) || + // CJK Unified Ideographs .. Yi Radicals + (0x4E00 <= codePoint && codePoint <= 0xA4C6) || + // Hangul Jamo Extended-A + (0xA960 <= codePoint && codePoint <= 0xA97C) || + // Hangul Syllables + (0xAC00 <= codePoint && codePoint <= 0xD7A3) || + // CJK Compatibility Ideographs + (0xF900 <= codePoint && codePoint <= 0xFAFF) || + // Vertical Forms + (0xFE10 <= codePoint && codePoint <= 0xFE19) || + // CJK Compatibility Forms .. Small Form Variants + (0xFE30 <= codePoint && codePoint <= 0xFE6B) || + // Halfwidth and Fullwidth Forms + (0xFF01 <= codePoint && codePoint <= 0xFF60) || + (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || + // Kana Supplement + (0x1B000 <= codePoint && codePoint <= 0x1B001) || + // Enclosed Ideographic Supplement + (0x1F200 <= codePoint && codePoint <= 0x1F251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= codePoint && codePoint <= 0x3FFFD) + ) + ) { + return true; + } + + return false; +}; + +module.exports = isFullwidthCodePoint; +module.exports.default = isFullwidthCodePoint; diff --git a/node_modules/is-fullwidth-code-point/license b/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..2137e88 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,42 @@ +{ + "name": "is-fullwidth-code-point", + "version": "3.0.0", + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "license": "MIT", + "repository": "sindresorhus/is-fullwidth-code-point", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "string", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-fullwidth-code-point/readme.md b/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..4236bba --- /dev/null +++ b/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt(0)); +//=> true + +isFullwidthCodePoint('a'.codePointAt(0)); +//=> false +``` + + +## API + +### isFullwidthCodePoint(codePoint) + +#### codePoint + +Type: `number` + +The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jpeg-exif/.babelrc b/node_modules/jpeg-exif/.babelrc new file mode 100644 index 0000000..6a9be79 --- /dev/null +++ b/node_modules/jpeg-exif/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "env" + ] +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/.eslintrc.json b/node_modules/jpeg-exif/.eslintrc.json new file mode 100644 index 0000000..6f67564 --- /dev/null +++ b/node_modules/jpeg-exif/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "airbnb-base" +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/.travis.yml b/node_modules/jpeg-exif/.travis.yml new file mode 100644 index 0000000..3af24ca --- /dev/null +++ b/node_modules/jpeg-exif/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "10" +before_script: + - "npm i mocha chai coveralls istanbul" +after_success: + - "rm -rf ./coverage && npm r mocha chai istanbul coveralls" diff --git a/node_modules/jpeg-exif/LICENSE.txt b/node_modules/jpeg-exif/LICENSE.txt new file mode 100644 index 0000000..772b520 --- /dev/null +++ b/node_modules/jpeg-exif/LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 邵振华 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/jpeg-exif/README.md b/node_modules/jpeg-exif/README.md new file mode 100644 index 0000000..d852604 --- /dev/null +++ b/node_modules/jpeg-exif/README.md @@ -0,0 +1,77 @@ +# jpeg-exif +Get exif information from jpeg format file. Works with TIFF too! + +[![npm](https://img.shields.io/npm/dm/jpeg-exif.svg)][npm-url] [![Inline docs](http://inch-ci.org/github/zhso/jpeg-exif.svg?branch=master&style=shields)](http://inch-ci.org/github/zhso/jpeg-exif) [![Build Status](https://travis-ci.org/zhso/jpeg-exif.svg?branch=master)](https://travis-ci.org/zhso/jpeg-exif) [![Coverage Status](https://coveralls.io/repos/github/zhso/jpeg-exif/badge.svg?branch=master)](https://coveralls.io/github/zhso/jpeg-exif?branch=master) + +[npm-url]: https://npmjs.org/package/jpeg-exif +### Async + +```js +import exif from "jpeg-exif"; + +const filePath = "~/Photo/IMG_0001.JPG"; + +exif.parse(filePath, (err, data) => { + if (err) { + console.log(err); + } else { + console.log(data); + } +}); +``` + +### Sync + +```js +import exif from "jpeg-exif"; + +const filePath = "~/Photo/IMG_0001.JPG"; +const data = exif.parseSync(filePath); + +console.log(data); +``` + +## From Buffer + +```js +import fs from "fs"; +import exif from "jpeg-exif"; + +const filePath = "~/Documents/DOC_0001.TIFF"; +const buffer = fs.readFileSync(filePath); +const data = exif.fromBuffer(buffer); + +console.log(data); +``` + +## Features + +* Support All CP3451 Standard Tags (Include GPS & SubExif Tags) +* Support Sync, Async +* Support pass Buffer Type + +## Installation + +```bash +$ npm i jpeg-exif +``` + +## Callback Data Format + +```js +{ + "Make": "Apple", + "Model": "Apple", + //... + "SubExif": [ + "DateTimeOriginal": "2015:10:06 17:19:36", + "CreateDate": "2015:10:06 17:19:36", + //... + ], + "GPSInfo":[ + "GPSLatitudeRef": "N", + "GPSLatitude": [ 35, 39, 40.08 ], + //... + ] +} +``` diff --git a/node_modules/jpeg-exif/lib/index.js b/node_modules/jpeg-exif/lib/index.js new file mode 100644 index 0000000..cccf1bb --- /dev/null +++ b/node_modules/jpeg-exif/lib/index.js @@ -0,0 +1,376 @@ +'use strict'; + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var tags = require('./tags.json'); + +/* + unsignedByte, + asciiStrings, + unsignedShort, + unsignedLong, + unsignedRational, + signedByte, + undefined, + signedShort, + signedLong, + signedRational, + singleFloat, + doubleFloat + */ +var bytes = [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8]; +var SOIMarkerLength = 2; +var JPEGSOIMarker = 0xffd8; +var TIFFINTEL = 0x4949; +var TIFFMOTOROLA = 0x4d4d; +var APPMarkerLength = 2; +var APPMarkerBegin = 0xffe0; +var APPMarkerEnd = 0xffef; +var data = void 0; +/** + * @param buffer {Buffer} + * @returns {Boolean} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var isImage = isValid(content); + * console.log(isImage); + */ +var isValid = function isValid(buffer) { + try { + var SOIMarker = buffer.readUInt16BE(0); + return SOIMarker === JPEGSOIMarker; + } catch (e) { + throw new Error('Unsupport file format.'); + } +}; +/** + * @param buffer {Buffer} + * @returns {Boolean} + * @example + */ +var isTiff = function isTiff(buffer) { + try { + var SOIMarker = buffer.readUInt16BE(0); + return SOIMarker === TIFFINTEL || SOIMarker === TIFFMOTOROLA; + } catch (e) { + throw new Error('Unsupport file format.'); + } +}; +/** + * @param buffer {Buffer} + * @returns {Number} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var APPNumber = checkAPPn(content); + * console.log(APPNumber); + */ +var checkAPPn = function checkAPPn(buffer) { + try { + var APPMarkerTag = buffer.readUInt16BE(0); + var isInRange = APPMarkerTag >= APPMarkerBegin && APPMarkerTag <= APPMarkerEnd; + return isInRange ? APPMarkerTag - APPMarkerBegin : false; + } catch (e) { + throw new Error('Invalid APP Tag.'); + } +}; +/** + * @param buffer {Buffer} + * @param tagCollection {Object} + * @param order {Boolean} + * @param offset {Number} + * @returns {Object} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = IFDHandler(content, 0, true, 8); + * console.log(exifFragments.value); + */ +var IFDHandler = function IFDHandler(buffer, tagCollection, order, offset) { + var entriesNumber = order ? buffer.readUInt16BE(0) : buffer.readUInt16LE(0); + + if (entriesNumber === 0) { + return {}; + } + + var entriesNumberLength = 2; + var entries = buffer.slice(entriesNumberLength); + var entryLength = 12; + // let nextIFDPointerBegin = entriesNumberLength + entryLength * entriesNumber; + // let bigNextIFDPointer= buffer.readUInt32BE(nextIFDPointerBegin) ; + // let littleNextIFDPointer= buffer.readUInt32LE(nextIFDPointerBegin); + // let nextIFDPointer = order ?bigNextIFDPointer:littleNextIFDPointer; + var exif = {}; + var entryCount = 0; + + for (entryCount; entryCount < entriesNumber; entryCount += 1) { + var entryBegin = entryCount * entryLength; + var entry = entries.slice(entryBegin, entryBegin + entryLength); + var tagBegin = 0; + var tagLength = 2; + var dataFormatBegin = tagBegin + tagLength; + var dataFormatLength = 2; + var componentsBegin = dataFormatBegin + dataFormatLength; + var componentsNumberLength = 4; + var dataValueBegin = componentsBegin + componentsNumberLength; + var dataValueLength = 4; + var tagAddress = entry.slice(tagBegin, dataFormatBegin); + var tagNumber = order ? tagAddress.toString('hex') : tagAddress.reverse().toString('hex'); + var tagName = tagCollection[tagNumber]; + var bigDataFormat = entry.readUInt16BE(dataFormatBegin); + var littleDataFormat = entry.readUInt16LE(dataFormatBegin); + var dataFormat = order ? bigDataFormat : littleDataFormat; + var componentsByte = bytes[dataFormat]; + var bigComponentsNumber = entry.readUInt32BE(componentsBegin); + var littleComponentNumber = entry.readUInt32LE(componentsBegin); + var componentsNumber = order ? bigComponentsNumber : littleComponentNumber; + var dataLength = componentsNumber * componentsByte; + var dataValue = entry.slice(dataValueBegin, dataValueBegin + dataValueLength); + + if (dataLength > 4) { + var dataOffset = (order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0)) - offset; + dataValue = buffer.slice(dataOffset, dataOffset + dataLength); + } + + var tagValue = void 0; + + if (tagName) { + switch (dataFormat) { + case 1: + tagValue = dataValue.readUInt8(0); + break; + case 2: + tagValue = dataValue.toString('ascii').replace(/\0+$/, ''); + break; + case 3: + tagValue = order ? dataValue.readUInt16BE(0) : dataValue.readUInt16LE(0); + break; + case 4: + tagValue = order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0); + break; + case 5: + tagValue = []; + + for (var i = 0; i < dataValue.length; i += 8) { + var bigTagValue = dataValue.readUInt32BE(i) / dataValue.readUInt32BE(i + 4); + var littleTagValue = dataValue.readUInt32LE(i) / dataValue.readUInt32LE(i + 4); + tagValue.push(order ? bigTagValue : littleTagValue); + } + + break; + case 7: + switch (tagName) { + case 'ExifVersion': + tagValue = dataValue.toString(); + break; + case 'FlashPixVersion': + tagValue = dataValue.toString(); + break; + case 'SceneType': + tagValue = dataValue.readUInt8(0); + break; + default: + tagValue = '0x' + dataValue.toString('hex', 0, 15); + break; + } + break; + case 10: + { + var bigOrder = dataValue.readInt32BE(0) / dataValue.readInt32BE(4); + var littleOrder = dataValue.readInt32LE(0) / dataValue.readInt32LE(4); + tagValue = order ? bigOrder : littleOrder; + break; + } + default: + tagValue = '0x' + dataValue.toString('hex'); + break; + } + exif[tagName] = tagValue; + } + /* + else { + console.log(`Unkown Tag [0x${tagNumber}].`); + } + */ + } + return exif; +}; + +/** + * @param buf {Buffer} + * @returns {Undefined} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = EXIFHandler(content); + */ +var EXIFHandler = function EXIFHandler(buf) { + var pad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var buffer = buf; + + if (pad) { + buffer = buf.slice(APPMarkerLength); + var length = buffer.readUInt16BE(0); + buffer = buffer.slice(0, length); + var lengthLength = 2; + buffer = buffer.slice(lengthLength); + var identifierLength = 5; + buffer = buffer.slice(identifierLength); + var padLength = 1; + buffer = buffer.slice(padLength); + } + + var byteOrderLength = 2; + var byteOrder = buffer.toString('ascii', 0, byteOrderLength) === 'MM'; + var fortyTwoLength = 2; + var fortyTwoEnd = byteOrderLength + fortyTwoLength; + var big42 = buffer.readUInt32BE(fortyTwoEnd); + var little42 = buffer.readUInt32LE(fortyTwoEnd); + var offsetOfIFD = byteOrder ? big42 : little42; + + buffer = buffer.slice(offsetOfIFD); + + if (buffer.length > 0) { + data = IFDHandler(buffer, tags.ifd, byteOrder, offsetOfIFD); + + if (data.ExifIFDPointer) { + buffer = buffer.slice(data.ExifIFDPointer - offsetOfIFD); + data.SubExif = IFDHandler(buffer, tags.ifd, byteOrder, data.ExifIFDPointer); + } + + if (data.GPSInfoIFDPointer) { + var gps = data.GPSInfoIFDPointer; + buffer = buffer.slice(data.ExifIFDPointer ? gps - data.ExifIFDPointer : gps - offsetOfIFD); + data.GPSInfo = IFDHandler(buffer, tags.gps, byteOrder, gps); + } + } +}; + +/** + * @param buffer {Buffer} + * @returns {Undefined} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = APPnHandler(content); + */ +var APPnHandler = function APPnHandler(buffer) { + var APPMarkerTag = checkAPPn(buffer); + + if (APPMarkerTag !== false) { + // APP0 is 0, and 0==false + var length = buffer.readUInt16BE(APPMarkerLength); + + switch (APPMarkerTag) { + case 1: + // EXIF + EXIFHandler(buffer); + break; + default: + APPnHandler(buffer.slice(APPMarkerLength + length)); + break; + } + } +}; + +/** + * @param buffer {Buffer} + * @returns {Object} + * @example + */ +var fromBuffer = function fromBuffer(buffer) { + if (!buffer) { + throw new Error('buffer not found'); + } + + data = undefined; + + if (isValid(buffer)) { + buffer = buffer.slice(SOIMarkerLength); + data = {}; + APPnHandler(buffer); + } else if (isTiff(buffer)) { + data = {}; + EXIFHandler(buffer, false); + } + + return data; +}; + +/** + * @param file {String} + * @returns {Object} + * @example + * var exif = sync("~/Picture/IMG_1981.JPG"); + * console.log(exif.createTime); + */ +var sync = function sync(file) { + if (!file) { + throw new Error('File not found'); + } + + var buffer = _fs2.default.readFileSync(file); + + return fromBuffer(buffer); +}; + +/** + * @param file {String} + * @param callback {Function} + * @example + * async("~/Picture/IMG_0707.JPG", (err, data) => { + * if(err) { + * console.log(err); + * } + * if(data) { + * console.log(data.ExifOffset.createTime); + * } + * } + */ +var async = function async(file, callback) { + data = undefined; + + new Promise(function (resolve, reject) { + if (!file) { + reject(new Error('❓File not found.')); + } + + _fs2.default.readFile(file, function (err, buffer) { + if (err) { + reject(err); + } else { + try { + if (isValid(buffer)) { + var buf = buffer.slice(SOIMarkerLength); + + data = {}; + + APPnHandler(buf); + resolve(data); + } else if (isTiff(buffer)) { + data = {}; + + EXIFHandler(buffer, false); + resolve(data); + } else { + reject(new Error('😱Unsupport file type.')); + } + } catch (e) { + reject(e); + } + } + }); + }, function (error) { + callback(error, undefined); + }).then(function (d) { + callback(undefined, d); + }).catch(function (error) { + callback(error, undefined); + }); +}; + +exports.fromBuffer = fromBuffer; +exports.parse = async; +exports.parseSync = sync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/jpeg-exif/lib/index.js.map b/node_modules/jpeg-exif/lib/index.js.map new file mode 100644 index 0000000..c11fb8f --- /dev/null +++ b/node_modules/jpeg-exif/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.js"],"names":["tags","require","bytes","SOIMarkerLength","JPEGSOIMarker","TIFFINTEL","TIFFMOTOROLA","APPMarkerLength","APPMarkerBegin","APPMarkerEnd","data","isValid","buffer","SOIMarker","readUInt16BE","e","Error","isTiff","checkAPPn","APPMarkerTag","isInRange","IFDHandler","tagCollection","order","offset","entriesNumber","readUInt16LE","entriesNumberLength","entries","slice","entryLength","exif","entryCount","entryBegin","entry","tagBegin","tagLength","dataFormatBegin","dataFormatLength","componentsBegin","componentsNumberLength","dataValueBegin","dataValueLength","tagAddress","tagNumber","toString","reverse","tagName","bigDataFormat","littleDataFormat","dataFormat","componentsByte","bigComponentsNumber","readUInt32BE","littleComponentNumber","readUInt32LE","componentsNumber","dataLength","dataValue","dataOffset","tagValue","readUInt8","replace","i","length","bigTagValue","littleTagValue","push","bigOrder","readInt32BE","littleOrder","readInt32LE","EXIFHandler","buf","pad","lengthLength","identifierLength","padLength","byteOrderLength","byteOrder","fortyTwoLength","fortyTwoEnd","big42","little42","offsetOfIFD","ifd","ExifIFDPointer","SubExif","GPSInfoIFDPointer","gps","GPSInfo","APPnHandler","fromBuffer","undefined","sync","file","fs","readFileSync","async","callback","Promise","resolve","reject","readFile","err","error","then","d","catch","exports","parse","parseSync"],"mappings":";;AAAA;;;;;;AAEA,IAAMA,OAAOC,QAAQ,aAAR,CAAb;;AAEA;;;;;;;;;;;;;;AAcA,IAAMC,QAAQ,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,EAA4B,CAA5B,EAA+B,CAA/B,EAAkC,CAAlC,EAAqC,CAArC,CAAd;AACA,IAAMC,kBAAkB,CAAxB;AACA,IAAMC,gBAAgB,MAAtB;AACA,IAAMC,YAAY,MAAlB;AACA,IAAMC,eAAe,MAArB;AACA,IAAMC,kBAAkB,CAAxB;AACA,IAAMC,iBAAiB,MAAvB;AACA,IAAMC,eAAe,MAArB;AACA,IAAIC,aAAJ;AACA;;;;;;;;AAQA,IAAMC,UAAU,SAAVA,OAAU,CAACC,MAAD,EAAY;AAC1B,MAAI;AACF,QAAMC,YAAYD,OAAOE,YAAP,CAAoB,CAApB,CAAlB;AACA,WAAOD,cAAcT,aAArB;AACD,GAHD,CAGE,OAAOW,CAAP,EAAU;AACV,UAAM,IAAIC,KAAJ,CAAU,wBAAV,CAAN;AACD;AACF,CAPD;AAQA;;;;;AAKA,IAAMC,SAAS,SAATA,MAAS,CAACL,MAAD,EAAY;AACzB,MAAI;AACF,QAA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wBAAY5D,MAAZ,EAAoB,KAApB;AACAyF,oBAAQ3F,IAAR;AACD,WALM,MAKA;AACL4F,mBAAO,IAAItF,KAAJ,CAAU,wBAAV,CAAP;AACD;AACF,SAhBD,CAgBE,OAAOD,CAAP,EAAU;AACVuF,iBAAOvF,CAAP;AACD;AACF;AACF,KAxBD;AAyBD,GA9BD,EA8BG,UAAC0F,KAAD,EAAW;AACZN,aAASM,KAAT,EAAgBZ,SAAhB;AACD,GAhCD,EAgCGa,IAhCH,CAgCQ,UAACC,CAAD,EAAO;AACbR,aAASN,SAAT,EAAoBc,CAApB;AACD,GAlCD,EAkCGC,KAlCH,CAkCS,UAACH,KAAD,EAAW;AAClBN,aAASM,KAAT,EAAgBZ,SAAhB;AACD,GApCD;AAqCD,CAxCD;;AA0CAgB,QAAQjB,UAAR,GAAqBA,UAArB;AACAiB,QAAQC,KAAR,GAAgBZ,KAAhB;AACAW,QAAQE,SAAR,GAAoBjB,IAApB","file":"index.js","sourcesContent":["import fs from 'fs';\n\nconst tags = require('./tags.json');\n\n/*\n unsignedByte,\n asciiStrings,\n unsignedShort,\n unsignedLong,\n unsignedRational,\n signedByte,\n undefined,\n signedShort,\n signedLong,\n signedRational,\n singleFloat,\n doubleFloat\n */\nconst bytes = [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8];\nconst SOIMarkerLength = 2;\nconst JPEGSOIMarker = 0xffd8;\nconst TIFFINTEL = 0x4949;\nconst TIFFMOTOROLA = 0x4d4d;\nconst APPMarkerLength = 2;\nconst APPMarkerBegin = 0xffe0;\nconst APPMarkerEnd = 0xffef;\nlet data;\n/**\n * @param buffer {Buffer}\n * @returns {Boolean}\n * @example\n * var content = fs.readFileSync(\"~/Picture/IMG_0911.JPG\");\n * var isImage = isValid(content);\n * console.log(isImage);\n */\nconst isValid = (buffer) => {\n try {\n const SOIMarker = buffer.readUInt16BE(0);\n return SOIMarker === JPEGSOIMarker;\n } catch (e) {\n throw new Error('Unsupport file format.');\n }\n};\n/**\n * @param buffer {Buffer}\n * @returns {Boolean}\n * @example\n */\nconst isTiff = (buffer) => {\n try {\n const SOIMarker = buffer.readUInt16BE(0);\n return SOIMarker === TIFFINTEL || SOIMarker === TIFFMOTOROLA;\n } catch (e) {\n throw new Error('Unsupport file format.');\n }\n};\n/**\n * @param buffer {Buffer}\n * @returns {Number}\n * @example\n * var content = fs.readFileSync(\"~/Picture/IMG_0911.JPG\");\n * var APPNumber = checkAPPn(content);\n * console.log(APPNumber);\n */\nconst checkAPPn = (buffer) => {\n try {\n const APPMarkerTag = buffer.readUInt16BE(0);\n const isInRange = APPMarkerTag >= APPMarkerBegin && APPMarkerTag <= APPMarkerEnd;\n return isInRange ? APPMarkerTag - APPMarkerBegin : false;\n } catch (e) {\n throw new Error('Invalid APP Tag.');\n }\n};\n/**\n * @param buffer {Buffer}\n * @param tagCollection {Object}\n * @param order {Boolean}\n * @param offset {Number}\n * @returns {Object}\n * @example\n * var content = fs.readFileSync(\"~/Picture/IMG_0911.JPG\");\n * var exifFragments = IFDHandler(content, 0, true, 8);\n * console.log(exifFragments.value);\n */\nconst IFDHandler = (buffer, tagCollection, order, offset) => {\n const entriesNumber = order ? buffer.readUInt16BE(0) : buffer.readUInt16LE(0);\n\n if (entriesNumber === 0) {\n return {};\n }\n\n const entriesNumberLength = 2;\n const entries = buffer.slice(entriesNumberLength);\n const entryLength = 12;\n // let nextIFDPointerBegin = entriesNumberLength + entryLength * entriesNumber;\n // let bigNextIFDPointer= buffer.readUInt32BE(nextIFDPointerBegin) ;\n // let littleNextIFDPointer= buffer.readUInt32LE(nextIFDPointerBegin);\n // let nextIFDPointer = order ?bigNextIFDPointer:littleNextIFDPointer;\n const exif = {};\n let entryCount = 0;\n\n for (entryCount; entryCount < entriesNumber; entryCount += 1) {\n const entryBegin = entryCount * entryLength;\n const entry = entries.slice(entryBegin, entryBegin + entryLength);\n const tagBegin = 0;\n const tagLength = 2;\n const dataFormatBegin = tagBegin + tagLength;\n const dataFormatLength = 2;\n const componentsBegin = dataFormatBegin + dataFormatLength;\n const componentsNumberLength = 4;\n const dataValueBegin = componentsBegin + componentsNumberLength;\n const dataValueLength = 4;\n const tagAddress = entry.slice(tagBegin, dataFormatBegin);\n const tagNumber = order ? tagAddress.toString('hex') : tagAddress.reverse().toString('hex');\n const tagName = tagCollection[tagNumber];\n const bigDataFormat = entry.readUInt16BE(dataFormatBegin);\n const littleDataFormat = entry.readUInt16LE(dataFormatBegin);\n const dataFormat = order ? bigDataFormat : littleDataFormat;\n const componentsByte = bytes[dataFormat];\n const bigComponentsNumber = entry.readUInt32BE(componentsBegin);\n const littleComponentNumber = entry.readUInt32LE(componentsBegin);\n const componentsNumber = order ? bigComponentsNumber : littleComponentNumber;\n const dataLength = componentsNumber * componentsByte;\n let dataValue = entry.slice(dataValueBegin, dataValueBegin + dataValueLength);\n\n if (dataLength > 4) {\n const dataOffset = (order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0)) - offset;\n dataValue = buffer.slice(dataOffset, dataOffset + dataLength);\n }\n\n let tagValue;\n\n if (tagName) {\n switch (dataFormat) {\n case 1:\n tagValue = dataValue.readUInt8(0);\n break;\n case 2:\n tagValue = dataValue.toString('ascii').replace(/\\0+$/, '');\n break;\n case 3:\n tagValue = order ? dataValue.readUInt16BE(0) : dataValue.readUInt16LE(0);\n break;\n case 4:\n tagValue = order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0);\n break;\n case 5:\n tagValue = [];\n\n for (let i = 0; i < dataValue.length; i += 8) {\n const bigTagValue = dataValue.readUInt32BE(i) / dataValue.readUInt32BE(i + 4);\n const littleTagValue = dataValue.readUInt32LE(i) / dataValue.readUInt32LE(i + 4);\n tagValue.push(order ? bigTagValue : littleTagValue);\n }\n\n break;\n case 7:\n switch (tagName) {\n case 'ExifVersion':\n tagValue = dataValue.toString();\n break;\n case 'FlashPixVersion':\n tagValue = dataValue.toString();\n break;\n case 'SceneType':\n tagValue = dataValue.readUInt8(0);\n break;\n default:\n tagValue = `0x${dataValue.toString('hex', 0, 15)}`;\n break;\n }\n break;\n case 10: {\n const bigOrder = dataValue.readInt32BE(0) / dataValue.readInt32BE(4);\n const littleOrder = dataValue.readInt32LE(0) / dataValue.readInt32LE(4);\n tagValue = order ? bigOrder : littleOrder;\n break;\n }\n default:\n tagValue = `0x${dataValue.toString('hex')}`;\n break;\n }\n exif[tagName] = tagValue;\n }\n /*\n else {\n console.log(`Unkown Tag [0x${tagNumber}].`);\n }\n */\n }\n return exif;\n};\n\n/**\n * @param buf {Buffer}\n * @returns {Undefined}\n * @example\n * var content = fs.readFileSync(\"~/Picture/IMG_0911.JPG\");\n * var exifFragments = EXIFHandler(content);\n */\nconst EXIFHandler = (buf, pad = true) => {\n let buffer = buf;\n\n if (pad) {\n buffer = buf.slice(APPMarkerLength);\n const length = buffer.readUInt16BE(0);\n buffer = buffer.slice(0, length);\n const lengthLength = 2;\n buffer = buffer.slice(lengthLength);\n const identifierLength = 5;\n buffer = buffer.slice(identifierLength);\n const padLength = 1;\n buffer = buffer.slice(padLength);\n }\n\n const byteOrderLength = 2;\n const byteOrder = buffer.toString('ascii', 0, byteOrderLength) === 'MM';\n const fortyTwoLength = 2;\n const fortyTwoEnd = byteOrderLength + fortyTwoLength;\n const big42 = buffer.readUInt32BE(fortyTwoEnd);\n const little42 = buffer.readUInt32LE(fortyTwoEnd);\n const offsetOfIFD = byteOrder ? big42 : little42;\n\n buffer = buffer.slice(offsetOfIFD);\n\n if (buffer.length > 0) {\n data = IFDHandler(buffer, tags.ifd, byteOrder, offsetOfIFD);\n\n if (data.ExifIFDPointer) {\n buffer = buffer.slice(data.ExifIFDPointer - offsetOfIFD);\n data.SubExif = IFDHandler(buffer, tags.ifd, byteOrder, data.ExifIFDPointer);\n }\n\n if (data.GPSInfoIFDPointer) {\n const gps = data.GPSInfoIFDPointer;\n buffer = buffer.slice(data.ExifIFDPointer ? gps - data.ExifIFDPointer : gps - offsetOfIFD);\n data.GPSInfo = IFDHandler(buffer, tags.gps, byteOrder, gps);\n }\n }\n};\n\n/**\n * @param buffer {Buffer}\n * @returns {Undefined}\n * @example\n * var content = fs.readFileSync(\"~/Picture/IMG_0911.JPG\");\n * var exifFragments = APPnHandler(content);\n */\nconst APPnHandler = (buffer) => {\n const APPMarkerTag = checkAPPn(buffer);\n\n if (APPMarkerTag !== false) { // APP0 is 0, and 0==false\n const length = buffer.readUInt16BE(APPMarkerLength);\n\n switch (APPMarkerTag) {\n case 1: // EXIF\n EXIFHandler(buffer);\n break;\n default:\n APPnHandler(buffer.slice(APPMarkerLength + length));\n break;\n }\n }\n};\n\n/**\n * @param buffer {Buffer}\n * @returns {Object}\n * @example\n */\nconst fromBuffer = (buffer) => {\n if (!buffer) {\n throw new Error('buffer not found');\n }\n\n data = undefined;\n\n if (isValid(buffer)) {\n buffer = buffer.slice(SOIMarkerLength);\n data = {};\n APPnHandler(buffer);\n } else if (isTiff(buffer)) {\n data = {};\n EXIFHandler(buffer, false);\n }\n\n return data;\n};\n\n/**\n * @param file {String}\n * @returns {Object}\n * @example\n * var exif = sync(\"~/Picture/IMG_1981.JPG\");\n * console.log(exif.createTime);\n */\nconst sync = (file) => {\n if (!file) {\n throw new Error('File not found');\n }\n\n const buffer = fs.readFileSync(file);\n\n return fromBuffer(buffer);\n};\n\n/**\n * @param file {String}\n * @param callback {Function}\n * @example\n * async(\"~/Picture/IMG_0707.JPG\", (err, data) => {\n * if(err) {\n * console.log(err);\n * }\n * if(data) {\n * console.log(data.ExifOffset.createTime);\n * }\n * }\n */\nconst async = (file, callback) => {\n data = undefined;\n\n new Promise((resolve, reject) => {\n if (!file) {\n reject(new Error('❓File not found.'));\n }\n\n fs.readFile(file, (err, buffer) => {\n if (err) {\n reject(err);\n } else {\n try {\n if (isValid(buffer)) {\n const buf = buffer.slice(SOIMarkerLength);\n\n data = {};\n\n APPnHandler(buf);\n resolve(data);\n } else if (isTiff(buffer)) {\n data = {};\n\n EXIFHandler(buffer, false);\n resolve(data);\n } else {\n reject(new Error('😱Unsupport file type.'));\n }\n } catch (e) {\n reject(e);\n }\n }\n });\n }, (error) => {\n callback(error, undefined);\n }).then((d) => {\n callback(undefined, d);\n }).catch((error) => {\n callback(error, undefined);\n });\n};\n\nexports.fromBuffer = fromBuffer;\nexports.parse = async;\nexports.parseSync = sync;\n"]} \ No newline at end of file diff --git a/node_modules/jpeg-exif/lib/plus.json b/node_modules/jpeg-exif/lib/plus.json new file mode 100644 index 0000000..2a4017c --- /dev/null +++ b/node_modules/jpeg-exif/lib/plus.json @@ -0,0 +1,348 @@ +{ + "00fe": "SubfileType", + "00ff": "OldSubfileType", + "000b": "ProcessingSoftware", + "0001": "InteropIndex", + "01b1": "Decode", + "01b2": "DefaultImageColor", + "01b3": "T82Options", + "01b5": "JPEGTables", + "0002": "InteropVersion", + "02bc": "XMP", + "03e7": "USPTOMiscellaneous", + "9c9b": "XPTitle", + "9c9c": "XPComment", + "9c9d": "XPAuthor", + "9c9e": "XPKeywords", + "9c9f": "XPSubject", + "010a": "FillOrder", + "010d": "DocumentName", + "011d": "PageName", + "011e": "XPosition", + "011f": "YPosition", + "012c": "ColorResponseUnit", + "013c": "HostComputer", + "013d": "Predictor", + "014a": "SubIFD", + "014c": "InkSet", + "014d": "InkNames", + "014e": "NumberOfInks", + "015a": "Indexed", + "015b": "JPEGTables", + "015f": "OPIProxy", + "022f": "StripRowCounts", + "80a3": "WangTag1", + "80a4": "WangAnnotation", + "80a5": "WangTag3", + "80a6": "WangTag4", + "80b8": "ImageReferencePoints", + "80b9": "RegionXformTackPoint", + "80ba": "WarpQuadrilateral", + "80bb": "AffineTransformMat", + "80e3": "Matteing", + "80e4": "DataType", + "80e5": "ImageDepth", + "80e6": "TileDepth", + "82a5": "MDFileTag", + "82a6": "MDScalePixel", + "82a7": "MDColorTable", + "82a8": "MDLabName", + "82a9": "MDSampleInfo", + "82aa": "MDPrepDate", + "82ab": "MDPrepTime", + "82ac": "MDFileUnits", + "83bb": "IPTC-NAA", + "84e0": "Site", + "84e1": "ColorSequence", + "84e2": "IT8Header", + "84e3": "RasterPadding", + "84e4": "BitsPerRunLength", + "84e5": "BitsPerExtendedRunLength", + "84e6": "ColorTable", + "84e7": "ImageColorIndicator", + "84e8": "BackgroundColorIndicator", + "84e9": "ImageColorValue", + "84ea": "BackgroundColorValue", + "84eb": "PixelIntensityRange", + "84ec": "TransparencyIndicator", + "84ed": "ColorCharacterization", + "84ee": "HCUsage", + "84ef": "TrapIndicator", + "84f0": "CMYKEquivalent", + "85b8": "PixelMagicJBIGOptions", + "85d7": "JPLCartoIFD", + "85d8": "ModelTransform", + "87ac": "ImageLayer", + "87af": "GeoTiffDirectory", + "87b0": "GeoTiffDoubleParams", + "87b1": "GeoTiffAsciiParams", + "87be": "JBIGOptions", + "0107": "Thresholding", + "0108": "CellWidth", + "0109": "CellLength", + "0118": "MinSampleValue", + "0119": "MaxSampleValue", + "0120": "FreeOffsets", + "0121": "FreeByteCounts", + "0122": "GrayResponseUnit", + "0123": "GrayResponseCurve", + "0124": "T4Options", + "0125": "T6Options", + "0129": "PageNumber", + "0140": "ColorMap", + "0141": "HalftoneHints", + "0142": "TileWidth", + "0143": "TileLength", + "0144": "TileOffsets", + "0145": "TileByteCounts", + "0146": "BadFaxLines", + "0147": "CleanFaxData", + "0148": "ConsecutiveBadFaxLines", + "0150": "DotRange", + "0151": "TargetPrinter", + "0152": "ExtraSamples", + "0153": "SampleFormat", + "0154": "SMinSampleValue", + "0155": "SMaxSampleValue", + "0156": "TransferRange", + "0157": "ClipPath", + "0158": "XClipPathUnits", + "0159": "YClipPathUnits", + "0190": "GlobalParametersIFD", + "0191": "ProfileType", + "0192": "FaxProfile", + "0193": "CodingMethods", + "0194": "VersionYear", + "0195": "ModeNumber", + "0200": "JPEGProc", + "0203": "JPEGRestartInterval", + "0205": "JPEGLosslessPredictors", + "0206": "JPEGPointTransforms", + "0207": "JPEGQTables", + "0208": "JPEGDCTables", + "0209": "JPEGACTables", + "800d": "ImageID", + "821a": "MatrixWorldToCamera", + "827d": "Model2", + "828d": "CFARepeatPatternDim", + "828e": "CFAPattern2", + "828f": "BatteryLevel", + "830e": "PixelScale", + "835c": "UIC1Tag", + "835d": "UIC2Tag", + "835e": "UIC3Tag", + "835f": "UIC4Tag", + "847e": "IntergraphPacketData", + "847f": "IntergraphFlagRegisters", + "877f": "TIFF_FXExtensions", + "882a": "TimeZoneOffset", + "882b": "SelfTimerMode", + "885c": "FaxRecvParams", + "885d": "FaxSubAddress", + "885e": "FaxRecvTime", + "888a": "LeafSubIFD", + "920b": "FlashEnergy", + "920c": "SpatialFrequencyResponse", + "920d": "Noise", + "920e": "FocalPlaneXResolution", + "920f": "FocalPlaneYResolution", + "923a": "CIP3DataFile", + "923b": "CIP3Sheet", + "923c": "CIP3Side", + "923f": "StoNits", + "932f": "MSDocumentText", + "935c": "ImageSourceData", + "1000": "RelatedImageFileFormat", + "1001": "RelatedImageWidth", + "1002": "RelatedImageHeight", + "4746": "Rating", + "4747": "XP_DIP_XML", + "4748": "StitchInfo", + "4749": "RatingPercent", + "7035": "ChromaticAberrationCorrParams", + "7037": "DistortionCorrParams", + "8214": "ImageFullWidth", + "8215": "ImageFullHeight", + "8216": "TextureFormat", + "8217": "WrapModes", + "8218": "FovCot", + "8219": "MatrixWorldToScreen", + "8290": "KodakIFD", + "8335": "AdventScale", + "8336": "AdventRevision", + "8480": "IntergraphMatrix", + "8481": "INGRReserved", + "8482": "ModelTiePoint", + "8546": "SEMInfo", + "8568": "AFCP_IPTC", + "8602": "WB_GRGBLevels", + "8606": "LeafData", + "8649": "PhotoshopSettings", + "8773": "ICC_Profile", + "8780": "MultiProfiles", + "8781": "SharedData", + "8782": "T88Options", + "8829": "Interlace", + "8871": "FedexEDR", + "9009": "GooglePlusUploadCode", + "9210": "FocalPlaneResolutionUnit", + "9211": "ImageNumber", + "9212": "SecurityClassification", + "9213": "ImageHistory", + "9215": "ExposureIndex", + "9216": "TIFF-EPStandardID", + "9217": "SensingMethod", + "9330": "MSPropertySetStorage", + "9331": "MSDocumentTextPosition", + "a20d": "Noise", + "a211": "ImageNumber", + "a212": "SecurityClassification", + "a213": "ImageHistory", + "a216": "TIFF-EPStandardID", + "a480": "GDALMetadata", + "a481": "GDALNoData", + "afc0": "ExpandSoftware", + "afc1": "ExpandLens", + "afc2": "ExpandFilm", + "afc3": "ExpandFilterLens", + "afc4": "ExpandScanner", + "afc5": "ExpandFlashLamp", + "bc01": "PixelFormat", + "bc02": "Transformation", + "bc03": "Uncompressed", + "bc04": "ImageType", + "bc80": "ImageWidth", + "bc81": "ImageHeight", + "bc82": "WidthResolution", + "bc83": "HeightResolution", + "bcc0": "ImageOffset", + "bcc1": "ImageByteCount", + "bcc2": "AlphaOffset", + "bcc3": "AlphaByteCount", + "bcc4": "ImageDataDiscard", + "bcc5": "AlphaDataDiscard", + "c4a5": "PrintIM", + "c6bf": "ColorimetricReference", + "c6c5": "SRawType", + "c6d2": "PanasonicTitle", + "c6d3": "PanasonicTitle2", + "c6f3": "CameraCalibrationSig", + "c6f4": "ProfileCalibrationSig", + "c6f5": "ProfileIFD", + "c6f6": "AsShotProfileName", + "c6f7": "NoiseReductionApplied", + "c6f8": "ProfileName", + "c6f9": "ProfileHueSatMapDims", + "c6fa": "ProfileHueSatMapData1", + "c6fb": "ProfileHueSatMapData2", + "c6fc": "ProfileToneCurve", + "c6fd": "ProfileEmbedPolicy", + "c6fe": "ProfileCopyright", + "c7a1": "CameraLabel", + "c7a3": "ProfileHueSatMapEncoding", + "c7a4": "ProfileLookTableEncoding", + "c7a5": "BaselineExposureOffset", + "c7a6": "DefaultBlackRender", + "c7a7": "NewRawImageDigest", + "c7a8": "RawToPreviewGain", + "c7b5": "DefaultUserCrop", + "c42a": "OceImageLogic", + "c44f": "Annotations", + "c61a": "BlackLevel", + "c61b": "BlackLevelDeltaH", + "c61c": "BlackLevelDeltaV", + "c61d": "WhiteLevel", + "c61e": "DefaultScale", + "c61f": "DefaultCropOrigin", + "c62a": "BaselineExposure", + "c62b": "BaselineNoise", + "c62c": "BaselineSharpness", + "c62d": "BayerGreenSplit", + "c62e": "LinearResponseLimit", + "c62f": "CameraSerialNumber", + "c65a": "CalibrationIlluminant1", + "c65b": "CalibrationIlluminant2", + "c65c": "BestQualityScale", + "c65d": "RawDataUniqueID", + "c68b": "OriginalRawFileName", + "c68c": "OriginalRawFileData", + "c68d": "ActiveArea", + "c68e": "MaskedAreas", + "c68f": "AsShotICCProfile", + "c71a": "PreviewColorSpace", + "c71b": "PreviewDateTime", + "c71c": "RawImageDigest", + "c71d": "OriginalRawFileDigest", + "c71e": "SubTileBlockSize", + "c71f": "RowInterleaveFactor", + "c74e": "OpcodeList3", + "c427": "OceScanjobDesc", + "c428": "OceApplicationSelector", + "c429": "OceIDNumber", + "c573": "OriginalFileName", + "c580": "USPTOOriginalContentType", + "c612": "DNGVersion", + "c613": "DNGBackwardVersion", + "c614": "UniqueCameraModel", + "c615": "LocalizedCameraModel", + "c616": "CFAPlaneColor", + "c617": "CFALayout", + "c618": "LinearizationTable", + "c619": "BlackLevelRepeatDim", + "c620": "DefaultCropSize", + "c621": "ColorMatrix1", + "c622": "ColorMatrix2", + "c623": "CameraCalibration1", + "c624": "CameraCalibration2", + "c625": "ReductionMatrix1", + "c626": "ReductionMatrix2", + "c627": "AnalogBalance", + "c628": "AsShotNeutral", + "c629": "AsShotWhiteXY", + "c630": "DNGLensInfo", + "c631": "ChromaBlurRadius", + "c632": "AntiAliasStrength", + "c633": "ShadowScale", + "c634": "SR2Private", + "c635": "MakerNoteSafety", + "c640": "RawImageSegmentation", + "c660": "AliasLayerMetadata", + "c690": "AsShotPreProfileMatrix", + "c691": "CurrentICCProfile", + "c692": "CurrentPreProfileMatrix", + "c714": "ForwardMatrix1", + "c715": "ForwardMatrix2", + "c716": "PreviewApplicationName", + "c717": "PreviewApplicationVersion", + "c718": "PreviewSettingsName", + "c719": "PreviewSettingsDigest", + "c725": "ProfileLookTableDims", + "c726": "ProfileLookTableData", + "c740": "OpcodeList1", + "c741": "OpcodeList2", + "c761": "NoiseProfile", + "c763": "TimeCodes", + "c764": "FrameRate", + "c772": "TStop", + "c789": "ReelName", + "c791": "OriginalDefaultFinalSize", + "c792": "OriginalBestQualitySize", + "c793": "OriginalDefaultCropSize", + "ea1c": "Padding", + "ea1d": "OffsetSchema", + "fde8": "OwnerName", + "fde9": "SerialNumber", + "fdea": "Lens", + "fe00": "KDC_IFD", + "fe4c": "RawFile", + "fe4d": "Converter", + "fe4e": "WhiteBalance", + "fe51": "Exposure", + "fe52": "Shadows", + "fe53": "Brightness", + "fe54": "Contrast", + "fe55": "Saturation", + "fe56": "Sharpness", + "fe57": "Smoothness", + "fe58": "MoireFilter" +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/lib/tags.json b/node_modules/jpeg-exif/lib/tags.json new file mode 100644 index 0000000..d71008f --- /dev/null +++ b/node_modules/jpeg-exif/lib/tags.json @@ -0,0 +1,140 @@ +{ + "ifd": { + "010e": "ImageDescription", + "010f": "Make", + "011a": "XResolution", + "011b": "YResolution", + "011c": "PlanarConfiguration", + "012d": "TransferFunction", + "013b": "Artist", + "013e": "WhitePoint", + "013f": "PrimaryChromaticities", + "0100": "ImageWidth", + "0101": "ImageHeight", + "0102": "BitsPerSample", + "0103": "Compression", + "0106": "PhotometricInterpretation", + "0110": "Model", + "0111": "StripOffsets", + "0112": "Orientation", + "0115": "SamplesPerPixel", + "0116": "RowsPerStrip", + "0117": "StripByteCounts", + "0128": "ResolutionUnit", + "0131": "Software", + "0132": "DateTime", + "0201": "JPEGInterchangeFormat", + "0202": "JPEGInterchangeFormatLength", + "0211": "YCbCrCoefficients", + "0212": "YCbCrSubSampling", + "0213": "YCbCrPositioning", + "0214": "ReferenceBlackWhite", + "829a": "ExposureTime", + "829d": "FNumber", + "920a": "FocalLength", + "927c": "MakerNote", + "8298": "Copyright", + "8769": "ExifIFDPointer", + "8822": "ExposureProgram", + "8824": "SpectralSensitivity", + "8825": "GPSInfoIFDPointer", + "8827": "PhotographicSensitivity", + "8828": "OECF", + "8830": "SensitivityType", + "8831": "StandardOutputSensitivity", + "8832": "RecommendedExposureIndex", + "8833": "ISOSpeed", + "8834": "ISOSpeedLatitudeyyy", + "8835": "ISOSpeedLatitudezzz", + "9000": "ExifVersion", + "9003": "DateTimeOriginal", + "9004": "DateTimeDigitized", + "9101": "ComponentsConfiguration", + "9102": "CompressedBitsPerPixel", + "9201": "ShutterSpeedValue", + "9202": "ApertureValue", + "9203": "BrightnessValue", + "9204": "ExposureBiasValue", + "9205": "MaxApertureValue", + "9206": "SubjectDistance", + "9207": "MeteringMode", + "9208": "LightSource", + "9209": "Flash", + "9214": "SubjectArea", + "9286": "UserComment", + "9290": "SubSecTime", + "9291": "SubSecTimeOriginal", + "9292": "SubSecTimeDigitized", + "a000": "FlashpixVersion", + "a001": "ColorSpace", + "a002": "PixelXDimension", + "a003": "PixelYDimension", + "a004": "RelatedSoundFile", + "a005": "InteroperabilityIFDPointer", + "a20b": "FlashEnergy", + "a20c": "SpatialFrequencyResponse", + "a20e": "FocalPlaneXResolution", + "a20f": "FocalPlaneYResolution", + "a40a": "Sharpness", + "a40b": "DeviceSettingDescription", + "a40c": "SubjectDistanceRange", + "a210": "FocalPlaneResolutionUnit", + "a214": "SubjectLocation", + "a215": "ExposureIndex", + "a217": "SensingMethod", + "a300": "FileSource", + "a301": "SceneType", + "a302": "CFAPattern", + "a401": "CustomRendered", + "a402": "ExposureMode", + "a403": "WhiteBalance", + "a404": "DigitalZoomRatio", + "a405": "FocalLengthIn35mmFilm", + "a406": "SceneCaptureType", + "a407": "GainControl", + "a408": "Contrast", + "a409": "Saturation", + "a420": "ImageUniqueID", + "a430": "CameraOwnerName", + "a431": "BodySerialNumber", + "a432": "LensSpecification", + "a433": "LensMake", + "a434": "LensModel", + "a435": "LensSerialNumber", + "a500": "Gamma" + }, + "gps": { + "0000": "GPSVersionID", + "0001": "GPSLatitudeRef", + "0002": "GPSLatitude", + "0003": "GPSLongitudeRef", + "0004": "GPSLongitude", + "0005": "GPSAltitudeRef", + "0006": "GPSAltitude", + "0007": "GPSTimeStamp", + "0008": "GPSSatellites", + "0009": "GPSStatus", + "000a": "GPSMeasureMode", + "000b": "GPSDOP", + "000c": "GPSSpeedRef", + "000d": "GPSSpeed", + "000e": "GPSTrackRef", + "000f": "GPSTrack", + "0010": "GPSImgDirectionRef", + "0011": "GPSImgDirection", + "0012": "GPSMapDatum", + "0013": "GPSDestLatitudeRef", + "0014": "GPSDestLatitude", + "0015": "GPSDestLongitudeRef", + "0016": "GPSDestLongitude", + "0017": "GPSDestBearingRef", + "0018": "GPSDestBearing", + "0019": "GPSDestDistanceRef", + "001a": "GPSDestDistance", + "001b": "GPSProcessingMethod", + "001c": "GPSAreaInformation", + "001d": "GPSDateStamp", + "001e": "GPSDifferential", + "001f": "GPSHPositioningError" + } +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/package.json b/node_modules/jpeg-exif/package.json new file mode 100644 index 0000000..e84973a --- /dev/null +++ b/node_modules/jpeg-exif/package.json @@ -0,0 +1,42 @@ +{ + "name": "jpeg-exif", + "version": "1.1.4", + "description": "Use for parse .jpg file exif info (including GPS info.).", + "main": "lib/index.js", + "scripts": { + "test": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", + "lint": "./node_modules/.bin/eslint ./src/index.js ./test/index.test.js --fix", + "build": "babel ./src -d lib --source-maps && cp ./src/*.json ./lib" + }, + "keywords": [ + "jpeg", + "exif", + "gps", + "image", + "picture", + "photo", + "jfif" + ], + "homepage": "https://github.com/zhso/jpeg-exif", + "repository": { + "type": "git", + "url": "https://github.com/zhso/jpeg-exif.git" + }, + "bugs": { + "url": "https://github.com/zhso/jpeg-exif/issues", + "email": "s@zhso.net" + }, + "author": "s@zhso.net", + "license": "MIT", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-env": "^1.7.0", + "chai": "^4.2.0", + "coveralls": "^3.0.6", + "eslint": "^6.2.0", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-plugin-import": "^2.18.2", + "istanbul": "^0.4.5", + "mocha": "^6.2.0" + } +} diff --git a/node_modules/jpeg-exif/src/index.js b/node_modules/jpeg-exif/src/index.js new file mode 100644 index 0000000..64201c8 --- /dev/null +++ b/node_modules/jpeg-exif/src/index.js @@ -0,0 +1,364 @@ +import fs from 'fs'; + +const tags = require('./tags.json'); + +/* + unsignedByte, + asciiStrings, + unsignedShort, + unsignedLong, + unsignedRational, + signedByte, + undefined, + signedShort, + signedLong, + signedRational, + singleFloat, + doubleFloat + */ +const bytes = [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8]; +const SOIMarkerLength = 2; +const JPEGSOIMarker = 0xffd8; +const TIFFINTEL = 0x4949; +const TIFFMOTOROLA = 0x4d4d; +const APPMarkerLength = 2; +const APPMarkerBegin = 0xffe0; +const APPMarkerEnd = 0xffef; +let data; +/** + * @param buffer {Buffer} + * @returns {Boolean} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var isImage = isValid(content); + * console.log(isImage); + */ +const isValid = (buffer) => { + try { + const SOIMarker = buffer.readUInt16BE(0); + return SOIMarker === JPEGSOIMarker; + } catch (e) { + throw new Error('Unsupport file format.'); + } +}; +/** + * @param buffer {Buffer} + * @returns {Boolean} + * @example + */ +const isTiff = (buffer) => { + try { + const SOIMarker = buffer.readUInt16BE(0); + return SOIMarker === TIFFINTEL || SOIMarker === TIFFMOTOROLA; + } catch (e) { + throw new Error('Unsupport file format.'); + } +}; +/** + * @param buffer {Buffer} + * @returns {Number} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var APPNumber = checkAPPn(content); + * console.log(APPNumber); + */ +const checkAPPn = (buffer) => { + try { + const APPMarkerTag = buffer.readUInt16BE(0); + const isInRange = APPMarkerTag >= APPMarkerBegin && APPMarkerTag <= APPMarkerEnd; + return isInRange ? APPMarkerTag - APPMarkerBegin : false; + } catch (e) { + throw new Error('Invalid APP Tag.'); + } +}; +/** + * @param buffer {Buffer} + * @param tagCollection {Object} + * @param order {Boolean} + * @param offset {Number} + * @returns {Object} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = IFDHandler(content, 0, true, 8); + * console.log(exifFragments.value); + */ +const IFDHandler = (buffer, tagCollection, order, offset) => { + const entriesNumber = order ? buffer.readUInt16BE(0) : buffer.readUInt16LE(0); + + if (entriesNumber === 0) { + return {}; + } + + const entriesNumberLength = 2; + const entries = buffer.slice(entriesNumberLength); + const entryLength = 12; + // let nextIFDPointerBegin = entriesNumberLength + entryLength * entriesNumber; + // let bigNextIFDPointer= buffer.readUInt32BE(nextIFDPointerBegin) ; + // let littleNextIFDPointer= buffer.readUInt32LE(nextIFDPointerBegin); + // let nextIFDPointer = order ?bigNextIFDPointer:littleNextIFDPointer; + const exif = {}; + let entryCount = 0; + + for (entryCount; entryCount < entriesNumber; entryCount += 1) { + const entryBegin = entryCount * entryLength; + const entry = entries.slice(entryBegin, entryBegin + entryLength); + const tagBegin = 0; + const tagLength = 2; + const dataFormatBegin = tagBegin + tagLength; + const dataFormatLength = 2; + const componentsBegin = dataFormatBegin + dataFormatLength; + const componentsNumberLength = 4; + const dataValueBegin = componentsBegin + componentsNumberLength; + const dataValueLength = 4; + const tagAddress = entry.slice(tagBegin, dataFormatBegin); + const tagNumber = order ? tagAddress.toString('hex') : tagAddress.reverse().toString('hex'); + const tagName = tagCollection[tagNumber]; + const bigDataFormat = entry.readUInt16BE(dataFormatBegin); + const littleDataFormat = entry.readUInt16LE(dataFormatBegin); + const dataFormat = order ? bigDataFormat : littleDataFormat; + const componentsByte = bytes[dataFormat]; + const bigComponentsNumber = entry.readUInt32BE(componentsBegin); + const littleComponentNumber = entry.readUInt32LE(componentsBegin); + const componentsNumber = order ? bigComponentsNumber : littleComponentNumber; + const dataLength = componentsNumber * componentsByte; + let dataValue = entry.slice(dataValueBegin, dataValueBegin + dataValueLength); + + if (dataLength > 4) { + const dataOffset = (order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0)) - offset; + dataValue = buffer.slice(dataOffset, dataOffset + dataLength); + } + + let tagValue; + + if (tagName) { + switch (dataFormat) { + case 1: + tagValue = dataValue.readUInt8(0); + break; + case 2: + tagValue = dataValue.toString('ascii').replace(/\0+$/, ''); + break; + case 3: + tagValue = order ? dataValue.readUInt16BE(0) : dataValue.readUInt16LE(0); + break; + case 4: + tagValue = order ? dataValue.readUInt32BE(0) : dataValue.readUInt32LE(0); + break; + case 5: + tagValue = []; + + for (let i = 0; i < dataValue.length; i += 8) { + const bigTagValue = dataValue.readUInt32BE(i) / dataValue.readUInt32BE(i + 4); + const littleTagValue = dataValue.readUInt32LE(i) / dataValue.readUInt32LE(i + 4); + tagValue.push(order ? bigTagValue : littleTagValue); + } + + break; + case 7: + switch (tagName) { + case 'ExifVersion': + tagValue = dataValue.toString(); + break; + case 'FlashPixVersion': + tagValue = dataValue.toString(); + break; + case 'SceneType': + tagValue = dataValue.readUInt8(0); + break; + default: + tagValue = `0x${dataValue.toString('hex', 0, 15)}`; + break; + } + break; + case 10: { + const bigOrder = dataValue.readInt32BE(0) / dataValue.readInt32BE(4); + const littleOrder = dataValue.readInt32LE(0) / dataValue.readInt32LE(4); + tagValue = order ? bigOrder : littleOrder; + break; + } + default: + tagValue = `0x${dataValue.toString('hex')}`; + break; + } + exif[tagName] = tagValue; + } + /* + else { + console.log(`Unkown Tag [0x${tagNumber}].`); + } + */ + } + return exif; +}; + +/** + * @param buf {Buffer} + * @returns {Undefined} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = EXIFHandler(content); + */ +const EXIFHandler = (buf, pad = true) => { + let buffer = buf; + + if (pad) { + buffer = buf.slice(APPMarkerLength); + const length = buffer.readUInt16BE(0); + buffer = buffer.slice(0, length); + const lengthLength = 2; + buffer = buffer.slice(lengthLength); + const identifierLength = 5; + buffer = buffer.slice(identifierLength); + const padLength = 1; + buffer = buffer.slice(padLength); + } + + const byteOrderLength = 2; + const byteOrder = buffer.toString('ascii', 0, byteOrderLength) === 'MM'; + const fortyTwoLength = 2; + const fortyTwoEnd = byteOrderLength + fortyTwoLength; + const big42 = buffer.readUInt32BE(fortyTwoEnd); + const little42 = buffer.readUInt32LE(fortyTwoEnd); + const offsetOfIFD = byteOrder ? big42 : little42; + + buffer = buffer.slice(offsetOfIFD); + + if (buffer.length > 0) { + data = IFDHandler(buffer, tags.ifd, byteOrder, offsetOfIFD); + + if (data.ExifIFDPointer) { + buffer = buffer.slice(data.ExifIFDPointer - offsetOfIFD); + data.SubExif = IFDHandler(buffer, tags.ifd, byteOrder, data.ExifIFDPointer); + } + + if (data.GPSInfoIFDPointer) { + const gps = data.GPSInfoIFDPointer; + buffer = buffer.slice(data.ExifIFDPointer ? gps - data.ExifIFDPointer : gps - offsetOfIFD); + data.GPSInfo = IFDHandler(buffer, tags.gps, byteOrder, gps); + } + } +}; + +/** + * @param buffer {Buffer} + * @returns {Undefined} + * @example + * var content = fs.readFileSync("~/Picture/IMG_0911.JPG"); + * var exifFragments = APPnHandler(content); + */ +const APPnHandler = (buffer) => { + const APPMarkerTag = checkAPPn(buffer); + + if (APPMarkerTag !== false) { // APP0 is 0, and 0==false + const length = buffer.readUInt16BE(APPMarkerLength); + + switch (APPMarkerTag) { + case 1: // EXIF + EXIFHandler(buffer); + break; + default: + APPnHandler(buffer.slice(APPMarkerLength + length)); + break; + } + } +}; + +/** + * @param buffer {Buffer} + * @returns {Object} + * @example + */ +const fromBuffer = (buffer) => { + if (!buffer) { + throw new Error('buffer not found'); + } + + data = undefined; + + if (isValid(buffer)) { + buffer = buffer.slice(SOIMarkerLength); + data = {}; + APPnHandler(buffer); + } else if (isTiff(buffer)) { + data = {}; + EXIFHandler(buffer, false); + } + + return data; +}; + +/** + * @param file {String} + * @returns {Object} + * @example + * var exif = sync("~/Picture/IMG_1981.JPG"); + * console.log(exif.createTime); + */ +const sync = (file) => { + if (!file) { + throw new Error('File not found'); + } + + const buffer = fs.readFileSync(file); + + return fromBuffer(buffer); +}; + +/** + * @param file {String} + * @param callback {Function} + * @example + * async("~/Picture/IMG_0707.JPG", (err, data) => { + * if(err) { + * console.log(err); + * } + * if(data) { + * console.log(data.ExifOffset.createTime); + * } + * } + */ +const async = (file, callback) => { + data = undefined; + + new Promise((resolve, reject) => { + if (!file) { + reject(new Error('❓File not found.')); + } + + fs.readFile(file, (err, buffer) => { + if (err) { + reject(err); + } else { + try { + if (isValid(buffer)) { + const buf = buffer.slice(SOIMarkerLength); + + data = {}; + + APPnHandler(buf); + resolve(data); + } else if (isTiff(buffer)) { + data = {}; + + EXIFHandler(buffer, false); + resolve(data); + } else { + reject(new Error('😱Unsupport file type.')); + } + } catch (e) { + reject(e); + } + } + }); + }, (error) => { + callback(error, undefined); + }).then((d) => { + callback(undefined, d); + }).catch((error) => { + callback(error, undefined); + }); +}; + +exports.fromBuffer = fromBuffer; +exports.parse = async; +exports.parseSync = sync; diff --git a/node_modules/jpeg-exif/src/plus.json b/node_modules/jpeg-exif/src/plus.json new file mode 100644 index 0000000..2a4017c --- /dev/null +++ b/node_modules/jpeg-exif/src/plus.json @@ -0,0 +1,348 @@ +{ + "00fe": "SubfileType", + "00ff": "OldSubfileType", + "000b": "ProcessingSoftware", + "0001": "InteropIndex", + "01b1": "Decode", + "01b2": "DefaultImageColor", + "01b3": "T82Options", + "01b5": "JPEGTables", + "0002": "InteropVersion", + "02bc": "XMP", + "03e7": "USPTOMiscellaneous", + "9c9b": "XPTitle", + "9c9c": "XPComment", + "9c9d": "XPAuthor", + "9c9e": "XPKeywords", + "9c9f": "XPSubject", + "010a": "FillOrder", + "010d": "DocumentName", + "011d": "PageName", + "011e": "XPosition", + "011f": "YPosition", + "012c": "ColorResponseUnit", + "013c": "HostComputer", + "013d": "Predictor", + "014a": "SubIFD", + "014c": "InkSet", + "014d": "InkNames", + "014e": "NumberOfInks", + "015a": "Indexed", + "015b": "JPEGTables", + "015f": "OPIProxy", + "022f": "StripRowCounts", + "80a3": "WangTag1", + "80a4": "WangAnnotation", + "80a5": "WangTag3", + "80a6": "WangTag4", + "80b8": "ImageReferencePoints", + "80b9": "RegionXformTackPoint", + "80ba": "WarpQuadrilateral", + "80bb": "AffineTransformMat", + "80e3": "Matteing", + "80e4": "DataType", + "80e5": "ImageDepth", + "80e6": "TileDepth", + "82a5": "MDFileTag", + "82a6": "MDScalePixel", + "82a7": "MDColorTable", + "82a8": "MDLabName", + "82a9": "MDSampleInfo", + "82aa": "MDPrepDate", + "82ab": "MDPrepTime", + "82ac": "MDFileUnits", + "83bb": "IPTC-NAA", + "84e0": "Site", + "84e1": "ColorSequence", + "84e2": "IT8Header", + "84e3": "RasterPadding", + "84e4": "BitsPerRunLength", + "84e5": "BitsPerExtendedRunLength", + "84e6": "ColorTable", + "84e7": "ImageColorIndicator", + "84e8": "BackgroundColorIndicator", + "84e9": "ImageColorValue", + "84ea": "BackgroundColorValue", + "84eb": "PixelIntensityRange", + "84ec": "TransparencyIndicator", + "84ed": "ColorCharacterization", + "84ee": "HCUsage", + "84ef": "TrapIndicator", + "84f0": "CMYKEquivalent", + "85b8": "PixelMagicJBIGOptions", + "85d7": "JPLCartoIFD", + "85d8": "ModelTransform", + "87ac": "ImageLayer", + "87af": "GeoTiffDirectory", + "87b0": "GeoTiffDoubleParams", + "87b1": "GeoTiffAsciiParams", + "87be": "JBIGOptions", + "0107": "Thresholding", + "0108": "CellWidth", + "0109": "CellLength", + "0118": "MinSampleValue", + "0119": "MaxSampleValue", + "0120": "FreeOffsets", + "0121": "FreeByteCounts", + "0122": "GrayResponseUnit", + "0123": "GrayResponseCurve", + "0124": "T4Options", + "0125": "T6Options", + "0129": "PageNumber", + "0140": "ColorMap", + "0141": "HalftoneHints", + "0142": "TileWidth", + "0143": "TileLength", + "0144": "TileOffsets", + "0145": "TileByteCounts", + "0146": "BadFaxLines", + "0147": "CleanFaxData", + "0148": "ConsecutiveBadFaxLines", + "0150": "DotRange", + "0151": "TargetPrinter", + "0152": "ExtraSamples", + "0153": "SampleFormat", + "0154": "SMinSampleValue", + "0155": "SMaxSampleValue", + "0156": "TransferRange", + "0157": "ClipPath", + "0158": "XClipPathUnits", + "0159": "YClipPathUnits", + "0190": "GlobalParametersIFD", + "0191": "ProfileType", + "0192": "FaxProfile", + "0193": "CodingMethods", + "0194": "VersionYear", + "0195": "ModeNumber", + "0200": "JPEGProc", + "0203": "JPEGRestartInterval", + "0205": "JPEGLosslessPredictors", + "0206": "JPEGPointTransforms", + "0207": "JPEGQTables", + "0208": "JPEGDCTables", + "0209": "JPEGACTables", + "800d": "ImageID", + "821a": "MatrixWorldToCamera", + "827d": "Model2", + "828d": "CFARepeatPatternDim", + "828e": "CFAPattern2", + "828f": "BatteryLevel", + "830e": "PixelScale", + "835c": "UIC1Tag", + "835d": "UIC2Tag", + "835e": "UIC3Tag", + "835f": "UIC4Tag", + "847e": "IntergraphPacketData", + "847f": "IntergraphFlagRegisters", + "877f": "TIFF_FXExtensions", + "882a": "TimeZoneOffset", + "882b": "SelfTimerMode", + "885c": "FaxRecvParams", + "885d": "FaxSubAddress", + "885e": "FaxRecvTime", + "888a": "LeafSubIFD", + "920b": "FlashEnergy", + "920c": "SpatialFrequencyResponse", + "920d": "Noise", + "920e": "FocalPlaneXResolution", + "920f": "FocalPlaneYResolution", + "923a": "CIP3DataFile", + "923b": "CIP3Sheet", + "923c": "CIP3Side", + "923f": "StoNits", + "932f": "MSDocumentText", + "935c": "ImageSourceData", + "1000": "RelatedImageFileFormat", + "1001": "RelatedImageWidth", + "1002": "RelatedImageHeight", + "4746": "Rating", + "4747": "XP_DIP_XML", + "4748": "StitchInfo", + "4749": "RatingPercent", + "7035": "ChromaticAberrationCorrParams", + "7037": "DistortionCorrParams", + "8214": "ImageFullWidth", + "8215": "ImageFullHeight", + "8216": "TextureFormat", + "8217": "WrapModes", + "8218": "FovCot", + "8219": "MatrixWorldToScreen", + "8290": "KodakIFD", + "8335": "AdventScale", + "8336": "AdventRevision", + "8480": "IntergraphMatrix", + "8481": "INGRReserved", + "8482": "ModelTiePoint", + "8546": "SEMInfo", + "8568": "AFCP_IPTC", + "8602": "WB_GRGBLevels", + "8606": "LeafData", + "8649": "PhotoshopSettings", + "8773": "ICC_Profile", + "8780": "MultiProfiles", + "8781": "SharedData", + "8782": "T88Options", + "8829": "Interlace", + "8871": "FedexEDR", + "9009": "GooglePlusUploadCode", + "9210": "FocalPlaneResolutionUnit", + "9211": "ImageNumber", + "9212": "SecurityClassification", + "9213": "ImageHistory", + "9215": "ExposureIndex", + "9216": "TIFF-EPStandardID", + "9217": "SensingMethod", + "9330": "MSPropertySetStorage", + "9331": "MSDocumentTextPosition", + "a20d": "Noise", + "a211": "ImageNumber", + "a212": "SecurityClassification", + "a213": "ImageHistory", + "a216": "TIFF-EPStandardID", + "a480": "GDALMetadata", + "a481": "GDALNoData", + "afc0": "ExpandSoftware", + "afc1": "ExpandLens", + "afc2": "ExpandFilm", + "afc3": "ExpandFilterLens", + "afc4": "ExpandScanner", + "afc5": "ExpandFlashLamp", + "bc01": "PixelFormat", + "bc02": "Transformation", + "bc03": "Uncompressed", + "bc04": "ImageType", + "bc80": "ImageWidth", + "bc81": "ImageHeight", + "bc82": "WidthResolution", + "bc83": "HeightResolution", + "bcc0": "ImageOffset", + "bcc1": "ImageByteCount", + "bcc2": "AlphaOffset", + "bcc3": "AlphaByteCount", + "bcc4": "ImageDataDiscard", + "bcc5": "AlphaDataDiscard", + "c4a5": "PrintIM", + "c6bf": "ColorimetricReference", + "c6c5": "SRawType", + "c6d2": "PanasonicTitle", + "c6d3": "PanasonicTitle2", + "c6f3": "CameraCalibrationSig", + "c6f4": "ProfileCalibrationSig", + "c6f5": "ProfileIFD", + "c6f6": "AsShotProfileName", + "c6f7": "NoiseReductionApplied", + "c6f8": "ProfileName", + "c6f9": "ProfileHueSatMapDims", + "c6fa": "ProfileHueSatMapData1", + "c6fb": "ProfileHueSatMapData2", + "c6fc": "ProfileToneCurve", + "c6fd": "ProfileEmbedPolicy", + "c6fe": "ProfileCopyright", + "c7a1": "CameraLabel", + "c7a3": "ProfileHueSatMapEncoding", + "c7a4": "ProfileLookTableEncoding", + "c7a5": "BaselineExposureOffset", + "c7a6": "DefaultBlackRender", + "c7a7": "NewRawImageDigest", + "c7a8": "RawToPreviewGain", + "c7b5": "DefaultUserCrop", + "c42a": "OceImageLogic", + "c44f": "Annotations", + "c61a": "BlackLevel", + "c61b": "BlackLevelDeltaH", + "c61c": "BlackLevelDeltaV", + "c61d": "WhiteLevel", + "c61e": "DefaultScale", + "c61f": "DefaultCropOrigin", + "c62a": "BaselineExposure", + "c62b": "BaselineNoise", + "c62c": "BaselineSharpness", + "c62d": "BayerGreenSplit", + "c62e": "LinearResponseLimit", + "c62f": "CameraSerialNumber", + "c65a": "CalibrationIlluminant1", + "c65b": "CalibrationIlluminant2", + "c65c": "BestQualityScale", + "c65d": "RawDataUniqueID", + "c68b": "OriginalRawFileName", + "c68c": "OriginalRawFileData", + "c68d": "ActiveArea", + "c68e": "MaskedAreas", + "c68f": "AsShotICCProfile", + "c71a": "PreviewColorSpace", + "c71b": "PreviewDateTime", + "c71c": "RawImageDigest", + "c71d": "OriginalRawFileDigest", + "c71e": "SubTileBlockSize", + "c71f": "RowInterleaveFactor", + "c74e": "OpcodeList3", + "c427": "OceScanjobDesc", + "c428": "OceApplicationSelector", + "c429": "OceIDNumber", + "c573": "OriginalFileName", + "c580": "USPTOOriginalContentType", + "c612": "DNGVersion", + "c613": "DNGBackwardVersion", + "c614": "UniqueCameraModel", + "c615": "LocalizedCameraModel", + "c616": "CFAPlaneColor", + "c617": "CFALayout", + "c618": "LinearizationTable", + "c619": "BlackLevelRepeatDim", + "c620": "DefaultCropSize", + "c621": "ColorMatrix1", + "c622": "ColorMatrix2", + "c623": "CameraCalibration1", + "c624": "CameraCalibration2", + "c625": "ReductionMatrix1", + "c626": "ReductionMatrix2", + "c627": "AnalogBalance", + "c628": "AsShotNeutral", + "c629": "AsShotWhiteXY", + "c630": "DNGLensInfo", + "c631": "ChromaBlurRadius", + "c632": "AntiAliasStrength", + "c633": "ShadowScale", + "c634": "SR2Private", + "c635": "MakerNoteSafety", + "c640": "RawImageSegmentation", + "c660": "AliasLayerMetadata", + "c690": "AsShotPreProfileMatrix", + "c691": "CurrentICCProfile", + "c692": "CurrentPreProfileMatrix", + "c714": "ForwardMatrix1", + "c715": "ForwardMatrix2", + "c716": "PreviewApplicationName", + "c717": "PreviewApplicationVersion", + "c718": "PreviewSettingsName", + "c719": "PreviewSettingsDigest", + "c725": "ProfileLookTableDims", + "c726": "ProfileLookTableData", + "c740": "OpcodeList1", + "c741": "OpcodeList2", + "c761": "NoiseProfile", + "c763": "TimeCodes", + "c764": "FrameRate", + "c772": "TStop", + "c789": "ReelName", + "c791": "OriginalDefaultFinalSize", + "c792": "OriginalBestQualitySize", + "c793": "OriginalDefaultCropSize", + "ea1c": "Padding", + "ea1d": "OffsetSchema", + "fde8": "OwnerName", + "fde9": "SerialNumber", + "fdea": "Lens", + "fe00": "KDC_IFD", + "fe4c": "RawFile", + "fe4d": "Converter", + "fe4e": "WhiteBalance", + "fe51": "Exposure", + "fe52": "Shadows", + "fe53": "Brightness", + "fe54": "Contrast", + "fe55": "Saturation", + "fe56": "Sharpness", + "fe57": "Smoothness", + "fe58": "MoireFilter" +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/src/tags.json b/node_modules/jpeg-exif/src/tags.json new file mode 100644 index 0000000..d71008f --- /dev/null +++ b/node_modules/jpeg-exif/src/tags.json @@ -0,0 +1,140 @@ +{ + "ifd": { + "010e": "ImageDescription", + "010f": "Make", + "011a": "XResolution", + "011b": "YResolution", + "011c": "PlanarConfiguration", + "012d": "TransferFunction", + "013b": "Artist", + "013e": "WhitePoint", + "013f": "PrimaryChromaticities", + "0100": "ImageWidth", + "0101": "ImageHeight", + "0102": "BitsPerSample", + "0103": "Compression", + "0106": "PhotometricInterpretation", + "0110": "Model", + "0111": "StripOffsets", + "0112": "Orientation", + "0115": "SamplesPerPixel", + "0116": "RowsPerStrip", + "0117": "StripByteCounts", + "0128": "ResolutionUnit", + "0131": "Software", + "0132": "DateTime", + "0201": "JPEGInterchangeFormat", + "0202": "JPEGInterchangeFormatLength", + "0211": "YCbCrCoefficients", + "0212": "YCbCrSubSampling", + "0213": "YCbCrPositioning", + "0214": "ReferenceBlackWhite", + "829a": "ExposureTime", + "829d": "FNumber", + "920a": "FocalLength", + "927c": "MakerNote", + "8298": "Copyright", + "8769": "ExifIFDPointer", + "8822": "ExposureProgram", + "8824": "SpectralSensitivity", + "8825": "GPSInfoIFDPointer", + "8827": "PhotographicSensitivity", + "8828": "OECF", + "8830": "SensitivityType", + "8831": "StandardOutputSensitivity", + "8832": "RecommendedExposureIndex", + "8833": "ISOSpeed", + "8834": "ISOSpeedLatitudeyyy", + "8835": "ISOSpeedLatitudezzz", + "9000": "ExifVersion", + "9003": "DateTimeOriginal", + "9004": "DateTimeDigitized", + "9101": "ComponentsConfiguration", + "9102": "CompressedBitsPerPixel", + "9201": "ShutterSpeedValue", + "9202": "ApertureValue", + "9203": "BrightnessValue", + "9204": "ExposureBiasValue", + "9205": "MaxApertureValue", + "9206": "SubjectDistance", + "9207": "MeteringMode", + "9208": "LightSource", + "9209": "Flash", + "9214": "SubjectArea", + "9286": "UserComment", + "9290": "SubSecTime", + "9291": "SubSecTimeOriginal", + "9292": "SubSecTimeDigitized", + "a000": "FlashpixVersion", + "a001": "ColorSpace", + "a002": "PixelXDimension", + "a003": "PixelYDimension", + "a004": "RelatedSoundFile", + "a005": "InteroperabilityIFDPointer", + "a20b": "FlashEnergy", + "a20c": "SpatialFrequencyResponse", + "a20e": "FocalPlaneXResolution", + "a20f": "FocalPlaneYResolution", + "a40a": "Sharpness", + "a40b": "DeviceSettingDescription", + "a40c": "SubjectDistanceRange", + "a210": "FocalPlaneResolutionUnit", + "a214": "SubjectLocation", + "a215": "ExposureIndex", + "a217": "SensingMethod", + "a300": "FileSource", + "a301": "SceneType", + "a302": "CFAPattern", + "a401": "CustomRendered", + "a402": "ExposureMode", + "a403": "WhiteBalance", + "a404": "DigitalZoomRatio", + "a405": "FocalLengthIn35mmFilm", + "a406": "SceneCaptureType", + "a407": "GainControl", + "a408": "Contrast", + "a409": "Saturation", + "a420": "ImageUniqueID", + "a430": "CameraOwnerName", + "a431": "BodySerialNumber", + "a432": "LensSpecification", + "a433": "LensMake", + "a434": "LensModel", + "a435": "LensSerialNumber", + "a500": "Gamma" + }, + "gps": { + "0000": "GPSVersionID", + "0001": "GPSLatitudeRef", + "0002": "GPSLatitude", + "0003": "GPSLongitudeRef", + "0004": "GPSLongitude", + "0005": "GPSAltitudeRef", + "0006": "GPSAltitude", + "0007": "GPSTimeStamp", + "0008": "GPSSatellites", + "0009": "GPSStatus", + "000a": "GPSMeasureMode", + "000b": "GPSDOP", + "000c": "GPSSpeedRef", + "000d": "GPSSpeed", + "000e": "GPSTrackRef", + "000f": "GPSTrack", + "0010": "GPSImgDirectionRef", + "0011": "GPSImgDirection", + "0012": "GPSMapDatum", + "0013": "GPSDestLatitudeRef", + "0014": "GPSDestLatitude", + "0015": "GPSDestLongitudeRef", + "0016": "GPSDestLongitude", + "0017": "GPSDestBearingRef", + "0018": "GPSDestBearing", + "0019": "GPSDestDistanceRef", + "001a": "GPSDestDistance", + "001b": "GPSProcessingMethod", + "001c": "GPSAreaInformation", + "001d": "GPSDateStamp", + "001e": "GPSDifferential", + "001f": "GPSHPositioningError" + } +} \ No newline at end of file diff --git a/node_modules/jpeg-exif/test/Arbitro.tiff b/node_modules/jpeg-exif/test/Arbitro.tiff new file mode 100644 index 0000000..2efe348 Binary files /dev/null and b/node_modules/jpeg-exif/test/Arbitro.tiff differ diff --git a/node_modules/jpeg-exif/test/IMG_0001.JPG b/node_modules/jpeg-exif/test/IMG_0001.JPG new file mode 100644 index 0000000..f6c68f3 Binary files /dev/null and b/node_modules/jpeg-exif/test/IMG_0001.JPG differ diff --git a/node_modules/jpeg-exif/test/IMG_0003.JPG b/node_modules/jpeg-exif/test/IMG_0003.JPG new file mode 100644 index 0000000..9f68396 Binary files /dev/null and b/node_modules/jpeg-exif/test/IMG_0003.JPG differ diff --git a/node_modules/jpeg-exif/test/index.test.js b/node_modules/jpeg-exif/test/index.test.js new file mode 100644 index 0000000..a77f499 --- /dev/null +++ b/node_modules/jpeg-exif/test/index.test.js @@ -0,0 +1,135 @@ +/* global it, describe */ +const fs = require('fs'); +const { expect } = require('chai'); +const exif = require('../lib/index.js'); + +describe('.parse()', () => { + it('file {undefined}', () => { + exif.parse(undefined, (err) => { + expect(err).to.throw(Error); + }); + }); + + it('file {null}', () => { + exif.parse('./test/null.jpg', (err) => { + expect(err).to.throw(Error); + }); + }); + + it('APP1:#0xffe1', (done) => { + exif.parse('./test/IMG_0001.JPG', (err, data) => { + expect(data).to.be.an('object'); + done(); + }); + }); + + it('APP0:#0xffe0', (done) => { + exif.parse('./test/IMG_0003.JPG', (err, data) => { + expect(data).to.be.an('undefined'); + done(); + }); + }); + + it('!(APP1:#0xffe1||APP0:#0xffe0)', (done) => { + exif.parse('./test/index.test.js', (err, data) => { + expect(data).to.be.an('undefined'); + done(); + }); + }); + + it('[SubExif]', (done) => { + exif.parse('./test/IMG_0001.JPG', (err, data) => { + expect(data.SubExif).to.be.an('object'); + done(); + }); + }); + + it('[GPSInfo]', (done) => { + exif.parse('./test/IMG_0001.JPG', (err, data) => { + expect(data.GPSInfo).to.be.an('object'); + done(); + }); + }); +}); + +describe('.parseSync()', () => { + it('file {undefined}', () => { + expect(exif.parseSync).to.throw(Error); + }); + + it('file {null}', () => { + expect(exif.parseSync).to.throw(Error); + }); + + it('APP1:#0xffe1', () => { + const data = exif.parseSync('./test/IMG_0001.JPG'); + expect(data).to.be.an('object'); + }); + + it('!APP1:#0xffe1', () => { + const data = exif.parseSync('./test/IMG_0003.JPG'); + expect(data).to.be.an('object'); + }); + + it('[SubExif]', () => { + const data = exif.parseSync('./test/IMG_0001.JPG'); + expect(data.SubExif).to.be.an('object'); + }); + + it('[GPSInfo]', () => { + const data = exif.parseSync('./test/IMG_0001.JPG'); + expect(data.GPSInfo).to.be.an('object'); + }); + + it('TIFF', () => { + const data = exif.parseSync('./test/Arbitro.tiff'); + + expect(data).to.be.eql({ + ImageWidth: 174, + ImageHeight: 38, + BitsPerSample: 8, + Compression: 5, + PhotometricInterpretation: 2, + StripOffsets: 8, + Orientation: 1, + SamplesPerPixel: 4, + RowsPerStrip: 38, + StripByteCounts: 6391, + PlanarConfiguration: 1, + }); + }); +}); + +describe('.fromBuffer()', () => { + it('file {undefined}', () => { + expect(exif.fromBuffer).to.throw(Error); + }); + + it('APP1:#0xffe1', () => { + const buffer = fs.readFileSync('./test/IMG_0001.JPG'); + const data = exif.fromBuffer(buffer); + + expect(data).to.be.an('object'); + }); + + it('!APP1:#0xffe1', () => { + const buffer = fs.readFileSync('./test/IMG_0003.JPG'); + const data = exif.fromBuffer(buffer); + + expect(data).to.be.an('object'); + }); + + it('[SubExif]', () => { + const buffer = fs.readFileSync('./test/IMG_0001.JPG'); + const data = exif.fromBuffer(buffer); + + expect(data.SubExif).to.be.an('object'); + }); + + it('[GPSInfo]', () => { + const buffer = fs.readFileSync('./test/IMG_0001.JPG'); + const data = exif.fromBuffer(buffer); + + expect(data.GPSInfo).to.be.an('object'); + }); +}); diff --git a/node_modules/jsqr/LICENSE b/node_modules/jsqr/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/node_modules/jsqr/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/node_modules/jsqr/README.md b/node_modules/jsqr/README.md new file mode 100644 index 0000000..d193273 --- /dev/null +++ b/node_modules/jsqr/README.md @@ -0,0 +1,107 @@ +# jsQR + +[![Build Status](https://travis-ci.org/cozmo/jsQR.svg?branch=master)](https://travis-ci.org/cozmo/jsQR) + +A pure javascript QR code reading library. +This library takes in raw images and will locate, extract and parse any QR code found within. + +[Demo](https://cozmo.github.io/jsQR) + + +## Installation + + + +### NPM +Available [on npm](https://www.npmjs.com/package/jsqr). Can be used in a Node.js program or with a module bundler such as Webpack or Browserify. + +``` +npm install jsqr --save +``` + +```javascript +// ES6 import +import jsQR from "jsqr"; + +// CommonJS require +const jsQR = require("jsqr"); + +jsQR(...); +``` + +### Browser +Alternatively for frontend use [`jsQR.js`](./dist/jsQR.js) can be included with a script tag + +```html + + +``` + +### A note on webcams +jsQR is designed to be a completely standalone library for scanning QR codes. By design it does not include any platform specific code. This allows it to just as easily scan a frontend webcam stream, a user uploaded image, or be used as part of a backend Node.js process. + +If you want to use jsQR to scan a webcam stream you'll need to extract the [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) from the video stream. This can then be passed to jsQR. The [jsQR demo](https://cozmo.github.io/jsQR) contains a barebones implementation of webcam scanning that can be used as a starting point and customized for your needs. For more advanced questions you can refer to the [`getUserMedia` docs](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) or the fairly comprehensive [webRTC sample code](https://github.com/webrtc/samples), both of which are great resources for consuming a webcam stream. + +## Usage + +jsQR exports a method that takes in 3 arguments representing the image data you wish to decode. Additionally can take an options object to further configure scanning behavior. + +```javascript +const code = jsQR(imageData, width, height, options?); + +if (code) { + console.log("Found QR code", code); +} +``` + +### Arguments +- `imageData` - An `Uint8ClampedArray` of RGBA pixel values in the form `[r0, g0, b0, a0, r1, g1, b1, a1, ...]`. +As such the length of this array should be `4 * width * height`. +This data is in the same form as the [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) interface, and it's also [commonly](https://www.npmjs.com/package/jpeg-js#decoding-jpegs) [returned](https://github.com/lukeapage/pngjs/blob/master/README.md#property-data) by node modules for reading images. +- `width` - The width of the image you wish to decode. +- `height` - The height of the image you wish to decode. +- `options` (optional) - Additional options. + - `inversionAttempts` - (`attemptBoth` (default), `dontInvert`, `onlyInvert`, or `invertFirst`) - Should jsQR attempt to invert the image to find QR codes with white modules on black backgrounds instead of the black modules on white background. This option defaults to `attemptBoth` for backwards compatibility but causes a ~50% performance hit, and will probably be default to `dontInvert` in future versions. + +### Return value +If a QR is able to be decoded the library will return an object with the following keys. + +- `binaryData` - `Uint8ClampedArray` - The raw bytes of the QR code. +- `data` - The string version of the QR code data. +- `chunks` - The QR chunks. +- `version` - The QR version. +- `location` - An object with keys describing key points of the QR code. Each key is a point of the form `{x: number, y: number}`. +Has points for the following locations. + - Corners - `topRightCorner`/`topLeftCorner`/`bottomRightCorner`/`bottomLeftCorner`; + - Finder patterns - `topRightFinderPattern`/`topLeftFinderPattern`/`bottomLeftFinderPattern` + - May also have a point for the `bottomRightAlignmentPattern` assuming one exists and can be located. + +Because the library is written in [typescript](http://www.typescriptlang.org/) you can also view the [type definitions](./dist/index.d.ts) to understand the API. + +## Contributing + +jsQR is written using [typescript](http://www.typescriptlang.org/). +You can view the development source in the [`src`](./src) directory. + +Tests can be run with + +``` +npm test +``` + +Besides unit tests the test suite contains several hundred images that can be found in the [/tests/end-to-end/](./tests/end-to-end/) folder. + +Not all the images can be read. In general changes should hope to increase the number of images that read. However due to the nature of computer vision some changes may cause images that pass to start to fail and visa versa. To update the expected outcomes run `npm run-script generate-test-data`. These outcomes can be evaluated in the context of a PR to determine if a change improves or harms the overall ability of the library to read QR codes. A summary of which are passing +and failing can be found at [/tests/end-to-end/report.json](./tests/end-to-end/report.json) + +After testing any changes, you can compile the production version by running +``` +npm run-script build +``` + +- Source hosted at [GitHub](https://github.com/cozmo/jsQR) +- Report issues, questions, feature requests on [GitHub Issues](https://github.com/cozmo/jsQR/issues) + +Pull requests are welcome! Please create seperate branches for seperate features/patches. diff --git a/node_modules/jsqr/dist/BitMatrix.d.ts b/node_modules/jsqr/dist/BitMatrix.d.ts new file mode 100644 index 0000000..ba5a881 --- /dev/null +++ b/node_modules/jsqr/dist/BitMatrix.d.ts @@ -0,0 +1,10 @@ +export declare class BitMatrix { + static createEmpty(width: number, height: number): BitMatrix; + width: number; + height: number; + private data; + constructor(data: Uint8ClampedArray, width: number); + get(x: number, y: number): boolean; + set(x: number, y: number, v: boolean): void; + setRegion(left: number, top: number, width: number, height: number, v: boolean): void; +} diff --git a/node_modules/jsqr/dist/binarizer/index.d.ts b/node_modules/jsqr/dist/binarizer/index.d.ts new file mode 100644 index 0000000..22f863b --- /dev/null +++ b/node_modules/jsqr/dist/binarizer/index.d.ts @@ -0,0 +1,8 @@ +import { BitMatrix } from "../BitMatrix"; +export declare function binarize(data: Uint8ClampedArray, width: number, height: number, returnInverted: boolean): { + binarized: BitMatrix; + inverted: BitMatrix; +} | { + binarized: BitMatrix; + inverted?: undefined; +}; diff --git a/node_modules/jsqr/dist/decoder/decodeData/BitStream.d.ts b/node_modules/jsqr/dist/decoder/decodeData/BitStream.d.ts new file mode 100644 index 0000000..5a8f8cf --- /dev/null +++ b/node_modules/jsqr/dist/decoder/decodeData/BitStream.d.ts @@ -0,0 +1,8 @@ +export declare class BitStream { + private bytes; + private byteOffset; + private bitOffset; + constructor(bytes: Uint8ClampedArray); + readBits(numBits: number): number; + available(): number; +} diff --git a/node_modules/jsqr/dist/decoder/decodeData/index.d.ts b/node_modules/jsqr/dist/decoder/decodeData/index.d.ts new file mode 100644 index 0000000..6ecd99a --- /dev/null +++ b/node_modules/jsqr/dist/decoder/decodeData/index.d.ts @@ -0,0 +1,27 @@ +export interface Chunk { + type: Mode; + text: string; +} +export interface ByteChunk { + type: Mode.Byte | Mode.Kanji; + bytes: number[]; +} +export interface ECIChunk { + type: Mode.ECI; + assignmentNumber: number; +} +export declare type Chunks = Array; +export interface DecodedQR { + text: string; + bytes: number[]; + chunks: Chunks; + version: number; +} +export declare enum Mode { + Numeric = "numeric", + Alphanumeric = "alphanumeric", + Byte = "byte", + Kanji = "kanji", + ECI = "eci" +} +export declare function decode(data: Uint8ClampedArray, version: number): DecodedQR; diff --git a/node_modules/jsqr/dist/decoder/decodeData/shiftJISTable.d.ts b/node_modules/jsqr/dist/decoder/decodeData/shiftJISTable.d.ts new file mode 100644 index 0000000..9ac2e62 --- /dev/null +++ b/node_modules/jsqr/dist/decoder/decodeData/shiftJISTable.d.ts @@ -0,0 +1,3 @@ +export declare const shiftJISTable: { + [key: number]: number; +}; diff --git a/node_modules/jsqr/dist/decoder/decoder.d.ts b/node_modules/jsqr/dist/decoder/decoder.d.ts new file mode 100644 index 0000000..8336365 --- /dev/null +++ b/node_modules/jsqr/dist/decoder/decoder.d.ts @@ -0,0 +1,3 @@ +import { BitMatrix } from "../BitMatrix"; +import { DecodedQR } from "./decodeData"; +export declare function decode(matrix: BitMatrix): DecodedQR; diff --git a/node_modules/jsqr/dist/decoder/reedsolomon/GenericGF.d.ts b/node_modules/jsqr/dist/decoder/reedsolomon/GenericGF.d.ts new file mode 100644 index 0000000..47d171d --- /dev/null +++ b/node_modules/jsqr/dist/decoder/reedsolomon/GenericGF.d.ts @@ -0,0 +1,17 @@ +import GenericGFPoly from "./GenericGFPoly"; +export declare function addOrSubtractGF(a: number, b: number): number; +export default class GenericGF { + primitive: number; + size: number; + generatorBase: number; + zero: GenericGFPoly; + one: GenericGFPoly; + private expTable; + private logTable; + constructor(primitive: number, size: number, genBase: number); + multiply(a: number, b: number): number; + inverse(a: number): number; + buildMonomial(degree: number, coefficient: number): GenericGFPoly; + log(a: number): number; + exp(a: number): number; +} diff --git a/node_modules/jsqr/dist/decoder/reedsolomon/GenericGFPoly.d.ts b/node_modules/jsqr/dist/decoder/reedsolomon/GenericGFPoly.d.ts new file mode 100644 index 0000000..19641e7 --- /dev/null +++ b/node_modules/jsqr/dist/decoder/reedsolomon/GenericGFPoly.d.ts @@ -0,0 +1,14 @@ +import GenericGF from "./GenericGF"; +export default class GenericGFPoly { + private field; + private coefficients; + constructor(field: GenericGF, coefficients: Uint8ClampedArray); + degree(): number; + isZero(): boolean; + getCoefficient(degree: number): number; + addOrSubtract(other: GenericGFPoly): GenericGFPoly; + multiply(scalar: number): GenericGFPoly; + multiplyPoly(other: GenericGFPoly): GenericGFPoly; + multiplyByMonomial(degree: number, coefficient: number): GenericGFPoly; + evaluateAt(a: number): number; +} diff --git a/node_modules/jsqr/dist/decoder/reedsolomon/index.d.ts b/node_modules/jsqr/dist/decoder/reedsolomon/index.d.ts new file mode 100644 index 0000000..2ca0d73 --- /dev/null +++ b/node_modules/jsqr/dist/decoder/reedsolomon/index.d.ts @@ -0,0 +1 @@ +export declare function decode(bytes: number[], twoS: number): Uint8ClampedArray; diff --git a/node_modules/jsqr/dist/decoder/version.d.ts b/node_modules/jsqr/dist/decoder/version.d.ts new file mode 100644 index 0000000..9d71230 --- /dev/null +++ b/node_modules/jsqr/dist/decoder/version.d.ts @@ -0,0 +1,13 @@ +export interface Version { + infoBits: number; + versionNumber: number; + alignmentPatternCenters: number[]; + errorCorrectionLevels: Array<{ + ecCodewordsPerBlock: number; + ecBlocks: Array<{ + numBlocks: number; + dataCodewordsPerBlock: number; + }>; + }>; +} +export declare const VERSIONS: Version[]; diff --git a/node_modules/jsqr/dist/extractor/index.d.ts b/node_modules/jsqr/dist/extractor/index.d.ts new file mode 100644 index 0000000..d1ee205 --- /dev/null +++ b/node_modules/jsqr/dist/extractor/index.d.ts @@ -0,0 +1,9 @@ +import { BitMatrix } from "../BitMatrix"; +import { QRLocation } from "../locator"; +export declare function extract(image: BitMatrix, location: QRLocation): { + matrix: BitMatrix; + mappingFunction: (x: number, y: number) => { + x: number; + y: number; + }; +}; diff --git a/node_modules/jsqr/dist/index.d.ts b/node_modules/jsqr/dist/index.d.ts new file mode 100644 index 0000000..d341eb7 --- /dev/null +++ b/node_modules/jsqr/dist/index.d.ts @@ -0,0 +1,23 @@ +import { Chunks } from "./decoder/decodeData"; +import { Point } from "./locator"; +export interface QRCode { + binaryData: number[]; + data: string; + chunks: Chunks; + version: number; + location: { + topRightCorner: Point; + topLeftCorner: Point; + bottomRightCorner: Point; + bottomLeftCorner: Point; + topRightFinderPattern: Point; + topLeftFinderPattern: Point; + bottomLeftFinderPattern: Point; + bottomRightAlignmentPattern?: Point; + }; +} +export interface Options { + inversionAttempts?: "dontInvert" | "onlyInvert" | "attemptBoth" | "invertFirst"; +} +declare function jsQR(data: Uint8ClampedArray, width: number, height: number, providedOptions?: Options): QRCode | null; +export default jsQR; diff --git a/node_modules/jsqr/dist/jsQR.js b/node_modules/jsqr/dist/jsQR.js new file mode 100644 index 0000000..429896a --- /dev/null +++ b/node_modules/jsqr/dist/jsQR.js @@ -0,0 +1,10102 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["jsQR"] = factory(); + else + root["jsQR"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BitMatrix = /** @class */ (function () { + function BitMatrix(data, width) { + this.width = width; + this.height = data.length / width; + this.data = data; + } + BitMatrix.createEmpty = function (width, height) { + return new BitMatrix(new Uint8ClampedArray(width * height), width); + }; + BitMatrix.prototype.get = function (x, y) { + if (x < 0 || x >= this.width || y < 0 || y >= this.height) { + return false; + } + return !!this.data[y * this.width + x]; + }; + BitMatrix.prototype.set = function (x, y, v) { + this.data[y * this.width + x] = v ? 1 : 0; + }; + BitMatrix.prototype.setRegion = function (left, top, width, height, v) { + for (var y = top; y < top + height; y++) { + for (var x = left; x < left + width; x++) { + this.set(x, y, !!v); + } + } + }; + return BitMatrix; +}()); +exports.BitMatrix = BitMatrix; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var GenericGFPoly_1 = __webpack_require__(2); +function addOrSubtractGF(a, b) { + return a ^ b; // tslint:disable-line:no-bitwise +} +exports.addOrSubtractGF = addOrSubtractGF; +var GenericGF = /** @class */ (function () { + function GenericGF(primitive, size, genBase) { + this.primitive = primitive; + this.size = size; + this.generatorBase = genBase; + this.expTable = new Array(this.size); + this.logTable = new Array(this.size); + var x = 1; + for (var i = 0; i < this.size; i++) { + this.expTable[i] = x; + x = x * 2; + if (x >= this.size) { + x = (x ^ this.primitive) & (this.size - 1); // tslint:disable-line:no-bitwise + } + } + for (var i = 0; i < this.size - 1; i++) { + this.logTable[this.expTable[i]] = i; + } + this.zero = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([0])); + this.one = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([1])); + } + GenericGF.prototype.multiply = function (a, b) { + if (a === 0 || b === 0) { + return 0; + } + return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.size - 1)]; + }; + GenericGF.prototype.inverse = function (a) { + if (a === 0) { + throw new Error("Can't invert 0"); + } + return this.expTable[this.size - this.logTable[a] - 1]; + }; + GenericGF.prototype.buildMonomial = function (degree, coefficient) { + if (degree < 0) { + throw new Error("Invalid monomial degree less than 0"); + } + if (coefficient === 0) { + return this.zero; + } + var coefficients = new Uint8ClampedArray(degree + 1); + coefficients[0] = coefficient; + return new GenericGFPoly_1.default(this, coefficients); + }; + GenericGF.prototype.log = function (a) { + if (a === 0) { + throw new Error("Can't take log(0)"); + } + return this.logTable[a]; + }; + GenericGF.prototype.exp = function (a) { + return this.expTable[a]; + }; + return GenericGF; +}()); +exports.default = GenericGF; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var GenericGF_1 = __webpack_require__(1); +var GenericGFPoly = /** @class */ (function () { + function GenericGFPoly(field, coefficients) { + if (coefficients.length === 0) { + throw new Error("No coefficients."); + } + this.field = field; + var coefficientsLength = coefficients.length; + if (coefficientsLength > 1 && coefficients[0] === 0) { + // Leading term must be non-zero for anything except the constant polynomial "0" + var firstNonZero = 1; + while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) { + firstNonZero++; + } + if (firstNonZero === coefficientsLength) { + this.coefficients = field.zero.coefficients; + } + else { + this.coefficients = new Uint8ClampedArray(coefficientsLength - firstNonZero); + for (var i = 0; i < this.coefficients.length; i++) { + this.coefficients[i] = coefficients[firstNonZero + i]; + } + } + } + else { + this.coefficients = coefficients; + } + } + GenericGFPoly.prototype.degree = function () { + return this.coefficients.length - 1; + }; + GenericGFPoly.prototype.isZero = function () { + return this.coefficients[0] === 0; + }; + GenericGFPoly.prototype.getCoefficient = function (degree) { + return this.coefficients[this.coefficients.length - 1 - degree]; + }; + GenericGFPoly.prototype.addOrSubtract = function (other) { + var _a; + if (this.isZero()) { + return other; + } + if (other.isZero()) { + return this; + } + var smallerCoefficients = this.coefficients; + var largerCoefficients = other.coefficients; + if (smallerCoefficients.length > largerCoefficients.length) { + _a = [largerCoefficients, smallerCoefficients], smallerCoefficients = _a[0], largerCoefficients = _a[1]; + } + var sumDiff = new Uint8ClampedArray(largerCoefficients.length); + var lengthDiff = largerCoefficients.length - smallerCoefficients.length; + for (var i = 0; i < lengthDiff; i++) { + sumDiff[i] = largerCoefficients[i]; + } + for (var i = lengthDiff; i < largerCoefficients.length; i++) { + sumDiff[i] = GenericGF_1.addOrSubtractGF(smallerCoefficients[i - lengthDiff], largerCoefficients[i]); + } + return new GenericGFPoly(this.field, sumDiff); + }; + GenericGFPoly.prototype.multiply = function (scalar) { + if (scalar === 0) { + return this.field.zero; + } + if (scalar === 1) { + return this; + } + var size = this.coefficients.length; + var product = new Uint8ClampedArray(size); + for (var i = 0; i < size; i++) { + product[i] = this.field.multiply(this.coefficients[i], scalar); + } + return new GenericGFPoly(this.field, product); + }; + GenericGFPoly.prototype.multiplyPoly = function (other) { + if (this.isZero() || other.isZero()) { + return this.field.zero; + } + var aCoefficients = this.coefficients; + var aLength = aCoefficients.length; + var bCoefficients = other.coefficients; + var bLength = bCoefficients.length; + var product = new Uint8ClampedArray(aLength + bLength - 1); + for (var i = 0; i < aLength; i++) { + var aCoeff = aCoefficients[i]; + for (var j = 0; j < bLength; j++) { + product[i + j] = GenericGF_1.addOrSubtractGF(product[i + j], this.field.multiply(aCoeff, bCoefficients[j])); + } + } + return new GenericGFPoly(this.field, product); + }; + GenericGFPoly.prototype.multiplyByMonomial = function (degree, coefficient) { + if (degree < 0) { + throw new Error("Invalid degree less than 0"); + } + if (coefficient === 0) { + return this.field.zero; + } + var size = this.coefficients.length; + var product = new Uint8ClampedArray(size + degree); + for (var i = 0; i < size; i++) { + product[i] = this.field.multiply(this.coefficients[i], coefficient); + } + return new GenericGFPoly(this.field, product); + }; + GenericGFPoly.prototype.evaluateAt = function (a) { + var result = 0; + if (a === 0) { + // Just return the x^0 coefficient + return this.getCoefficient(0); + } + var size = this.coefficients.length; + if (a === 1) { + // Just the sum of the coefficients + this.coefficients.forEach(function (coefficient) { + result = GenericGF_1.addOrSubtractGF(result, coefficient); + }); + return result; + } + result = this.coefficients[0]; + for (var i = 1; i < size; i++) { + result = GenericGF_1.addOrSubtractGF(this.field.multiply(a, result), this.coefficients[i]); + } + return result; + }; + return GenericGFPoly; +}()); +exports.default = GenericGFPoly; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var binarizer_1 = __webpack_require__(4); +var decoder_1 = __webpack_require__(5); +var extractor_1 = __webpack_require__(11); +var locator_1 = __webpack_require__(12); +function scan(matrix) { + var locations = locator_1.locate(matrix); + if (!locations) { + return null; + } + for (var _i = 0, locations_1 = locations; _i < locations_1.length; _i++) { + var location_1 = locations_1[_i]; + var extracted = extractor_1.extract(matrix, location_1); + var decoded = decoder_1.decode(extracted.matrix); + if (decoded) { + return { + binaryData: decoded.bytes, + data: decoded.text, + chunks: decoded.chunks, + version: decoded.version, + location: { + topRightCorner: extracted.mappingFunction(location_1.dimension, 0), + topLeftCorner: extracted.mappingFunction(0, 0), + bottomRightCorner: extracted.mappingFunction(location_1.dimension, location_1.dimension), + bottomLeftCorner: extracted.mappingFunction(0, location_1.dimension), + topRightFinderPattern: location_1.topRight, + topLeftFinderPattern: location_1.topLeft, + bottomLeftFinderPattern: location_1.bottomLeft, + bottomRightAlignmentPattern: location_1.alignmentPattern, + }, + }; + } + } + return null; +} +var defaultOptions = { + inversionAttempts: "attemptBoth", +}; +function jsQR(data, width, height, providedOptions) { + if (providedOptions === void 0) { providedOptions = {}; } + var options = defaultOptions; + Object.keys(options || {}).forEach(function (opt) { + options[opt] = providedOptions[opt] || options[opt]; + }); + var shouldInvert = options.inversionAttempts === "attemptBoth" || options.inversionAttempts === "invertFirst"; + var tryInvertedFirst = options.inversionAttempts === "onlyInvert" || options.inversionAttempts === "invertFirst"; + var _a = binarizer_1.binarize(data, width, height, shouldInvert), binarized = _a.binarized, inverted = _a.inverted; + var result = scan(tryInvertedFirst ? inverted : binarized); + if (!result && (options.inversionAttempts === "attemptBoth" || options.inversionAttempts === "invertFirst")) { + result = scan(tryInvertedFirst ? binarized : inverted); + } + return result; +} +jsQR.default = jsQR; +exports.default = jsQR; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BitMatrix_1 = __webpack_require__(0); +var REGION_SIZE = 8; +var MIN_DYNAMIC_RANGE = 24; +function numBetween(value, min, max) { + return value < min ? min : value > max ? max : value; +} +// Like BitMatrix but accepts arbitry Uint8 values +var Matrix = /** @class */ (function () { + function Matrix(width, height) { + this.width = width; + this.data = new Uint8ClampedArray(width * height); + } + Matrix.prototype.get = function (x, y) { + return this.data[y * this.width + x]; + }; + Matrix.prototype.set = function (x, y, value) { + this.data[y * this.width + x] = value; + }; + return Matrix; +}()); +function binarize(data, width, height, returnInverted) { + if (data.length !== width * height * 4) { + throw new Error("Malformed data passed to binarizer."); + } + // Convert image to greyscale + var greyscalePixels = new Matrix(width, height); + for (var x = 0; x < width; x++) { + for (var y = 0; y < height; y++) { + var r = data[((y * width + x) * 4) + 0]; + var g = data[((y * width + x) * 4) + 1]; + var b = data[((y * width + x) * 4) + 2]; + greyscalePixels.set(x, y, 0.2126 * r + 0.7152 * g + 0.0722 * b); + } + } + var horizontalRegionCount = Math.ceil(width / REGION_SIZE); + var verticalRegionCount = Math.ceil(height / REGION_SIZE); + var blackPoints = new Matrix(horizontalRegionCount, verticalRegionCount); + for (var verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) { + for (var hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) { + var sum = 0; + var min = Infinity; + var max = 0; + for (var y = 0; y < REGION_SIZE; y++) { + for (var x = 0; x < REGION_SIZE; x++) { + var pixelLumosity = greyscalePixels.get(hortizontalRegion * REGION_SIZE + x, verticalRegion * REGION_SIZE + y); + sum += pixelLumosity; + min = Math.min(min, pixelLumosity); + max = Math.max(max, pixelLumosity); + } + } + var average = sum / (Math.pow(REGION_SIZE, 2)); + if (max - min <= MIN_DYNAMIC_RANGE) { + // If variation within the block is low, assume this is a block with only light or only + // dark pixels. In that case we do not want to use the average, as it would divide this + // low contrast area into black and white pixels, essentially creating data out of noise. + // + // Default the blackpoint for these blocks to be half the min - effectively white them out + average = min / 2; + if (verticalRegion > 0 && hortizontalRegion > 0) { + // Correct the "white background" assumption for blocks that have neighbors by comparing + // the pixels in this block to the previously calculated black points. This is based on + // the fact that dark barcode symbology is always surrounded by some amount of light + // background for which reasonable black point estimates were made. The bp estimated at + // the boundaries is used for the interior. + // The (min < bp) is arbitrary but works better than other heuristics that were tried. + var averageNeighborBlackPoint = (blackPoints.get(hortizontalRegion, verticalRegion - 1) + + (2 * blackPoints.get(hortizontalRegion - 1, verticalRegion)) + + blackPoints.get(hortizontalRegion - 1, verticalRegion - 1)) / 4; + if (min < averageNeighborBlackPoint) { + average = averageNeighborBlackPoint; + } + } + } + blackPoints.set(hortizontalRegion, verticalRegion, average); + } + } + var binarized = BitMatrix_1.BitMatrix.createEmpty(width, height); + var inverted = null; + if (returnInverted) { + inverted = BitMatrix_1.BitMatrix.createEmpty(width, height); + } + for (var verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) { + for (var hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) { + var left = numBetween(hortizontalRegion, 2, horizontalRegionCount - 3); + var top_1 = numBetween(verticalRegion, 2, verticalRegionCount - 3); + var sum = 0; + for (var xRegion = -2; xRegion <= 2; xRegion++) { + for (var yRegion = -2; yRegion <= 2; yRegion++) { + sum += blackPoints.get(left + xRegion, top_1 + yRegion); + } + } + var threshold = sum / 25; + for (var xRegion = 0; xRegion < REGION_SIZE; xRegion++) { + for (var yRegion = 0; yRegion < REGION_SIZE; yRegion++) { + var x = hortizontalRegion * REGION_SIZE + xRegion; + var y = verticalRegion * REGION_SIZE + yRegion; + var lum = greyscalePixels.get(x, y); + binarized.set(x, y, lum <= threshold); + if (returnInverted) { + inverted.set(x, y, !(lum <= threshold)); + } + } + } + } + } + if (returnInverted) { + return { binarized: binarized, inverted: inverted }; + } + return { binarized: binarized }; +} +exports.binarize = binarize; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BitMatrix_1 = __webpack_require__(0); +var decodeData_1 = __webpack_require__(6); +var reedsolomon_1 = __webpack_require__(9); +var version_1 = __webpack_require__(10); +// tslint:disable:no-bitwise +function numBitsDiffering(x, y) { + var z = x ^ y; + var bitCount = 0; + while (z) { + bitCount++; + z &= z - 1; + } + return bitCount; +} +function pushBit(bit, byte) { + return (byte << 1) | bit; +} +// tslint:enable:no-bitwise +var FORMAT_INFO_TABLE = [ + { bits: 0x5412, formatInfo: { errorCorrectionLevel: 1, dataMask: 0 } }, + { bits: 0x5125, formatInfo: { errorCorrectionLevel: 1, dataMask: 1 } }, + { bits: 0x5E7C, formatInfo: { errorCorrectionLevel: 1, dataMask: 2 } }, + { bits: 0x5B4B, formatInfo: { errorCorrectionLevel: 1, dataMask: 3 } }, + { bits: 0x45F9, formatInfo: { errorCorrectionLevel: 1, dataMask: 4 } }, + { bits: 0x40CE, formatInfo: { errorCorrectionLevel: 1, dataMask: 5 } }, + { bits: 0x4F97, formatInfo: { errorCorrectionLevel: 1, dataMask: 6 } }, + { bits: 0x4AA0, formatInfo: { errorCorrectionLevel: 1, dataMask: 7 } }, + { bits: 0x77C4, formatInfo: { errorCorrectionLevel: 0, dataMask: 0 } }, + { bits: 0x72F3, formatInfo: { errorCorrectionLevel: 0, dataMask: 1 } }, + { bits: 0x7DAA, formatInfo: { errorCorrectionLevel: 0, dataMask: 2 } }, + { bits: 0x789D, formatInfo: { errorCorrectionLevel: 0, dataMask: 3 } }, + { bits: 0x662F, formatInfo: { errorCorrectionLevel: 0, dataMask: 4 } }, + { bits: 0x6318, formatInfo: { errorCorrectionLevel: 0, dataMask: 5 } }, + { bits: 0x6C41, formatInfo: { errorCorrectionLevel: 0, dataMask: 6 } }, + { bits: 0x6976, formatInfo: { errorCorrectionLevel: 0, dataMask: 7 } }, + { bits: 0x1689, formatInfo: { errorCorrectionLevel: 3, dataMask: 0 } }, + { bits: 0x13BE, formatInfo: { errorCorrectionLevel: 3, dataMask: 1 } }, + { bits: 0x1CE7, formatInfo: { errorCorrectionLevel: 3, dataMask: 2 } }, + { bits: 0x19D0, formatInfo: { errorCorrectionLevel: 3, dataMask: 3 } }, + { bits: 0x0762, formatInfo: { errorCorrectionLevel: 3, dataMask: 4 } }, + { bits: 0x0255, formatInfo: { errorCorrectionLevel: 3, dataMask: 5 } }, + { bits: 0x0D0C, formatInfo: { errorCorrectionLevel: 3, dataMask: 6 } }, + { bits: 0x083B, formatInfo: { errorCorrectionLevel: 3, dataMask: 7 } }, + { bits: 0x355F, formatInfo: { errorCorrectionLevel: 2, dataMask: 0 } }, + { bits: 0x3068, formatInfo: { errorCorrectionLevel: 2, dataMask: 1 } }, + { bits: 0x3F31, formatInfo: { errorCorrectionLevel: 2, dataMask: 2 } }, + { bits: 0x3A06, formatInfo: { errorCorrectionLevel: 2, dataMask: 3 } }, + { bits: 0x24B4, formatInfo: { errorCorrectionLevel: 2, dataMask: 4 } }, + { bits: 0x2183, formatInfo: { errorCorrectionLevel: 2, dataMask: 5 } }, + { bits: 0x2EDA, formatInfo: { errorCorrectionLevel: 2, dataMask: 6 } }, + { bits: 0x2BED, formatInfo: { errorCorrectionLevel: 2, dataMask: 7 } }, +]; +var DATA_MASKS = [ + function (p) { return ((p.y + p.x) % 2) === 0; }, + function (p) { return (p.y % 2) === 0; }, + function (p) { return p.x % 3 === 0; }, + function (p) { return (p.y + p.x) % 3 === 0; }, + function (p) { return (Math.floor(p.y / 2) + Math.floor(p.x / 3)) % 2 === 0; }, + function (p) { return ((p.x * p.y) % 2) + ((p.x * p.y) % 3) === 0; }, + function (p) { return ((((p.y * p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; }, + function (p) { return ((((p.y + p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; }, +]; +function buildFunctionPatternMask(version) { + var dimension = 17 + 4 * version.versionNumber; + var matrix = BitMatrix_1.BitMatrix.createEmpty(dimension, dimension); + matrix.setRegion(0, 0, 9, 9, true); // Top left finder pattern + separator + format + matrix.setRegion(dimension - 8, 0, 8, 9, true); // Top right finder pattern + separator + format + matrix.setRegion(0, dimension - 8, 9, 8, true); // Bottom left finder pattern + separator + format + // Alignment patterns + for (var _i = 0, _a = version.alignmentPatternCenters; _i < _a.length; _i++) { + var x = _a[_i]; + for (var _b = 0, _c = version.alignmentPatternCenters; _b < _c.length; _b++) { + var y = _c[_b]; + if (!(x === 6 && y === 6 || x === 6 && y === dimension - 7 || x === dimension - 7 && y === 6)) { + matrix.setRegion(x - 2, y - 2, 5, 5, true); + } + } + } + matrix.setRegion(6, 9, 1, dimension - 17, true); // Vertical timing pattern + matrix.setRegion(9, 6, dimension - 17, 1, true); // Horizontal timing pattern + if (version.versionNumber > 6) { + matrix.setRegion(dimension - 11, 0, 3, 6, true); // Version info, top right + matrix.setRegion(0, dimension - 11, 6, 3, true); // Version info, bottom left + } + return matrix; +} +function readCodewords(matrix, version, formatInfo) { + var dataMask = DATA_MASKS[formatInfo.dataMask]; + var dimension = matrix.height; + var functionPatternMask = buildFunctionPatternMask(version); + var codewords = []; + var currentByte = 0; + var bitsRead = 0; + // Read columns in pairs, from right to left + var readingUp = true; + for (var columnIndex = dimension - 1; columnIndex > 0; columnIndex -= 2) { + if (columnIndex === 6) { // Skip whole column with vertical alignment pattern; + columnIndex--; + } + for (var i = 0; i < dimension; i++) { + var y = readingUp ? dimension - 1 - i : i; + for (var columnOffset = 0; columnOffset < 2; columnOffset++) { + var x = columnIndex - columnOffset; + if (!functionPatternMask.get(x, y)) { + bitsRead++; + var bit = matrix.get(x, y); + if (dataMask({ y: y, x: x })) { + bit = !bit; + } + currentByte = pushBit(bit, currentByte); + if (bitsRead === 8) { // Whole bytes + codewords.push(currentByte); + bitsRead = 0; + currentByte = 0; + } + } + } + } + readingUp = !readingUp; + } + return codewords; +} +function readVersion(matrix) { + var dimension = matrix.height; + var provisionalVersion = Math.floor((dimension - 17) / 4); + if (provisionalVersion <= 6) { // 6 and under dont have version info in the QR code + return version_1.VERSIONS[provisionalVersion - 1]; + } + var topRightVersionBits = 0; + for (var y = 5; y >= 0; y--) { + for (var x = dimension - 9; x >= dimension - 11; x--) { + topRightVersionBits = pushBit(matrix.get(x, y), topRightVersionBits); + } + } + var bottomLeftVersionBits = 0; + for (var x = 5; x >= 0; x--) { + for (var y = dimension - 9; y >= dimension - 11; y--) { + bottomLeftVersionBits = pushBit(matrix.get(x, y), bottomLeftVersionBits); + } + } + var bestDifference = Infinity; + var bestVersion; + for (var _i = 0, VERSIONS_1 = version_1.VERSIONS; _i < VERSIONS_1.length; _i++) { + var version = VERSIONS_1[_i]; + if (version.infoBits === topRightVersionBits || version.infoBits === bottomLeftVersionBits) { + return version; + } + var difference = numBitsDiffering(topRightVersionBits, version.infoBits); + if (difference < bestDifference) { + bestVersion = version; + bestDifference = difference; + } + difference = numBitsDiffering(bottomLeftVersionBits, version.infoBits); + if (difference < bestDifference) { + bestVersion = version; + bestDifference = difference; + } + } + // We can tolerate up to 3 bits of error since no two version info codewords will + // differ in less than 8 bits. + if (bestDifference <= 3) { + return bestVersion; + } +} +function readFormatInformation(matrix) { + var topLeftFormatInfoBits = 0; + for (var x = 0; x <= 8; x++) { + if (x !== 6) { // Skip timing pattern bit + topLeftFormatInfoBits = pushBit(matrix.get(x, 8), topLeftFormatInfoBits); + } + } + for (var y = 7; y >= 0; y--) { + if (y !== 6) { // Skip timing pattern bit + topLeftFormatInfoBits = pushBit(matrix.get(8, y), topLeftFormatInfoBits); + } + } + var dimension = matrix.height; + var topRightBottomRightFormatInfoBits = 0; + for (var y = dimension - 1; y >= dimension - 7; y--) { // bottom left + topRightBottomRightFormatInfoBits = pushBit(matrix.get(8, y), topRightBottomRightFormatInfoBits); + } + for (var x = dimension - 8; x < dimension; x++) { // top right + topRightBottomRightFormatInfoBits = pushBit(matrix.get(x, 8), topRightBottomRightFormatInfoBits); + } + var bestDifference = Infinity; + var bestFormatInfo = null; + for (var _i = 0, FORMAT_INFO_TABLE_1 = FORMAT_INFO_TABLE; _i < FORMAT_INFO_TABLE_1.length; _i++) { + var _a = FORMAT_INFO_TABLE_1[_i], bits = _a.bits, formatInfo = _a.formatInfo; + if (bits === topLeftFormatInfoBits || bits === topRightBottomRightFormatInfoBits) { + return formatInfo; + } + var difference = numBitsDiffering(topLeftFormatInfoBits, bits); + if (difference < bestDifference) { + bestFormatInfo = formatInfo; + bestDifference = difference; + } + if (topLeftFormatInfoBits !== topRightBottomRightFormatInfoBits) { // also try the other option + difference = numBitsDiffering(topRightBottomRightFormatInfoBits, bits); + if (difference < bestDifference) { + bestFormatInfo = formatInfo; + bestDifference = difference; + } + } + } + // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits differing means we found a match + if (bestDifference <= 3) { + return bestFormatInfo; + } + return null; +} +function getDataBlocks(codewords, version, ecLevel) { + var ecInfo = version.errorCorrectionLevels[ecLevel]; + var dataBlocks = []; + var totalCodewords = 0; + ecInfo.ecBlocks.forEach(function (block) { + for (var i = 0; i < block.numBlocks; i++) { + dataBlocks.push({ numDataCodewords: block.dataCodewordsPerBlock, codewords: [] }); + totalCodewords += block.dataCodewordsPerBlock + ecInfo.ecCodewordsPerBlock; + } + }); + // In some cases the QR code will be malformed enough that we pull off more or less than we should. + // If we pull off less there's nothing we can do. + // If we pull off more we can safely truncate + if (codewords.length < totalCodewords) { + return null; + } + codewords = codewords.slice(0, totalCodewords); + var shortBlockSize = ecInfo.ecBlocks[0].dataCodewordsPerBlock; + // Pull codewords to fill the blocks up to the minimum size + for (var i = 0; i < shortBlockSize; i++) { + for (var _i = 0, dataBlocks_1 = dataBlocks; _i < dataBlocks_1.length; _i++) { + var dataBlock = dataBlocks_1[_i]; + dataBlock.codewords.push(codewords.shift()); + } + } + // If there are any large blocks, pull codewords to fill the last element of those + if (ecInfo.ecBlocks.length > 1) { + var smallBlockCount = ecInfo.ecBlocks[0].numBlocks; + var largeBlockCount = ecInfo.ecBlocks[1].numBlocks; + for (var i = 0; i < largeBlockCount; i++) { + dataBlocks[smallBlockCount + i].codewords.push(codewords.shift()); + } + } + // Add the rest of the codewords to the blocks. These are the error correction codewords. + while (codewords.length > 0) { + for (var _a = 0, dataBlocks_2 = dataBlocks; _a < dataBlocks_2.length; _a++) { + var dataBlock = dataBlocks_2[_a]; + dataBlock.codewords.push(codewords.shift()); + } + } + return dataBlocks; +} +function decodeMatrix(matrix) { + var version = readVersion(matrix); + if (!version) { + return null; + } + var formatInfo = readFormatInformation(matrix); + if (!formatInfo) { + return null; + } + var codewords = readCodewords(matrix, version, formatInfo); + var dataBlocks = getDataBlocks(codewords, version, formatInfo.errorCorrectionLevel); + if (!dataBlocks) { + return null; + } + // Count total number of data bytes + var totalBytes = dataBlocks.reduce(function (a, b) { return a + b.numDataCodewords; }, 0); + var resultBytes = new Uint8ClampedArray(totalBytes); + var resultIndex = 0; + for (var _i = 0, dataBlocks_3 = dataBlocks; _i < dataBlocks_3.length; _i++) { + var dataBlock = dataBlocks_3[_i]; + var correctedBytes = reedsolomon_1.decode(dataBlock.codewords, dataBlock.codewords.length - dataBlock.numDataCodewords); + if (!correctedBytes) { + return null; + } + for (var i = 0; i < dataBlock.numDataCodewords; i++) { + resultBytes[resultIndex++] = correctedBytes[i]; + } + } + try { + return decodeData_1.decode(resultBytes, version.versionNumber); + } + catch (_a) { + return null; + } +} +function decode(matrix) { + if (matrix == null) { + return null; + } + var result = decodeMatrix(matrix); + if (result) { + return result; + } + // Decoding didn't work, try mirroring the QR across the topLeft -> bottomRight line. + for (var x = 0; x < matrix.width; x++) { + for (var y = x + 1; y < matrix.height; y++) { + if (matrix.get(x, y) !== matrix.get(y, x)) { + matrix.set(x, y, !matrix.get(x, y)); + matrix.set(y, x, !matrix.get(y, x)); + } + } + } + return decodeMatrix(matrix); +} +exports.decode = decode; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +// tslint:disable:no-bitwise +var BitStream_1 = __webpack_require__(7); +var shiftJISTable_1 = __webpack_require__(8); +var Mode; +(function (Mode) { + Mode["Numeric"] = "numeric"; + Mode["Alphanumeric"] = "alphanumeric"; + Mode["Byte"] = "byte"; + Mode["Kanji"] = "kanji"; + Mode["ECI"] = "eci"; +})(Mode = exports.Mode || (exports.Mode = {})); +var ModeByte; +(function (ModeByte) { + ModeByte[ModeByte["Terminator"] = 0] = "Terminator"; + ModeByte[ModeByte["Numeric"] = 1] = "Numeric"; + ModeByte[ModeByte["Alphanumeric"] = 2] = "Alphanumeric"; + ModeByte[ModeByte["Byte"] = 4] = "Byte"; + ModeByte[ModeByte["Kanji"] = 8] = "Kanji"; + ModeByte[ModeByte["ECI"] = 7] = "ECI"; + // StructuredAppend = 0x3, + // FNC1FirstPosition = 0x5, + // FNC1SecondPosition = 0x9, +})(ModeByte || (ModeByte = {})); +function decodeNumeric(stream, size) { + var bytes = []; + var text = ""; + var characterCountSize = [10, 12, 14][size]; + var length = stream.readBits(characterCountSize); + // Read digits in groups of 3 + while (length >= 3) { + var num = stream.readBits(10); + if (num >= 1000) { + throw new Error("Invalid numeric value above 999"); + } + var a = Math.floor(num / 100); + var b = Math.floor(num / 10) % 10; + var c = num % 10; + bytes.push(48 + a, 48 + b, 48 + c); + text += a.toString() + b.toString() + c.toString(); + length -= 3; + } + // If the number of digits aren't a multiple of 3, the remaining digits are special cased. + if (length === 2) { + var num = stream.readBits(7); + if (num >= 100) { + throw new Error("Invalid numeric value above 99"); + } + var a = Math.floor(num / 10); + var b = num % 10; + bytes.push(48 + a, 48 + b); + text += a.toString() + b.toString(); + } + else if (length === 1) { + var num = stream.readBits(4); + if (num >= 10) { + throw new Error("Invalid numeric value above 9"); + } + bytes.push(48 + num); + text += num.toString(); + } + return { bytes: bytes, text: text }; +} +var AlphanumericCharacterCodes = [ + "0", "1", "2", "3", "4", "5", "6", "7", "8", + "9", "A", "B", "C", "D", "E", "F", "G", "H", + "I", "J", "K", "L", "M", "N", "O", "P", "Q", + "R", "S", "T", "U", "V", "W", "X", "Y", "Z", + " ", "$", "%", "*", "+", "-", ".", "/", ":", +]; +function decodeAlphanumeric(stream, size) { + var bytes = []; + var text = ""; + var characterCountSize = [9, 11, 13][size]; + var length = stream.readBits(characterCountSize); + while (length >= 2) { + var v = stream.readBits(11); + var a = Math.floor(v / 45); + var b = v % 45; + bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0), AlphanumericCharacterCodes[b].charCodeAt(0)); + text += AlphanumericCharacterCodes[a] + AlphanumericCharacterCodes[b]; + length -= 2; + } + if (length === 1) { + var a = stream.readBits(6); + bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0)); + text += AlphanumericCharacterCodes[a]; + } + return { bytes: bytes, text: text }; +} +function decodeByte(stream, size) { + var bytes = []; + var text = ""; + var characterCountSize = [8, 16, 16][size]; + var length = stream.readBits(characterCountSize); + for (var i = 0; i < length; i++) { + var b = stream.readBits(8); + bytes.push(b); + } + try { + text += decodeURIComponent(bytes.map(function (b) { return "%" + ("0" + b.toString(16)).substr(-2); }).join("")); + } + catch (_a) { + // failed to decode + } + return { bytes: bytes, text: text }; +} +function decodeKanji(stream, size) { + var bytes = []; + var text = ""; + var characterCountSize = [8, 10, 12][size]; + var length = stream.readBits(characterCountSize); + for (var i = 0; i < length; i++) { + var k = stream.readBits(13); + var c = (Math.floor(k / 0xC0) << 8) | (k % 0xC0); + if (c < 0x1F00) { + c += 0x8140; + } + else { + c += 0xC140; + } + bytes.push(c >> 8, c & 0xFF); + text += String.fromCharCode(shiftJISTable_1.shiftJISTable[c]); + } + return { bytes: bytes, text: text }; +} +function decode(data, version) { + var _a, _b, _c, _d; + var stream = new BitStream_1.BitStream(data); + // There are 3 'sizes' based on the version. 1-9 is small (0), 10-26 is medium (1) and 27-40 is large (2). + var size = version <= 9 ? 0 : version <= 26 ? 1 : 2; + var result = { + text: "", + bytes: [], + chunks: [], + version: version, + }; + while (stream.available() >= 4) { + var mode = stream.readBits(4); + if (mode === ModeByte.Terminator) { + return result; + } + else if (mode === ModeByte.ECI) { + if (stream.readBits(1) === 0) { + result.chunks.push({ + type: Mode.ECI, + assignmentNumber: stream.readBits(7), + }); + } + else if (stream.readBits(1) === 0) { + result.chunks.push({ + type: Mode.ECI, + assignmentNumber: stream.readBits(14), + }); + } + else if (stream.readBits(1) === 0) { + result.chunks.push({ + type: Mode.ECI, + assignmentNumber: stream.readBits(21), + }); + } + else { + // ECI data seems corrupted + result.chunks.push({ + type: Mode.ECI, + assignmentNumber: -1, + }); + } + } + else if (mode === ModeByte.Numeric) { + var numericResult = decodeNumeric(stream, size); + result.text += numericResult.text; + (_a = result.bytes).push.apply(_a, numericResult.bytes); + result.chunks.push({ + type: Mode.Numeric, + text: numericResult.text, + }); + } + else if (mode === ModeByte.Alphanumeric) { + var alphanumericResult = decodeAlphanumeric(stream, size); + result.text += alphanumericResult.text; + (_b = result.bytes).push.apply(_b, alphanumericResult.bytes); + result.chunks.push({ + type: Mode.Alphanumeric, + text: alphanumericResult.text, + }); + } + else if (mode === ModeByte.Byte) { + var byteResult = decodeByte(stream, size); + result.text += byteResult.text; + (_c = result.bytes).push.apply(_c, byteResult.bytes); + result.chunks.push({ + type: Mode.Byte, + bytes: byteResult.bytes, + text: byteResult.text, + }); + } + else if (mode === ModeByte.Kanji) { + var kanjiResult = decodeKanji(stream, size); + result.text += kanjiResult.text; + (_d = result.bytes).push.apply(_d, kanjiResult.bytes); + result.chunks.push({ + type: Mode.Kanji, + bytes: kanjiResult.bytes, + text: kanjiResult.text, + }); + } + } + // If there is no data left, or the remaining bits are all 0, then that counts as a termination marker + if (stream.available() === 0 || stream.readBits(stream.available()) === 0) { + return result; + } +} +exports.decode = decode; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// tslint:disable:no-bitwise +Object.defineProperty(exports, "__esModule", { value: true }); +var BitStream = /** @class */ (function () { + function BitStream(bytes) { + this.byteOffset = 0; + this.bitOffset = 0; + this.bytes = bytes; + } + BitStream.prototype.readBits = function (numBits) { + if (numBits < 1 || numBits > 32 || numBits > this.available()) { + throw new Error("Cannot read " + numBits.toString() + " bits"); + } + var result = 0; + // First, read remainder from current byte + if (this.bitOffset > 0) { + var bitsLeft = 8 - this.bitOffset; + var toRead = numBits < bitsLeft ? numBits : bitsLeft; + var bitsToNotRead = bitsLeft - toRead; + var mask = (0xFF >> (8 - toRead)) << bitsToNotRead; + result = (this.bytes[this.byteOffset] & mask) >> bitsToNotRead; + numBits -= toRead; + this.bitOffset += toRead; + if (this.bitOffset === 8) { + this.bitOffset = 0; + this.byteOffset++; + } + } + // Next read whole bytes + if (numBits > 0) { + while (numBits >= 8) { + result = (result << 8) | (this.bytes[this.byteOffset] & 0xFF); + this.byteOffset++; + numBits -= 8; + } + // Finally read a partial byte + if (numBits > 0) { + var bitsToNotRead = 8 - numBits; + var mask = (0xFF >> bitsToNotRead) << bitsToNotRead; + result = (result << numBits) | ((this.bytes[this.byteOffset] & mask) >> bitsToNotRead); + this.bitOffset += numBits; + } + } + return result; + }; + BitStream.prototype.available = function () { + return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset; + }; + return BitStream; +}()); +exports.BitStream = BitStream; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shiftJISTable = { + 0x20: 0x0020, + 0x21: 0x0021, + 0x22: 0x0022, + 0x23: 0x0023, + 0x24: 0x0024, + 0x25: 0x0025, + 0x26: 0x0026, + 0x27: 0x0027, + 0x28: 0x0028, + 0x29: 0x0029, + 0x2A: 0x002A, + 0x2B: 0x002B, + 0x2C: 0x002C, + 0x2D: 0x002D, + 0x2E: 0x002E, + 0x2F: 0x002F, + 0x30: 0x0030, + 0x31: 0x0031, + 0x32: 0x0032, + 0x33: 0x0033, + 0x34: 0x0034, + 0x35: 0x0035, + 0x36: 0x0036, + 0x37: 0x0037, + 0x38: 0x0038, + 0x39: 0x0039, + 0x3A: 0x003A, + 0x3B: 0x003B, + 0x3C: 0x003C, + 0x3D: 0x003D, + 0x3E: 0x003E, + 0x3F: 0x003F, + 0x40: 0x0040, + 0x41: 0x0041, + 0x42: 0x0042, + 0x43: 0x0043, + 0x44: 0x0044, + 0x45: 0x0045, + 0x46: 0x0046, + 0x47: 0x0047, + 0x48: 0x0048, + 0x49: 0x0049, + 0x4A: 0x004A, + 0x4B: 0x004B, + 0x4C: 0x004C, + 0x4D: 0x004D, + 0x4E: 0x004E, + 0x4F: 0x004F, + 0x50: 0x0050, + 0x51: 0x0051, + 0x52: 0x0052, + 0x53: 0x0053, + 0x54: 0x0054, + 0x55: 0x0055, + 0x56: 0x0056, + 0x57: 0x0057, + 0x58: 0x0058, + 0x59: 0x0059, + 0x5A: 0x005A, + 0x5B: 0x005B, + 0x5C: 0x00A5, + 0x5D: 0x005D, + 0x5E: 0x005E, + 0x5F: 0x005F, + 0x60: 0x0060, + 0x61: 0x0061, + 0x62: 0x0062, + 0x63: 0x0063, + 0x64: 0x0064, + 0x65: 0x0065, + 0x66: 0x0066, + 0x67: 0x0067, + 0x68: 0x0068, + 0x69: 0x0069, + 0x6A: 0x006A, + 0x6B: 0x006B, + 0x6C: 0x006C, + 0x6D: 0x006D, + 0x6E: 0x006E, + 0x6F: 0x006F, + 0x70: 0x0070, + 0x71: 0x0071, + 0x72: 0x0072, + 0x73: 0x0073, + 0x74: 0x0074, + 0x75: 0x0075, + 0x76: 0x0076, + 0x77: 0x0077, + 0x78: 0x0078, + 0x79: 0x0079, + 0x7A: 0x007A, + 0x7B: 0x007B, + 0x7C: 0x007C, + 0x7D: 0x007D, + 0x7E: 0x203E, + 0x8140: 0x3000, + 0x8141: 0x3001, + 0x8142: 0x3002, + 0x8143: 0xFF0C, + 0x8144: 0xFF0E, + 0x8145: 0x30FB, + 0x8146: 0xFF1A, + 0x8147: 0xFF1B, + 0x8148: 0xFF1F, + 0x8149: 0xFF01, + 0x814A: 0x309B, + 0x814B: 0x309C, + 0x814C: 0x00B4, + 0x814D: 0xFF40, + 0x814E: 0x00A8, + 0x814F: 0xFF3E, + 0x8150: 0xFFE3, + 0x8151: 0xFF3F, + 0x8152: 0x30FD, + 0x8153: 0x30FE, + 0x8154: 0x309D, + 0x8155: 0x309E, + 0x8156: 0x3003, + 0x8157: 0x4EDD, + 0x8158: 0x3005, + 0x8159: 0x3006, + 0x815A: 0x3007, + 0x815B: 0x30FC, + 0x815C: 0x2015, + 0x815D: 0x2010, + 0x815E: 0xFF0F, + 0x815F: 0x005C, + 0x8160: 0x301C, + 0x8161: 0x2016, + 0x8162: 0xFF5C, + 0x8163: 0x2026, + 0x8164: 0x2025, + 0x8165: 0x2018, + 0x8166: 0x2019, + 0x8167: 0x201C, + 0x8168: 0x201D, + 0x8169: 0xFF08, + 0x816A: 0xFF09, + 0x816B: 0x3014, + 0x816C: 0x3015, + 0x816D: 0xFF3B, + 0x816E: 0xFF3D, + 0x816F: 0xFF5B, + 0x8170: 0xFF5D, + 0x8171: 0x3008, + 0x8172: 0x3009, + 0x8173: 0x300A, + 0x8174: 0x300B, + 0x8175: 0x300C, + 0x8176: 0x300D, + 0x8177: 0x300E, + 0x8178: 0x300F, + 0x8179: 0x3010, + 0x817A: 0x3011, + 0x817B: 0xFF0B, + 0x817C: 0x2212, + 0x817D: 0x00B1, + 0x817E: 0x00D7, + 0x8180: 0x00F7, + 0x8181: 0xFF1D, + 0x8182: 0x2260, + 0x8183: 0xFF1C, + 0x8184: 0xFF1E, + 0x8185: 0x2266, + 0x8186: 0x2267, + 0x8187: 0x221E, + 0x8188: 0x2234, + 0x8189: 0x2642, + 0x818A: 0x2640, + 0x818B: 0x00B0, + 0x818C: 0x2032, + 0x818D: 0x2033, + 0x818E: 0x2103, + 0x818F: 0xFFE5, + 0x8190: 0xFF04, + 0x8191: 0x00A2, + 0x8192: 0x00A3, + 0x8193: 0xFF05, + 0x8194: 0xFF03, + 0x8195: 0xFF06, + 0x8196: 0xFF0A, + 0x8197: 0xFF20, + 0x8198: 0x00A7, + 0x8199: 0x2606, + 0x819A: 0x2605, + 0x819B: 0x25CB, + 0x819C: 0x25CF, + 0x819D: 0x25CE, + 0x819E: 0x25C7, + 0x819F: 0x25C6, + 0x81A0: 0x25A1, + 0x81A1: 0x25A0, + 0x81A2: 0x25B3, + 0x81A3: 0x25B2, + 0x81A4: 0x25BD, + 0x81A5: 0x25BC, + 0x81A6: 0x203B, + 0x81A7: 0x3012, + 0x81A8: 0x2192, + 0x81A9: 0x2190, + 0x81AA: 0x2191, + 0x81AB: 0x2193, + 0x81AC: 0x3013, + 0x81B8: 0x2208, + 0x81B9: 0x220B, + 0x81BA: 0x2286, + 0x81BB: 0x2287, + 0x81BC: 0x2282, + 0x81BD: 0x2283, + 0x81BE: 0x222A, + 0x81BF: 0x2229, + 0x81C8: 0x2227, + 0x81C9: 0x2228, + 0x81CA: 0x00AC, + 0x81CB: 0x21D2, + 0x81CC: 0x21D4, + 0x81CD: 0x2200, + 0x81CE: 0x2203, + 0x81DA: 0x2220, + 0x81DB: 0x22A5, + 0x81DC: 0x2312, + 0x81DD: 0x2202, + 0x81DE: 0x2207, + 0x81DF: 0x2261, + 0x81E0: 0x2252, + 0x81E1: 0x226A, + 0x81E2: 0x226B, + 0x81E3: 0x221A, + 0x81E4: 0x223D, + 0x81E5: 0x221D, + 0x81E6: 0x2235, + 0x81E7: 0x222B, + 0x81E8: 0x222C, + 0x81F0: 0x212B, + 0x81F1: 0x2030, + 0x81F2: 0x266F, + 0x81F3: 0x266D, + 0x81F4: 0x266A, + 0x81F5: 0x2020, + 0x81F6: 0x2021, + 0x81F7: 0x00B6, + 0x81FC: 0x25EF, + 0x824F: 0xFF10, + 0x8250: 0xFF11, + 0x8251: 0xFF12, + 0x8252: 0xFF13, + 0x8253: 0xFF14, + 0x8254: 0xFF15, + 0x8255: 0xFF16, + 0x8256: 0xFF17, + 0x8257: 0xFF18, + 0x8258: 0xFF19, + 0x8260: 0xFF21, + 0x8261: 0xFF22, + 0x8262: 0xFF23, + 0x8263: 0xFF24, + 0x8264: 0xFF25, + 0x8265: 0xFF26, + 0x8266: 0xFF27, + 0x8267: 0xFF28, + 0x8268: 0xFF29, + 0x8269: 0xFF2A, + 0x826A: 0xFF2B, + 0x826B: 0xFF2C, + 0x826C: 0xFF2D, + 0x826D: 0xFF2E, + 0x826E: 0xFF2F, + 0x826F: 0xFF30, + 0x8270: 0xFF31, + 0x8271: 0xFF32, + 0x8272: 0xFF33, + 0x8273: 0xFF34, + 0x8274: 0xFF35, + 0x8275: 0xFF36, + 0x8276: 0xFF37, + 0x8277: 0xFF38, + 0x8278: 0xFF39, + 0x8279: 0xFF3A, + 0x8281: 0xFF41, + 0x8282: 0xFF42, + 0x8283: 0xFF43, + 0x8284: 0xFF44, + 0x8285: 0xFF45, + 0x8286: 0xFF46, + 0x8287: 0xFF47, + 0x8288: 0xFF48, + 0x8289: 0xFF49, + 0x828A: 0xFF4A, + 0x828B: 0xFF4B, + 0x828C: 0xFF4C, + 0x828D: 0xFF4D, + 0x828E: 0xFF4E, + 0x828F: 0xFF4F, + 0x8290: 0xFF50, + 0x8291: 0xFF51, + 0x8292: 0xFF52, + 0x8293: 0xFF53, + 0x8294: 0xFF54, + 0x8295: 0xFF55, + 0x8296: 0xFF56, + 0x8297: 0xFF57, + 0x8298: 0xFF58, + 0x8299: 0xFF59, + 0x829A: 0xFF5A, + 0x829F: 0x3041, + 0x82A0: 0x3042, + 0x82A1: 0x3043, + 0x82A2: 0x3044, + 0x82A3: 0x3045, + 0x82A4: 0x3046, + 0x82A5: 0x3047, + 0x82A6: 0x3048, + 0x82A7: 0x3049, + 0x82A8: 0x304A, + 0x82A9: 0x304B, + 0x82AA: 0x304C, + 0x82AB: 0x304D, + 0x82AC: 0x304E, + 0x82AD: 0x304F, + 0x82AE: 0x3050, + 0x82AF: 0x3051, + 0x82B0: 0x3052, + 0x82B1: 0x3053, + 0x82B2: 0x3054, + 0x82B3: 0x3055, + 0x82B4: 0x3056, + 0x82B5: 0x3057, + 0x82B6: 0x3058, + 0x82B7: 0x3059, + 0x82B8: 0x305A, + 0x82B9: 0x305B, + 0x82BA: 0x305C, + 0x82BB: 0x305D, + 0x82BC: 0x305E, + 0x82BD: 0x305F, + 0x82BE: 0x3060, + 0x82BF: 0x3061, + 0x82C0: 0x3062, + 0x82C1: 0x3063, + 0x82C2: 0x3064, + 0x82C3: 0x3065, + 0x82C4: 0x3066, + 0x82C5: 0x3067, + 0x82C6: 0x3068, + 0x82C7: 0x3069, + 0x82C8: 0x306A, + 0x82C9: 0x306B, + 0x82CA: 0x306C, + 0x82CB: 0x306D, + 0x82CC: 0x306E, + 0x82CD: 0x306F, + 0x82CE: 0x3070, + 0x82CF: 0x3071, + 0x82D0: 0x3072, + 0x82D1: 0x3073, + 0x82D2: 0x3074, + 0x82D3: 0x3075, + 0x82D4: 0x3076, + 0x82D5: 0x3077, + 0x82D6: 0x3078, + 0x82D7: 0x3079, + 0x82D8: 0x307A, + 0x82D9: 0x307B, + 0x82DA: 0x307C, + 0x82DB: 0x307D, + 0x82DC: 0x307E, + 0x82DD: 0x307F, + 0x82DE: 0x3080, + 0x82DF: 0x3081, + 0x82E0: 0x3082, + 0x82E1: 0x3083, + 0x82E2: 0x3084, + 0x82E3: 0x3085, + 0x82E4: 0x3086, + 0x82E5: 0x3087, + 0x82E6: 0x3088, + 0x82E7: 0x3089, + 0x82E8: 0x308A, + 0x82E9: 0x308B, + 0x82EA: 0x308C, + 0x82EB: 0x308D, + 0x82EC: 0x308E, + 0x82ED: 0x308F, + 0x82EE: 0x3090, + 0x82EF: 0x3091, + 0x82F0: 0x3092, + 0x82F1: 0x3093, + 0x8340: 0x30A1, + 0x8341: 0x30A2, + 0x8342: 0x30A3, + 0x8343: 0x30A4, + 0x8344: 0x30A5, + 0x8345: 0x30A6, + 0x8346: 0x30A7, + 0x8347: 0x30A8, + 0x8348: 0x30A9, + 0x8349: 0x30AA, + 0x834A: 0x30AB, + 0x834B: 0x30AC, + 0x834C: 0x30AD, + 0x834D: 0x30AE, + 0x834E: 0x30AF, + 0x834F: 0x30B0, + 0x8350: 0x30B1, + 0x8351: 0x30B2, + 0x8352: 0x30B3, + 0x8353: 0x30B4, + 0x8354: 0x30B5, + 0x8355: 0x30B6, + 0x8356: 0x30B7, + 0x8357: 0x30B8, + 0x8358: 0x30B9, + 0x8359: 0x30BA, + 0x835A: 0x30BB, + 0x835B: 0x30BC, + 0x835C: 0x30BD, + 0x835D: 0x30BE, + 0x835E: 0x30BF, + 0x835F: 0x30C0, + 0x8360: 0x30C1, + 0x8361: 0x30C2, + 0x8362: 0x30C3, + 0x8363: 0x30C4, + 0x8364: 0x30C5, + 0x8365: 0x30C6, + 0x8366: 0x30C7, + 0x8367: 0x30C8, + 0x8368: 0x30C9, + 0x8369: 0x30CA, + 0x836A: 0x30CB, + 0x836B: 0x30CC, + 0x836C: 0x30CD, + 0x836D: 0x30CE, + 0x836E: 0x30CF, + 0x836F: 0x30D0, + 0x8370: 0x30D1, + 0x8371: 0x30D2, + 0x8372: 0x30D3, + 0x8373: 0x30D4, + 0x8374: 0x30D5, + 0x8375: 0x30D6, + 0x8376: 0x30D7, + 0x8377: 0x30D8, + 0x8378: 0x30D9, + 0x8379: 0x30DA, + 0x837A: 0x30DB, + 0x837B: 0x30DC, + 0x837C: 0x30DD, + 0x837D: 0x30DE, + 0x837E: 0x30DF, + 0x8380: 0x30E0, + 0x8381: 0x30E1, + 0x8382: 0x30E2, + 0x8383: 0x30E3, + 0x8384: 0x30E4, + 0x8385: 0x30E5, + 0x8386: 0x30E6, + 0x8387: 0x30E7, + 0x8388: 0x30E8, + 0x8389: 0x30E9, + 0x838A: 0x30EA, + 0x838B: 0x30EB, + 0x838C: 0x30EC, + 0x838D: 0x30ED, + 0x838E: 0x30EE, + 0x838F: 0x30EF, + 0x8390: 0x30F0, + 0x8391: 0x30F1, + 0x8392: 0x30F2, + 0x8393: 0x30F3, + 0x8394: 0x30F4, + 0x8395: 0x30F5, + 0x8396: 0x30F6, + 0x839F: 0x0391, + 0x83A0: 0x0392, + 0x83A1: 0x0393, + 0x83A2: 0x0394, + 0x83A3: 0x0395, + 0x83A4: 0x0396, + 0x83A5: 0x0397, + 0x83A6: 0x0398, + 0x83A7: 0x0399, + 0x83A8: 0x039A, + 0x83A9: 0x039B, + 0x83AA: 0x039C, + 0x83AB: 0x039D, + 0x83AC: 0x039E, + 0x83AD: 0x039F, + 0x83AE: 0x03A0, + 0x83AF: 0x03A1, + 0x83B0: 0x03A3, + 0x83B1: 0x03A4, + 0x83B2: 0x03A5, + 0x83B3: 0x03A6, + 0x83B4: 0x03A7, + 0x83B5: 0x03A8, + 0x83B6: 0x03A9, + 0x83BF: 0x03B1, + 0x83C0: 0x03B2, + 0x83C1: 0x03B3, + 0x83C2: 0x03B4, + 0x83C3: 0x03B5, + 0x83C4: 0x03B6, + 0x83C5: 0x03B7, + 0x83C6: 0x03B8, + 0x83C7: 0x03B9, + 0x83C8: 0x03BA, + 0x83C9: 0x03BB, + 0x83CA: 0x03BC, + 0x83CB: 0x03BD, + 0x83CC: 0x03BE, + 0x83CD: 0x03BF, + 0x83CE: 0x03C0, + 0x83CF: 0x03C1, + 0x83D0: 0x03C3, + 0x83D1: 0x03C4, + 0x83D2: 0x03C5, + 0x83D3: 0x03C6, + 0x83D4: 0x03C7, + 0x83D5: 0x03C8, + 0x83D6: 0x03C9, + 0x8440: 0x0410, + 0x8441: 0x0411, + 0x8442: 0x0412, + 0x8443: 0x0413, + 0x8444: 0x0414, + 0x8445: 0x0415, + 0x8446: 0x0401, + 0x8447: 0x0416, + 0x8448: 0x0417, + 0x8449: 0x0418, + 0x844A: 0x0419, + 0x844B: 0x041A, + 0x844C: 0x041B, + 0x844D: 0x041C, + 0x844E: 0x041D, + 0x844F: 0x041E, + 0x8450: 0x041F, + 0x8451: 0x0420, + 0x8452: 0x0421, + 0x8453: 0x0422, + 0x8454: 0x0423, + 0x8455: 0x0424, + 0x8456: 0x0425, + 0x8457: 0x0426, + 0x8458: 0x0427, + 0x8459: 0x0428, + 0x845A: 0x0429, + 0x845B: 0x042A, + 0x845C: 0x042B, + 0x845D: 0x042C, + 0x845E: 0x042D, + 0x845F: 0x042E, + 0x8460: 0x042F, + 0x8470: 0x0430, + 0x8471: 0x0431, + 0x8472: 0x0432, + 0x8473: 0x0433, + 0x8474: 0x0434, + 0x8475: 0x0435, + 0x8476: 0x0451, + 0x8477: 0x0436, + 0x8478: 0x0437, + 0x8479: 0x0438, + 0x847A: 0x0439, + 0x847B: 0x043A, + 0x847C: 0x043B, + 0x847D: 0x043C, + 0x847E: 0x043D, + 0x8480: 0x043E, + 0x8481: 0x043F, + 0x8482: 0x0440, + 0x8483: 0x0441, + 0x8484: 0x0442, + 0x8485: 0x0443, + 0x8486: 0x0444, + 0x8487: 0x0445, + 0x8488: 0x0446, + 0x8489: 0x0447, + 0x848A: 0x0448, + 0x848B: 0x0449, + 0x848C: 0x044A, + 0x848D: 0x044B, + 0x848E: 0x044C, + 0x848F: 0x044D, + 0x8490: 0x044E, + 0x8491: 0x044F, + 0x849F: 0x2500, + 0x84A0: 0x2502, + 0x84A1: 0x250C, + 0x84A2: 0x2510, + 0x84A3: 0x2518, + 0x84A4: 0x2514, + 0x84A5: 0x251C, + 0x84A6: 0x252C, + 0x84A7: 0x2524, + 0x84A8: 0x2534, + 0x84A9: 0x253C, + 0x84AA: 0x2501, + 0x84AB: 0x2503, + 0x84AC: 0x250F, + 0x84AD: 0x2513, + 0x84AE: 0x251B, + 0x84AF: 0x2517, + 0x84B0: 0x2523, + 0x84B1: 0x2533, + 0x84B2: 0x252B, + 0x84B3: 0x253B, + 0x84B4: 0x254B, + 0x84B5: 0x2520, + 0x84B6: 0x252F, + 0x84B7: 0x2528, + 0x84B8: 0x2537, + 0x84B9: 0x253F, + 0x84BA: 0x251D, + 0x84BB: 0x2530, + 0x84BC: 0x2525, + 0x84BD: 0x2538, + 0x84BE: 0x2542, + 0x889F: 0x4E9C, + 0x88A0: 0x5516, + 0x88A1: 0x5A03, + 0x88A2: 0x963F, + 0x88A3: 0x54C0, + 0x88A4: 0x611B, + 0x88A5: 0x6328, + 0x88A6: 0x59F6, + 0x88A7: 0x9022, + 0x88A8: 0x8475, + 0x88A9: 0x831C, + 0x88AA: 0x7A50, + 0x88AB: 0x60AA, + 0x88AC: 0x63E1, + 0x88AD: 0x6E25, + 0x88AE: 0x65ED, + 0x88AF: 0x8466, + 0x88B0: 0x82A6, + 0x88B1: 0x9BF5, + 0x88B2: 0x6893, + 0x88B3: 0x5727, + 0x88B4: 0x65A1, + 0x88B5: 0x6271, + 0x88B6: 0x5B9B, + 0x88B7: 0x59D0, + 0x88B8: 0x867B, + 0x88B9: 0x98F4, + 0x88BA: 0x7D62, + 0x88BB: 0x7DBE, + 0x88BC: 0x9B8E, + 0x88BD: 0x6216, + 0x88BE: 0x7C9F, + 0x88BF: 0x88B7, + 0x88C0: 0x5B89, + 0x88C1: 0x5EB5, + 0x88C2: 0x6309, + 0x88C3: 0x6697, + 0x88C4: 0x6848, + 0x88C5: 0x95C7, + 0x88C6: 0x978D, + 0x88C7: 0x674F, + 0x88C8: 0x4EE5, + 0x88C9: 0x4F0A, + 0x88CA: 0x4F4D, + 0x88CB: 0x4F9D, + 0x88CC: 0x5049, + 0x88CD: 0x56F2, + 0x88CE: 0x5937, + 0x88CF: 0x59D4, + 0x88D0: 0x5A01, + 0x88D1: 0x5C09, + 0x88D2: 0x60DF, + 0x88D3: 0x610F, + 0x88D4: 0x6170, + 0x88D5: 0x6613, + 0x88D6: 0x6905, + 0x88D7: 0x70BA, + 0x88D8: 0x754F, + 0x88D9: 0x7570, + 0x88DA: 0x79FB, + 0x88DB: 0x7DAD, + 0x88DC: 0x7DEF, + 0x88DD: 0x80C3, + 0x88DE: 0x840E, + 0x88DF: 0x8863, + 0x88E0: 0x8B02, + 0x88E1: 0x9055, + 0x88E2: 0x907A, + 0x88E3: 0x533B, + 0x88E4: 0x4E95, + 0x88E5: 0x4EA5, + 0x88E6: 0x57DF, + 0x88E7: 0x80B2, + 0x88E8: 0x90C1, + 0x88E9: 0x78EF, + 0x88EA: 0x4E00, + 0x88EB: 0x58F1, + 0x88EC: 0x6EA2, + 0x88ED: 0x9038, + 0x88EE: 0x7A32, + 0x88EF: 0x8328, + 0x88F0: 0x828B, + 0x88F1: 0x9C2F, + 0x88F2: 0x5141, + 0x88F3: 0x5370, + 0x88F4: 0x54BD, + 0x88F5: 0x54E1, + 0x88F6: 0x56E0, + 0x88F7: 0x59FB, + 0x88F8: 0x5F15, + 0x88F9: 0x98F2, + 0x88FA: 0x6DEB, + 0x88FB: 0x80E4, + 0x88FC: 0x852D, + 0x8940: 0x9662, + 0x8941: 0x9670, + 0x8942: 0x96A0, + 0x8943: 0x97FB, + 0x8944: 0x540B, + 0x8945: 0x53F3, + 0x8946: 0x5B87, + 0x8947: 0x70CF, + 0x8948: 0x7FBD, + 0x8949: 0x8FC2, + 0x894A: 0x96E8, + 0x894B: 0x536F, + 0x894C: 0x9D5C, + 0x894D: 0x7ABA, + 0x894E: 0x4E11, + 0x894F: 0x7893, + 0x8950: 0x81FC, + 0x8951: 0x6E26, + 0x8952: 0x5618, + 0x8953: 0x5504, + 0x8954: 0x6B1D, + 0x8955: 0x851A, + 0x8956: 0x9C3B, + 0x8957: 0x59E5, + 0x8958: 0x53A9, + 0x8959: 0x6D66, + 0x895A: 0x74DC, + 0x895B: 0x958F, + 0x895C: 0x5642, + 0x895D: 0x4E91, + 0x895E: 0x904B, + 0x895F: 0x96F2, + 0x8960: 0x834F, + 0x8961: 0x990C, + 0x8962: 0x53E1, + 0x8963: 0x55B6, + 0x8964: 0x5B30, + 0x8965: 0x5F71, + 0x8966: 0x6620, + 0x8967: 0x66F3, + 0x8968: 0x6804, + 0x8969: 0x6C38, + 0x896A: 0x6CF3, + 0x896B: 0x6D29, + 0x896C: 0x745B, + 0x896D: 0x76C8, + 0x896E: 0x7A4E, + 0x896F: 0x9834, + 0x8970: 0x82F1, + 0x8971: 0x885B, + 0x8972: 0x8A60, + 0x8973: 0x92ED, + 0x8974: 0x6DB2, + 0x8975: 0x75AB, + 0x8976: 0x76CA, + 0x8977: 0x99C5, + 0x8978: 0x60A6, + 0x8979: 0x8B01, + 0x897A: 0x8D8A, + 0x897B: 0x95B2, + 0x897C: 0x698E, + 0x897D: 0x53AD, + 0x897E: 0x5186, + 0x8980: 0x5712, + 0x8981: 0x5830, + 0x8982: 0x5944, + 0x8983: 0x5BB4, + 0x8984: 0x5EF6, + 0x8985: 0x6028, + 0x8986: 0x63A9, + 0x8987: 0x63F4, + 0x8988: 0x6CBF, + 0x8989: 0x6F14, + 0x898A: 0x708E, + 0x898B: 0x7114, + 0x898C: 0x7159, + 0x898D: 0x71D5, + 0x898E: 0x733F, + 0x898F: 0x7E01, + 0x8990: 0x8276, + 0x8991: 0x82D1, + 0x8992: 0x8597, + 0x8993: 0x9060, + 0x8994: 0x925B, + 0x8995: 0x9D1B, + 0x8996: 0x5869, + 0x8997: 0x65BC, + 0x8998: 0x6C5A, + 0x8999: 0x7525, + 0x899A: 0x51F9, + 0x899B: 0x592E, + 0x899C: 0x5965, + 0x899D: 0x5F80, + 0x899E: 0x5FDC, + 0x899F: 0x62BC, + 0x89A0: 0x65FA, + 0x89A1: 0x6A2A, + 0x89A2: 0x6B27, + 0x89A3: 0x6BB4, + 0x89A4: 0x738B, + 0x89A5: 0x7FC1, + 0x89A6: 0x8956, + 0x89A7: 0x9D2C, + 0x89A8: 0x9D0E, + 0x89A9: 0x9EC4, + 0x89AA: 0x5CA1, + 0x89AB: 0x6C96, + 0x89AC: 0x837B, + 0x89AD: 0x5104, + 0x89AE: 0x5C4B, + 0x89AF: 0x61B6, + 0x89B0: 0x81C6, + 0x89B1: 0x6876, + 0x89B2: 0x7261, + 0x89B3: 0x4E59, + 0x89B4: 0x4FFA, + 0x89B5: 0x5378, + 0x89B6: 0x6069, + 0x89B7: 0x6E29, + 0x89B8: 0x7A4F, + 0x89B9: 0x97F3, + 0x89BA: 0x4E0B, + 0x89BB: 0x5316, + 0x89BC: 0x4EEE, + 0x89BD: 0x4F55, + 0x89BE: 0x4F3D, + 0x89BF: 0x4FA1, + 0x89C0: 0x4F73, + 0x89C1: 0x52A0, + 0x89C2: 0x53EF, + 0x89C3: 0x5609, + 0x89C4: 0x590F, + 0x89C5: 0x5AC1, + 0x89C6: 0x5BB6, + 0x89C7: 0x5BE1, + 0x89C8: 0x79D1, + 0x89C9: 0x6687, + 0x89CA: 0x679C, + 0x89CB: 0x67B6, + 0x89CC: 0x6B4C, + 0x89CD: 0x6CB3, + 0x89CE: 0x706B, + 0x89CF: 0x73C2, + 0x89D0: 0x798D, + 0x89D1: 0x79BE, + 0x89D2: 0x7A3C, + 0x89D3: 0x7B87, + 0x89D4: 0x82B1, + 0x89D5: 0x82DB, + 0x89D6: 0x8304, + 0x89D7: 0x8377, + 0x89D8: 0x83EF, + 0x89D9: 0x83D3, + 0x89DA: 0x8766, + 0x89DB: 0x8AB2, + 0x89DC: 0x5629, + 0x89DD: 0x8CA8, + 0x89DE: 0x8FE6, + 0x89DF: 0x904E, + 0x89E0: 0x971E, + 0x89E1: 0x868A, + 0x89E2: 0x4FC4, + 0x89E3: 0x5CE8, + 0x89E4: 0x6211, + 0x89E5: 0x7259, + 0x89E6: 0x753B, + 0x89E7: 0x81E5, + 0x89E8: 0x82BD, + 0x89E9: 0x86FE, + 0x89EA: 0x8CC0, + 0x89EB: 0x96C5, + 0x89EC: 0x9913, + 0x89ED: 0x99D5, + 0x89EE: 0x4ECB, + 0x89EF: 0x4F1A, + 0x89F0: 0x89E3, + 0x89F1: 0x56DE, + 0x89F2: 0x584A, + 0x89F3: 0x58CA, + 0x89F4: 0x5EFB, + 0x89F5: 0x5FEB, + 0x89F6: 0x602A, + 0x89F7: 0x6094, + 0x89F8: 0x6062, + 0x89F9: 0x61D0, + 0x89FA: 0x6212, + 0x89FB: 0x62D0, + 0x89FC: 0x6539, + 0x8A40: 0x9B41, + 0x8A41: 0x6666, + 0x8A42: 0x68B0, + 0x8A43: 0x6D77, + 0x8A44: 0x7070, + 0x8A45: 0x754C, + 0x8A46: 0x7686, + 0x8A47: 0x7D75, + 0x8A48: 0x82A5, + 0x8A49: 0x87F9, + 0x8A4A: 0x958B, + 0x8A4B: 0x968E, + 0x8A4C: 0x8C9D, + 0x8A4D: 0x51F1, + 0x8A4E: 0x52BE, + 0x8A4F: 0x5916, + 0x8A50: 0x54B3, + 0x8A51: 0x5BB3, + 0x8A52: 0x5D16, + 0x8A53: 0x6168, + 0x8A54: 0x6982, + 0x8A55: 0x6DAF, + 0x8A56: 0x788D, + 0x8A57: 0x84CB, + 0x8A58: 0x8857, + 0x8A59: 0x8A72, + 0x8A5A: 0x93A7, + 0x8A5B: 0x9AB8, + 0x8A5C: 0x6D6C, + 0x8A5D: 0x99A8, + 0x8A5E: 0x86D9, + 0x8A5F: 0x57A3, + 0x8A60: 0x67FF, + 0x8A61: 0x86CE, + 0x8A62: 0x920E, + 0x8A63: 0x5283, + 0x8A64: 0x5687, + 0x8A65: 0x5404, + 0x8A66: 0x5ED3, + 0x8A67: 0x62E1, + 0x8A68: 0x64B9, + 0x8A69: 0x683C, + 0x8A6A: 0x6838, + 0x8A6B: 0x6BBB, + 0x8A6C: 0x7372, + 0x8A6D: 0x78BA, + 0x8A6E: 0x7A6B, + 0x8A6F: 0x899A, + 0x8A70: 0x89D2, + 0x8A71: 0x8D6B, + 0x8A72: 0x8F03, + 0x8A73: 0x90ED, + 0x8A74: 0x95A3, + 0x8A75: 0x9694, + 0x8A76: 0x9769, + 0x8A77: 0x5B66, + 0x8A78: 0x5CB3, + 0x8A79: 0x697D, + 0x8A7A: 0x984D, + 0x8A7B: 0x984E, + 0x8A7C: 0x639B, + 0x8A7D: 0x7B20, + 0x8A7E: 0x6A2B, + 0x8A80: 0x6A7F, + 0x8A81: 0x68B6, + 0x8A82: 0x9C0D, + 0x8A83: 0x6F5F, + 0x8A84: 0x5272, + 0x8A85: 0x559D, + 0x8A86: 0x6070, + 0x8A87: 0x62EC, + 0x8A88: 0x6D3B, + 0x8A89: 0x6E07, + 0x8A8A: 0x6ED1, + 0x8A8B: 0x845B, + 0x8A8C: 0x8910, + 0x8A8D: 0x8F44, + 0x8A8E: 0x4E14, + 0x8A8F: 0x9C39, + 0x8A90: 0x53F6, + 0x8A91: 0x691B, + 0x8A92: 0x6A3A, + 0x8A93: 0x9784, + 0x8A94: 0x682A, + 0x8A95: 0x515C, + 0x8A96: 0x7AC3, + 0x8A97: 0x84B2, + 0x8A98: 0x91DC, + 0x8A99: 0x938C, + 0x8A9A: 0x565B, + 0x8A9B: 0x9D28, + 0x8A9C: 0x6822, + 0x8A9D: 0x8305, + 0x8A9E: 0x8431, + 0x8A9F: 0x7CA5, + 0x8AA0: 0x5208, + 0x8AA1: 0x82C5, + 0x8AA2: 0x74E6, + 0x8AA3: 0x4E7E, + 0x8AA4: 0x4F83, + 0x8AA5: 0x51A0, + 0x8AA6: 0x5BD2, + 0x8AA7: 0x520A, + 0x8AA8: 0x52D8, + 0x8AA9: 0x52E7, + 0x8AAA: 0x5DFB, + 0x8AAB: 0x559A, + 0x8AAC: 0x582A, + 0x8AAD: 0x59E6, + 0x8AAE: 0x5B8C, + 0x8AAF: 0x5B98, + 0x8AB0: 0x5BDB, + 0x8AB1: 0x5E72, + 0x8AB2: 0x5E79, + 0x8AB3: 0x60A3, + 0x8AB4: 0x611F, + 0x8AB5: 0x6163, + 0x8AB6: 0x61BE, + 0x8AB7: 0x63DB, + 0x8AB8: 0x6562, + 0x8AB9: 0x67D1, + 0x8ABA: 0x6853, + 0x8ABB: 0x68FA, + 0x8ABC: 0x6B3E, + 0x8ABD: 0x6B53, + 0x8ABE: 0x6C57, + 0x8ABF: 0x6F22, + 0x8AC0: 0x6F97, + 0x8AC1: 0x6F45, + 0x8AC2: 0x74B0, + 0x8AC3: 0x7518, + 0x8AC4: 0x76E3, + 0x8AC5: 0x770B, + 0x8AC6: 0x7AFF, + 0x8AC7: 0x7BA1, + 0x8AC8: 0x7C21, + 0x8AC9: 0x7DE9, + 0x8ACA: 0x7F36, + 0x8ACB: 0x7FF0, + 0x8ACC: 0x809D, + 0x8ACD: 0x8266, + 0x8ACE: 0x839E, + 0x8ACF: 0x89B3, + 0x8AD0: 0x8ACC, + 0x8AD1: 0x8CAB, + 0x8AD2: 0x9084, + 0x8AD3: 0x9451, + 0x8AD4: 0x9593, + 0x8AD5: 0x9591, + 0x8AD6: 0x95A2, + 0x8AD7: 0x9665, + 0x8AD8: 0x97D3, + 0x8AD9: 0x9928, + 0x8ADA: 0x8218, + 0x8ADB: 0x4E38, + 0x8ADC: 0x542B, + 0x8ADD: 0x5CB8, + 0x8ADE: 0x5DCC, + 0x8ADF: 0x73A9, + 0x8AE0: 0x764C, + 0x8AE1: 0x773C, + 0x8AE2: 0x5CA9, + 0x8AE3: 0x7FEB, + 0x8AE4: 0x8D0B, + 0x8AE5: 0x96C1, + 0x8AE6: 0x9811, + 0x8AE7: 0x9854, + 0x8AE8: 0x9858, + 0x8AE9: 0x4F01, + 0x8AEA: 0x4F0E, + 0x8AEB: 0x5371, + 0x8AEC: 0x559C, + 0x8AED: 0x5668, + 0x8AEE: 0x57FA, + 0x8AEF: 0x5947, + 0x8AF0: 0x5B09, + 0x8AF1: 0x5BC4, + 0x8AF2: 0x5C90, + 0x8AF3: 0x5E0C, + 0x8AF4: 0x5E7E, + 0x8AF5: 0x5FCC, + 0x8AF6: 0x63EE, + 0x8AF7: 0x673A, + 0x8AF8: 0x65D7, + 0x8AF9: 0x65E2, + 0x8AFA: 0x671F, + 0x8AFB: 0x68CB, + 0x8AFC: 0x68C4, + 0x8B40: 0x6A5F, + 0x8B41: 0x5E30, + 0x8B42: 0x6BC5, + 0x8B43: 0x6C17, + 0x8B44: 0x6C7D, + 0x8B45: 0x757F, + 0x8B46: 0x7948, + 0x8B47: 0x5B63, + 0x8B48: 0x7A00, + 0x8B49: 0x7D00, + 0x8B4A: 0x5FBD, + 0x8B4B: 0x898F, + 0x8B4C: 0x8A18, + 0x8B4D: 0x8CB4, + 0x8B4E: 0x8D77, + 0x8B4F: 0x8ECC, + 0x8B50: 0x8F1D, + 0x8B51: 0x98E2, + 0x8B52: 0x9A0E, + 0x8B53: 0x9B3C, + 0x8B54: 0x4E80, + 0x8B55: 0x507D, + 0x8B56: 0x5100, + 0x8B57: 0x5993, + 0x8B58: 0x5B9C, + 0x8B59: 0x622F, + 0x8B5A: 0x6280, + 0x8B5B: 0x64EC, + 0x8B5C: 0x6B3A, + 0x8B5D: 0x72A0, + 0x8B5E: 0x7591, + 0x8B5F: 0x7947, + 0x8B60: 0x7FA9, + 0x8B61: 0x87FB, + 0x8B62: 0x8ABC, + 0x8B63: 0x8B70, + 0x8B64: 0x63AC, + 0x8B65: 0x83CA, + 0x8B66: 0x97A0, + 0x8B67: 0x5409, + 0x8B68: 0x5403, + 0x8B69: 0x55AB, + 0x8B6A: 0x6854, + 0x8B6B: 0x6A58, + 0x8B6C: 0x8A70, + 0x8B6D: 0x7827, + 0x8B6E: 0x6775, + 0x8B6F: 0x9ECD, + 0x8B70: 0x5374, + 0x8B71: 0x5BA2, + 0x8B72: 0x811A, + 0x8B73: 0x8650, + 0x8B74: 0x9006, + 0x8B75: 0x4E18, + 0x8B76: 0x4E45, + 0x8B77: 0x4EC7, + 0x8B78: 0x4F11, + 0x8B79: 0x53CA, + 0x8B7A: 0x5438, + 0x8B7B: 0x5BAE, + 0x8B7C: 0x5F13, + 0x8B7D: 0x6025, + 0x8B7E: 0x6551, + 0x8B80: 0x673D, + 0x8B81: 0x6C42, + 0x8B82: 0x6C72, + 0x8B83: 0x6CE3, + 0x8B84: 0x7078, + 0x8B85: 0x7403, + 0x8B86: 0x7A76, + 0x8B87: 0x7AAE, + 0x8B88: 0x7B08, + 0x8B89: 0x7D1A, + 0x8B8A: 0x7CFE, + 0x8B8B: 0x7D66, + 0x8B8C: 0x65E7, + 0x8B8D: 0x725B, + 0x8B8E: 0x53BB, + 0x8B8F: 0x5C45, + 0x8B90: 0x5DE8, + 0x8B91: 0x62D2, + 0x8B92: 0x62E0, + 0x8B93: 0x6319, + 0x8B94: 0x6E20, + 0x8B95: 0x865A, + 0x8B96: 0x8A31, + 0x8B97: 0x8DDD, + 0x8B98: 0x92F8, + 0x8B99: 0x6F01, + 0x8B9A: 0x79A6, + 0x8B9B: 0x9B5A, + 0x8B9C: 0x4EA8, + 0x8B9D: 0x4EAB, + 0x8B9E: 0x4EAC, + 0x8B9F: 0x4F9B, + 0x8BA0: 0x4FA0, + 0x8BA1: 0x50D1, + 0x8BA2: 0x5147, + 0x8BA3: 0x7AF6, + 0x8BA4: 0x5171, + 0x8BA5: 0x51F6, + 0x8BA6: 0x5354, + 0x8BA7: 0x5321, + 0x8BA8: 0x537F, + 0x8BA9: 0x53EB, + 0x8BAA: 0x55AC, + 0x8BAB: 0x5883, + 0x8BAC: 0x5CE1, + 0x8BAD: 0x5F37, + 0x8BAE: 0x5F4A, + 0x8BAF: 0x602F, + 0x8BB0: 0x6050, + 0x8BB1: 0x606D, + 0x8BB2: 0x631F, + 0x8BB3: 0x6559, + 0x8BB4: 0x6A4B, + 0x8BB5: 0x6CC1, + 0x8BB6: 0x72C2, + 0x8BB7: 0x72ED, + 0x8BB8: 0x77EF, + 0x8BB9: 0x80F8, + 0x8BBA: 0x8105, + 0x8BBB: 0x8208, + 0x8BBC: 0x854E, + 0x8BBD: 0x90F7, + 0x8BBE: 0x93E1, + 0x8BBF: 0x97FF, + 0x8BC0: 0x9957, + 0x8BC1: 0x9A5A, + 0x8BC2: 0x4EF0, + 0x8BC3: 0x51DD, + 0x8BC4: 0x5C2D, + 0x8BC5: 0x6681, + 0x8BC6: 0x696D, + 0x8BC7: 0x5C40, + 0x8BC8: 0x66F2, + 0x8BC9: 0x6975, + 0x8BCA: 0x7389, + 0x8BCB: 0x6850, + 0x8BCC: 0x7C81, + 0x8BCD: 0x50C5, + 0x8BCE: 0x52E4, + 0x8BCF: 0x5747, + 0x8BD0: 0x5DFE, + 0x8BD1: 0x9326, + 0x8BD2: 0x65A4, + 0x8BD3: 0x6B23, + 0x8BD4: 0x6B3D, + 0x8BD5: 0x7434, + 0x8BD6: 0x7981, + 0x8BD7: 0x79BD, + 0x8BD8: 0x7B4B, + 0x8BD9: 0x7DCA, + 0x8BDA: 0x82B9, + 0x8BDB: 0x83CC, + 0x8BDC: 0x887F, + 0x8BDD: 0x895F, + 0x8BDE: 0x8B39, + 0x8BDF: 0x8FD1, + 0x8BE0: 0x91D1, + 0x8BE1: 0x541F, + 0x8BE2: 0x9280, + 0x8BE3: 0x4E5D, + 0x8BE4: 0x5036, + 0x8BE5: 0x53E5, + 0x8BE6: 0x533A, + 0x8BE7: 0x72D7, + 0x8BE8: 0x7396, + 0x8BE9: 0x77E9, + 0x8BEA: 0x82E6, + 0x8BEB: 0x8EAF, + 0x8BEC: 0x99C6, + 0x8BED: 0x99C8, + 0x8BEE: 0x99D2, + 0x8BEF: 0x5177, + 0x8BF0: 0x611A, + 0x8BF1: 0x865E, + 0x8BF2: 0x55B0, + 0x8BF3: 0x7A7A, + 0x8BF4: 0x5076, + 0x8BF5: 0x5BD3, + 0x8BF6: 0x9047, + 0x8BF7: 0x9685, + 0x8BF8: 0x4E32, + 0x8BF9: 0x6ADB, + 0x8BFA: 0x91E7, + 0x8BFB: 0x5C51, + 0x8BFC: 0x5C48, + 0x8C40: 0x6398, + 0x8C41: 0x7A9F, + 0x8C42: 0x6C93, + 0x8C43: 0x9774, + 0x8C44: 0x8F61, + 0x8C45: 0x7AAA, + 0x8C46: 0x718A, + 0x8C47: 0x9688, + 0x8C48: 0x7C82, + 0x8C49: 0x6817, + 0x8C4A: 0x7E70, + 0x8C4B: 0x6851, + 0x8C4C: 0x936C, + 0x8C4D: 0x52F2, + 0x8C4E: 0x541B, + 0x8C4F: 0x85AB, + 0x8C50: 0x8A13, + 0x8C51: 0x7FA4, + 0x8C52: 0x8ECD, + 0x8C53: 0x90E1, + 0x8C54: 0x5366, + 0x8C55: 0x8888, + 0x8C56: 0x7941, + 0x8C57: 0x4FC2, + 0x8C58: 0x50BE, + 0x8C59: 0x5211, + 0x8C5A: 0x5144, + 0x8C5B: 0x5553, + 0x8C5C: 0x572D, + 0x8C5D: 0x73EA, + 0x8C5E: 0x578B, + 0x8C5F: 0x5951, + 0x8C60: 0x5F62, + 0x8C61: 0x5F84, + 0x8C62: 0x6075, + 0x8C63: 0x6176, + 0x8C64: 0x6167, + 0x8C65: 0x61A9, + 0x8C66: 0x63B2, + 0x8C67: 0x643A, + 0x8C68: 0x656C, + 0x8C69: 0x666F, + 0x8C6A: 0x6842, + 0x8C6B: 0x6E13, + 0x8C6C: 0x7566, + 0x8C6D: 0x7A3D, + 0x8C6E: 0x7CFB, + 0x8C6F: 0x7D4C, + 0x8C70: 0x7D99, + 0x8C71: 0x7E4B, + 0x8C72: 0x7F6B, + 0x8C73: 0x830E, + 0x8C74: 0x834A, + 0x8C75: 0x86CD, + 0x8C76: 0x8A08, + 0x8C77: 0x8A63, + 0x8C78: 0x8B66, + 0x8C79: 0x8EFD, + 0x8C7A: 0x981A, + 0x8C7B: 0x9D8F, + 0x8C7C: 0x82B8, + 0x8C7D: 0x8FCE, + 0x8C7E: 0x9BE8, + 0x8C80: 0x5287, + 0x8C81: 0x621F, + 0x8C82: 0x6483, + 0x8C83: 0x6FC0, + 0x8C84: 0x9699, + 0x8C85: 0x6841, + 0x8C86: 0x5091, + 0x8C87: 0x6B20, + 0x8C88: 0x6C7A, + 0x8C89: 0x6F54, + 0x8C8A: 0x7A74, + 0x8C8B: 0x7D50, + 0x8C8C: 0x8840, + 0x8C8D: 0x8A23, + 0x8C8E: 0x6708, + 0x8C8F: 0x4EF6, + 0x8C90: 0x5039, + 0x8C91: 0x5026, + 0x8C92: 0x5065, + 0x8C93: 0x517C, + 0x8C94: 0x5238, + 0x8C95: 0x5263, + 0x8C96: 0x55A7, + 0x8C97: 0x570F, + 0x8C98: 0x5805, + 0x8C99: 0x5ACC, + 0x8C9A: 0x5EFA, + 0x8C9B: 0x61B2, + 0x8C9C: 0x61F8, + 0x8C9D: 0x62F3, + 0x8C9E: 0x6372, + 0x8C9F: 0x691C, + 0x8CA0: 0x6A29, + 0x8CA1: 0x727D, + 0x8CA2: 0x72AC, + 0x8CA3: 0x732E, + 0x8CA4: 0x7814, + 0x8CA5: 0x786F, + 0x8CA6: 0x7D79, + 0x8CA7: 0x770C, + 0x8CA8: 0x80A9, + 0x8CA9: 0x898B, + 0x8CAA: 0x8B19, + 0x8CAB: 0x8CE2, + 0x8CAC: 0x8ED2, + 0x8CAD: 0x9063, + 0x8CAE: 0x9375, + 0x8CAF: 0x967A, + 0x8CB0: 0x9855, + 0x8CB1: 0x9A13, + 0x8CB2: 0x9E78, + 0x8CB3: 0x5143, + 0x8CB4: 0x539F, + 0x8CB5: 0x53B3, + 0x8CB6: 0x5E7B, + 0x8CB7: 0x5F26, + 0x8CB8: 0x6E1B, + 0x8CB9: 0x6E90, + 0x8CBA: 0x7384, + 0x8CBB: 0x73FE, + 0x8CBC: 0x7D43, + 0x8CBD: 0x8237, + 0x8CBE: 0x8A00, + 0x8CBF: 0x8AFA, + 0x8CC0: 0x9650, + 0x8CC1: 0x4E4E, + 0x8CC2: 0x500B, + 0x8CC3: 0x53E4, + 0x8CC4: 0x547C, + 0x8CC5: 0x56FA, + 0x8CC6: 0x59D1, + 0x8CC7: 0x5B64, + 0x8CC8: 0x5DF1, + 0x8CC9: 0x5EAB, + 0x8CCA: 0x5F27, + 0x8CCB: 0x6238, + 0x8CCC: 0x6545, + 0x8CCD: 0x67AF, + 0x8CCE: 0x6E56, + 0x8CCF: 0x72D0, + 0x8CD0: 0x7CCA, + 0x8CD1: 0x88B4, + 0x8CD2: 0x80A1, + 0x8CD3: 0x80E1, + 0x8CD4: 0x83F0, + 0x8CD5: 0x864E, + 0x8CD6: 0x8A87, + 0x8CD7: 0x8DE8, + 0x8CD8: 0x9237, + 0x8CD9: 0x96C7, + 0x8CDA: 0x9867, + 0x8CDB: 0x9F13, + 0x8CDC: 0x4E94, + 0x8CDD: 0x4E92, + 0x8CDE: 0x4F0D, + 0x8CDF: 0x5348, + 0x8CE0: 0x5449, + 0x8CE1: 0x543E, + 0x8CE2: 0x5A2F, + 0x8CE3: 0x5F8C, + 0x8CE4: 0x5FA1, + 0x8CE5: 0x609F, + 0x8CE6: 0x68A7, + 0x8CE7: 0x6A8E, + 0x8CE8: 0x745A, + 0x8CE9: 0x7881, + 0x8CEA: 0x8A9E, + 0x8CEB: 0x8AA4, + 0x8CEC: 0x8B77, + 0x8CED: 0x9190, + 0x8CEE: 0x4E5E, + 0x8CEF: 0x9BC9, + 0x8CF0: 0x4EA4, + 0x8CF1: 0x4F7C, + 0x8CF2: 0x4FAF, + 0x8CF3: 0x5019, + 0x8CF4: 0x5016, + 0x8CF5: 0x5149, + 0x8CF6: 0x516C, + 0x8CF7: 0x529F, + 0x8CF8: 0x52B9, + 0x8CF9: 0x52FE, + 0x8CFA: 0x539A, + 0x8CFB: 0x53E3, + 0x8CFC: 0x5411, + 0x8D40: 0x540E, + 0x8D41: 0x5589, + 0x8D42: 0x5751, + 0x8D43: 0x57A2, + 0x8D44: 0x597D, + 0x8D45: 0x5B54, + 0x8D46: 0x5B5D, + 0x8D47: 0x5B8F, + 0x8D48: 0x5DE5, + 0x8D49: 0x5DE7, + 0x8D4A: 0x5DF7, + 0x8D4B: 0x5E78, + 0x8D4C: 0x5E83, + 0x8D4D: 0x5E9A, + 0x8D4E: 0x5EB7, + 0x8D4F: 0x5F18, + 0x8D50: 0x6052, + 0x8D51: 0x614C, + 0x8D52: 0x6297, + 0x8D53: 0x62D8, + 0x8D54: 0x63A7, + 0x8D55: 0x653B, + 0x8D56: 0x6602, + 0x8D57: 0x6643, + 0x8D58: 0x66F4, + 0x8D59: 0x676D, + 0x8D5A: 0x6821, + 0x8D5B: 0x6897, + 0x8D5C: 0x69CB, + 0x8D5D: 0x6C5F, + 0x8D5E: 0x6D2A, + 0x8D5F: 0x6D69, + 0x8D60: 0x6E2F, + 0x8D61: 0x6E9D, + 0x8D62: 0x7532, + 0x8D63: 0x7687, + 0x8D64: 0x786C, + 0x8D65: 0x7A3F, + 0x8D66: 0x7CE0, + 0x8D67: 0x7D05, + 0x8D68: 0x7D18, + 0x8D69: 0x7D5E, + 0x8D6A: 0x7DB1, + 0x8D6B: 0x8015, + 0x8D6C: 0x8003, + 0x8D6D: 0x80AF, + 0x8D6E: 0x80B1, + 0x8D6F: 0x8154, + 0x8D70: 0x818F, + 0x8D71: 0x822A, + 0x8D72: 0x8352, + 0x8D73: 0x884C, + 0x8D74: 0x8861, + 0x8D75: 0x8B1B, + 0x8D76: 0x8CA2, + 0x8D77: 0x8CFC, + 0x8D78: 0x90CA, + 0x8D79: 0x9175, + 0x8D7A: 0x9271, + 0x8D7B: 0x783F, + 0x8D7C: 0x92FC, + 0x8D7D: 0x95A4, + 0x8D7E: 0x964D, + 0x8D80: 0x9805, + 0x8D81: 0x9999, + 0x8D82: 0x9AD8, + 0x8D83: 0x9D3B, + 0x8D84: 0x525B, + 0x8D85: 0x52AB, + 0x8D86: 0x53F7, + 0x8D87: 0x5408, + 0x8D88: 0x58D5, + 0x8D89: 0x62F7, + 0x8D8A: 0x6FE0, + 0x8D8B: 0x8C6A, + 0x8D8C: 0x8F5F, + 0x8D8D: 0x9EB9, + 0x8D8E: 0x514B, + 0x8D8F: 0x523B, + 0x8D90: 0x544A, + 0x8D91: 0x56FD, + 0x8D92: 0x7A40, + 0x8D93: 0x9177, + 0x8D94: 0x9D60, + 0x8D95: 0x9ED2, + 0x8D96: 0x7344, + 0x8D97: 0x6F09, + 0x8D98: 0x8170, + 0x8D99: 0x7511, + 0x8D9A: 0x5FFD, + 0x8D9B: 0x60DA, + 0x8D9C: 0x9AA8, + 0x8D9D: 0x72DB, + 0x8D9E: 0x8FBC, + 0x8D9F: 0x6B64, + 0x8DA0: 0x9803, + 0x8DA1: 0x4ECA, + 0x8DA2: 0x56F0, + 0x8DA3: 0x5764, + 0x8DA4: 0x58BE, + 0x8DA5: 0x5A5A, + 0x8DA6: 0x6068, + 0x8DA7: 0x61C7, + 0x8DA8: 0x660F, + 0x8DA9: 0x6606, + 0x8DAA: 0x6839, + 0x8DAB: 0x68B1, + 0x8DAC: 0x6DF7, + 0x8DAD: 0x75D5, + 0x8DAE: 0x7D3A, + 0x8DAF: 0x826E, + 0x8DB0: 0x9B42, + 0x8DB1: 0x4E9B, + 0x8DB2: 0x4F50, + 0x8DB3: 0x53C9, + 0x8DB4: 0x5506, + 0x8DB5: 0x5D6F, + 0x8DB6: 0x5DE6, + 0x8DB7: 0x5DEE, + 0x8DB8: 0x67FB, + 0x8DB9: 0x6C99, + 0x8DBA: 0x7473, + 0x8DBB: 0x7802, + 0x8DBC: 0x8A50, + 0x8DBD: 0x9396, + 0x8DBE: 0x88DF, + 0x8DBF: 0x5750, + 0x8DC0: 0x5EA7, + 0x8DC1: 0x632B, + 0x8DC2: 0x50B5, + 0x8DC3: 0x50AC, + 0x8DC4: 0x518D, + 0x8DC5: 0x6700, + 0x8DC6: 0x54C9, + 0x8DC7: 0x585E, + 0x8DC8: 0x59BB, + 0x8DC9: 0x5BB0, + 0x8DCA: 0x5F69, + 0x8DCB: 0x624D, + 0x8DCC: 0x63A1, + 0x8DCD: 0x683D, + 0x8DCE: 0x6B73, + 0x8DCF: 0x6E08, + 0x8DD0: 0x707D, + 0x8DD1: 0x91C7, + 0x8DD2: 0x7280, + 0x8DD3: 0x7815, + 0x8DD4: 0x7826, + 0x8DD5: 0x796D, + 0x8DD6: 0x658E, + 0x8DD7: 0x7D30, + 0x8DD8: 0x83DC, + 0x8DD9: 0x88C1, + 0x8DDA: 0x8F09, + 0x8DDB: 0x969B, + 0x8DDC: 0x5264, + 0x8DDD: 0x5728, + 0x8DDE: 0x6750, + 0x8DDF: 0x7F6A, + 0x8DE0: 0x8CA1, + 0x8DE1: 0x51B4, + 0x8DE2: 0x5742, + 0x8DE3: 0x962A, + 0x8DE4: 0x583A, + 0x8DE5: 0x698A, + 0x8DE6: 0x80B4, + 0x8DE7: 0x54B2, + 0x8DE8: 0x5D0E, + 0x8DE9: 0x57FC, + 0x8DEA: 0x7895, + 0x8DEB: 0x9DFA, + 0x8DEC: 0x4F5C, + 0x8DED: 0x524A, + 0x8DEE: 0x548B, + 0x8DEF: 0x643E, + 0x8DF0: 0x6628, + 0x8DF1: 0x6714, + 0x8DF2: 0x67F5, + 0x8DF3: 0x7A84, + 0x8DF4: 0x7B56, + 0x8DF5: 0x7D22, + 0x8DF6: 0x932F, + 0x8DF7: 0x685C, + 0x8DF8: 0x9BAD, + 0x8DF9: 0x7B39, + 0x8DFA: 0x5319, + 0x8DFB: 0x518A, + 0x8DFC: 0x5237, + 0x8E40: 0x5BDF, + 0x8E41: 0x62F6, + 0x8E42: 0x64AE, + 0x8E43: 0x64E6, + 0x8E44: 0x672D, + 0x8E45: 0x6BBA, + 0x8E46: 0x85A9, + 0x8E47: 0x96D1, + 0x8E48: 0x7690, + 0x8E49: 0x9BD6, + 0x8E4A: 0x634C, + 0x8E4B: 0x9306, + 0x8E4C: 0x9BAB, + 0x8E4D: 0x76BF, + 0x8E4E: 0x6652, + 0x8E4F: 0x4E09, + 0x8E50: 0x5098, + 0x8E51: 0x53C2, + 0x8E52: 0x5C71, + 0x8E53: 0x60E8, + 0x8E54: 0x6492, + 0x8E55: 0x6563, + 0x8E56: 0x685F, + 0x8E57: 0x71E6, + 0x8E58: 0x73CA, + 0x8E59: 0x7523, + 0x8E5A: 0x7B97, + 0x8E5B: 0x7E82, + 0x8E5C: 0x8695, + 0x8E5D: 0x8B83, + 0x8E5E: 0x8CDB, + 0x8E5F: 0x9178, + 0x8E60: 0x9910, + 0x8E61: 0x65AC, + 0x8E62: 0x66AB, + 0x8E63: 0x6B8B, + 0x8E64: 0x4ED5, + 0x8E65: 0x4ED4, + 0x8E66: 0x4F3A, + 0x8E67: 0x4F7F, + 0x8E68: 0x523A, + 0x8E69: 0x53F8, + 0x8E6A: 0x53F2, + 0x8E6B: 0x55E3, + 0x8E6C: 0x56DB, + 0x8E6D: 0x58EB, + 0x8E6E: 0x59CB, + 0x8E6F: 0x59C9, + 0x8E70: 0x59FF, + 0x8E71: 0x5B50, + 0x8E72: 0x5C4D, + 0x8E73: 0x5E02, + 0x8E74: 0x5E2B, + 0x8E75: 0x5FD7, + 0x8E76: 0x601D, + 0x8E77: 0x6307, + 0x8E78: 0x652F, + 0x8E79: 0x5B5C, + 0x8E7A: 0x65AF, + 0x8E7B: 0x65BD, + 0x8E7C: 0x65E8, + 0x8E7D: 0x679D, + 0x8E7E: 0x6B62, + 0x8E80: 0x6B7B, + 0x8E81: 0x6C0F, + 0x8E82: 0x7345, + 0x8E83: 0x7949, + 0x8E84: 0x79C1, + 0x8E85: 0x7CF8, + 0x8E86: 0x7D19, + 0x8E87: 0x7D2B, + 0x8E88: 0x80A2, + 0x8E89: 0x8102, + 0x8E8A: 0x81F3, + 0x8E8B: 0x8996, + 0x8E8C: 0x8A5E, + 0x8E8D: 0x8A69, + 0x8E8E: 0x8A66, + 0x8E8F: 0x8A8C, + 0x8E90: 0x8AEE, + 0x8E91: 0x8CC7, + 0x8E92: 0x8CDC, + 0x8E93: 0x96CC, + 0x8E94: 0x98FC, + 0x8E95: 0x6B6F, + 0x8E96: 0x4E8B, + 0x8E97: 0x4F3C, + 0x8E98: 0x4F8D, + 0x8E99: 0x5150, + 0x8E9A: 0x5B57, + 0x8E9B: 0x5BFA, + 0x8E9C: 0x6148, + 0x8E9D: 0x6301, + 0x8E9E: 0x6642, + 0x8E9F: 0x6B21, + 0x8EA0: 0x6ECB, + 0x8EA1: 0x6CBB, + 0x8EA2: 0x723E, + 0x8EA3: 0x74BD, + 0x8EA4: 0x75D4, + 0x8EA5: 0x78C1, + 0x8EA6: 0x793A, + 0x8EA7: 0x800C, + 0x8EA8: 0x8033, + 0x8EA9: 0x81EA, + 0x8EAA: 0x8494, + 0x8EAB: 0x8F9E, + 0x8EAC: 0x6C50, + 0x8EAD: 0x9E7F, + 0x8EAE: 0x5F0F, + 0x8EAF: 0x8B58, + 0x8EB0: 0x9D2B, + 0x8EB1: 0x7AFA, + 0x8EB2: 0x8EF8, + 0x8EB3: 0x5B8D, + 0x8EB4: 0x96EB, + 0x8EB5: 0x4E03, + 0x8EB6: 0x53F1, + 0x8EB7: 0x57F7, + 0x8EB8: 0x5931, + 0x8EB9: 0x5AC9, + 0x8EBA: 0x5BA4, + 0x8EBB: 0x6089, + 0x8EBC: 0x6E7F, + 0x8EBD: 0x6F06, + 0x8EBE: 0x75BE, + 0x8EBF: 0x8CEA, + 0x8EC0: 0x5B9F, + 0x8EC1: 0x8500, + 0x8EC2: 0x7BE0, + 0x8EC3: 0x5072, + 0x8EC4: 0x67F4, + 0x8EC5: 0x829D, + 0x8EC6: 0x5C61, + 0x8EC7: 0x854A, + 0x8EC8: 0x7E1E, + 0x8EC9: 0x820E, + 0x8ECA: 0x5199, + 0x8ECB: 0x5C04, + 0x8ECC: 0x6368, + 0x8ECD: 0x8D66, + 0x8ECE: 0x659C, + 0x8ECF: 0x716E, + 0x8ED0: 0x793E, + 0x8ED1: 0x7D17, + 0x8ED2: 0x8005, + 0x8ED3: 0x8B1D, + 0x8ED4: 0x8ECA, + 0x8ED5: 0x906E, + 0x8ED6: 0x86C7, + 0x8ED7: 0x90AA, + 0x8ED8: 0x501F, + 0x8ED9: 0x52FA, + 0x8EDA: 0x5C3A, + 0x8EDB: 0x6753, + 0x8EDC: 0x707C, + 0x8EDD: 0x7235, + 0x8EDE: 0x914C, + 0x8EDF: 0x91C8, + 0x8EE0: 0x932B, + 0x8EE1: 0x82E5, + 0x8EE2: 0x5BC2, + 0x8EE3: 0x5F31, + 0x8EE4: 0x60F9, + 0x8EE5: 0x4E3B, + 0x8EE6: 0x53D6, + 0x8EE7: 0x5B88, + 0x8EE8: 0x624B, + 0x8EE9: 0x6731, + 0x8EEA: 0x6B8A, + 0x8EEB: 0x72E9, + 0x8EEC: 0x73E0, + 0x8EED: 0x7A2E, + 0x8EEE: 0x816B, + 0x8EEF: 0x8DA3, + 0x8EF0: 0x9152, + 0x8EF1: 0x9996, + 0x8EF2: 0x5112, + 0x8EF3: 0x53D7, + 0x8EF4: 0x546A, + 0x8EF5: 0x5BFF, + 0x8EF6: 0x6388, + 0x8EF7: 0x6A39, + 0x8EF8: 0x7DAC, + 0x8EF9: 0x9700, + 0x8EFA: 0x56DA, + 0x8EFB: 0x53CE, + 0x8EFC: 0x5468, + 0x8F40: 0x5B97, + 0x8F41: 0x5C31, + 0x8F42: 0x5DDE, + 0x8F43: 0x4FEE, + 0x8F44: 0x6101, + 0x8F45: 0x62FE, + 0x8F46: 0x6D32, + 0x8F47: 0x79C0, + 0x8F48: 0x79CB, + 0x8F49: 0x7D42, + 0x8F4A: 0x7E4D, + 0x8F4B: 0x7FD2, + 0x8F4C: 0x81ED, + 0x8F4D: 0x821F, + 0x8F4E: 0x8490, + 0x8F4F: 0x8846, + 0x8F50: 0x8972, + 0x8F51: 0x8B90, + 0x8F52: 0x8E74, + 0x8F53: 0x8F2F, + 0x8F54: 0x9031, + 0x8F55: 0x914B, + 0x8F56: 0x916C, + 0x8F57: 0x96C6, + 0x8F58: 0x919C, + 0x8F59: 0x4EC0, + 0x8F5A: 0x4F4F, + 0x8F5B: 0x5145, + 0x8F5C: 0x5341, + 0x8F5D: 0x5F93, + 0x8F5E: 0x620E, + 0x8F5F: 0x67D4, + 0x8F60: 0x6C41, + 0x8F61: 0x6E0B, + 0x8F62: 0x7363, + 0x8F63: 0x7E26, + 0x8F64: 0x91CD, + 0x8F65: 0x9283, + 0x8F66: 0x53D4, + 0x8F67: 0x5919, + 0x8F68: 0x5BBF, + 0x8F69: 0x6DD1, + 0x8F6A: 0x795D, + 0x8F6B: 0x7E2E, + 0x8F6C: 0x7C9B, + 0x8F6D: 0x587E, + 0x8F6E: 0x719F, + 0x8F6F: 0x51FA, + 0x8F70: 0x8853, + 0x8F71: 0x8FF0, + 0x8F72: 0x4FCA, + 0x8F73: 0x5CFB, + 0x8F74: 0x6625, + 0x8F75: 0x77AC, + 0x8F76: 0x7AE3, + 0x8F77: 0x821C, + 0x8F78: 0x99FF, + 0x8F79: 0x51C6, + 0x8F7A: 0x5FAA, + 0x8F7B: 0x65EC, + 0x8F7C: 0x696F, + 0x8F7D: 0x6B89, + 0x8F7E: 0x6DF3, + 0x8F80: 0x6E96, + 0x8F81: 0x6F64, + 0x8F82: 0x76FE, + 0x8F83: 0x7D14, + 0x8F84: 0x5DE1, + 0x8F85: 0x9075, + 0x8F86: 0x9187, + 0x8F87: 0x9806, + 0x8F88: 0x51E6, + 0x8F89: 0x521D, + 0x8F8A: 0x6240, + 0x8F8B: 0x6691, + 0x8F8C: 0x66D9, + 0x8F8D: 0x6E1A, + 0x8F8E: 0x5EB6, + 0x8F8F: 0x7DD2, + 0x8F90: 0x7F72, + 0x8F91: 0x66F8, + 0x8F92: 0x85AF, + 0x8F93: 0x85F7, + 0x8F94: 0x8AF8, + 0x8F95: 0x52A9, + 0x8F96: 0x53D9, + 0x8F97: 0x5973, + 0x8F98: 0x5E8F, + 0x8F99: 0x5F90, + 0x8F9A: 0x6055, + 0x8F9B: 0x92E4, + 0x8F9C: 0x9664, + 0x8F9D: 0x50B7, + 0x8F9E: 0x511F, + 0x8F9F: 0x52DD, + 0x8FA0: 0x5320, + 0x8FA1: 0x5347, + 0x8FA2: 0x53EC, + 0x8FA3: 0x54E8, + 0x8FA4: 0x5546, + 0x8FA5: 0x5531, + 0x8FA6: 0x5617, + 0x8FA7: 0x5968, + 0x8FA8: 0x59BE, + 0x8FA9: 0x5A3C, + 0x8FAA: 0x5BB5, + 0x8FAB: 0x5C06, + 0x8FAC: 0x5C0F, + 0x8FAD: 0x5C11, + 0x8FAE: 0x5C1A, + 0x8FAF: 0x5E84, + 0x8FB0: 0x5E8A, + 0x8FB1: 0x5EE0, + 0x8FB2: 0x5F70, + 0x8FB3: 0x627F, + 0x8FB4: 0x6284, + 0x8FB5: 0x62DB, + 0x8FB6: 0x638C, + 0x8FB7: 0x6377, + 0x8FB8: 0x6607, + 0x8FB9: 0x660C, + 0x8FBA: 0x662D, + 0x8FBB: 0x6676, + 0x8FBC: 0x677E, + 0x8FBD: 0x68A2, + 0x8FBE: 0x6A1F, + 0x8FBF: 0x6A35, + 0x8FC0: 0x6CBC, + 0x8FC1: 0x6D88, + 0x8FC2: 0x6E09, + 0x8FC3: 0x6E58, + 0x8FC4: 0x713C, + 0x8FC5: 0x7126, + 0x8FC6: 0x7167, + 0x8FC7: 0x75C7, + 0x8FC8: 0x7701, + 0x8FC9: 0x785D, + 0x8FCA: 0x7901, + 0x8FCB: 0x7965, + 0x8FCC: 0x79F0, + 0x8FCD: 0x7AE0, + 0x8FCE: 0x7B11, + 0x8FCF: 0x7CA7, + 0x8FD0: 0x7D39, + 0x8FD1: 0x8096, + 0x8FD2: 0x83D6, + 0x8FD3: 0x848B, + 0x8FD4: 0x8549, + 0x8FD5: 0x885D, + 0x8FD6: 0x88F3, + 0x8FD7: 0x8A1F, + 0x8FD8: 0x8A3C, + 0x8FD9: 0x8A54, + 0x8FDA: 0x8A73, + 0x8FDB: 0x8C61, + 0x8FDC: 0x8CDE, + 0x8FDD: 0x91A4, + 0x8FDE: 0x9266, + 0x8FDF: 0x937E, + 0x8FE0: 0x9418, + 0x8FE1: 0x969C, + 0x8FE2: 0x9798, + 0x8FE3: 0x4E0A, + 0x8FE4: 0x4E08, + 0x8FE5: 0x4E1E, + 0x8FE6: 0x4E57, + 0x8FE7: 0x5197, + 0x8FE8: 0x5270, + 0x8FE9: 0x57CE, + 0x8FEA: 0x5834, + 0x8FEB: 0x58CC, + 0x8FEC: 0x5B22, + 0x8FED: 0x5E38, + 0x8FEE: 0x60C5, + 0x8FEF: 0x64FE, + 0x8FF0: 0x6761, + 0x8FF1: 0x6756, + 0x8FF2: 0x6D44, + 0x8FF3: 0x72B6, + 0x8FF4: 0x7573, + 0x8FF5: 0x7A63, + 0x8FF6: 0x84B8, + 0x8FF7: 0x8B72, + 0x8FF8: 0x91B8, + 0x8FF9: 0x9320, + 0x8FFA: 0x5631, + 0x8FFB: 0x57F4, + 0x8FFC: 0x98FE, + 0x9040: 0x62ED, + 0x9041: 0x690D, + 0x9042: 0x6B96, + 0x9043: 0x71ED, + 0x9044: 0x7E54, + 0x9045: 0x8077, + 0x9046: 0x8272, + 0x9047: 0x89E6, + 0x9048: 0x98DF, + 0x9049: 0x8755, + 0x904A: 0x8FB1, + 0x904B: 0x5C3B, + 0x904C: 0x4F38, + 0x904D: 0x4FE1, + 0x904E: 0x4FB5, + 0x904F: 0x5507, + 0x9050: 0x5A20, + 0x9051: 0x5BDD, + 0x9052: 0x5BE9, + 0x9053: 0x5FC3, + 0x9054: 0x614E, + 0x9055: 0x632F, + 0x9056: 0x65B0, + 0x9057: 0x664B, + 0x9058: 0x68EE, + 0x9059: 0x699B, + 0x905A: 0x6D78, + 0x905B: 0x6DF1, + 0x905C: 0x7533, + 0x905D: 0x75B9, + 0x905E: 0x771F, + 0x905F: 0x795E, + 0x9060: 0x79E6, + 0x9061: 0x7D33, + 0x9062: 0x81E3, + 0x9063: 0x82AF, + 0x9064: 0x85AA, + 0x9065: 0x89AA, + 0x9066: 0x8A3A, + 0x9067: 0x8EAB, + 0x9068: 0x8F9B, + 0x9069: 0x9032, + 0x906A: 0x91DD, + 0x906B: 0x9707, + 0x906C: 0x4EBA, + 0x906D: 0x4EC1, + 0x906E: 0x5203, + 0x906F: 0x5875, + 0x9070: 0x58EC, + 0x9071: 0x5C0B, + 0x9072: 0x751A, + 0x9073: 0x5C3D, + 0x9074: 0x814E, + 0x9075: 0x8A0A, + 0x9076: 0x8FC5, + 0x9077: 0x9663, + 0x9078: 0x976D, + 0x9079: 0x7B25, + 0x907A: 0x8ACF, + 0x907B: 0x9808, + 0x907C: 0x9162, + 0x907D: 0x56F3, + 0x907E: 0x53A8, + 0x9080: 0x9017, + 0x9081: 0x5439, + 0x9082: 0x5782, + 0x9083: 0x5E25, + 0x9084: 0x63A8, + 0x9085: 0x6C34, + 0x9086: 0x708A, + 0x9087: 0x7761, + 0x9088: 0x7C8B, + 0x9089: 0x7FE0, + 0x908A: 0x8870, + 0x908B: 0x9042, + 0x908C: 0x9154, + 0x908D: 0x9310, + 0x908E: 0x9318, + 0x908F: 0x968F, + 0x9090: 0x745E, + 0x9091: 0x9AC4, + 0x9092: 0x5D07, + 0x9093: 0x5D69, + 0x9094: 0x6570, + 0x9095: 0x67A2, + 0x9096: 0x8DA8, + 0x9097: 0x96DB, + 0x9098: 0x636E, + 0x9099: 0x6749, + 0x909A: 0x6919, + 0x909B: 0x83C5, + 0x909C: 0x9817, + 0x909D: 0x96C0, + 0x909E: 0x88FE, + 0x909F: 0x6F84, + 0x90A0: 0x647A, + 0x90A1: 0x5BF8, + 0x90A2: 0x4E16, + 0x90A3: 0x702C, + 0x90A4: 0x755D, + 0x90A5: 0x662F, + 0x90A6: 0x51C4, + 0x90A7: 0x5236, + 0x90A8: 0x52E2, + 0x90A9: 0x59D3, + 0x90AA: 0x5F81, + 0x90AB: 0x6027, + 0x90AC: 0x6210, + 0x90AD: 0x653F, + 0x90AE: 0x6574, + 0x90AF: 0x661F, + 0x90B0: 0x6674, + 0x90B1: 0x68F2, + 0x90B2: 0x6816, + 0x90B3: 0x6B63, + 0x90B4: 0x6E05, + 0x90B5: 0x7272, + 0x90B6: 0x751F, + 0x90B7: 0x76DB, + 0x90B8: 0x7CBE, + 0x90B9: 0x8056, + 0x90BA: 0x58F0, + 0x90BB: 0x88FD, + 0x90BC: 0x897F, + 0x90BD: 0x8AA0, + 0x90BE: 0x8A93, + 0x90BF: 0x8ACB, + 0x90C0: 0x901D, + 0x90C1: 0x9192, + 0x90C2: 0x9752, + 0x90C3: 0x9759, + 0x90C4: 0x6589, + 0x90C5: 0x7A0E, + 0x90C6: 0x8106, + 0x90C7: 0x96BB, + 0x90C8: 0x5E2D, + 0x90C9: 0x60DC, + 0x90CA: 0x621A, + 0x90CB: 0x65A5, + 0x90CC: 0x6614, + 0x90CD: 0x6790, + 0x90CE: 0x77F3, + 0x90CF: 0x7A4D, + 0x90D0: 0x7C4D, + 0x90D1: 0x7E3E, + 0x90D2: 0x810A, + 0x90D3: 0x8CAC, + 0x90D4: 0x8D64, + 0x90D5: 0x8DE1, + 0x90D6: 0x8E5F, + 0x90D7: 0x78A9, + 0x90D8: 0x5207, + 0x90D9: 0x62D9, + 0x90DA: 0x63A5, + 0x90DB: 0x6442, + 0x90DC: 0x6298, + 0x90DD: 0x8A2D, + 0x90DE: 0x7A83, + 0x90DF: 0x7BC0, + 0x90E0: 0x8AAC, + 0x90E1: 0x96EA, + 0x90E2: 0x7D76, + 0x90E3: 0x820C, + 0x90E4: 0x8749, + 0x90E5: 0x4ED9, + 0x90E6: 0x5148, + 0x90E7: 0x5343, + 0x90E8: 0x5360, + 0x90E9: 0x5BA3, + 0x90EA: 0x5C02, + 0x90EB: 0x5C16, + 0x90EC: 0x5DDD, + 0x90ED: 0x6226, + 0x90EE: 0x6247, + 0x90EF: 0x64B0, + 0x90F0: 0x6813, + 0x90F1: 0x6834, + 0x90F2: 0x6CC9, + 0x90F3: 0x6D45, + 0x90F4: 0x6D17, + 0x90F5: 0x67D3, + 0x90F6: 0x6F5C, + 0x90F7: 0x714E, + 0x90F8: 0x717D, + 0x90F9: 0x65CB, + 0x90FA: 0x7A7F, + 0x90FB: 0x7BAD, + 0x90FC: 0x7DDA, + 0x9140: 0x7E4A, + 0x9141: 0x7FA8, + 0x9142: 0x817A, + 0x9143: 0x821B, + 0x9144: 0x8239, + 0x9145: 0x85A6, + 0x9146: 0x8A6E, + 0x9147: 0x8CCE, + 0x9148: 0x8DF5, + 0x9149: 0x9078, + 0x914A: 0x9077, + 0x914B: 0x92AD, + 0x914C: 0x9291, + 0x914D: 0x9583, + 0x914E: 0x9BAE, + 0x914F: 0x524D, + 0x9150: 0x5584, + 0x9151: 0x6F38, + 0x9152: 0x7136, + 0x9153: 0x5168, + 0x9154: 0x7985, + 0x9155: 0x7E55, + 0x9156: 0x81B3, + 0x9157: 0x7CCE, + 0x9158: 0x564C, + 0x9159: 0x5851, + 0x915A: 0x5CA8, + 0x915B: 0x63AA, + 0x915C: 0x66FE, + 0x915D: 0x66FD, + 0x915E: 0x695A, + 0x915F: 0x72D9, + 0x9160: 0x758F, + 0x9161: 0x758E, + 0x9162: 0x790E, + 0x9163: 0x7956, + 0x9164: 0x79DF, + 0x9165: 0x7C97, + 0x9166: 0x7D20, + 0x9167: 0x7D44, + 0x9168: 0x8607, + 0x9169: 0x8A34, + 0x916A: 0x963B, + 0x916B: 0x9061, + 0x916C: 0x9F20, + 0x916D: 0x50E7, + 0x916E: 0x5275, + 0x916F: 0x53CC, + 0x9170: 0x53E2, + 0x9171: 0x5009, + 0x9172: 0x55AA, + 0x9173: 0x58EE, + 0x9174: 0x594F, + 0x9175: 0x723D, + 0x9176: 0x5B8B, + 0x9177: 0x5C64, + 0x9178: 0x531D, + 0x9179: 0x60E3, + 0x917A: 0x60F3, + 0x917B: 0x635C, + 0x917C: 0x6383, + 0x917D: 0x633F, + 0x917E: 0x63BB, + 0x9180: 0x64CD, + 0x9181: 0x65E9, + 0x9182: 0x66F9, + 0x9183: 0x5DE3, + 0x9184: 0x69CD, + 0x9185: 0x69FD, + 0x9186: 0x6F15, + 0x9187: 0x71E5, + 0x9188: 0x4E89, + 0x9189: 0x75E9, + 0x918A: 0x76F8, + 0x918B: 0x7A93, + 0x918C: 0x7CDF, + 0x918D: 0x7DCF, + 0x918E: 0x7D9C, + 0x918F: 0x8061, + 0x9190: 0x8349, + 0x9191: 0x8358, + 0x9192: 0x846C, + 0x9193: 0x84BC, + 0x9194: 0x85FB, + 0x9195: 0x88C5, + 0x9196: 0x8D70, + 0x9197: 0x9001, + 0x9198: 0x906D, + 0x9199: 0x9397, + 0x919A: 0x971C, + 0x919B: 0x9A12, + 0x919C: 0x50CF, + 0x919D: 0x5897, + 0x919E: 0x618E, + 0x919F: 0x81D3, + 0x91A0: 0x8535, + 0x91A1: 0x8D08, + 0x91A2: 0x9020, + 0x91A3: 0x4FC3, + 0x91A4: 0x5074, + 0x91A5: 0x5247, + 0x91A6: 0x5373, + 0x91A7: 0x606F, + 0x91A8: 0x6349, + 0x91A9: 0x675F, + 0x91AA: 0x6E2C, + 0x91AB: 0x8DB3, + 0x91AC: 0x901F, + 0x91AD: 0x4FD7, + 0x91AE: 0x5C5E, + 0x91AF: 0x8CCA, + 0x91B0: 0x65CF, + 0x91B1: 0x7D9A, + 0x91B2: 0x5352, + 0x91B3: 0x8896, + 0x91B4: 0x5176, + 0x91B5: 0x63C3, + 0x91B6: 0x5B58, + 0x91B7: 0x5B6B, + 0x91B8: 0x5C0A, + 0x91B9: 0x640D, + 0x91BA: 0x6751, + 0x91BB: 0x905C, + 0x91BC: 0x4ED6, + 0x91BD: 0x591A, + 0x91BE: 0x592A, + 0x91BF: 0x6C70, + 0x91C0: 0x8A51, + 0x91C1: 0x553E, + 0x91C2: 0x5815, + 0x91C3: 0x59A5, + 0x91C4: 0x60F0, + 0x91C5: 0x6253, + 0x91C6: 0x67C1, + 0x91C7: 0x8235, + 0x91C8: 0x6955, + 0x91C9: 0x9640, + 0x91CA: 0x99C4, + 0x91CB: 0x9A28, + 0x91CC: 0x4F53, + 0x91CD: 0x5806, + 0x91CE: 0x5BFE, + 0x91CF: 0x8010, + 0x91D0: 0x5CB1, + 0x91D1: 0x5E2F, + 0x91D2: 0x5F85, + 0x91D3: 0x6020, + 0x91D4: 0x614B, + 0x91D5: 0x6234, + 0x91D6: 0x66FF, + 0x91D7: 0x6CF0, + 0x91D8: 0x6EDE, + 0x91D9: 0x80CE, + 0x91DA: 0x817F, + 0x91DB: 0x82D4, + 0x91DC: 0x888B, + 0x91DD: 0x8CB8, + 0x91DE: 0x9000, + 0x91DF: 0x902E, + 0x91E0: 0x968A, + 0x91E1: 0x9EDB, + 0x91E2: 0x9BDB, + 0x91E3: 0x4EE3, + 0x91E4: 0x53F0, + 0x91E5: 0x5927, + 0x91E6: 0x7B2C, + 0x91E7: 0x918D, + 0x91E8: 0x984C, + 0x91E9: 0x9DF9, + 0x91EA: 0x6EDD, + 0x91EB: 0x7027, + 0x91EC: 0x5353, + 0x91ED: 0x5544, + 0x91EE: 0x5B85, + 0x91EF: 0x6258, + 0x91F0: 0x629E, + 0x91F1: 0x62D3, + 0x91F2: 0x6CA2, + 0x91F3: 0x6FEF, + 0x91F4: 0x7422, + 0x91F5: 0x8A17, + 0x91F6: 0x9438, + 0x91F7: 0x6FC1, + 0x91F8: 0x8AFE, + 0x91F9: 0x8338, + 0x91FA: 0x51E7, + 0x91FB: 0x86F8, + 0x91FC: 0x53EA, + 0x9240: 0x53E9, + 0x9241: 0x4F46, + 0x9242: 0x9054, + 0x9243: 0x8FB0, + 0x9244: 0x596A, + 0x9245: 0x8131, + 0x9246: 0x5DFD, + 0x9247: 0x7AEA, + 0x9248: 0x8FBF, + 0x9249: 0x68DA, + 0x924A: 0x8C37, + 0x924B: 0x72F8, + 0x924C: 0x9C48, + 0x924D: 0x6A3D, + 0x924E: 0x8AB0, + 0x924F: 0x4E39, + 0x9250: 0x5358, + 0x9251: 0x5606, + 0x9252: 0x5766, + 0x9253: 0x62C5, + 0x9254: 0x63A2, + 0x9255: 0x65E6, + 0x9256: 0x6B4E, + 0x9257: 0x6DE1, + 0x9258: 0x6E5B, + 0x9259: 0x70AD, + 0x925A: 0x77ED, + 0x925B: 0x7AEF, + 0x925C: 0x7BAA, + 0x925D: 0x7DBB, + 0x925E: 0x803D, + 0x925F: 0x80C6, + 0x9260: 0x86CB, + 0x9261: 0x8A95, + 0x9262: 0x935B, + 0x9263: 0x56E3, + 0x9264: 0x58C7, + 0x9265: 0x5F3E, + 0x9266: 0x65AD, + 0x9267: 0x6696, + 0x9268: 0x6A80, + 0x9269: 0x6BB5, + 0x926A: 0x7537, + 0x926B: 0x8AC7, + 0x926C: 0x5024, + 0x926D: 0x77E5, + 0x926E: 0x5730, + 0x926F: 0x5F1B, + 0x9270: 0x6065, + 0x9271: 0x667A, + 0x9272: 0x6C60, + 0x9273: 0x75F4, + 0x9274: 0x7A1A, + 0x9275: 0x7F6E, + 0x9276: 0x81F4, + 0x9277: 0x8718, + 0x9278: 0x9045, + 0x9279: 0x99B3, + 0x927A: 0x7BC9, + 0x927B: 0x755C, + 0x927C: 0x7AF9, + 0x927D: 0x7B51, + 0x927E: 0x84C4, + 0x9280: 0x9010, + 0x9281: 0x79E9, + 0x9282: 0x7A92, + 0x9283: 0x8336, + 0x9284: 0x5AE1, + 0x9285: 0x7740, + 0x9286: 0x4E2D, + 0x9287: 0x4EF2, + 0x9288: 0x5B99, + 0x9289: 0x5FE0, + 0x928A: 0x62BD, + 0x928B: 0x663C, + 0x928C: 0x67F1, + 0x928D: 0x6CE8, + 0x928E: 0x866B, + 0x928F: 0x8877, + 0x9290: 0x8A3B, + 0x9291: 0x914E, + 0x9292: 0x92F3, + 0x9293: 0x99D0, + 0x9294: 0x6A17, + 0x9295: 0x7026, + 0x9296: 0x732A, + 0x9297: 0x82E7, + 0x9298: 0x8457, + 0x9299: 0x8CAF, + 0x929A: 0x4E01, + 0x929B: 0x5146, + 0x929C: 0x51CB, + 0x929D: 0x558B, + 0x929E: 0x5BF5, + 0x929F: 0x5E16, + 0x92A0: 0x5E33, + 0x92A1: 0x5E81, + 0x92A2: 0x5F14, + 0x92A3: 0x5F35, + 0x92A4: 0x5F6B, + 0x92A5: 0x5FB4, + 0x92A6: 0x61F2, + 0x92A7: 0x6311, + 0x92A8: 0x66A2, + 0x92A9: 0x671D, + 0x92AA: 0x6F6E, + 0x92AB: 0x7252, + 0x92AC: 0x753A, + 0x92AD: 0x773A, + 0x92AE: 0x8074, + 0x92AF: 0x8139, + 0x92B0: 0x8178, + 0x92B1: 0x8776, + 0x92B2: 0x8ABF, + 0x92B3: 0x8ADC, + 0x92B4: 0x8D85, + 0x92B5: 0x8DF3, + 0x92B6: 0x929A, + 0x92B7: 0x9577, + 0x92B8: 0x9802, + 0x92B9: 0x9CE5, + 0x92BA: 0x52C5, + 0x92BB: 0x6357, + 0x92BC: 0x76F4, + 0x92BD: 0x6715, + 0x92BE: 0x6C88, + 0x92BF: 0x73CD, + 0x92C0: 0x8CC3, + 0x92C1: 0x93AE, + 0x92C2: 0x9673, + 0x92C3: 0x6D25, + 0x92C4: 0x589C, + 0x92C5: 0x690E, + 0x92C6: 0x69CC, + 0x92C7: 0x8FFD, + 0x92C8: 0x939A, + 0x92C9: 0x75DB, + 0x92CA: 0x901A, + 0x92CB: 0x585A, + 0x92CC: 0x6802, + 0x92CD: 0x63B4, + 0x92CE: 0x69FB, + 0x92CF: 0x4F43, + 0x92D0: 0x6F2C, + 0x92D1: 0x67D8, + 0x92D2: 0x8FBB, + 0x92D3: 0x8526, + 0x92D4: 0x7DB4, + 0x92D5: 0x9354, + 0x92D6: 0x693F, + 0x92D7: 0x6F70, + 0x92D8: 0x576A, + 0x92D9: 0x58F7, + 0x92DA: 0x5B2C, + 0x92DB: 0x7D2C, + 0x92DC: 0x722A, + 0x92DD: 0x540A, + 0x92DE: 0x91E3, + 0x92DF: 0x9DB4, + 0x92E0: 0x4EAD, + 0x92E1: 0x4F4E, + 0x92E2: 0x505C, + 0x92E3: 0x5075, + 0x92E4: 0x5243, + 0x92E5: 0x8C9E, + 0x92E6: 0x5448, + 0x92E7: 0x5824, + 0x92E8: 0x5B9A, + 0x92E9: 0x5E1D, + 0x92EA: 0x5E95, + 0x92EB: 0x5EAD, + 0x92EC: 0x5EF7, + 0x92ED: 0x5F1F, + 0x92EE: 0x608C, + 0x92EF: 0x62B5, + 0x92F0: 0x633A, + 0x92F1: 0x63D0, + 0x92F2: 0x68AF, + 0x92F3: 0x6C40, + 0x92F4: 0x7887, + 0x92F5: 0x798E, + 0x92F6: 0x7A0B, + 0x92F7: 0x7DE0, + 0x92F8: 0x8247, + 0x92F9: 0x8A02, + 0x92FA: 0x8AE6, + 0x92FB: 0x8E44, + 0x92FC: 0x9013, + 0x9340: 0x90B8, + 0x9341: 0x912D, + 0x9342: 0x91D8, + 0x9343: 0x9F0E, + 0x9344: 0x6CE5, + 0x9345: 0x6458, + 0x9346: 0x64E2, + 0x9347: 0x6575, + 0x9348: 0x6EF4, + 0x9349: 0x7684, + 0x934A: 0x7B1B, + 0x934B: 0x9069, + 0x934C: 0x93D1, + 0x934D: 0x6EBA, + 0x934E: 0x54F2, + 0x934F: 0x5FB9, + 0x9350: 0x64A4, + 0x9351: 0x8F4D, + 0x9352: 0x8FED, + 0x9353: 0x9244, + 0x9354: 0x5178, + 0x9355: 0x586B, + 0x9356: 0x5929, + 0x9357: 0x5C55, + 0x9358: 0x5E97, + 0x9359: 0x6DFB, + 0x935A: 0x7E8F, + 0x935B: 0x751C, + 0x935C: 0x8CBC, + 0x935D: 0x8EE2, + 0x935E: 0x985B, + 0x935F: 0x70B9, + 0x9360: 0x4F1D, + 0x9361: 0x6BBF, + 0x9362: 0x6FB1, + 0x9363: 0x7530, + 0x9364: 0x96FB, + 0x9365: 0x514E, + 0x9366: 0x5410, + 0x9367: 0x5835, + 0x9368: 0x5857, + 0x9369: 0x59AC, + 0x936A: 0x5C60, + 0x936B: 0x5F92, + 0x936C: 0x6597, + 0x936D: 0x675C, + 0x936E: 0x6E21, + 0x936F: 0x767B, + 0x9370: 0x83DF, + 0x9371: 0x8CED, + 0x9372: 0x9014, + 0x9373: 0x90FD, + 0x9374: 0x934D, + 0x9375: 0x7825, + 0x9376: 0x783A, + 0x9377: 0x52AA, + 0x9378: 0x5EA6, + 0x9379: 0x571F, + 0x937A: 0x5974, + 0x937B: 0x6012, + 0x937C: 0x5012, + 0x937D: 0x515A, + 0x937E: 0x51AC, + 0x9380: 0x51CD, + 0x9381: 0x5200, + 0x9382: 0x5510, + 0x9383: 0x5854, + 0x9384: 0x5858, + 0x9385: 0x5957, + 0x9386: 0x5B95, + 0x9387: 0x5CF6, + 0x9388: 0x5D8B, + 0x9389: 0x60BC, + 0x938A: 0x6295, + 0x938B: 0x642D, + 0x938C: 0x6771, + 0x938D: 0x6843, + 0x938E: 0x68BC, + 0x938F: 0x68DF, + 0x9390: 0x76D7, + 0x9391: 0x6DD8, + 0x9392: 0x6E6F, + 0x9393: 0x6D9B, + 0x9394: 0x706F, + 0x9395: 0x71C8, + 0x9396: 0x5F53, + 0x9397: 0x75D8, + 0x9398: 0x7977, + 0x9399: 0x7B49, + 0x939A: 0x7B54, + 0x939B: 0x7B52, + 0x939C: 0x7CD6, + 0x939D: 0x7D71, + 0x939E: 0x5230, + 0x939F: 0x8463, + 0x93A0: 0x8569, + 0x93A1: 0x85E4, + 0x93A2: 0x8A0E, + 0x93A3: 0x8B04, + 0x93A4: 0x8C46, + 0x93A5: 0x8E0F, + 0x93A6: 0x9003, + 0x93A7: 0x900F, + 0x93A8: 0x9419, + 0x93A9: 0x9676, + 0x93AA: 0x982D, + 0x93AB: 0x9A30, + 0x93AC: 0x95D8, + 0x93AD: 0x50CD, + 0x93AE: 0x52D5, + 0x93AF: 0x540C, + 0x93B0: 0x5802, + 0x93B1: 0x5C0E, + 0x93B2: 0x61A7, + 0x93B3: 0x649E, + 0x93B4: 0x6D1E, + 0x93B5: 0x77B3, + 0x93B6: 0x7AE5, + 0x93B7: 0x80F4, + 0x93B8: 0x8404, + 0x93B9: 0x9053, + 0x93BA: 0x9285, + 0x93BB: 0x5CE0, + 0x93BC: 0x9D07, + 0x93BD: 0x533F, + 0x93BE: 0x5F97, + 0x93BF: 0x5FB3, + 0x93C0: 0x6D9C, + 0x93C1: 0x7279, + 0x93C2: 0x7763, + 0x93C3: 0x79BF, + 0x93C4: 0x7BE4, + 0x93C5: 0x6BD2, + 0x93C6: 0x72EC, + 0x93C7: 0x8AAD, + 0x93C8: 0x6803, + 0x93C9: 0x6A61, + 0x93CA: 0x51F8, + 0x93CB: 0x7A81, + 0x93CC: 0x6934, + 0x93CD: 0x5C4A, + 0x93CE: 0x9CF6, + 0x93CF: 0x82EB, + 0x93D0: 0x5BC5, + 0x93D1: 0x9149, + 0x93D2: 0x701E, + 0x93D3: 0x5678, + 0x93D4: 0x5C6F, + 0x93D5: 0x60C7, + 0x93D6: 0x6566, + 0x93D7: 0x6C8C, + 0x93D8: 0x8C5A, + 0x93D9: 0x9041, + 0x93DA: 0x9813, + 0x93DB: 0x5451, + 0x93DC: 0x66C7, + 0x93DD: 0x920D, + 0x93DE: 0x5948, + 0x93DF: 0x90A3, + 0x93E0: 0x5185, + 0x93E1: 0x4E4D, + 0x93E2: 0x51EA, + 0x93E3: 0x8599, + 0x93E4: 0x8B0E, + 0x93E5: 0x7058, + 0x93E6: 0x637A, + 0x93E7: 0x934B, + 0x93E8: 0x6962, + 0x93E9: 0x99B4, + 0x93EA: 0x7E04, + 0x93EB: 0x7577, + 0x93EC: 0x5357, + 0x93ED: 0x6960, + 0x93EE: 0x8EDF, + 0x93EF: 0x96E3, + 0x93F0: 0x6C5D, + 0x93F1: 0x4E8C, + 0x93F2: 0x5C3C, + 0x93F3: 0x5F10, + 0x93F4: 0x8FE9, + 0x93F5: 0x5302, + 0x93F6: 0x8CD1, + 0x93F7: 0x8089, + 0x93F8: 0x8679, + 0x93F9: 0x5EFF, + 0x93FA: 0x65E5, + 0x93FB: 0x4E73, + 0x93FC: 0x5165, + 0x9440: 0x5982, + 0x9441: 0x5C3F, + 0x9442: 0x97EE, + 0x9443: 0x4EFB, + 0x9444: 0x598A, + 0x9445: 0x5FCD, + 0x9446: 0x8A8D, + 0x9447: 0x6FE1, + 0x9448: 0x79B0, + 0x9449: 0x7962, + 0x944A: 0x5BE7, + 0x944B: 0x8471, + 0x944C: 0x732B, + 0x944D: 0x71B1, + 0x944E: 0x5E74, + 0x944F: 0x5FF5, + 0x9450: 0x637B, + 0x9451: 0x649A, + 0x9452: 0x71C3, + 0x9453: 0x7C98, + 0x9454: 0x4E43, + 0x9455: 0x5EFC, + 0x9456: 0x4E4B, + 0x9457: 0x57DC, + 0x9458: 0x56A2, + 0x9459: 0x60A9, + 0x945A: 0x6FC3, + 0x945B: 0x7D0D, + 0x945C: 0x80FD, + 0x945D: 0x8133, + 0x945E: 0x81BF, + 0x945F: 0x8FB2, + 0x9460: 0x8997, + 0x9461: 0x86A4, + 0x9462: 0x5DF4, + 0x9463: 0x628A, + 0x9464: 0x64AD, + 0x9465: 0x8987, + 0x9466: 0x6777, + 0x9467: 0x6CE2, + 0x9468: 0x6D3E, + 0x9469: 0x7436, + 0x946A: 0x7834, + 0x946B: 0x5A46, + 0x946C: 0x7F75, + 0x946D: 0x82AD, + 0x946E: 0x99AC, + 0x946F: 0x4FF3, + 0x9470: 0x5EC3, + 0x9471: 0x62DD, + 0x9472: 0x6392, + 0x9473: 0x6557, + 0x9474: 0x676F, + 0x9475: 0x76C3, + 0x9476: 0x724C, + 0x9477: 0x80CC, + 0x9478: 0x80BA, + 0x9479: 0x8F29, + 0x947A: 0x914D, + 0x947B: 0x500D, + 0x947C: 0x57F9, + 0x947D: 0x5A92, + 0x947E: 0x6885, + 0x9480: 0x6973, + 0x9481: 0x7164, + 0x9482: 0x72FD, + 0x9483: 0x8CB7, + 0x9484: 0x58F2, + 0x9485: 0x8CE0, + 0x9486: 0x966A, + 0x9487: 0x9019, + 0x9488: 0x877F, + 0x9489: 0x79E4, + 0x948A: 0x77E7, + 0x948B: 0x8429, + 0x948C: 0x4F2F, + 0x948D: 0x5265, + 0x948E: 0x535A, + 0x948F: 0x62CD, + 0x9490: 0x67CF, + 0x9491: 0x6CCA, + 0x9492: 0x767D, + 0x9493: 0x7B94, + 0x9494: 0x7C95, + 0x9495: 0x8236, + 0x9496: 0x8584, + 0x9497: 0x8FEB, + 0x9498: 0x66DD, + 0x9499: 0x6F20, + 0x949A: 0x7206, + 0x949B: 0x7E1B, + 0x949C: 0x83AB, + 0x949D: 0x99C1, + 0x949E: 0x9EA6, + 0x949F: 0x51FD, + 0x94A0: 0x7BB1, + 0x94A1: 0x7872, + 0x94A2: 0x7BB8, + 0x94A3: 0x8087, + 0x94A4: 0x7B48, + 0x94A5: 0x6AE8, + 0x94A6: 0x5E61, + 0x94A7: 0x808C, + 0x94A8: 0x7551, + 0x94A9: 0x7560, + 0x94AA: 0x516B, + 0x94AB: 0x9262, + 0x94AC: 0x6E8C, + 0x94AD: 0x767A, + 0x94AE: 0x9197, + 0x94AF: 0x9AEA, + 0x94B0: 0x4F10, + 0x94B1: 0x7F70, + 0x94B2: 0x629C, + 0x94B3: 0x7B4F, + 0x94B4: 0x95A5, + 0x94B5: 0x9CE9, + 0x94B6: 0x567A, + 0x94B7: 0x5859, + 0x94B8: 0x86E4, + 0x94B9: 0x96BC, + 0x94BA: 0x4F34, + 0x94BB: 0x5224, + 0x94BC: 0x534A, + 0x94BD: 0x53CD, + 0x94BE: 0x53DB, + 0x94BF: 0x5E06, + 0x94C0: 0x642C, + 0x94C1: 0x6591, + 0x94C2: 0x677F, + 0x94C3: 0x6C3E, + 0x94C4: 0x6C4E, + 0x94C5: 0x7248, + 0x94C6: 0x72AF, + 0x94C7: 0x73ED, + 0x94C8: 0x7554, + 0x94C9: 0x7E41, + 0x94CA: 0x822C, + 0x94CB: 0x85E9, + 0x94CC: 0x8CA9, + 0x94CD: 0x7BC4, + 0x94CE: 0x91C6, + 0x94CF: 0x7169, + 0x94D0: 0x9812, + 0x94D1: 0x98EF, + 0x94D2: 0x633D, + 0x94D3: 0x6669, + 0x94D4: 0x756A, + 0x94D5: 0x76E4, + 0x94D6: 0x78D0, + 0x94D7: 0x8543, + 0x94D8: 0x86EE, + 0x94D9: 0x532A, + 0x94DA: 0x5351, + 0x94DB: 0x5426, + 0x94DC: 0x5983, + 0x94DD: 0x5E87, + 0x94DE: 0x5F7C, + 0x94DF: 0x60B2, + 0x94E0: 0x6249, + 0x94E1: 0x6279, + 0x94E2: 0x62AB, + 0x94E3: 0x6590, + 0x94E4: 0x6BD4, + 0x94E5: 0x6CCC, + 0x94E6: 0x75B2, + 0x94E7: 0x76AE, + 0x94E8: 0x7891, + 0x94E9: 0x79D8, + 0x94EA: 0x7DCB, + 0x94EB: 0x7F77, + 0x94EC: 0x80A5, + 0x94ED: 0x88AB, + 0x94EE: 0x8AB9, + 0x94EF: 0x8CBB, + 0x94F0: 0x907F, + 0x94F1: 0x975E, + 0x94F2: 0x98DB, + 0x94F3: 0x6A0B, + 0x94F4: 0x7C38, + 0x94F5: 0x5099, + 0x94F6: 0x5C3E, + 0x94F7: 0x5FAE, + 0x94F8: 0x6787, + 0x94F9: 0x6BD8, + 0x94FA: 0x7435, + 0x94FB: 0x7709, + 0x94FC: 0x7F8E, + 0x9540: 0x9F3B, + 0x9541: 0x67CA, + 0x9542: 0x7A17, + 0x9543: 0x5339, + 0x9544: 0x758B, + 0x9545: 0x9AED, + 0x9546: 0x5F66, + 0x9547: 0x819D, + 0x9548: 0x83F1, + 0x9549: 0x8098, + 0x954A: 0x5F3C, + 0x954B: 0x5FC5, + 0x954C: 0x7562, + 0x954D: 0x7B46, + 0x954E: 0x903C, + 0x954F: 0x6867, + 0x9550: 0x59EB, + 0x9551: 0x5A9B, + 0x9552: 0x7D10, + 0x9553: 0x767E, + 0x9554: 0x8B2C, + 0x9555: 0x4FF5, + 0x9556: 0x5F6A, + 0x9557: 0x6A19, + 0x9558: 0x6C37, + 0x9559: 0x6F02, + 0x955A: 0x74E2, + 0x955B: 0x7968, + 0x955C: 0x8868, + 0x955D: 0x8A55, + 0x955E: 0x8C79, + 0x955F: 0x5EDF, + 0x9560: 0x63CF, + 0x9561: 0x75C5, + 0x9562: 0x79D2, + 0x9563: 0x82D7, + 0x9564: 0x9328, + 0x9565: 0x92F2, + 0x9566: 0x849C, + 0x9567: 0x86ED, + 0x9568: 0x9C2D, + 0x9569: 0x54C1, + 0x956A: 0x5F6C, + 0x956B: 0x658C, + 0x956C: 0x6D5C, + 0x956D: 0x7015, + 0x956E: 0x8CA7, + 0x956F: 0x8CD3, + 0x9570: 0x983B, + 0x9571: 0x654F, + 0x9572: 0x74F6, + 0x9573: 0x4E0D, + 0x9574: 0x4ED8, + 0x9575: 0x57E0, + 0x9576: 0x592B, + 0x9577: 0x5A66, + 0x9578: 0x5BCC, + 0x9579: 0x51A8, + 0x957A: 0x5E03, + 0x957B: 0x5E9C, + 0x957C: 0x6016, + 0x957D: 0x6276, + 0x957E: 0x6577, + 0x9580: 0x65A7, + 0x9581: 0x666E, + 0x9582: 0x6D6E, + 0x9583: 0x7236, + 0x9584: 0x7B26, + 0x9585: 0x8150, + 0x9586: 0x819A, + 0x9587: 0x8299, + 0x9588: 0x8B5C, + 0x9589: 0x8CA0, + 0x958A: 0x8CE6, + 0x958B: 0x8D74, + 0x958C: 0x961C, + 0x958D: 0x9644, + 0x958E: 0x4FAE, + 0x958F: 0x64AB, + 0x9590: 0x6B66, + 0x9591: 0x821E, + 0x9592: 0x8461, + 0x9593: 0x856A, + 0x9594: 0x90E8, + 0x9595: 0x5C01, + 0x9596: 0x6953, + 0x9597: 0x98A8, + 0x9598: 0x847A, + 0x9599: 0x8557, + 0x959A: 0x4F0F, + 0x959B: 0x526F, + 0x959C: 0x5FA9, + 0x959D: 0x5E45, + 0x959E: 0x670D, + 0x959F: 0x798F, + 0x95A0: 0x8179, + 0x95A1: 0x8907, + 0x95A2: 0x8986, + 0x95A3: 0x6DF5, + 0x95A4: 0x5F17, + 0x95A5: 0x6255, + 0x95A6: 0x6CB8, + 0x95A7: 0x4ECF, + 0x95A8: 0x7269, + 0x95A9: 0x9B92, + 0x95AA: 0x5206, + 0x95AB: 0x543B, + 0x95AC: 0x5674, + 0x95AD: 0x58B3, + 0x95AE: 0x61A4, + 0x95AF: 0x626E, + 0x95B0: 0x711A, + 0x95B1: 0x596E, + 0x95B2: 0x7C89, + 0x95B3: 0x7CDE, + 0x95B4: 0x7D1B, + 0x95B5: 0x96F0, + 0x95B6: 0x6587, + 0x95B7: 0x805E, + 0x95B8: 0x4E19, + 0x95B9: 0x4F75, + 0x95BA: 0x5175, + 0x95BB: 0x5840, + 0x95BC: 0x5E63, + 0x95BD: 0x5E73, + 0x95BE: 0x5F0A, + 0x95BF: 0x67C4, + 0x95C0: 0x4E26, + 0x95C1: 0x853D, + 0x95C2: 0x9589, + 0x95C3: 0x965B, + 0x95C4: 0x7C73, + 0x95C5: 0x9801, + 0x95C6: 0x50FB, + 0x95C7: 0x58C1, + 0x95C8: 0x7656, + 0x95C9: 0x78A7, + 0x95CA: 0x5225, + 0x95CB: 0x77A5, + 0x95CC: 0x8511, + 0x95CD: 0x7B86, + 0x95CE: 0x504F, + 0x95CF: 0x5909, + 0x95D0: 0x7247, + 0x95D1: 0x7BC7, + 0x95D2: 0x7DE8, + 0x95D3: 0x8FBA, + 0x95D4: 0x8FD4, + 0x95D5: 0x904D, + 0x95D6: 0x4FBF, + 0x95D7: 0x52C9, + 0x95D8: 0x5A29, + 0x95D9: 0x5F01, + 0x95DA: 0x97AD, + 0x95DB: 0x4FDD, + 0x95DC: 0x8217, + 0x95DD: 0x92EA, + 0x95DE: 0x5703, + 0x95DF: 0x6355, + 0x95E0: 0x6B69, + 0x95E1: 0x752B, + 0x95E2: 0x88DC, + 0x95E3: 0x8F14, + 0x95E4: 0x7A42, + 0x95E5: 0x52DF, + 0x95E6: 0x5893, + 0x95E7: 0x6155, + 0x95E8: 0x620A, + 0x95E9: 0x66AE, + 0x95EA: 0x6BCD, + 0x95EB: 0x7C3F, + 0x95EC: 0x83E9, + 0x95ED: 0x5023, + 0x95EE: 0x4FF8, + 0x95EF: 0x5305, + 0x95F0: 0x5446, + 0x95F1: 0x5831, + 0x95F2: 0x5949, + 0x95F3: 0x5B9D, + 0x95F4: 0x5CF0, + 0x95F5: 0x5CEF, + 0x95F6: 0x5D29, + 0x95F7: 0x5E96, + 0x95F8: 0x62B1, + 0x95F9: 0x6367, + 0x95FA: 0x653E, + 0x95FB: 0x65B9, + 0x95FC: 0x670B, + 0x9640: 0x6CD5, + 0x9641: 0x6CE1, + 0x9642: 0x70F9, + 0x9643: 0x7832, + 0x9644: 0x7E2B, + 0x9645: 0x80DE, + 0x9646: 0x82B3, + 0x9647: 0x840C, + 0x9648: 0x84EC, + 0x9649: 0x8702, + 0x964A: 0x8912, + 0x964B: 0x8A2A, + 0x964C: 0x8C4A, + 0x964D: 0x90A6, + 0x964E: 0x92D2, + 0x964F: 0x98FD, + 0x9650: 0x9CF3, + 0x9651: 0x9D6C, + 0x9652: 0x4E4F, + 0x9653: 0x4EA1, + 0x9654: 0x508D, + 0x9655: 0x5256, + 0x9656: 0x574A, + 0x9657: 0x59A8, + 0x9658: 0x5E3D, + 0x9659: 0x5FD8, + 0x965A: 0x5FD9, + 0x965B: 0x623F, + 0x965C: 0x66B4, + 0x965D: 0x671B, + 0x965E: 0x67D0, + 0x965F: 0x68D2, + 0x9660: 0x5192, + 0x9661: 0x7D21, + 0x9662: 0x80AA, + 0x9663: 0x81A8, + 0x9664: 0x8B00, + 0x9665: 0x8C8C, + 0x9666: 0x8CBF, + 0x9667: 0x927E, + 0x9668: 0x9632, + 0x9669: 0x5420, + 0x966A: 0x982C, + 0x966B: 0x5317, + 0x966C: 0x50D5, + 0x966D: 0x535C, + 0x966E: 0x58A8, + 0x966F: 0x64B2, + 0x9670: 0x6734, + 0x9671: 0x7267, + 0x9672: 0x7766, + 0x9673: 0x7A46, + 0x9674: 0x91E6, + 0x9675: 0x52C3, + 0x9676: 0x6CA1, + 0x9677: 0x6B86, + 0x9678: 0x5800, + 0x9679: 0x5E4C, + 0x967A: 0x5954, + 0x967B: 0x672C, + 0x967C: 0x7FFB, + 0x967D: 0x51E1, + 0x967E: 0x76C6, + 0x9680: 0x6469, + 0x9681: 0x78E8, + 0x9682: 0x9B54, + 0x9683: 0x9EBB, + 0x9684: 0x57CB, + 0x9685: 0x59B9, + 0x9686: 0x6627, + 0x9687: 0x679A, + 0x9688: 0x6BCE, + 0x9689: 0x54E9, + 0x968A: 0x69D9, + 0x968B: 0x5E55, + 0x968C: 0x819C, + 0x968D: 0x6795, + 0x968E: 0x9BAA, + 0x968F: 0x67FE, + 0x9690: 0x9C52, + 0x9691: 0x685D, + 0x9692: 0x4EA6, + 0x9693: 0x4FE3, + 0x9694: 0x53C8, + 0x9695: 0x62B9, + 0x9696: 0x672B, + 0x9697: 0x6CAB, + 0x9698: 0x8FC4, + 0x9699: 0x4FAD, + 0x969A: 0x7E6D, + 0x969B: 0x9EBF, + 0x969C: 0x4E07, + 0x969D: 0x6162, + 0x969E: 0x6E80, + 0x969F: 0x6F2B, + 0x96A0: 0x8513, + 0x96A1: 0x5473, + 0x96A2: 0x672A, + 0x96A3: 0x9B45, + 0x96A4: 0x5DF3, + 0x96A5: 0x7B95, + 0x96A6: 0x5CAC, + 0x96A7: 0x5BC6, + 0x96A8: 0x871C, + 0x96A9: 0x6E4A, + 0x96AA: 0x84D1, + 0x96AB: 0x7A14, + 0x96AC: 0x8108, + 0x96AD: 0x5999, + 0x96AE: 0x7C8D, + 0x96AF: 0x6C11, + 0x96B0: 0x7720, + 0x96B1: 0x52D9, + 0x96B2: 0x5922, + 0x96B3: 0x7121, + 0x96B4: 0x725F, + 0x96B5: 0x77DB, + 0x96B6: 0x9727, + 0x96B7: 0x9D61, + 0x96B8: 0x690B, + 0x96B9: 0x5A7F, + 0x96BA: 0x5A18, + 0x96BB: 0x51A5, + 0x96BC: 0x540D, + 0x96BD: 0x547D, + 0x96BE: 0x660E, + 0x96BF: 0x76DF, + 0x96C0: 0x8FF7, + 0x96C1: 0x9298, + 0x96C2: 0x9CF4, + 0x96C3: 0x59EA, + 0x96C4: 0x725D, + 0x96C5: 0x6EC5, + 0x96C6: 0x514D, + 0x96C7: 0x68C9, + 0x96C8: 0x7DBF, + 0x96C9: 0x7DEC, + 0x96CA: 0x9762, + 0x96CB: 0x9EBA, + 0x96CC: 0x6478, + 0x96CD: 0x6A21, + 0x96CE: 0x8302, + 0x96CF: 0x5984, + 0x96D0: 0x5B5F, + 0x96D1: 0x6BDB, + 0x96D2: 0x731B, + 0x96D3: 0x76F2, + 0x96D4: 0x7DB2, + 0x96D5: 0x8017, + 0x96D6: 0x8499, + 0x96D7: 0x5132, + 0x96D8: 0x6728, + 0x96D9: 0x9ED9, + 0x96DA: 0x76EE, + 0x96DB: 0x6762, + 0x96DC: 0x52FF, + 0x96DD: 0x9905, + 0x96DE: 0x5C24, + 0x96DF: 0x623B, + 0x96E0: 0x7C7E, + 0x96E1: 0x8CB0, + 0x96E2: 0x554F, + 0x96E3: 0x60B6, + 0x96E4: 0x7D0B, + 0x96E5: 0x9580, + 0x96E6: 0x5301, + 0x96E7: 0x4E5F, + 0x96E8: 0x51B6, + 0x96E9: 0x591C, + 0x96EA: 0x723A, + 0x96EB: 0x8036, + 0x96EC: 0x91CE, + 0x96ED: 0x5F25, + 0x96EE: 0x77E2, + 0x96EF: 0x5384, + 0x96F0: 0x5F79, + 0x96F1: 0x7D04, + 0x96F2: 0x85AC, + 0x96F3: 0x8A33, + 0x96F4: 0x8E8D, + 0x96F5: 0x9756, + 0x96F6: 0x67F3, + 0x96F7: 0x85AE, + 0x96F8: 0x9453, + 0x96F9: 0x6109, + 0x96FA: 0x6108, + 0x96FB: 0x6CB9, + 0x96FC: 0x7652, + 0x9740: 0x8AED, + 0x9741: 0x8F38, + 0x9742: 0x552F, + 0x9743: 0x4F51, + 0x9744: 0x512A, + 0x9745: 0x52C7, + 0x9746: 0x53CB, + 0x9747: 0x5BA5, + 0x9748: 0x5E7D, + 0x9749: 0x60A0, + 0x974A: 0x6182, + 0x974B: 0x63D6, + 0x974C: 0x6709, + 0x974D: 0x67DA, + 0x974E: 0x6E67, + 0x974F: 0x6D8C, + 0x9750: 0x7336, + 0x9751: 0x7337, + 0x9752: 0x7531, + 0x9753: 0x7950, + 0x9754: 0x88D5, + 0x9755: 0x8A98, + 0x9756: 0x904A, + 0x9757: 0x9091, + 0x9758: 0x90F5, + 0x9759: 0x96C4, + 0x975A: 0x878D, + 0x975B: 0x5915, + 0x975C: 0x4E88, + 0x975D: 0x4F59, + 0x975E: 0x4E0E, + 0x975F: 0x8A89, + 0x9760: 0x8F3F, + 0x9761: 0x9810, + 0x9762: 0x50AD, + 0x9763: 0x5E7C, + 0x9764: 0x5996, + 0x9765: 0x5BB9, + 0x9766: 0x5EB8, + 0x9767: 0x63DA, + 0x9768: 0x63FA, + 0x9769: 0x64C1, + 0x976A: 0x66DC, + 0x976B: 0x694A, + 0x976C: 0x69D8, + 0x976D: 0x6D0B, + 0x976E: 0x6EB6, + 0x976F: 0x7194, + 0x9770: 0x7528, + 0x9771: 0x7AAF, + 0x9772: 0x7F8A, + 0x9773: 0x8000, + 0x9774: 0x8449, + 0x9775: 0x84C9, + 0x9776: 0x8981, + 0x9777: 0x8B21, + 0x9778: 0x8E0A, + 0x9779: 0x9065, + 0x977A: 0x967D, + 0x977B: 0x990A, + 0x977C: 0x617E, + 0x977D: 0x6291, + 0x977E: 0x6B32, + 0x9780: 0x6C83, + 0x9781: 0x6D74, + 0x9782: 0x7FCC, + 0x9783: 0x7FFC, + 0x9784: 0x6DC0, + 0x9785: 0x7F85, + 0x9786: 0x87BA, + 0x9787: 0x88F8, + 0x9788: 0x6765, + 0x9789: 0x83B1, + 0x978A: 0x983C, + 0x978B: 0x96F7, + 0x978C: 0x6D1B, + 0x978D: 0x7D61, + 0x978E: 0x843D, + 0x978F: 0x916A, + 0x9790: 0x4E71, + 0x9791: 0x5375, + 0x9792: 0x5D50, + 0x9793: 0x6B04, + 0x9794: 0x6FEB, + 0x9795: 0x85CD, + 0x9796: 0x862D, + 0x9797: 0x89A7, + 0x9798: 0x5229, + 0x9799: 0x540F, + 0x979A: 0x5C65, + 0x979B: 0x674E, + 0x979C: 0x68A8, + 0x979D: 0x7406, + 0x979E: 0x7483, + 0x979F: 0x75E2, + 0x97A0: 0x88CF, + 0x97A1: 0x88E1, + 0x97A2: 0x91CC, + 0x97A3: 0x96E2, + 0x97A4: 0x9678, + 0x97A5: 0x5F8B, + 0x97A6: 0x7387, + 0x97A7: 0x7ACB, + 0x97A8: 0x844E, + 0x97A9: 0x63A0, + 0x97AA: 0x7565, + 0x97AB: 0x5289, + 0x97AC: 0x6D41, + 0x97AD: 0x6E9C, + 0x97AE: 0x7409, + 0x97AF: 0x7559, + 0x97B0: 0x786B, + 0x97B1: 0x7C92, + 0x97B2: 0x9686, + 0x97B3: 0x7ADC, + 0x97B4: 0x9F8D, + 0x97B5: 0x4FB6, + 0x97B6: 0x616E, + 0x97B7: 0x65C5, + 0x97B8: 0x865C, + 0x97B9: 0x4E86, + 0x97BA: 0x4EAE, + 0x97BB: 0x50DA, + 0x97BC: 0x4E21, + 0x97BD: 0x51CC, + 0x97BE: 0x5BEE, + 0x97BF: 0x6599, + 0x97C0: 0x6881, + 0x97C1: 0x6DBC, + 0x97C2: 0x731F, + 0x97C3: 0x7642, + 0x97C4: 0x77AD, + 0x97C5: 0x7A1C, + 0x97C6: 0x7CE7, + 0x97C7: 0x826F, + 0x97C8: 0x8AD2, + 0x97C9: 0x907C, + 0x97CA: 0x91CF, + 0x97CB: 0x9675, + 0x97CC: 0x9818, + 0x97CD: 0x529B, + 0x97CE: 0x7DD1, + 0x97CF: 0x502B, + 0x97D0: 0x5398, + 0x97D1: 0x6797, + 0x97D2: 0x6DCB, + 0x97D3: 0x71D0, + 0x97D4: 0x7433, + 0x97D5: 0x81E8, + 0x97D6: 0x8F2A, + 0x97D7: 0x96A3, + 0x97D8: 0x9C57, + 0x97D9: 0x9E9F, + 0x97DA: 0x7460, + 0x97DB: 0x5841, + 0x97DC: 0x6D99, + 0x97DD: 0x7D2F, + 0x97DE: 0x985E, + 0x97DF: 0x4EE4, + 0x97E0: 0x4F36, + 0x97E1: 0x4F8B, + 0x97E2: 0x51B7, + 0x97E3: 0x52B1, + 0x97E4: 0x5DBA, + 0x97E5: 0x601C, + 0x97E6: 0x73B2, + 0x97E7: 0x793C, + 0x97E8: 0x82D3, + 0x97E9: 0x9234, + 0x97EA: 0x96B7, + 0x97EB: 0x96F6, + 0x97EC: 0x970A, + 0x97ED: 0x9E97, + 0x97EE: 0x9F62, + 0x97EF: 0x66A6, + 0x97F0: 0x6B74, + 0x97F1: 0x5217, + 0x97F2: 0x52A3, + 0x97F3: 0x70C8, + 0x97F4: 0x88C2, + 0x97F5: 0x5EC9, + 0x97F6: 0x604B, + 0x97F7: 0x6190, + 0x97F8: 0x6F23, + 0x97F9: 0x7149, + 0x97FA: 0x7C3E, + 0x97FB: 0x7DF4, + 0x97FC: 0x806F, + 0x9840: 0x84EE, + 0x9841: 0x9023, + 0x9842: 0x932C, + 0x9843: 0x5442, + 0x9844: 0x9B6F, + 0x9845: 0x6AD3, + 0x9846: 0x7089, + 0x9847: 0x8CC2, + 0x9848: 0x8DEF, + 0x9849: 0x9732, + 0x984A: 0x52B4, + 0x984B: 0x5A41, + 0x984C: 0x5ECA, + 0x984D: 0x5F04, + 0x984E: 0x6717, + 0x984F: 0x697C, + 0x9850: 0x6994, + 0x9851: 0x6D6A, + 0x9852: 0x6F0F, + 0x9853: 0x7262, + 0x9854: 0x72FC, + 0x9855: 0x7BED, + 0x9856: 0x8001, + 0x9857: 0x807E, + 0x9858: 0x874B, + 0x9859: 0x90CE, + 0x985A: 0x516D, + 0x985B: 0x9E93, + 0x985C: 0x7984, + 0x985D: 0x808B, + 0x985E: 0x9332, + 0x985F: 0x8AD6, + 0x9860: 0x502D, + 0x9861: 0x548C, + 0x9862: 0x8A71, + 0x9863: 0x6B6A, + 0x9864: 0x8CC4, + 0x9865: 0x8107, + 0x9866: 0x60D1, + 0x9867: 0x67A0, + 0x9868: 0x9DF2, + 0x9869: 0x4E99, + 0x986A: 0x4E98, + 0x986B: 0x9C10, + 0x986C: 0x8A6B, + 0x986D: 0x85C1, + 0x986E: 0x8568, + 0x986F: 0x6900, + 0x9870: 0x6E7E, + 0x9871: 0x7897, + 0x9872: 0x8155, + 0x989F: 0x5F0C, + 0x98A0: 0x4E10, + 0x98A1: 0x4E15, + 0x98A2: 0x4E2A, + 0x98A3: 0x4E31, + 0x98A4: 0x4E36, + 0x98A5: 0x4E3C, + 0x98A6: 0x4E3F, + 0x98A7: 0x4E42, + 0x98A8: 0x4E56, + 0x98A9: 0x4E58, + 0x98AA: 0x4E82, + 0x98AB: 0x4E85, + 0x98AC: 0x8C6B, + 0x98AD: 0x4E8A, + 0x98AE: 0x8212, + 0x98AF: 0x5F0D, + 0x98B0: 0x4E8E, + 0x98B1: 0x4E9E, + 0x98B2: 0x4E9F, + 0x98B3: 0x4EA0, + 0x98B4: 0x4EA2, + 0x98B5: 0x4EB0, + 0x98B6: 0x4EB3, + 0x98B7: 0x4EB6, + 0x98B8: 0x4ECE, + 0x98B9: 0x4ECD, + 0x98BA: 0x4EC4, + 0x98BB: 0x4EC6, + 0x98BC: 0x4EC2, + 0x98BD: 0x4ED7, + 0x98BE: 0x4EDE, + 0x98BF: 0x4EED, + 0x98C0: 0x4EDF, + 0x98C1: 0x4EF7, + 0x98C2: 0x4F09, + 0x98C3: 0x4F5A, + 0x98C4: 0x4F30, + 0x98C5: 0x4F5B, + 0x98C6: 0x4F5D, + 0x98C7: 0x4F57, + 0x98C8: 0x4F47, + 0x98C9: 0x4F76, + 0x98CA: 0x4F88, + 0x98CB: 0x4F8F, + 0x98CC: 0x4F98, + 0x98CD: 0x4F7B, + 0x98CE: 0x4F69, + 0x98CF: 0x4F70, + 0x98D0: 0x4F91, + 0x98D1: 0x4F6F, + 0x98D2: 0x4F86, + 0x98D3: 0x4F96, + 0x98D4: 0x5118, + 0x98D5: 0x4FD4, + 0x98D6: 0x4FDF, + 0x98D7: 0x4FCE, + 0x98D8: 0x4FD8, + 0x98D9: 0x4FDB, + 0x98DA: 0x4FD1, + 0x98DB: 0x4FDA, + 0x98DC: 0x4FD0, + 0x98DD: 0x4FE4, + 0x98DE: 0x4FE5, + 0x98DF: 0x501A, + 0x98E0: 0x5028, + 0x98E1: 0x5014, + 0x98E2: 0x502A, + 0x98E3: 0x5025, + 0x98E4: 0x5005, + 0x98E5: 0x4F1C, + 0x98E6: 0x4FF6, + 0x98E7: 0x5021, + 0x98E8: 0x5029, + 0x98E9: 0x502C, + 0x98EA: 0x4FFE, + 0x98EB: 0x4FEF, + 0x98EC: 0x5011, + 0x98ED: 0x5006, + 0x98EE: 0x5043, + 0x98EF: 0x5047, + 0x98F0: 0x6703, + 0x98F1: 0x5055, + 0x98F2: 0x5050, + 0x98F3: 0x5048, + 0x98F4: 0x505A, + 0x98F5: 0x5056, + 0x98F6: 0x506C, + 0x98F7: 0x5078, + 0x98F8: 0x5080, + 0x98F9: 0x509A, + 0x98FA: 0x5085, + 0x98FB: 0x50B4, + 0x98FC: 0x50B2, + 0x9940: 0x50C9, + 0x9941: 0x50CA, + 0x9942: 0x50B3, + 0x9943: 0x50C2, + 0x9944: 0x50D6, + 0x9945: 0x50DE, + 0x9946: 0x50E5, + 0x9947: 0x50ED, + 0x9948: 0x50E3, + 0x9949: 0x50EE, + 0x994A: 0x50F9, + 0x994B: 0x50F5, + 0x994C: 0x5109, + 0x994D: 0x5101, + 0x994E: 0x5102, + 0x994F: 0x5116, + 0x9950: 0x5115, + 0x9951: 0x5114, + 0x9952: 0x511A, + 0x9953: 0x5121, + 0x9954: 0x513A, + 0x9955: 0x5137, + 0x9956: 0x513C, + 0x9957: 0x513B, + 0x9958: 0x513F, + 0x9959: 0x5140, + 0x995A: 0x5152, + 0x995B: 0x514C, + 0x995C: 0x5154, + 0x995D: 0x5162, + 0x995E: 0x7AF8, + 0x995F: 0x5169, + 0x9960: 0x516A, + 0x9961: 0x516E, + 0x9962: 0x5180, + 0x9963: 0x5182, + 0x9964: 0x56D8, + 0x9965: 0x518C, + 0x9966: 0x5189, + 0x9967: 0x518F, + 0x9968: 0x5191, + 0x9969: 0x5193, + 0x996A: 0x5195, + 0x996B: 0x5196, + 0x996C: 0x51A4, + 0x996D: 0x51A6, + 0x996E: 0x51A2, + 0x996F: 0x51A9, + 0x9970: 0x51AA, + 0x9971: 0x51AB, + 0x9972: 0x51B3, + 0x9973: 0x51B1, + 0x9974: 0x51B2, + 0x9975: 0x51B0, + 0x9976: 0x51B5, + 0x9977: 0x51BD, + 0x9978: 0x51C5, + 0x9979: 0x51C9, + 0x997A: 0x51DB, + 0x997B: 0x51E0, + 0x997C: 0x8655, + 0x997D: 0x51E9, + 0x997E: 0x51ED, + 0x9980: 0x51F0, + 0x9981: 0x51F5, + 0x9982: 0x51FE, + 0x9983: 0x5204, + 0x9984: 0x520B, + 0x9985: 0x5214, + 0x9986: 0x520E, + 0x9987: 0x5227, + 0x9988: 0x522A, + 0x9989: 0x522E, + 0x998A: 0x5233, + 0x998B: 0x5239, + 0x998C: 0x524F, + 0x998D: 0x5244, + 0x998E: 0x524B, + 0x998F: 0x524C, + 0x9990: 0x525E, + 0x9991: 0x5254, + 0x9992: 0x526A, + 0x9993: 0x5274, + 0x9994: 0x5269, + 0x9995: 0x5273, + 0x9996: 0x527F, + 0x9997: 0x527D, + 0x9998: 0x528D, + 0x9999: 0x5294, + 0x999A: 0x5292, + 0x999B: 0x5271, + 0x999C: 0x5288, + 0x999D: 0x5291, + 0x999E: 0x8FA8, + 0x999F: 0x8FA7, + 0x99A0: 0x52AC, + 0x99A1: 0x52AD, + 0x99A2: 0x52BC, + 0x99A3: 0x52B5, + 0x99A4: 0x52C1, + 0x99A5: 0x52CD, + 0x99A6: 0x52D7, + 0x99A7: 0x52DE, + 0x99A8: 0x52E3, + 0x99A9: 0x52E6, + 0x99AA: 0x98ED, + 0x99AB: 0x52E0, + 0x99AC: 0x52F3, + 0x99AD: 0x52F5, + 0x99AE: 0x52F8, + 0x99AF: 0x52F9, + 0x99B0: 0x5306, + 0x99B1: 0x5308, + 0x99B2: 0x7538, + 0x99B3: 0x530D, + 0x99B4: 0x5310, + 0x99B5: 0x530F, + 0x99B6: 0x5315, + 0x99B7: 0x531A, + 0x99B8: 0x5323, + 0x99B9: 0x532F, + 0x99BA: 0x5331, + 0x99BB: 0x5333, + 0x99BC: 0x5338, + 0x99BD: 0x5340, + 0x99BE: 0x5346, + 0x99BF: 0x5345, + 0x99C0: 0x4E17, + 0x99C1: 0x5349, + 0x99C2: 0x534D, + 0x99C3: 0x51D6, + 0x99C4: 0x535E, + 0x99C5: 0x5369, + 0x99C6: 0x536E, + 0x99C7: 0x5918, + 0x99C8: 0x537B, + 0x99C9: 0x5377, + 0x99CA: 0x5382, + 0x99CB: 0x5396, + 0x99CC: 0x53A0, + 0x99CD: 0x53A6, + 0x99CE: 0x53A5, + 0x99CF: 0x53AE, + 0x99D0: 0x53B0, + 0x99D1: 0x53B6, + 0x99D2: 0x53C3, + 0x99D3: 0x7C12, + 0x99D4: 0x96D9, + 0x99D5: 0x53DF, + 0x99D6: 0x66FC, + 0x99D7: 0x71EE, + 0x99D8: 0x53EE, + 0x99D9: 0x53E8, + 0x99DA: 0x53ED, + 0x99DB: 0x53FA, + 0x99DC: 0x5401, + 0x99DD: 0x543D, + 0x99DE: 0x5440, + 0x99DF: 0x542C, + 0x99E0: 0x542D, + 0x99E1: 0x543C, + 0x99E2: 0x542E, + 0x99E3: 0x5436, + 0x99E4: 0x5429, + 0x99E5: 0x541D, + 0x99E6: 0x544E, + 0x99E7: 0x548F, + 0x99E8: 0x5475, + 0x99E9: 0x548E, + 0x99EA: 0x545F, + 0x99EB: 0x5471, + 0x99EC: 0x5477, + 0x99ED: 0x5470, + 0x99EE: 0x5492, + 0x99EF: 0x547B, + 0x99F0: 0x5480, + 0x99F1: 0x5476, + 0x99F2: 0x5484, + 0x99F3: 0x5490, + 0x99F4: 0x5486, + 0x99F5: 0x54C7, + 0x99F6: 0x54A2, + 0x99F7: 0x54B8, + 0x99F8: 0x54A5, + 0x99F9: 0x54AC, + 0x99FA: 0x54C4, + 0x99FB: 0x54C8, + 0x99FC: 0x54A8, + 0x9A40: 0x54AB, + 0x9A41: 0x54C2, + 0x9A42: 0x54A4, + 0x9A43: 0x54BE, + 0x9A44: 0x54BC, + 0x9A45: 0x54D8, + 0x9A46: 0x54E5, + 0x9A47: 0x54E6, + 0x9A48: 0x550F, + 0x9A49: 0x5514, + 0x9A4A: 0x54FD, + 0x9A4B: 0x54EE, + 0x9A4C: 0x54ED, + 0x9A4D: 0x54FA, + 0x9A4E: 0x54E2, + 0x9A4F: 0x5539, + 0x9A50: 0x5540, + 0x9A51: 0x5563, + 0x9A52: 0x554C, + 0x9A53: 0x552E, + 0x9A54: 0x555C, + 0x9A55: 0x5545, + 0x9A56: 0x5556, + 0x9A57: 0x5557, + 0x9A58: 0x5538, + 0x9A59: 0x5533, + 0x9A5A: 0x555D, + 0x9A5B: 0x5599, + 0x9A5C: 0x5580, + 0x9A5D: 0x54AF, + 0x9A5E: 0x558A, + 0x9A5F: 0x559F, + 0x9A60: 0x557B, + 0x9A61: 0x557E, + 0x9A62: 0x5598, + 0x9A63: 0x559E, + 0x9A64: 0x55AE, + 0x9A65: 0x557C, + 0x9A66: 0x5583, + 0x9A67: 0x55A9, + 0x9A68: 0x5587, + 0x9A69: 0x55A8, + 0x9A6A: 0x55DA, + 0x9A6B: 0x55C5, + 0x9A6C: 0x55DF, + 0x9A6D: 0x55C4, + 0x9A6E: 0x55DC, + 0x9A6F: 0x55E4, + 0x9A70: 0x55D4, + 0x9A71: 0x5614, + 0x9A72: 0x55F7, + 0x9A73: 0x5616, + 0x9A74: 0x55FE, + 0x9A75: 0x55FD, + 0x9A76: 0x561B, + 0x9A77: 0x55F9, + 0x9A78: 0x564E, + 0x9A79: 0x5650, + 0x9A7A: 0x71DF, + 0x9A7B: 0x5634, + 0x9A7C: 0x5636, + 0x9A7D: 0x5632, + 0x9A7E: 0x5638, + 0x9A80: 0x566B, + 0x9A81: 0x5664, + 0x9A82: 0x562F, + 0x9A83: 0x566C, + 0x9A84: 0x566A, + 0x9A85: 0x5686, + 0x9A86: 0x5680, + 0x9A87: 0x568A, + 0x9A88: 0x56A0, + 0x9A89: 0x5694, + 0x9A8A: 0x568F, + 0x9A8B: 0x56A5, + 0x9A8C: 0x56AE, + 0x9A8D: 0x56B6, + 0x9A8E: 0x56B4, + 0x9A8F: 0x56C2, + 0x9A90: 0x56BC, + 0x9A91: 0x56C1, + 0x9A92: 0x56C3, + 0x9A93: 0x56C0, + 0x9A94: 0x56C8, + 0x9A95: 0x56CE, + 0x9A96: 0x56D1, + 0x9A97: 0x56D3, + 0x9A98: 0x56D7, + 0x9A99: 0x56EE, + 0x9A9A: 0x56F9, + 0x9A9B: 0x5700, + 0x9A9C: 0x56FF, + 0x9A9D: 0x5704, + 0x9A9E: 0x5709, + 0x9A9F: 0x5708, + 0x9AA0: 0x570B, + 0x9AA1: 0x570D, + 0x9AA2: 0x5713, + 0x9AA3: 0x5718, + 0x9AA4: 0x5716, + 0x9AA5: 0x55C7, + 0x9AA6: 0x571C, + 0x9AA7: 0x5726, + 0x9AA8: 0x5737, + 0x9AA9: 0x5738, + 0x9AAA: 0x574E, + 0x9AAB: 0x573B, + 0x9AAC: 0x5740, + 0x9AAD: 0x574F, + 0x9AAE: 0x5769, + 0x9AAF: 0x57C0, + 0x9AB0: 0x5788, + 0x9AB1: 0x5761, + 0x9AB2: 0x577F, + 0x9AB3: 0x5789, + 0x9AB4: 0x5793, + 0x9AB5: 0x57A0, + 0x9AB6: 0x57B3, + 0x9AB7: 0x57A4, + 0x9AB8: 0x57AA, + 0x9AB9: 0x57B0, + 0x9ABA: 0x57C3, + 0x9ABB: 0x57C6, + 0x9ABC: 0x57D4, + 0x9ABD: 0x57D2, + 0x9ABE: 0x57D3, + 0x9ABF: 0x580A, + 0x9AC0: 0x57D6, + 0x9AC1: 0x57E3, + 0x9AC2: 0x580B, + 0x9AC3: 0x5819, + 0x9AC4: 0x581D, + 0x9AC5: 0x5872, + 0x9AC6: 0x5821, + 0x9AC7: 0x5862, + 0x9AC8: 0x584B, + 0x9AC9: 0x5870, + 0x9ACA: 0x6BC0, + 0x9ACB: 0x5852, + 0x9ACC: 0x583D, + 0x9ACD: 0x5879, + 0x9ACE: 0x5885, + 0x9ACF: 0x58B9, + 0x9AD0: 0x589F, + 0x9AD1: 0x58AB, + 0x9AD2: 0x58BA, + 0x9AD3: 0x58DE, + 0x9AD4: 0x58BB, + 0x9AD5: 0x58B8, + 0x9AD6: 0x58AE, + 0x9AD7: 0x58C5, + 0x9AD8: 0x58D3, + 0x9AD9: 0x58D1, + 0x9ADA: 0x58D7, + 0x9ADB: 0x58D9, + 0x9ADC: 0x58D8, + 0x9ADD: 0x58E5, + 0x9ADE: 0x58DC, + 0x9ADF: 0x58E4, + 0x9AE0: 0x58DF, + 0x9AE1: 0x58EF, + 0x9AE2: 0x58FA, + 0x9AE3: 0x58F9, + 0x9AE4: 0x58FB, + 0x9AE5: 0x58FC, + 0x9AE6: 0x58FD, + 0x9AE7: 0x5902, + 0x9AE8: 0x590A, + 0x9AE9: 0x5910, + 0x9AEA: 0x591B, + 0x9AEB: 0x68A6, + 0x9AEC: 0x5925, + 0x9AED: 0x592C, + 0x9AEE: 0x592D, + 0x9AEF: 0x5932, + 0x9AF0: 0x5938, + 0x9AF1: 0x593E, + 0x9AF2: 0x7AD2, + 0x9AF3: 0x5955, + 0x9AF4: 0x5950, + 0x9AF5: 0x594E, + 0x9AF6: 0x595A, + 0x9AF7: 0x5958, + 0x9AF8: 0x5962, + 0x9AF9: 0x5960, + 0x9AFA: 0x5967, + 0x9AFB: 0x596C, + 0x9AFC: 0x5969, + 0x9B40: 0x5978, + 0x9B41: 0x5981, + 0x9B42: 0x599D, + 0x9B43: 0x4F5E, + 0x9B44: 0x4FAB, + 0x9B45: 0x59A3, + 0x9B46: 0x59B2, + 0x9B47: 0x59C6, + 0x9B48: 0x59E8, + 0x9B49: 0x59DC, + 0x9B4A: 0x598D, + 0x9B4B: 0x59D9, + 0x9B4C: 0x59DA, + 0x9B4D: 0x5A25, + 0x9B4E: 0x5A1F, + 0x9B4F: 0x5A11, + 0x9B50: 0x5A1C, + 0x9B51: 0x5A09, + 0x9B52: 0x5A1A, + 0x9B53: 0x5A40, + 0x9B54: 0x5A6C, + 0x9B55: 0x5A49, + 0x9B56: 0x5A35, + 0x9B57: 0x5A36, + 0x9B58: 0x5A62, + 0x9B59: 0x5A6A, + 0x9B5A: 0x5A9A, + 0x9B5B: 0x5ABC, + 0x9B5C: 0x5ABE, + 0x9B5D: 0x5ACB, + 0x9B5E: 0x5AC2, + 0x9B5F: 0x5ABD, + 0x9B60: 0x5AE3, + 0x9B61: 0x5AD7, + 0x9B62: 0x5AE6, + 0x9B63: 0x5AE9, + 0x9B64: 0x5AD6, + 0x9B65: 0x5AFA, + 0x9B66: 0x5AFB, + 0x9B67: 0x5B0C, + 0x9B68: 0x5B0B, + 0x9B69: 0x5B16, + 0x9B6A: 0x5B32, + 0x9B6B: 0x5AD0, + 0x9B6C: 0x5B2A, + 0x9B6D: 0x5B36, + 0x9B6E: 0x5B3E, + 0x9B6F: 0x5B43, + 0x9B70: 0x5B45, + 0x9B71: 0x5B40, + 0x9B72: 0x5B51, + 0x9B73: 0x5B55, + 0x9B74: 0x5B5A, + 0x9B75: 0x5B5B, + 0x9B76: 0x5B65, + 0x9B77: 0x5B69, + 0x9B78: 0x5B70, + 0x9B79: 0x5B73, + 0x9B7A: 0x5B75, + 0x9B7B: 0x5B78, + 0x9B7C: 0x6588, + 0x9B7D: 0x5B7A, + 0x9B7E: 0x5B80, + 0x9B80: 0x5B83, + 0x9B81: 0x5BA6, + 0x9B82: 0x5BB8, + 0x9B83: 0x5BC3, + 0x9B84: 0x5BC7, + 0x9B85: 0x5BC9, + 0x9B86: 0x5BD4, + 0x9B87: 0x5BD0, + 0x9B88: 0x5BE4, + 0x9B89: 0x5BE6, + 0x9B8A: 0x5BE2, + 0x9B8B: 0x5BDE, + 0x9B8C: 0x5BE5, + 0x9B8D: 0x5BEB, + 0x9B8E: 0x5BF0, + 0x9B8F: 0x5BF6, + 0x9B90: 0x5BF3, + 0x9B91: 0x5C05, + 0x9B92: 0x5C07, + 0x9B93: 0x5C08, + 0x9B94: 0x5C0D, + 0x9B95: 0x5C13, + 0x9B96: 0x5C20, + 0x9B97: 0x5C22, + 0x9B98: 0x5C28, + 0x9B99: 0x5C38, + 0x9B9A: 0x5C39, + 0x9B9B: 0x5C41, + 0x9B9C: 0x5C46, + 0x9B9D: 0x5C4E, + 0x9B9E: 0x5C53, + 0x9B9F: 0x5C50, + 0x9BA0: 0x5C4F, + 0x9BA1: 0x5B71, + 0x9BA2: 0x5C6C, + 0x9BA3: 0x5C6E, + 0x9BA4: 0x4E62, + 0x9BA5: 0x5C76, + 0x9BA6: 0x5C79, + 0x9BA7: 0x5C8C, + 0x9BA8: 0x5C91, + 0x9BA9: 0x5C94, + 0x9BAA: 0x599B, + 0x9BAB: 0x5CAB, + 0x9BAC: 0x5CBB, + 0x9BAD: 0x5CB6, + 0x9BAE: 0x5CBC, + 0x9BAF: 0x5CB7, + 0x9BB0: 0x5CC5, + 0x9BB1: 0x5CBE, + 0x9BB2: 0x5CC7, + 0x9BB3: 0x5CD9, + 0x9BB4: 0x5C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5E75, + 0x9BF3: 0x5E76, + 0x9BF4: 0x5E7A, + 0x9BF5: 0x9EBC, + 0x9BF6: 0x5E7F, + 0x9BF7: 0x5EA0, + 0x9BF8: 0x5EC1, + 0x9BF9: 0x5EC2, + 0x9BFA: 0x5EC8, + 0x9BFB: 0x5ED0, + 0x9BFC: 0x5ECF, + 0x9C40: 0x5ED6, + 0x9C41: 0x5EE3, + 0x9C42: 0x5EDD, + 0x9C43: 0x5EDA, + 0x9C44: 0x5EDB, + 0x9C45: 0x5EE2, + 0x9C46: 0x5EE1, + 0x9C47: 0x5EE8, + 0x9C48: 0x5EE9, + 0x9C49: 0x5EEC, + 0x9C4A: 0x5EF1, + 0x9C4B: 0x5EF3, + 0x9C4C: 0x5EF0, + 0x9C4D: 0x5EF4, + 0x9C4E: 0x5EF8, + 0x9C4F: 0x5EFE, + 0x9C50: 0x5F03, + 0x9C51: 0x5F09, + 0x9C52: 0x5F5D, + 0x9C53: 0x5F5C, + 0x9C54: 0x5F0B, + 0x9C55: 0x5F11, + 0x9C56: 0x5F16, + 0x9C57: 0x5F29, + 0x9C58: 0x5F2D, + 0x9C59: 0x5F38, + 0x9C5A: 0x5F41, + 0x9C5B: 0x5F48, + 0x9C5C: 0x5F4C, + 0x9C5D: 0x5F4E, + 0x9C5E: 0x5F2F, + 0x9C5F: 0x5F51, + 0x9C60: 0x5F56, + 0x9C61: 0x5F57, + 0x9C62: 0x5F59, + 0x9C63: 0x5F61, + 0x9C64: 0x5F6D, + 0x9C65: 0x5F73, + 0x9C66: 0x5F77, + 0x9C67: 0x5F83, + 0x9C68: 0x5F82, + 0x9C69: 0x5F7F, + 0x9C6A: 0x5F8A, + 0x9C6B: 0x5F88, + 0x9C6C: 0x5F91, + 0x9C6D: 0x5F87, + 0x9C6E: 0x5F9E, + 0x9C6F: 0x5F99, + 0x9C70: 0x5F98, + 0x9C71: 0x5FA0, + 0x9C72: 0x5FA8, + 0x9C73: 0x5FAD, + 0x9C74: 0x5FBC, + 0x9C75: 0x5FD6, + 0x9C76: 0x5FFB, + 0x9C77: 0x5FE4, + 0x9C78: 0x5FF8, + 0x9C79: 0x5FF1, + 0x9C7A: 0x5FDD, + 0x9C7B: 0x60B3, + 0x9C7C: 0x5FFF, + 0x9C7D: 0x6021, + 0x9C7E: 0x6060, + 0x9C80: 0x6019, + 0x9C81: 0x6010, + 0x9C82: 0x6029, + 0x9C83: 0x600E, + 0x9C84: 0x6031, + 0x9C85: 0x601B, + 0x9C86: 0x6015, + 0x9C87: 0x602B, + 0x9C88: 0x6026, + 0x9C89: 0x600F, + 0x9C8A: 0x603A, + 0x9C8B: 0x605A, + 0x9C8C: 0x6041, + 0x9C8D: 0x606A, + 0x9C8E: 0x6077, + 0x9C8F: 0x605F, + 0x9C90: 0x604A, + 0x9C91: 0x6046, + 0x9C92: 0x604D, + 0x9C93: 0x6063, + 0x9C94: 0x6043, + 0x9C95: 0x6064, + 0x9C96: 0x6042, + 0x9C97: 0x606C, + 0x9C98: 0x606B, + 0x9C99: 0x6059, + 0x9C9A: 0x6081, + 0x9C9B: 0x608D, + 0x9C9C: 0x60E7, + 0x9C9D: 0x6083, + 0x9C9E: 0x609A, + 0x9C9F: 0x6084, + 0x9CA0: 0x609B, + 0x9CA1: 0x6096, + 0x9CA2: 0x6097, + 0x9CA3: 0x6092, + 0x9CA4: 0x60A7, + 0x9CA5: 0x608B, + 0x9CA6: 0x60E1, + 0x9CA7: 0x60B8, + 0x9CA8: 0x60E0, + 0x9CA9: 0x60D3, + 0x9CAA: 0x60B4, + 0x9CAB: 0x5FF0, + 0x9CAC: 0x60BD, + 0x9CAD: 0x60C6, + 0x9CAE: 0x60B5, + 0x9CAF: 0x60D8, + 0x9CB0: 0x614D, + 0x9CB1: 0x6115, + 0x9CB2: 0x6106, + 0x9CB3: 0x60F6, + 0x9CB4: 0x60F7, + 0x9CB5: 0x6100, + 0x9CB6: 0x60F4, + 0x9CB7: 0x60FA, + 0x9CB8: 0x6103, + 0x9CB9: 0x6121, + 0x9CBA: 0x60FB, + 0x9CBB: 0x60F1, + 0x9CBC: 0x610D, + 0x9CBD: 0x610E, + 0x9CBE: 0x6147, + 0x9CBF: 0x613E, + 0x9CC0: 0x6128, + 0x9CC1: 0x6127, + 0x9CC2: 0x614A, + 0x9CC3: 0x613F, + 0x9CC4: 0x613C, + 0x9CC5: 0x612C, + 0x9CC6: 0x6134, + 0x9CC7: 0x613D, + 0x9CC8: 0x6142, + 0x9CC9: 0x6144, + 0x9CCA: 0x6173, + 0x9CCB: 0x6177, + 0x9CCC: 0x6158, + 0x9CCD: 0x6159, + 0x9CCE: 0x615A, + 0x9CCF: 0x616B, + 0x9CD0: 0x6174, + 0x9CD1: 0x616F, + 0x9CD2: 0x6165, + 0x9CD3: 0x6171, + 0x9CD4: 0x615F, + 0x9CD5: 0x615D, + 0x9CD6: 0x6153, + 0x9CD7: 0x6175, + 0x9CD8: 0x6199, + 0x9CD9: 0x6196, + 0x9CDA: 0x6187, + 0x9CDB: 0x61AC, + 0x9CDC: 0x6194, + 0x9CDD: 0x619A, + 0x9CDE: 0x618A, + 0x9CDF: 0x6191, + 0x9CE0: 0x61AB, + 0x9CE1: 0x61AE, + 0x9CE2: 0x61CC, + 0x9CE3: 0x61CA, + 0x9CE4: 0x61C9, + 0x9CE5: 0x61F7, + 0x9CE6: 0x61C8, + 0x9CE7: 0x61C3, + 0x9CE8: 0x61C6, + 0x9CE9: 0x61BA, + 0x9CEA: 0x61CB, + 0x9CEB: 0x7F79, + 0x9CEC: 0x61CD, + 0x9CED: 0x61E6, + 0x9CEE: 0x61E3, + 0x9CEF: 0x61F6, + 0x9CF0: 0x61FA, + 0x9CF1: 0x61F4, + 0x9CF2: 0x61FF, + 0x9CF3: 0x61FD, + 0x9CF4: 0x61FC, + 0x9CF5: 0x61FE, + 0x9CF6: 0x6200, + 0x9CF7: 0x6208, + 0x9CF8: 0x6209, + 0x9CF9: 0x620D, + 0x9CFA: 0x620C, + 0x9CFB: 0x6214, + 0x9CFC: 0x621B, + 0x9D40: 0x621E, + 0x9D41: 0x6221, + 0x9D42: 0x622A, + 0x9D43: 0x622E, + 0x9D44: 0x6230, + 0x9D45: 0x6232, + 0x9D46: 0x6233, + 0x9D47: 0x6241, + 0x9D48: 0x624E, + 0x9D49: 0x625E, + 0x9D4A: 0x6263, + 0x9D4B: 0x625B, + 0x9D4C: 0x6260, + 0x9D4D: 0x6268, + 0x9D4E: 0x627C, + 0x9D4F: 0x6282, + 0x9D50: 0x6289, + 0x9D51: 0x627E, + 0x9D52: 0x6292, + 0x9D53: 0x6293, + 0x9D54: 0x6296, + 0x9D55: 0x62D4, + 0x9D56: 0x6283, + 0x9D57: 0x6294, + 0x9D58: 0x62D7, + 0x9D59: 0x62D1, + 0x9D5A: 0x62BB, + 0x9D5B: 0x62CF, + 0x9D5C: 0x62FF, + 0x9D5D: 0x62C6, + 0x9D5E: 0x64D4, + 0x9D5F: 0x62C8, + 0x9D60: 0x62DC, + 0x9D61: 0x62CC, + 0x9D62: 0x62CA, + 0x9D63: 0x62C2, + 0x9D64: 0x62C7, + 0x9D65: 0x629B, + 0x9D66: 0x62C9, + 0x9D67: 0x630C, + 0x9D68: 0x62EE, + 0x9D69: 0x62F1, + 0x9D6A: 0x6327, + 0x9D6B: 0x6302, + 0x9D6C: 0x6308, + 0x9D6D: 0x62EF, + 0x9D6E: 0x62F5, + 0x9D6F: 0x6350, + 0x9D70: 0x633E, + 0x9D71: 0x634D, + 0x9D72: 0x641C, + 0x9D73: 0x634F, + 0x9D74: 0x6396, + 0x9D75: 0x638E, + 0x9D76: 0x6380, + 0x9D77: 0x63AB, + 0x9D78: 0x6376, + 0x9D79: 0x63A3, + 0x9D7A: 0x638F, + 0x9D7B: 0x6389, + 0x9D7C: 0x639F, + 0x9D7D: 0x63B5, + 0x9D7E: 0x636B, + 0x9D80: 0x6369, + 0x9D81: 0x63BE, + 0x9D82: 0x63E9, + 0x9D83: 0x63C0, + 0x9D84: 0x63C6, + 0x9D85: 0x63E3, + 0x9D86: 0x63C9, + 0x9D87: 0x63D2, + 0x9D88: 0x63F6, + 0x9D89: 0x63C4, + 0x9D8A: 0x6416, + 0x9D8B: 0x6434, + 0x9D8C: 0x6406, + 0x9D8D: 0x6413, + 0x9D8E: 0x6426, + 0x9D8F: 0x6436, + 0x9D90: 0x651D, + 0x9D91: 0x6417, + 0x9D92: 0x6428, + 0x9D93: 0x640F, + 0x9D94: 0x6467, + 0x9D95: 0x646F, + 0x9D96: 0x6476, + 0x9D97: 0x644E, + 0x9D98: 0x652A, + 0x9D99: 0x6495, + 0x9D9A: 0x6493, + 0x9D9B: 0x64A5, + 0x9D9C: 0x64A9, + 0x9D9D: 0x6488, + 0x9D9E: 0x64BC, + 0x9D9F: 0x64DA, + 0x9DA0: 0x64D2, + 0x9DA1: 0x64C5, + 0x9DA2: 0x64C7, + 0x9DA3: 0x64BB, + 0x9DA4: 0x64D8, + 0x9DA5: 0x64C2, + 0x9DA6: 0x64F1, + 0x9DA7: 0x64E7, + 0x9DA8: 0x8209, + 0x9DA9: 0x64E0, + 0x9DAA: 0x64E1, + 0x9DAB: 0x62AC, + 0x9DAC: 0x64E3, + 0x9DAD: 0x64EF, + 0x9DAE: 0x652C, + 0x9DAF: 0x64F6, + 0x9DB0: 0x64F4, + 0x9DB1: 0x64F2, + 0x9DB2: 0x64FA, + 0x9DB3: 0x6500, + 0x9DB4: 0x64FD, + 0x9DB5: 0x6518, + 0x9DB6: 0x651C, + 0x9DB7: 0x6505, + 0x9DB8: 0x6524, + 0x9DB9: 0x6523, + 0x9DBA: 0x652B, + 0x9DBB: 0x6534, + 0x9DBC: 0x6535, + 0x9DBD: 0x6537, + 0x9DBE: 0x6536, + 0x9DBF: 0x6538, + 0x9DC0: 0x754B, + 0x9DC1: 0x6548, + 0x9DC2: 0x6556, + 0x9DC3: 0x6555, + 0x9DC4: 0x654D, + 0x9DC5: 0x6558, + 0x9DC6: 0x655E, + 0x9DC7: 0x655D, + 0x9DC8: 0x6572, + 0x9DC9: 0x6578, + 0x9DCA: 0x6582, + 0x9DCB: 0x6583, + 0x9DCC: 0x8B8A, + 0x9DCD: 0x659B, + 0x9DCE: 0x659F, + 0x9DCF: 0x65AB, + 0x9DD0: 0x65B7, + 0x9DD1: 0x65C3, + 0x9DD2: 0x65C6, + 0x9DD3: 0x65C1, + 0x9DD4: 0x65C4, + 0x9DD5: 0x65CC, + 0x9DD6: 0x65D2, + 0x9DD7: 0x65DB, + 0x9DD8: 0x65D9, + 0x9DD9: 0x65E0, + 0x9DDA: 0x65E1, + 0x9DDB: 0x65F1, + 0x9DDC: 0x6772, + 0x9DDD: 0x660A, + 0x9DDE: 0x6603, + 0x9DDF: 0x65FB, + 0x9DE0: 0x6773, + 0x9DE1: 0x6635, + 0x9DE2: 0x6636, + 0x9DE3: 0x6634, + 0x9DE4: 0x661C, + 0x9DE5: 0x664F, + 0x9DE6: 0x6644, + 0x9DE7: 0x6649, + 0x9DE8: 0x6641, + 0x9DE9: 0x665E, + 0x9DEA: 0x665D, + 0x9DEB: 0x6664, + 0x9DEC: 0x6667, + 0x9DED: 0x6668, + 0x9DEE: 0x665F, + 0x9DEF: 0x6662, + 0x9DF0: 0x6670, + 0x9DF1: 0x6683, + 0x9DF2: 0x6688, + 0x9DF3: 0x668E, + 0x9DF4: 0x6689, + 0x9DF5: 0x6684, + 0x9DF6: 0x6698, + 0x9DF7: 0x669D, + 0x9DF8: 0x66C1, + 0x9DF9: 0x66B9, + 0x9DFA: 0x66C9, + 0x9DFB: 0x66BE, + 0x9DFC: 0x66BC, + 0x9E40: 0x66C4, + 0x9E41: 0x66B8, + 0x9E42: 0x66D6, + 0x9E43: 0x66DA, + 0x9E44: 0x66E0, + 0x9E45: 0x663F, + 0x9E46: 0x66E6, + 0x9E47: 0x66E9, + 0x9E48: 0x66F0, + 0x9E49: 0x66F5, + 0x9E4A: 0x66F7, + 0x9E4B: 0x670F, + 0x9E4C: 0x6716, + 0x9E4D: 0x671E, + 0x9E4E: 0x6726, + 0x9E4F: 0x6727, + 0x9E50: 0x9738, + 0x9E51: 0x672E, + 0x9E52: 0x673F, + 0x9E53: 0x6736, + 0x9E54: 0x6741, + 0x9E55: 0x6738, + 0x9E56: 0x6737, + 0x9E57: 0x6746, + 0x9E58: 0x675E, + 0x9E59: 0x6760, + 0x9E5A: 0x6759, + 0x9E5B: 0x6763, + 0x9E5C: 0x6764, + 0x9E5D: 0x6789, + 0x9E5E: 0x6770, + 0x9E5F: 0x67A9, + 0x9E60: 0x677C, + 0x9E61: 0x676A, + 0x9E62: 0x678C, + 0x9E63: 0x678B, + 0x9E64: 0x67A6, + 0x9E65: 0x67A1, + 0x9E66: 0x6785, + 0x9E67: 0x67B7, + 0x9E68: 0x67EF, + 0x9E69: 0x67B4, + 0x9E6A: 0x67EC, + 0x9E6B: 0x67B3, + 0x9E6C: 0x67E9, + 0x9E6D: 0x67B8, + 0x9E6E: 0x67E4, + 0x9E6F: 0x67DE, + 0x9E70: 0x67DD, + 0x9E71: 0x67E2, + 0x9E72: 0x67EE, + 0x9E73: 0x67B9, + 0x9E74: 0x67CE, + 0x9E75: 0x67C6, + 0x9E76: 0x67E7, + 0x9E77: 0x6A9C, + 0x9E78: 0x681E, + 0x9E79: 0x6846, + 0x9E7A: 0x6829, + 0x9E7B: 0x6840, + 0x9E7C: 0x684D, + 0x9E7D: 0x6832, + 0x9E7E: 0x684E, + 0x9E80: 0x68B3, + 0x9E81: 0x682B, + 0x9E82: 0x6859, + 0x9E83: 0x6863, + 0x9E84: 0x6877, + 0x9E85: 0x687F, + 0x9E86: 0x689F, + 0x9E87: 0x688F, + 0x9E88: 0x68AD, + 0x9E89: 0x6894, + 0x9E8A: 0x689D, + 0x9E8B: 0x689B, + 0x9E8C: 0x6883, + 0x9E8D: 0x6AAE, + 0x9E8E: 0x68B9, + 0x9E8F: 0x6874, + 0x9E90: 0x68B5, + 0x9E91: 0x68A0, + 0x9E92: 0x68BA, + 0x9E93: 0x690F, + 0x9E94: 0x688D, + 0x9E95: 0x687E, + 0x9E96: 0x6901, + 0x9E97: 0x68CA, + 0x9E98: 0x6908, + 0x9E99: 0x68D8, + 0x9E9A: 0x6922, + 0x9E9B: 0x6926, + 0x9E9C: 0x68E1, + 0x9E9D: 0x690C, + 0x9E9E: 0x68CD, + 0x9E9F: 0x68D4, + 0x9EA0: 0x68E7, + 0x9EA1: 0x68D5, + 0x9EA2: 0x6936, + 0x9EA3: 0x6912, + 0x9EA4: 0x6904, + 0x9EA5: 0x68D7, + 0x9EA6: 0x68E3, + 0x9EA7: 0x6925, + 0x9EA8: 0x68F9, + 0x9EA9: 0x68E0, + 0x9EAA: 0x68EF, + 0x9EAB: 0x6928, + 0x9EAC: 0x692A, + 0x9EAD: 0x691A, + 0x9EAE: 0x6923, + 0x9EAF: 0x6921, + 0x9EB0: 0x68C6, + 0x9EB1: 0x6979, + 0x9EB2: 0x6977, + 0x9EB3: 0x695C, + 0x9EB4: 0x6978, + 0x9EB5: 0x696B, + 0x9EB6: 0x6954, + 0x9EB7: 0x697E, + 0x9EB8: 0x696E, + 0x9EB9: 0x6939, + 0x9EBA: 0x6974, + 0x9EBB: 0x693D, + 0x9EBC: 0x6959, + 0x9EBD: 0x6930, + 0x9EBE: 0x6961, + 0x9EBF: 0x695E, + 0x9EC0: 0x695D, + 0x9EC1: 0x6981, + 0x9EC2: 0x696A, + 0x9EC3: 0x69B2, + 0x9EC4: 0x69AE, + 0x9EC5: 0x69D0, + 0x9EC6: 0x69BF, + 0x9EC7: 0x69C1, + 0x9EC8: 0x69D3, + 0x9EC9: 0x69BE, + 0x9ECA: 0x69CE, + 0x9ECB: 0x5BE8, + 0x9ECC: 0x69CA, + 0x9ECD: 0x69DD, + 0x9ECE: 0x69BB, + 0x9ECF: 0x69C3, + 0x9ED0: 0x69A7, + 0x9ED1: 0x6A2E, + 0x9ED2: 0x6991, + 0x9ED3: 0x69A0, + 0x9ED4: 0x699C, + 0x9ED5: 0x6995, + 0x9ED6: 0x69B4, + 0x9ED7: 0x69DE, + 0x9ED8: 0x69E8, + 0x9ED9: 0x6A02, + 0x9EDA: 0x6A1B, + 0x9EDB: 0x69FF, + 0x9EDC: 0x6B0A, + 0x9EDD: 0x69F9, + 0x9EDE: 0x69F2, + 0x9EDF: 0x69E7, + 0x9EE0: 0x6A05, + 0x9EE1: 0x69B1, + 0x9EE2: 0x6A1E, + 0x9EE3: 0x69ED, + 0x9EE4: 0x6A14, + 0x9EE5: 0x69EB, + 0x9EE6: 0x6A0A, + 0x9EE7: 0x6A12, + 0x9EE8: 0x6AC1, + 0x9EE9: 0x6A23, + 0x9EEA: 0x6A13, + 0x9EEB: 0x6A44, + 0x9EEC: 0x6A0C, + 0x9EED: 0x6A72, + 0x9EEE: 0x6A36, + 0x9EEF: 0x6A78, + 0x9EF0: 0x6A47, + 0x9EF1: 0x6A62, + 0x9EF2: 0x6A59, + 0x9EF3: 0x6A66, + 0x9EF4: 0x6A48, + 0x9EF5: 0x6A38, + 0x9EF6: 0x6A22, + 0x9EF7: 0x6A90, + 0x9EF8: 0x6A8D, + 0x9EF9: 0x6AA0, + 0x9EFA: 0x6A84, + 0x9EFB: 0x6AA2, + 0x9EFC: 0x6AA3, + 0x9F40: 0x6A97, + 0x9F41: 0x8617, + 0x9F42: 0x6ABB, + 0x9F43: 0x6AC3, + 0x9F44: 0x6AC2, + 0x9F45: 0x6AB8, + 0x9F46: 0x6AB3, + 0x9F47: 0x6AAC, + 0x9F48: 0x6ADE, + 0x9F49: 0x6AD1, + 0x9F4A: 0x6ADF, + 0x9F4B: 0x6AAA, + 0x9F4C: 0x6ADA, + 0x9F4D: 0x6AEA, + 0x9F4E: 0x6AFB, + 0x9F4F: 0x6B05, + 0x9F50: 0x8616, + 0x9F51: 0x6AFA, + 0x9F52: 0x6B12, + 0x9F53: 0x6B16, + 0x9F54: 0x9B31, + 0x9F55: 0x6B1F, + 0x9F56: 0x6B38, + 0x9F57: 0x6B37, + 0x9F58: 0x76DC, + 0x9F59: 0x6B39, + 0x9F5A: 0x98EE, + 0x9F5B: 0x6B47, + 0x9F5C: 0x6B43, + 0x9F5D: 0x6B49, + 0x9F5E: 0x6B50, + 0x9F5F: 0x6B59, + 0x9F60: 0x6B54, + 0x9F61: 0x6B5B, + 0x9F62: 0x6B5F, + 0x9F63: 0x6B61, + 0x9F64: 0x6B78, + 0x9F65: 0x6B79, + 0x9F66: 0x6B7F, + 0x9F67: 0x6B80, + 0x9F68: 0x6B84, + 0x9F69: 0x6B83, + 0x9F6A: 0x6B8D, + 0x9F6B: 0x6B98, + 0x9F6C: 0x6B95, + 0x9F6D: 0x6B9E, + 0x9F6E: 0x6BA4, + 0x9F6F: 0x6BAA, + 0x9F70: 0x6BAB, + 0x9F71: 0x6BAF, + 0x9F72: 0x6BB2, + 0x9F73: 0x6BB1, + 0x9F74: 0x6BB3, + 0x9F75: 0x6BB7, + 0x9F76: 0x6BBC, + 0x9F77: 0x6BC6, + 0x9F78: 0x6BCB, + 0x9F79: 0x6BD3, + 0x9F7A: 0x6BDF, + 0x9F7B: 0x6BEC, + 0x9F7C: 0x6BEB, + 0x9F7D: 0x6BF3, + 0x9F7E: 0x6BEF, + 0x9F80: 0x9EBE, + 0x9F81: 0x6C08, + 0x9F82: 0x6C13, + 0x9F83: 0x6C14, + 0x9F84: 0x6C1B, + 0x9F85: 0x6C24, + 0x9F86: 0x6C23, + 0x9F87: 0x6C5E, + 0x9F88: 0x6C55, + 0x9F89: 0x6C62, + 0x9F8A: 0x6C6A, + 0x9F8B: 0x6C82, + 0x9F8C: 0x6C8D, + 0x9F8D: 0x6C9A, + 0x9F8E: 0x6C81, + 0x9F8F: 0x6C9B, + 0x9F90: 0x6C7E, + 0x9F91: 0x6C68, + 0x9F92: 0x6C73, + 0x9F93: 0x6C92, + 0x9F94: 0x6C90, + 0x9F95: 0x6CC4, + 0x9F96: 0x6CF1, + 0x9F97: 0x6CD3, + 0x9F98: 0x6CBD, + 0x9F99: 0x6CD7, + 0x9F9A: 0x6CC5, + 0x9F9B: 0x6CDD, + 0x9F9C: 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FF7F, + 0xC0: 0xFF80, + 0xC1: 0xFF81, + 0xC2: 0xFF82, + 0xC3: 0xFF83, + 0xC4: 0xFF84, + 0xC5: 0xFF85, + 0xC6: 0xFF86, + 0xC7: 0xFF87, + 0xC8: 0xFF88, + 0xC9: 0xFF89, + 0xCA: 0xFF8A, + 0xCB: 0xFF8B, + 0xCC: 0xFF8C, + 0xCD: 0xFF8D, + 0xCE: 0xFF8E, + 0xCF: 0xFF8F, + 0xD0: 0xFF90, + 0xD1: 0xFF91, + 0xD2: 0xFF92, + 0xD3: 0xFF93, + 0xD4: 0xFF94, + 0xD5: 0xFF95, + 0xD6: 0xFF96, + 0xD7: 0xFF97, + 0xD8: 0xFF98, + 0xD9: 0xFF99, + 0xDA: 0xFF9A, + 0xDB: 0xFF9B, + 0xDC: 0xFF9C, + 0xDD: 0xFF9D, + 0xDE: 0xFF9E, + 0xDF: 0xFF9F, + 0xE040: 0x6F3E, + 0xE041: 0x6F13, + 0xE042: 0x6EF7, + 0xE043: 0x6F86, + 0xE044: 0x6F7A, + 0xE045: 0x6F78, + 0xE046: 0x6F81, + 0xE047: 0x6F80, + 0xE048: 0x6F6F, + 0xE049: 0x6F5B, + 0xE04A: 0x6FF3, + 0xE04B: 0x6F6D, + 0xE04C: 0x6F82, + 0xE04D: 0x6F7C, + 0xE04E: 0x6F58, + 0xE04F: 0x6F8E, + 0xE050: 0x6F91, + 0xE051: 0x6FC2, + 0xE052: 0x6F66, + 0xE053: 0x6FB3, + 0xE054: 0x6FA3, + 0xE055: 0x6FA1, + 0xE056: 0x6FA4, + 0xE057: 0x6FB9, + 0xE058: 0x6FC6, + 0xE059: 0x6FAA, + 0xE05A: 0x6FDF, + 0xE05B: 0x6FD5, + 0xE05C: 0x6FEC, + 0xE05D: 0x6FD4, + 0xE05E: 0x6FD8, + 0xE05F: 0x6FF1, + 0xE060: 0x6FEE, + 0xE061: 0x6FDB, + 0xE062: 0x7009, + 0xE063: 0x700B, + 0xE064: 0x6FFA, + 0xE065: 0x7011, + 0xE066: 0x7001, + 0xE067: 0x700F, + 0xE068: 0x6FFE, + 0xE069: 0x701B, + 0xE06A: 0x701A, + 0xE06B: 0x6F74, + 0xE06C: 0x701D, + 0xE06D: 0x7018, + 0xE06E: 0x701F, + 0xE06F: 0x7030, + 0xE070: 0x703E, + 0xE071: 0x7032, + 0xE072: 0x7051, + 0xE073: 0x7063, + 0xE074: 0x7099, + 0xE075: 0x7092, + 0xE076: 0x70AF, + 0xE077: 0x70F1, + 0xE078: 0x70AC, + 0xE079: 0x70B8, + 0xE07A: 0x70B3, + 0xE07B: 0x70AE, + 0xE07C: 0x70DF, + 0xE07D: 0x70CB, + 0xE07E: 0x70DD, + 0xE080: 0x70D9, + 0xE081: 0x7109, + 0xE082: 0x70FD, + 0xE083: 0x711C, + 0xE084: 0x7119, + 0xE085: 0x7165, + 0xE086: 0x7155, + 0xE087: 0x7188, + 0xE088: 0x7166, + 0xE089: 0x7162, + 0xE08A: 0x714C, + 0xE08B: 0x7156, + 0xE08C: 0x716C, + 0xE08D: 0x718F, + 0xE08E: 0x71FB, + 0xE08F: 0x7184, + 0xE090: 0x7195, + 0xE091: 0x71A8, + 0xE092: 0x71AC, + 0xE093: 0x71D7, + 0xE094: 0x71B9, + 0xE095: 0x71BE, + 0xE096: 0x71D2, + 0xE097: 0x71C9, + 0xE098: 0x71D4, + 0xE099: 0x71CE, + 0xE09A: 0x71E0, + 0xE09B: 0x71EC, + 0xE09C: 0x71E7, + 0xE09D: 0x71F5, + 0xE09E: 0x71FC, + 0xE09F: 0x71F9, + 0xE0A0: 0x71FF, + 0xE0A1: 0x720D, + 0xE0A2: 0x7210, + 0xE0A3: 0x721B, + 0xE0A4: 0x7228, + 0xE0A5: 0x722D, + 0xE0A6: 0x722C, + 0xE0A7: 0x7230, + 0xE0A8: 0x7232, + 0xE0A9: 0x723B, + 0xE0AA: 0x723C, + 0xE0AB: 0x723F, + 0xE0AC: 0x7240, + 0xE0AD: 0x7246, + 0xE0AE: 0x724B, + 0xE0AF: 0x7258, + 0xE0B0: 0x7274, + 0xE0B1: 0x727E, + 0xE0B2: 0x7282, + 0xE0B3: 0x7281, + 0xE0B4: 0x7287, + 0xE0B5: 0x7292, + 0xE0B6: 0x7296, + 0xE0B7: 0x72A2, + 0xE0B8: 0x72A7, + 0xE0B9: 0x72B9, + 0xE0BA: 0x72B2, + 0xE0BB: 0x72C3, + 0xE0BC: 0x72C6, + 0xE0BD: 0x72C4, + 0xE0BE: 0x72CE, + 0xE0BF: 0x72D2, + 0xE0C0: 0x72E2, + 0xE0C1: 0x72E0, + 0xE0C2: 0x72E1, + 0xE0C3: 0x72F9, + 0xE0C4: 0x72F7, + 0xE0C5: 0x500F, + 0xE0C6: 0x7317, + 0xE0C7: 0x730A, + 0xE0C8: 0x731C, + 0xE0C9: 0x7316, + 0xE0CA: 0x731D, + 0xE0CB: 0x7334, + 0xE0CC: 0x732F, + 0xE0CD: 0x7329, + 0xE0CE: 0x7325, + 0xE0CF: 0x733E, + 0xE0D0: 0x734E, + 0xE0D1: 0x734F, + 0xE0D2: 0x9ED8, + 0xE0D3: 0x7357, + 0xE0D4: 0x736A, + 0xE0D5: 0x7368, + 0xE0D6: 0x7370, + 0xE0D7: 0x7378, + 0xE0D8: 0x7375, + 0xE0D9: 0x737B, + 0xE0DA: 0x737A, + 0xE0DB: 0x73C8, + 0xE0DC: 0x73B3, + 0xE0DD: 0x73CE, + 0xE0DE: 0x73BB, + 0xE0DF: 0x73C0, + 0xE0E0: 0x73E5, + 0xE0E1: 0x73EE, + 0xE0E2: 0x73DE, + 0xE0E3: 0x74A2, + 0xE0E4: 0x7405, + 0xE0E5: 0x746F, + 0xE0E6: 0x7425, + 0xE0E7: 0x73F8, + 0xE0E8: 0x7432, + 0xE0E9: 0x743A, + 0xE0EA: 0x7455, + 0xE0EB: 0x743F, + 0xE0EC: 0x745F, + 0xE0ED: 0x7459, + 0xE0EE: 0x7441, + 0xE0EF: 0x745C, + 0xE0F0: 0x7469, + 0xE0F1: 0x7470, + 0xE0F2: 0x7463, + 0xE0F3: 0x746A, + 0xE0F4: 0x7476, + 0xE0F5: 0x747E, + 0xE0F6: 0x748B, + 0xE0F7: 0x749E, + 0xE0F8: 0x74A7, + 0xE0F9: 0x74CA, + 0xE0FA: 0x74CF, + 0xE0FB: 0x74D4, + 0xE0FC: 0x73F1, + 0xE140: 0x74E0, + 0xE141: 0x74E3, + 0xE142: 0x74E7, + 0xE143: 0x74E9, + 0xE144: 0x74EE, + 0xE145: 0x74F2, + 0xE146: 0x74F0, + 0xE147: 0x74F1, + 0xE148: 0x74F8, + 0xE149: 0x74F7, + 0xE14A: 0x7504, + 0xE14B: 0x7503, + 0xE14C: 0x7505, + 0xE14D: 0x750C, + 0xE14E: 0x750E, + 0xE14F: 0x750D, + 0xE150: 0x7515, + 0xE151: 0x7513, + 0xE152: 0x751E, + 0xE153: 0x7526, + 0xE154: 0x752C, + 0xE155: 0x753C, + 0xE156: 0x7544, + 0xE157: 0x754D, + 0xE158: 0x754A, + 0xE159: 0x7549, + 0xE15A: 0x755B, + 0xE15B: 0x7546, + 0xE15C: 0x755A, + 0xE15D: 0x7569, + 0xE15E: 0x7564, + 0xE15F: 0x7567, + 0xE160: 0x756B, + 0xE161: 0x756D, + 0xE162: 0x7578, + 0xE163: 0x7576, + 0xE164: 0x7586, + 0xE165: 0x7587, + 0xE166: 0x7574, + 0xE167: 0x758A, + 0xE168: 0x7589, + 0xE169: 0x7582, + 0xE16A: 0x7594, + 0xE16B: 0x759A, + 0xE16C: 0x759D, + 0xE16D: 0x75A5, + 0xE16E: 0x75A3, + 0xE16F: 0x75C2, + 0xE170: 0x75B3, + 0xE171: 0x75C3, + 0xE172: 0x75B5, + 0xE173: 0x75BD, + 0xE174: 0x75B8, + 0xE175: 0x75BC, + 0xE176: 0x75B1, + 0xE177: 0x75CD, + 0xE178: 0x75CA, + 0xE179: 0x75D2, + 0xE17A: 0x75D9, + 0xE17B: 0x75E3, + 0xE17C: 0x75DE, + 0xE17D: 0x75FE, + 0xE17E: 0x75FF, + 0xE180: 0x75FC, + 0xE181: 0x7601, + 0xE182: 0x75F0, + 0xE183: 0x75FA, + 0xE184: 0x75F2, + 0xE185: 0x75F3, + 0xE186: 0x760B, + 0xE187: 0x760D, + 0xE188: 0x7609, + 0xE189: 0x761F, + 0xE18A: 0x7627, + 0xE18B: 0x7620, + 0xE18C: 0x7621, + 0xE18D: 0x7622, + 0xE18E: 0x7624, + 0xE18F: 0x7634, + 0xE190: 0x7630, + 0xE191: 0x763B, + 0xE192: 0x7647, + 0xE193: 0x7648, + 0xE194: 0x7646, + 0xE195: 0x765C, + 0xE196: 0x7658, + 0xE197: 0x7661, + 0xE198: 0x7662, + 0xE199: 0x7668, + 0xE19A: 0x7669, + 0xE19B: 0x766A, + 0xE19C: 0x7667, + 0xE19D: 0x766C, + 0xE19E: 0x7670, + 0xE19F: 0x7672, + 0xE1A0: 0x7676, + 0xE1A1: 0x7678, + 0xE1A2: 0x767C, + 0xE1A3: 0x7680, + 0xE1A4: 0x7683, + 0xE1A5: 0x7688, + 0xE1A6: 0x768B, + 0xE1A7: 0x768E, + 0xE1A8: 0x7696, + 0xE1A9: 0x7693, + 0xE1AA: 0x7699, + 0xE1AB: 0x769A, + 0xE1AC: 0x76B0, + 0xE1AD: 0x76B4, + 0xE1AE: 0x76B8, + 0xE1AF: 0x76B9, + 0xE1B0: 0x76BA, + 0xE1B1: 0x76C2, + 0xE1B2: 0x76CD, + 0xE1B3: 0x76D6, + 0xE1B4: 0x76D2, + 0xE1B5: 0x76DE, + 0xE1B6: 0x76E1, + 0xE1B7: 0x76E5, + 0xE1B8: 0x76E7, + 0xE1B9: 0x76EA, + 0xE1BA: 0x862F, + 0xE1BB: 0x76FB, + 0xE1BC: 0x7708, + 0xE1BD: 0x7707, + 0xE1BE: 0x7704, + 0xE1BF: 0x7729, + 0xE1C0: 0x7724, + 0xE1C1: 0x771E, + 0xE1C2: 0x7725, + 0xE1C3: 0x7726, + 0xE1C4: 0x771B, + 0xE1C5: 0x7737, + 0xE1C6: 0x7738, + 0xE1C7: 0x7747, + 0xE1C8: 0x775A, + 0xE1C9: 0x7768, + 0xE1CA: 0x776B, + 0xE1CB: 0x775B, + 0xE1CC: 0x7765, + 0xE1CD: 0x777F, + 0xE1CE: 0x777E, + 0xE1CF: 0x7779, + 0xE1D0: 0x778E, + 0xE1D1: 0x778B, + 0xE1D2: 0x7791, + 0xE1D3: 0x77A0, + 0xE1D4: 0x779E, + 0xE1D5: 0x77B0, + 0xE1D6: 0x77B6, + 0xE1D7: 0x77B9, + 0xE1D8: 0x77BF, + 0xE1D9: 0x77BC, + 0xE1DA: 0x77BD, + 0xE1DB: 0x77BB, + 0xE1DC: 0x77C7, + 0xE1DD: 0x77CD, + 0xE1DE: 0x77D7, + 0xE1DF: 0x77DA, + 0xE1E0: 0x77DC, + 0xE1E1: 0x77E3, + 0xE1E2: 0x77EE, + 0xE1E3: 0x77FC, + 0xE1E4: 0x780C, + 0xE1E5: 0x7812, + 0xE1E6: 0x7926, + 0xE1E7: 0x7820, + 0xE1E8: 0x792A, + 0xE1E9: 0x7845, + 0xE1EA: 0x788E, + 0xE1EB: 0x7874, + 0xE1EC: 0x7886, + 0xE1ED: 0x787C, + 0xE1EE: 0x789A, + 0xE1EF: 0x788C, + 0xE1F0: 0x78A3, + 0xE1F1: 0x78B5, + 0xE1F2: 0x78AA, + 0xE1F3: 0x78AF, + 0xE1F4: 0x78D1, + 0xE1F5: 0x78C6, + 0xE1F6: 0x78CB, + 0xE1F7: 0x78D4, + 0xE1F8: 0x78BE, + 0xE1F9: 0x78BC, + 0xE1FA: 0x78C5, + 0xE1FB: 0x78CA, + 0xE1FC: 0x78EC, + 0xE240: 0x78E7, + 0xE241: 0x78DA, + 0xE242: 0x78FD, + 0xE243: 0x78F4, + 0xE244: 0x7907, + 0xE245: 0x7912, + 0xE246: 0x7911, + 0xE247: 0x7919, + 0xE248: 0x792C, + 0xE249: 0x792B, + 0xE24A: 0x7940, + 0xE24B: 0x7960, + 0xE24C: 0x7957, + 0xE24D: 0x795F, + 0xE24E: 0x795A, + 0xE24F: 0x7955, + 0xE250: 0x7953, + 0xE251: 0x797A, + 0xE252: 0x797F, + 0xE253: 0x798A, + 0xE254: 0x799D, + 0xE255: 0x79A7, + 0xE256: 0x9F4B, + 0xE257: 0x79AA, + 0xE258: 0x79AE, + 0xE259: 0x79B3, + 0xE25A: 0x79B9, + 0xE25B: 0x79BA, + 0xE25C: 0x79C9, + 0xE25D: 0x79D5, + 0xE25E: 0x79E7, + 0xE25F: 0x79EC, + 0xE260: 0x79E1, + 0xE261: 0x79E3, + 0xE262: 0x7A08, + 0xE263: 0x7A0D, + 0xE264: 0x7A18, + 0xE265: 0x7A19, + 0xE266: 0x7A20, + 0xE267: 0x7A1F, + 0xE268: 0x7980, + 0xE269: 0x7A31, + 0xE26A: 0x7A3B, + 0xE26B: 0x7A3E, + 0xE26C: 0x7A37, + 0xE26D: 0x7A43, + 0xE26E: 0x7A57, + 0xE26F: 0x7A49, + 0xE270: 0x7A61, + 0xE271: 0x7A62, + 0xE272: 0x7A69, + 0xE273: 0x9F9D, + 0xE274: 0x7A70, + 0xE275: 0x7A79, + 0xE276: 0x7A7D, + 0xE277: 0x7A88, + 0xE278: 0x7A97, + 0xE279: 0x7A95, + 0xE27A: 0x7A98, + 0xE27B: 0x7A96, + 0xE27C: 0x7AA9, + 0xE27D: 0x7AC8, + 0xE27E: 0x7AB0, + 0xE280: 0x7AB6, + 0xE281: 0x7AC5, + 0xE282: 0x7AC4, + 0xE283: 0x7ABF, + 0xE284: 0x9083, + 0xE285: 0x7AC7, + 0xE286: 0x7ACA, + 0xE287: 0x7ACD, + 0xE288: 0x7ACF, + 0xE289: 0x7AD5, + 0xE28A: 0x7AD3, + 0xE28B: 0x7AD9, + 0xE28C: 0x7ADA, + 0xE28D: 0x7ADD, + 0xE28E: 0x7AE1, + 0xE28F: 0x7AE2, + 0xE290: 0x7AE6, + 0xE291: 0x7AED, + 0xE292: 0x7AF0, + 0xE293: 0x7B02, + 0xE294: 0x7B0F, + 0xE295: 0x7B0A, + 0xE296: 0x7B06, + 0xE297: 0x7B33, + 0xE298: 0x7B18, + 0xE299: 0x7B19, + 0xE29A: 0x7B1E, + 0xE29B: 0x7B35, + 0xE29C: 0x7B28, + 0xE29D: 0x7B36, + 0xE29E: 0x7B50, + 0xE29F: 0x7B7A, + 0xE2A0: 0x7B04, + 0xE2A1: 0x7B4D, + 0xE2A2: 0x7B0B, + 0xE2A3: 0x7B4C, + 0xE2A4: 0x7B45, + 0xE2A5: 0x7B75, + 0xE2A6: 0x7B65, + 0xE2A7: 0x7B74, + 0xE2A8: 0x7B67, + 0xE2A9: 0x7B70, + 0xE2AA: 0x7B71, + 0xE2AB: 0x7B6C, + 0xE2AC: 0x7B6E, + 0xE2AD: 0x7B9D, + 0xE2AE: 0x7B98, + 0xE2AF: 0x7B9F, + 0xE2B0: 0x7B8D, + 0xE2B1: 0x7B9C, + 0xE2B2: 0x7B9A, + 0xE2B3: 0x7B8B, + 0xE2B4: 0x7B92, + 0xE2B5: 0x7B8F, + 0xE2B6: 0x7B5D, + 0xE2B7: 0x7B99, + 0xE2B8: 0x7BCB, + 0xE2B9: 0x7BC1, + 0xE2BA: 0x7BCC, + 0xE2BB: 0x7BCF, + 0xE2BC: 0x7BB4, + 0xE2BD: 0x7BC6, + 0xE2BE: 0x7BDD, + 0xE2BF: 0x7BE9, + 0xE2C0: 0x7C11, + 0xE2C1: 0x7C14, + 0xE2C2: 0x7BE6, + 0xE2C3: 0x7BE5, + 0xE2C4: 0x7C60, + 0xE2C5: 0x7C00, + 0xE2C6: 0x7C07, + 0xE2C7: 0x7C13, + 0xE2C8: 0x7BF3, + 0xE2C9: 0x7BF7, + 0xE2CA: 0x7C17, + 0xE2CB: 0x7C0D, + 0xE2CC: 0x7BF6, + 0xE2CD: 0x7C23, + 0xE2CE: 0x7C27, + 0xE2CF: 0x7C2A, + 0xE2D0: 0x7C1F, + 0xE2D1: 0x7C37, + 0xE2D2: 0x7C2B, + 0xE2D3: 0x7C3D, + 0xE2D4: 0x7C4C, + 0xE2D5: 0x7C43, + 0xE2D6: 0x7C54, + 0xE2D7: 0x7C4F, + 0xE2D8: 0x7C40, + 0xE2D9: 0x7C50, + 0xE2DA: 0x7C58, + 0xE2DB: 0x7C5F, + 0xE2DC: 0x7C64, + 0xE2DD: 0x7C56, + 0xE2DE: 0x7C65, + 0xE2DF: 0x7C6C, + 0xE2E0: 0x7C75, + 0xE2E1: 0x7C83, + 0xE2E2: 0x7C90, + 0xE2E3: 0x7CA4, + 0xE2E4: 0x7CAD, + 0xE2E5: 0x7CA2, + 0xE2E6: 0x7CAB, + 0xE2E7: 0x7CA1, + 0xE2E8: 0x7CA8, + 0xE2E9: 0x7CB3, + 0xE2EA: 0x7CB2, + 0xE2EB: 0x7CB1, + 0xE2EC: 0x7CAE, + 0xE2ED: 0x7CB9, + 0xE2EE: 0x7CBD, + 0xE2EF: 0x7CC0, + 0xE2F0: 0x7CC5, + 0xE2F1: 0x7CC2, + 0xE2F2: 0x7CD8, + 0xE2F3: 0x7CD2, + 0xE2F4: 0x7CDC, + 0xE2F5: 0x7CE2, + 0xE2F6: 0x9B3B, + 0xE2F7: 0x7CEF, + 0xE2F8: 0x7CF2, + 0xE2F9: 0x7CF4, + 0xE2FA: 0x7CF6, + 0xE2FB: 0x7CFA, + 0xE2FC: 0x7D06, + 0xE340: 0x7D02, + 0xE341: 0x7D1C, + 0xE342: 0x7D15, + 0xE343: 0x7D0A, + 0xE344: 0x7D45, + 0xE345: 0x7D4B, + 0xE346: 0x7D2E, + 0xE347: 0x7D32, + 0xE348: 0x7D3F, + 0xE349: 0x7D35, + 0xE34A: 0x7D46, + 0xE34B: 0x7D73, + 0xE34C: 0x7D56, + 0xE34D: 0x7D4E, + 0xE34E: 0x7D72, + 0xE34F: 0x7D68, + 0xE350: 0x7D6E, + 0xE351: 0x7D4F, + 0xE352: 0x7D63, + 0xE353: 0x7D93, + 0xE354: 0x7D89, + 0xE355: 0x7D5B, + 0xE356: 0x7D8F, + 0xE357: 0x7D7D, + 0xE358: 0x7D9B, + 0xE359: 0x7DBA, + 0xE35A: 0x7DAE, + 0xE35B: 0x7DA3, + 0xE35C: 0x7DB5, + 0xE35D: 0x7DC7, + 0xE35E: 0x7DBD, + 0xE35F: 0x7DAB, + 0xE360: 0x7E3D, + 0xE361: 0x7DA2, + 0xE362: 0x7DAF, + 0xE363: 0x7DDC, + 0xE364: 0x7DB8, + 0xE365: 0x7D9F, + 0xE366: 0x7DB0, + 0xE367: 0x7DD8, + 0xE368: 0x7DDD, + 0xE369: 0x7DE4, + 0xE36A: 0x7DDE, + 0xE36B: 0x7DFB, + 0xE36C: 0x7DF2, + 0xE36D: 0x7DE1, + 0xE36E: 0x7E05, + 0xE36F: 0x7E0A, + 0xE370: 0x7E23, + 0xE371: 0x7E21, + 0xE372: 0x7E12, + 0xE373: 0x7E31, + 0xE374: 0x7E1F, + 0xE375: 0x7E09, + 0xE376: 0x7E0B, + 0xE377: 0x7E22, + 0xE378: 0x7E46, + 0xE379: 0x7E66, + 0xE37A: 0x7E3B, + 0xE37B: 0x7E35, + 0xE37C: 0x7E39, + 0xE37D: 0x7E43, + 0xE37E: 0x7E37, + 0xE380: 0x7E32, + 0xE381: 0x7E3A, + 0xE382: 0x7E67, + 0xE383: 0x7E5D, + 0xE384: 0x7E56, + 0xE385: 0x7E5E, + 0xE386: 0x7E59, + 0xE387: 0x7E5A, + 0xE388: 0x7E79, + 0xE389: 0x7E6A, + 0xE38A: 0x7E69, + 0xE38B: 0x7E7C, + 0xE38C: 0x7E7B, + 0xE38D: 0x7E83, + 0xE38E: 0x7DD5, + 0xE38F: 0x7E7D, + 0xE390: 0x8FAE, + 0xE391: 0x7E7F, + 0xE392: 0x7E88, + 0xE393: 0x7E89, + 0xE394: 0x7E8C, + 0xE395: 0x7E92, + 0xE396: 0x7E90, + 0xE397: 0x7E93, + 0xE398: 0x7E94, + 0xE399: 0x7E96, + 0xE39A: 0x7E8E, + 0xE39B: 0x7E9B, + 0xE39C: 0x7E9C, + 0xE39D: 0x7F38, + 0xE39E: 0x7F3A, + 0xE39F: 0x7F45, + 0xE3A0: 0x7F4C, + 0xE3A1: 0x7F4D, + 0xE3A2: 0x7F4E, + 0xE3A3: 0x7F50, + 0xE3A4: 0x7F51, + 0xE3A5: 0x7F55, + 0xE3A6: 0x7F54, + 0xE3A7: 0x7F58, + 0xE3A8: 0x7F5F, + 0xE3A9: 0x7F60, + 0xE3AA: 0x7F68, + 0xE3AB: 0x7F69, + 0xE3AC: 0x7F67, + 0xE3AD: 0x7F78, + 0xE3AE: 0x7F82, + 0xE3AF: 0x7F86, + 0xE3B0: 0x7F83, + 0xE3B1: 0x7F88, + 0xE3B2: 0x7F87, + 0xE3B3: 0x7F8C, + 0xE3B4: 0x7F94, + 0xE3B5: 0x7F9E, + 0xE3B6: 0x7F9D, + 0xE3B7: 0x7F9A, + 0xE3B8: 0x7FA3, + 0xE3B9: 0x7FAF, + 0xE3BA: 0x7FB2, + 0xE3BB: 0x7FB9, + 0xE3BC: 0x7FAE, + 0xE3BD: 0x7FB6, + 0xE3BE: 0x7FB8, + 0xE3BF: 0x8B71, + 0xE3C0: 0x7FC5, + 0xE3C1: 0x7FC6, + 0xE3C2: 0x7FCA, + 0xE3C3: 0x7FD5, + 0xE3C4: 0x7FD4, + 0xE3C5: 0x7FE1, + 0xE3C6: 0x7FE6, + 0xE3C7: 0x7FE9, + 0xE3C8: 0x7FF3, + 0xE3C9: 0x7FF9, + 0xE3CA: 0x98DC, + 0xE3CB: 0x8006, + 0xE3CC: 0x8004, + 0xE3CD: 0x800B, + 0xE3CE: 0x8012, + 0xE3CF: 0x8018, + 0xE3D0: 0x8019, + 0xE3D1: 0x801C, + 0xE3D2: 0x8021, + 0xE3D3: 0x8028, + 0xE3D4: 0x803F, + 0xE3D5: 0x803B, + 0xE3D6: 0x804A, + 0xE3D7: 0x8046, + 0xE3D8: 0x8052, + 0xE3D9: 0x8058, + 0xE3DA: 0x805A, + 0xE3DB: 0x805F, + 0xE3DC: 0x8062, + 0xE3DD: 0x8068, + 0xE3DE: 0x8073, + 0xE3DF: 0x8072, + 0xE3E0: 0x8070, + 0xE3E1: 0x8076, + 0xE3E2: 0x8079, + 0xE3E3: 0x807D, + 0xE3E4: 0x807F, + 0xE3E5: 0x8084, + 0xE3E6: 0x8086, + 0xE3E7: 0x8085, + 0xE3E8: 0x809B, + 0xE3E9: 0x8093, + 0xE3EA: 0x809A, + 0xE3EB: 0x80AD, + 0xE3EC: 0x5190, + 0xE3ED: 0x80AC, + 0xE3EE: 0x80DB, + 0xE3EF: 0x80E5, + 0xE3F0: 0x80D9, + 0xE3F1: 0x80DD, + 0xE3F2: 0x80C4, + 0xE3F3: 0x80DA, + 0xE3F4: 0x80D6, + 0xE3F5: 0x8109, + 0xE3F6: 0x80EF, + 0xE3F7: 0x80F1, + 0xE3F8: 0x811B, + 0xE3F9: 0x8129, + 0xE3FA: 0x8123, + 0xE3FB: 0x812F, + 0xE3FC: 0x814B, + 0xE440: 0x968B, + 0xE441: 0x8146, + 0xE442: 0x813E, + 0xE443: 0x8153, + 0xE444: 0x8151, + 0xE445: 0x80FC, + 0xE446: 0x8171, + 0xE447: 0x816E, + 0xE448: 0x8165, + 0xE449: 0x8166, + 0xE44A: 0x8174, + 0xE44B: 0x8183, + 0xE44C: 0x8188, + 0xE44D: 0x818A, + 0xE44E: 0x8180, + 0xE44F: 0x8182, + 0xE450: 0x81A0, + 0xE451: 0x8195, + 0xE452: 0x81A4, + 0xE453: 0x81A3, + 0xE454: 0x815F, + 0xE455: 0x8193, + 0xE456: 0x81A9, + 0xE457: 0x81B0, + 0xE458: 0x81B5, + 0xE459: 0x81BE, + 0xE45A: 0x81B8, + 0xE45B: 0x81BD, + 0xE45C: 0x81C0, + 0xE45D: 0x81C2, + 0xE45E: 0x81BA, + 0xE45F: 0x81C9, + 0xE460: 0x81CD, + 0xE461: 0x81D1, + 0xE462: 0x81D9, + 0xE463: 0x81D8, + 0xE464: 0x81C8, + 0xE465: 0x81DA, + 0xE466: 0x81DF, + 0xE467: 0x81E0, + 0xE468: 0x81E7, + 0xE469: 0x81FA, + 0xE46A: 0x81FB, + 0xE46B: 0x81FE, + 0xE46C: 0x8201, + 0xE46D: 0x8202, + 0xE46E: 0x8205, + 0xE46F: 0x8207, + 0xE470: 0x820A, + 0xE471: 0x820D, + 0xE472: 0x8210, + 0xE473: 0x8216, + 0xE474: 0x8229, + 0xE475: 0x822B, + 0xE476: 0x8238, + 0xE477: 0x8233, + 0xE478: 0x8240, + 0xE479: 0x8259, + 0xE47A: 0x8258, + 0xE47B: 0x825D, + 0xE47C: 0x825A, + 0xE47D: 0x825F, + 0xE47E: 0x8264, + 0xE480: 0x8262, + 0xE481: 0x8268, + 0xE482: 0x826A, + 0xE483: 0x826B, + 0xE484: 0x822E, + 0xE485: 0x8271, + 0xE486: 0x8277, + 0xE487: 0x8278, + 0xE488: 0x827E, + 0xE489: 0x828D, + 0xE48A: 0x8292, + 0xE48B: 0x82AB, + 0xE48C: 0x829F, + 0xE48D: 0x82BB, + 0xE48E: 0x82AC, + 0xE48F: 0x82E1, + 0xE490: 0x82E3, + 0xE491: 0x82DF, + 0xE492: 0x82D2, + 0xE493: 0x82F4, + 0xE494: 0x82F3, + 0xE495: 0x82FA, + 0xE496: 0x8393, + 0xE497: 0x8303, + 0xE498: 0x82FB, + 0xE499: 0x82F9, + 0xE49A: 0x82DE, + 0xE49B: 0x8306, + 0xE49C: 0x82DC, + 0xE49D: 0x8309, + 0xE49E: 0x82D9, + 0xE49F: 0x8335, + 0xE4A0: 0x8334, + 0xE4A1: 0x8316, + 0xE4A2: 0x8332, + 0xE4A3: 0x8331, + 0xE4A4: 0x8340, + 0xE4A5: 0x8339, + 0xE4A6: 0x8350, + 0xE4A7: 0x8345, + 0xE4A8: 0x832F, + 0xE4A9: 0x832B, + 0xE4AA: 0x8317, + 0xE4AB: 0x8318, + 0xE4AC: 0x8385, + 0xE4AD: 0x839A, + 0xE4AE: 0x83AA, + 0xE4AF: 0x839F, + 0xE4B0: 0x83A2, + 0xE4B1: 0x8396, + 0xE4B2: 0x8323, + 0xE4B3: 0x838E, + 0xE4B4: 0x8387, + 0xE4B5: 0x838A, + 0xE4B6: 0x837C, + 0xE4B7: 0x83B5, + 0xE4B8: 0x8373, + 0xE4B9: 0x8375, + 0xE4BA: 0x83A0, + 0xE4BB: 0x8389, + 0xE4BC: 0x83A8, + 0xE4BD: 0x83F4, + 0xE4BE: 0x8413, + 0xE4BF: 0x83EB, + 0xE4C0: 0x83CE, + 0xE4C1: 0x83FD, + 0xE4C2: 0x8403, + 0xE4C3: 0x83D8, + 0xE4C4: 0x840B, + 0xE4C5: 0x83C1, + 0xE4C6: 0x83F7, + 0xE4C7: 0x8407, + 0xE4C8: 0x83E0, + 0xE4C9: 0x83F2, + 0xE4CA: 0x840D, + 0xE4CB: 0x8422, + 0xE4CC: 0x8420, + 0xE4CD: 0x83BD, + 0xE4CE: 0x8438, + 0xE4CF: 0x8506, + 0xE4D0: 0x83FB, + 0xE4D1: 0x846D, + 0xE4D2: 0x842A, + 0xE4D3: 0x843C, + 0xE4D4: 0x855A, + 0xE4D5: 0x8484, + 0xE4D6: 0x8477, + 0xE4D7: 0x846B, + 0xE4D8: 0x84AD, + 0xE4D9: 0x846E, + 0xE4DA: 0x8482, + 0xE4DB: 0x8469, + 0xE4DC: 0x8446, + 0xE4DD: 0x842C, + 0xE4DE: 0x846F, + 0xE4DF: 0x8479, + 0xE4E0: 0x8435, + 0xE4E1: 0x84CA, + 0xE4E2: 0x8462, + 0xE4E3: 0x84B9, + 0xE4E4: 0x84BF, + 0xE4E5: 0x849F, + 0xE4E6: 0x84D9, + 0xE4E7: 0x84CD, + 0xE4E8: 0x84BB, + 0xE4E9: 0x84DA, + 0xE4EA: 0x84D0, + 0xE4EB: 0x84C1, + 0xE4EC: 0x84C6, + 0xE4ED: 0x84D6, + 0xE4EE: 0x84A1, + 0xE4EF: 0x8521, + 0xE4F0: 0x84FF, + 0xE4F1: 0x84F4, + 0xE4F2: 0x8517, + 0xE4F3: 0x8518, + 0xE4F4: 0x852C, + 0xE4F5: 0x851F, + 0xE4F6: 0x8515, + 0xE4F7: 0x8514, + 0xE4F8: 0x84FC, + 0xE4F9: 0x8540, + 0xE4FA: 0x8563, + 0xE4FB: 0x8558, + 0xE4FC: 0x8548, + 0xE540: 0x8541, + 0xE541: 0x8602, + 0xE542: 0x854B, + 0xE543: 0x8555, + 0xE544: 0x8580, + 0xE545: 0x85A4, + 0xE546: 0x8588, + 0xE547: 0x8591, + 0xE548: 0x858A, + 0xE549: 0x85A8, + 0xE54A: 0x856D, + 0xE54B: 0x8594, + 0xE54C: 0x859B, + 0xE54D: 0x85EA, + 0xE54E: 0x8587, + 0xE54F: 0x859C, + 0xE550: 0x8577, + 0xE551: 0x857E, + 0xE552: 0x8590, + 0xE553: 0x85C9, + 0xE554: 0x85BA, + 0xE555: 0x85CF, + 0xE556: 0x85B9, + 0xE557: 0x85D0, + 0xE558: 0x85D5, + 0xE559: 0x85DD, + 0xE55A: 0x85E5, + 0xE55B: 0x85DC, + 0xE55C: 0x85F9, + 0xE55D: 0x860A, + 0xE55E: 0x8613, + 0xE55F: 0x860B, + 0xE560: 0x85FE, + 0xE561: 0x85FA, + 0xE562: 0x8606, + 0xE563: 0x8622, + 0xE564: 0x861A, + 0xE565: 0x8630, + 0xE566: 0x863F, + 0xE567: 0x864D, + 0xE568: 0x4E55, + 0xE569: 0x8654, + 0xE56A: 0x865F, + 0xE56B: 0x8667, + 0xE56C: 0x8671, + 0xE56D: 0x8693, + 0xE56E: 0x86A3, + 0xE56F: 0x86A9, + 0xE570: 0x86AA, + 0xE571: 0x868B, + 0xE572: 0x868C, + 0xE573: 0x86B6, + 0xE574: 0x86AF, + 0xE575: 0x86C4, + 0xE576: 0x86C6, + 0xE577: 0x86B0, + 0xE578: 0x86C9, + 0xE579: 0x8823, + 0xE57A: 0x86AB, + 0xE57B: 0x86D4, + 0xE57C: 0x86DE, + 0xE57D: 0x86E9, + 0xE57E: 0x86EC, + 0xE580: 0x86DF, + 0xE581: 0x86DB, + 0xE582: 0x86EF, + 0xE583: 0x8712, + 0xE584: 0x8706, + 0xE585: 0x8708, + 0xE586: 0x8700, + 0xE587: 0x8703, + 0xE588: 0x86FB, + 0xE589: 0x8711, + 0xE58A: 0x8709, + 0xE58B: 0x870D, + 0xE58C: 0x86F9, + 0xE58D: 0x870A, + 0xE58E: 0x8734, + 0xE58F: 0x873F, + 0xE590: 0x8737, + 0xE591: 0x873B, + 0xE592: 0x8725, + 0xE593: 0x8729, + 0xE594: 0x871A, + 0xE595: 0x8760, + 0xE596: 0x875F, + 0xE597: 0x8778, + 0xE598: 0x874C, + 0xE599: 0x874E, + 0xE59A: 0x8774, + 0xE59B: 0x8757, + 0xE59C: 0x8768, + 0xE59D: 0x876E, + 0xE59E: 0x8759, + 0xE59F: 0x8753, + 0xE5A0: 0x8763, + 0xE5A1: 0x876A, + 0xE5A2: 0x8805, + 0xE5A3: 0x87A2, + 0xE5A4: 0x879F, + 0xE5A5: 0x8782, + 0xE5A6: 0x87AF, + 0xE5A7: 0x87CB, + 0xE5A8: 0x87BD, + 0xE5A9: 0x87C0, + 0xE5AA: 0x87D0, + 0xE5AB: 0x96D6, + 0xE5AC: 0x87AB, + 0xE5AD: 0x87C4, + 0xE5AE: 0x87B3, + 0xE5AF: 0x87C7, + 0xE5B0: 0x87C6, + 0xE5B1: 0x87BB, + 0xE5B2: 0x87EF, + 0xE5B3: 0x87F2, + 0xE5B4: 0x87E0, + 0xE5B5: 0x880F, + 0xE5B6: 0x880D, + 0xE5B7: 0x87FE, + 0xE5B8: 0x87F6, + 0xE5B9: 0x87F7, + 0xE5BA: 0x880E, + 0xE5BB: 0x87D2, + 0xE5BC: 0x8811, + 0xE5BD: 0x8816, + 0xE5BE: 0x8815, + 0xE5BF: 0x8822, + 0xE5C0: 0x8821, + 0xE5C1: 0x8831, + 0xE5C2: 0x8836, + 0xE5C3: 0x8839, + 0xE5C4: 0x8827, + 0xE5C5: 0x883B, + 0xE5C6: 0x8844, + 0xE5C7: 0x8842, + 0xE5C8: 0x8852, + 0xE5C9: 0x8859, + 0xE5CA: 0x885E, + 0xE5CB: 0x8862, + 0xE5CC: 0x886B, + 0xE5CD: 0x8881, + 0xE5CE: 0x887E, + 0xE5CF: 0x889E, + 0xE5D0: 0x8875, + 0xE5D1: 0x887D, + 0xE5D2: 0x88B5, + 0xE5D3: 0x8872, + 0xE5D4: 0x8882, + 0xE5D5: 0x8897, + 0xE5D6: 0x8892, + 0xE5D7: 0x88AE, + 0xE5D8: 0x8899, + 0xE5D9: 0x88A2, + 0xE5DA: 0x888D, + 0xE5DB: 0x88A4, + 0xE5DC: 0x88B0, + 0xE5DD: 0x88BF, + 0xE5DE: 0x88B1, + 0xE5DF: 0x88C3, + 0xE5E0: 0x88C4, + 0xE5E1: 0x88D4, + 0xE5E2: 0x88D8, + 0xE5E3: 0x88D9, + 0xE5E4: 0x88DD, + 0xE5E5: 0x88F9, + 0xE5E6: 0x8902, + 0xE5E7: 0x88FC, + 0xE5E8: 0x88F4, + 0xE5E9: 0x88E8, + 0xE5EA: 0x88F2, + 0xE5EB: 0x8904, + 0xE5EC: 0x890C, + 0xE5ED: 0x890A, + 0xE5EE: 0x8913, + 0xE5EF: 0x8943, + 0xE5F0: 0x891E, + 0xE5F1: 0x8925, + 0xE5F2: 0x892A, + 0xE5F3: 0x892B, + 0xE5F4: 0x8941, + 0xE5F5: 0x8944, + 0xE5F6: 0x893B, + 0xE5F7: 0x8936, + 0xE5F8: 0x8938, + 0xE5F9: 0x894C, + 0xE5FA: 0x891D, + 0xE5FB: 0x8960, + 0xE5FC: 0x895E, + 0xE640: 0x8966, + 0xE641: 0x8964, + 0xE642: 0x896D, + 0xE643: 0x896A, + 0xE644: 0x896F, + 0xE645: 0x8974, + 0xE646: 0x8977, + 0xE647: 0x897E, + 0xE648: 0x8983, + 0xE649: 0x8988, + 0xE64A: 0x898A, + 0xE64B: 0x8993, + 0xE64C: 0x8998, + 0xE64D: 0x89A1, + 0xE64E: 0x89A9, + 0xE64F: 0x89A6, + 0xE650: 0x89AC, + 0xE651: 0x89AF, + 0xE652: 0x89B2, + 0xE653: 0x89BA, + 0xE654: 0x89BD, + 0xE655: 0x89BF, + 0xE656: 0x89C0, + 0xE657: 0x89DA, + 0xE658: 0x89DC, + 0xE659: 0x89DD, + 0xE65A: 0x89E7, + 0xE65B: 0x89F4, + 0xE65C: 0x89F8, + 0xE65D: 0x8A03, + 0xE65E: 0x8A16, + 0xE65F: 0x8A10, + 0xE660: 0x8A0C, + 0xE661: 0x8A1B, + 0xE662: 0x8A1D, + 0xE663: 0x8A25, + 0xE664: 0x8A36, + 0xE665: 0x8A41, + 0xE666: 0x8A5B, + 0xE667: 0x8A52, + 0xE668: 0x8A46, + 0xE669: 0x8A48, + 0xE66A: 0x8A7C, + 0xE66B: 0x8A6D, + 0xE66C: 0x8A6C, + 0xE66D: 0x8A62, + 0xE66E: 0x8A85, + 0xE66F: 0x8A82, + 0xE670: 0x8A84, + 0xE671: 0x8AA8, + 0xE672: 0x8AA1, + 0xE673: 0x8A91, + 0xE674: 0x8AA5, + 0xE675: 0x8AA6, + 0xE676: 0x8A9A, + 0xE677: 0x8AA3, + 0xE678: 0x8AC4, + 0xE679: 0x8ACD, + 0xE67A: 0x8AC2, + 0xE67B: 0x8ADA, + 0xE67C: 0x8AEB, + 0xE67D: 0x8AF3, + 0xE67E: 0x8AE7, + 0xE680: 0x8AE4, + 0xE681: 0x8AF1, + 0xE682: 0x8B14, + 0xE683: 0x8AE0, + 0xE684: 0x8AE2, + 0xE685: 0x8AF7, + 0xE686: 0x8ADE, + 0xE687: 0x8ADB, + 0xE688: 0x8B0C, + 0xE689: 0x8B07, + 0xE68A: 0x8B1A, + 0xE68B: 0x8AE1, + 0xE68C: 0x8B16, + 0xE68D: 0x8B10, + 0xE68E: 0x8B17, + 0xE68F: 0x8B20, + 0xE690: 0x8B33, + 0xE691: 0x97AB, + 0xE692: 0x8B26, + 0xE693: 0x8B2B, + 0xE694: 0x8B3E, + 0xE695: 0x8B28, + 0xE696: 0x8B41, + 0xE697: 0x8B4C, + 0xE698: 0x8B4F, + 0xE699: 0x8B4E, + 0xE69A: 0x8B49, + 0xE69B: 0x8B56, + 0xE69C: 0x8B5B, + 0xE69D: 0x8B5A, + 0xE69E: 0x8B6B, + 0xE69F: 0x8B5F, + 0xE6A0: 0x8B6C, + 0xE6A1: 0x8B6F, + 0xE6A2: 0x8B74, + 0xE6A3: 0x8B7D, + 0xE6A4: 0x8B80, + 0xE6A5: 0x8B8C, + 0xE6A6: 0x8B8E, + 0xE6A7: 0x8B92, + 0xE6A8: 0x8B93, + 0xE6A9: 0x8B96, + 0xE6AA: 0x8B99, + 0xE6AB: 0x8B9A, + 0xE6AC: 0x8C3A, + 0xE6AD: 0x8C41, + 0xE6AE: 0x8C3F, + 0xE6AF: 0x8C48, + 0xE6B0: 0x8C4C, + 0xE6B1: 0x8C4E, + 0xE6B2: 0x8C50, + 0xE6B3: 0x8C55, + 0xE6B4: 0x8C62, + 0xE6B5: 0x8C6C, + 0xE6B6: 0x8C78, + 0xE6B7: 0x8C7A, + 0xE6B8: 0x8C82, + 0xE6B9: 0x8C89, + 0xE6BA: 0x8C85, + 0xE6BB: 0x8C8A, + 0xE6BC: 0x8C8D, + 0xE6BD: 0x8C8E, + 0xE6BE: 0x8C94, + 0xE6BF: 0x8C7C, + 0xE6C0: 0x8C98, + 0xE6C1: 0x621D, + 0xE6C2: 0x8CAD, + 0xE6C3: 0x8CAA, + 0xE6C4: 0x8CBD, + 0xE6C5: 0x8CB2, + 0xE6C6: 0x8CB3, + 0xE6C7: 0x8CAE, + 0xE6C8: 0x8CB6, + 0xE6C9: 0x8CC8, + 0xE6CA: 0x8CC1, + 0xE6CB: 0x8CE4, + 0xE6CC: 0x8CE3, + 0xE6CD: 0x8CDA, + 0xE6CE: 0x8CFD, + 0xE6CF: 0x8CFA, + 0xE6D0: 0x8CFB, + 0xE6D1: 0x8D04, + 0xE6D2: 0x8D05, + 0xE6D3: 0x8D0A, + 0xE6D4: 0x8D07, + 0xE6D5: 0x8D0F, + 0xE6D6: 0x8D0D, + 0xE6D7: 0x8D10, + 0xE6D8: 0x9F4E, + 0xE6D9: 0x8D13, + 0xE6DA: 0x8CCD, + 0xE6DB: 0x8D14, + 0xE6DC: 0x8D16, + 0xE6DD: 0x8D67, + 0xE6DE: 0x8D6D, + 0xE6DF: 0x8D71, + 0xE6E0: 0x8D73, + 0xE6E1: 0x8D81, + 0xE6E2: 0x8D99, + 0xE6E3: 0x8DC2, + 0xE6E4: 0x8DBE, + 0xE6E5: 0x8DBA, + 0xE6E6: 0x8DCF, + 0xE6E7: 0x8DDA, + 0xE6E8: 0x8DD6, + 0xE6E9: 0x8DCC, + 0xE6EA: 0x8DDB, + 0xE6EB: 0x8DCB, + 0xE6EC: 0x8DEA, + 0xE6ED: 0x8DEB, + 0xE6EE: 0x8DDF, + 0xE6EF: 0x8DE3, + 0xE6F0: 0x8DFC, + 0xE6F1: 0x8E08, + 0xE6F2: 0x8E09, + 0xE6F3: 0x8DFF, + 0xE6F4: 0x8E1D, + 0xE6F5: 0x8E1E, + 0xE6F6: 0x8E10, + 0xE6F7: 0x8E1F, + 0xE6F8: 0x8E42, + 0xE6F9: 0x8E35, + 0xE6FA: 0x8E30, + 0xE6FB: 0x8E34, + 0xE6FC: 0x8E4A, + 0xE740: 0x8E47, + 0xE741: 0x8E49, + 0xE742: 0x8E4C, + 0xE743: 0x8E50, + 0xE744: 0x8E48, + 0xE745: 0x8E59, + 0xE746: 0x8E64, + 0xE747: 0x8E60, + 0xE748: 0x8E2A, + 0xE749: 0x8E63, + 0xE74A: 0x8E55, + 0xE74B: 0x8E76, + 0xE74C: 0x8E72, + 0xE74D: 0x8E7C, + 0xE74E: 0x8E81, + 0xE74F: 0x8E87, + 0xE750: 0x8E85, + 0xE751: 0x8E84, + 0xE752: 0x8E8B, + 0xE753: 0x8E8A, + 0xE754: 0x8E93, + 0xE755: 0x8E91, + 0xE756: 0x8E94, + 0xE757: 0x8E99, + 0xE758: 0x8EAA, + 0xE759: 0x8EA1, + 0xE75A: 0x8EAC, + 0xE75B: 0x8EB0, + 0xE75C: 0x8EC6, + 0xE75D: 0x8EB1, + 0xE75E: 0x8EBE, + 0xE75F: 0x8EC5, + 0xE760: 0x8EC8, + 0xE761: 0x8ECB, + 0xE762: 0x8EDB, + 0xE763: 0x8EE3, + 0xE764: 0x8EFC, + 0xE765: 0x8EFB, + 0xE766: 0x8EEB, + 0xE767: 0x8EFE, + 0xE768: 0x8F0A, + 0xE769: 0x8F05, + 0xE76A: 0x8F15, + 0xE76B: 0x8F12, + 0xE76C: 0x8F19, + 0xE76D: 0x8F13, + 0xE76E: 0x8F1C, + 0xE76F: 0x8F1F, + 0xE770: 0x8F1B, + 0xE771: 0x8F0C, + 0xE772: 0x8F26, + 0xE773: 0x8F33, + 0xE774: 0x8F3B, + 0xE775: 0x8F39, + 0xE776: 0x8F45, + 0xE777: 0x8F42, + 0xE778: 0x8F3E, + 0xE779: 0x8F4C, + 0xE77A: 0x8F49, + 0xE77B: 0x8F46, + 0xE77C: 0x8F4E, + 0xE77D: 0x8F57, + 0xE77E: 0x8F5C, + 0xE780: 0x8F62, + 0xE781: 0x8F63, + 0xE782: 0x8F64, + 0xE783: 0x8F9C, + 0xE784: 0x8F9F, + 0xE785: 0x8FA3, + 0xE786: 0x8FAD, + 0xE787: 0x8FAF, + 0xE788: 0x8FB7, + 0xE789: 0x8FDA, + 0xE78A: 0x8FE5, + 0xE78B: 0x8FE2, + 0xE78C: 0x8FEA, + 0xE78D: 0x8FEF, + 0xE78E: 0x9087, + 0xE78F: 0x8FF4, + 0xE790: 0x9005, + 0xE791: 0x8FF9, + 0xE792: 0x8FFA, + 0xE793: 0x9011, + 0xE794: 0x9015, + 0xE795: 0x9021, + 0xE796: 0x900D, + 0xE797: 0x901E, + 0xE798: 0x9016, + 0xE799: 0x900B, + 0xE79A: 0x9027, + 0xE79B: 0x9036, + 0xE79C: 0x9035, + 0xE79D: 0x9039, + 0xE79E: 0x8FF8, + 0xE79F: 0x904F, + 0xE7A0: 0x9050, + 0xE7A1: 0x9051, + 0xE7A2: 0x9052, + 0xE7A3: 0x900E, + 0xE7A4: 0x9049, + 0xE7A5: 0x903E, + 0xE7A6: 0x9056, + 0xE7A7: 0x9058, + 0xE7A8: 0x905E, + 0xE7A9: 0x9068, + 0xE7AA: 0x906F, + 0xE7AB: 0x9076, + 0xE7AC: 0x96A8, + 0xE7AD: 0x9072, + 0xE7AE: 0x9082, + 0xE7AF: 0x907D, + 0xE7B0: 0x9081, + 0xE7B1: 0x9080, + 0xE7B2: 0x908A, + 0xE7B3: 0x9089, + 0xE7B4: 0x908F, + 0xE7B5: 0x90A8, + 0xE7B6: 0x90AF, + 0xE7B7: 0x90B1, + 0xE7B8: 0x90B5, + 0xE7B9: 0x90E2, + 0xE7BA: 0x90E4, + 0xE7BB: 0x6248, + 0xE7BC: 0x90DB, + 0xE7BD: 0x9102, + 0xE7BE: 0x9112, + 0xE7BF: 0x9119, + 0xE7C0: 0x9132, + 0xE7C1: 0x9130, + 0xE7C2: 0x914A, + 0xE7C3: 0x9156, + 0xE7C4: 0x9158, + 0xE7C5: 0x9163, + 0xE7C6: 0x9165, + 0xE7C7: 0x9169, + 0xE7C8: 0x9173, + 0xE7C9: 0x9172, + 0xE7CA: 0x918B, + 0xE7CB: 0x9189, + 0xE7CC: 0x9182, + 0xE7CD: 0x91A2, + 0xE7CE: 0x91AB, + 0xE7CF: 0x91AF, + 0xE7D0: 0x91AA, + 0xE7D1: 0x91B5, + 0xE7D2: 0x91B4, + 0xE7D3: 0x91BA, + 0xE7D4: 0x91C0, + 0xE7D5: 0x91C1, + 0xE7D6: 0x91C9, + 0xE7D7: 0x91CB, + 0xE7D8: 0x91D0, + 0xE7D9: 0x91D6, + 0xE7DA: 0x91DF, + 0xE7DB: 0x91E1, + 0xE7DC: 0x91DB, + 0xE7DD: 0x91FC, + 0xE7DE: 0x91F5, + 0xE7DF: 0x91F6, + 0xE7E0: 0x921E, + 0xE7E1: 0x91FF, + 0xE7E2: 0x9214, + 0xE7E3: 0x922C, + 0xE7E4: 0x9215, + 0xE7E5: 0x9211, + 0xE7E6: 0x925E, + 0xE7E7: 0x9257, + 0xE7E8: 0x9245, + 0xE7E9: 0x9249, + 0xE7EA: 0x9264, + 0xE7EB: 0x9248, + 0xE7EC: 0x9295, + 0xE7ED: 0x923F, + 0xE7EE: 0x924B, + 0xE7EF: 0x9250, + 0xE7F0: 0x929C, + 0xE7F1: 0x9296, + 0xE7F2: 0x9293, + 0xE7F3: 0x929B, + 0xE7F4: 0x925A, + 0xE7F5: 0x92CF, + 0xE7F6: 0x92B9, + 0xE7F7: 0x92B7, + 0xE7F8: 0x92E9, + 0xE7F9: 0x930F, + 0xE7FA: 0x92FA, + 0xE7FB: 0x9344, + 0xE7FC: 0x932E, + 0xE840: 0x9319, + 0xE841: 0x9322, + 0xE842: 0x931A, + 0xE843: 0x9323, + 0xE844: 0x933A, + 0xE845: 0x9335, + 0xE846: 0x933B, + 0xE847: 0x935C, + 0xE848: 0x9360, + 0xE849: 0x937C, + 0xE84A: 0x936E, + 0xE84B: 0x9356, + 0xE84C: 0x93B0, + 0xE84D: 0x93AC, + 0xE84E: 0x93AD, + 0xE84F: 0x9394, + 0xE850: 0x93B9, + 0xE851: 0x93D6, + 0xE852: 0x93D7, + 0xE853: 0x93E8, + 0xE854: 0x93E5, + 0xE855: 0x93D8, + 0xE856: 0x93C3, + 0xE857: 0x93DD, + 0xE858: 0x93D0, + 0xE859: 0x93C8, + 0xE85A: 0x93E4, + 0xE85B: 0x941A, + 0xE85C: 0x9414, + 0xE85D: 0x9413, + 0xE85E: 0x9403, + 0xE85F: 0x9407, + 0xE860: 0x9410, + 0xE861: 0x9436, + 0xE862: 0x942B, + 0xE863: 0x9435, + 0xE864: 0x9421, + 0xE865: 0x943A, + 0xE866: 0x9441, + 0xE867: 0x9452, + 0xE868: 0x9444, + 0xE869: 0x945B, + 0xE86A: 0x9460, + 0xE86B: 0x9462, + 0xE86C: 0x945E, + 0xE86D: 0x946A, + 0xE86E: 0x9229, + 0xE86F: 0x9470, + 0xE870: 0x9475, + 0xE871: 0x9477, + 0xE872: 0x947D, + 0xE873: 0x945A, + 0xE874: 0x947C, + 0xE875: 0x947E, + 0xE876: 0x9481, + 0xE877: 0x947F, + 0xE878: 0x9582, + 0xE879: 0x9587, + 0xE87A: 0x958A, + 0xE87B: 0x9594, + 0xE87C: 0x9596, + 0xE87D: 0x9598, + 0xE87E: 0x9599, + 0xE880: 0x95A0, + 0xE881: 0x95A8, + 0xE882: 0x95A7, + 0xE883: 0x95AD, + 0xE884: 0x95BC, + 0xE885: 0x95BB, + 0xE886: 0x95B9, + 0xE887: 0x95BE, + 0xE888: 0x95CA, + 0xE889: 0x6FF6, + 0xE88A: 0x95C3, + 0xE88B: 0x95CD, + 0xE88C: 0x95CC, + 0xE88D: 0x95D5, + 0xE88E: 0x95D4, + 0xE88F: 0x95D6, + 0xE890: 0x95DC, + 0xE891: 0x95E1, + 0xE892: 0x95E5, + 0xE893: 0x95E2, + 0xE894: 0x9621, + 0xE895: 0x9628, + 0xE896: 0x962E, + 0xE897: 0x962F, + 0xE898: 0x9642, + 0xE899: 0x964C, + 0xE89A: 0x964F, + 0xE89B: 0x964B, + 0xE89C: 0x9677, + 0xE89D: 0x965C, + 0xE89E: 0x965E, + 0xE89F: 0x965D, + 0xE8A0: 0x965F, + 0xE8A1: 0x9666, + 0xE8A2: 0x9672, + 0xE8A3: 0x966C, + 0xE8A4: 0x968D, + 0xE8A5: 0x9698, + 0xE8A6: 0x9695, + 0xE8A7: 0x9697, + 0xE8A8: 0x96AA, + 0xE8A9: 0x96A7, + 0xE8AA: 0x96B1, + 0xE8AB: 0x96B2, + 0xE8AC: 0x96B0, + 0xE8AD: 0x96B4, + 0xE8AE: 0x96B6, + 0xE8AF: 0x96B8, + 0xE8B0: 0x96B9, + 0xE8B1: 0x96CE, + 0xE8B2: 0x96CB, + 0xE8B3: 0x96C9, + 0xE8B4: 0x96CD, + 0xE8B5: 0x894D, + 0xE8B6: 0x96DC, + 0xE8B7: 0x970D, + 0xE8B8: 0x96D5, + 0xE8B9: 0x96F9, + 0xE8BA: 0x9704, + 0xE8BB: 0x9706, + 0xE8BC: 0x9708, + 0xE8BD: 0x9713, + 0xE8BE: 0x970E, + 0xE8BF: 0x9711, + 0xE8C0: 0x970F, + 0xE8C1: 0x9716, + 0xE8C2: 0x9719, + 0xE8C3: 0x9724, + 0xE8C4: 0x972A, + 0xE8C5: 0x9730, + 0xE8C6: 0x9739, + 0xE8C7: 0x973D, + 0xE8C8: 0x973E, + 0xE8C9: 0x9744, + 0xE8CA: 0x9746, + 0xE8CB: 0x9748, + 0xE8CC: 0x9742, + 0xE8CD: 0x9749, + 0xE8CE: 0x975C, + 0xE8CF: 0x9760, + 0xE8D0: 0x9764, + 0xE8D1: 0x9766, + 0xE8D2: 0x9768, + 0xE8D3: 0x52D2, + 0xE8D4: 0x976B, + 0xE8D5: 0x9771, + 0xE8D6: 0x9779, + 0xE8D7: 0x9785, + 0xE8D8: 0x977C, + 0xE8D9: 0x9781, + 0xE8DA: 0x977A, + 0xE8DB: 0x9786, + 0xE8DC: 0x978B, + 0xE8DD: 0x978F, + 0xE8DE: 0x9790, + 0xE8DF: 0x979C, + 0xE8E0: 0x97A8, + 0xE8E1: 0x97A6, + 0xE8E2: 0x97A3, + 0xE8E3: 0x97B3, + 0xE8E4: 0x97B4, + 0xE8E5: 0x97C3, + 0xE8E6: 0x97C6, + 0xE8E7: 0x97C8, + 0xE8E8: 0x97CB, + 0xE8E9: 0x97DC, + 0xE8EA: 0x97ED, + 0xE8EB: 0x9F4F, + 0xE8EC: 0x97F2, + 0xE8ED: 0x7ADF, + 0xE8EE: 0x97F6, + 0xE8EF: 0x97F5, + 0xE8F0: 0x980F, + 0xE8F1: 0x980C, + 0xE8F2: 0x9838, + 0xE8F3: 0x9824, + 0xE8F4: 0x9821, + 0xE8F5: 0x9837, + 0xE8F6: 0x983D, + 0xE8F7: 0x9846, + 0xE8F8: 0x984F, + 0xE8F9: 0x984B, + 0xE8FA: 0x986B, + 0xE8FB: 0x986F, + 0xE8FC: 0x9870, + 0xE940: 0x9871, + 0xE941: 0x9874, + 0xE942: 0x9873, + 0xE943: 0x98AA, + 0xE944: 0x98AF, + 0xE945: 0x98B1, + 0xE946: 0x98B6, + 0xE947: 0x98C4, + 0xE948: 0x98C3, + 0xE949: 0x98C6, + 0xE94A: 0x98E9, + 0xE94B: 0x98EB, + 0xE94C: 0x9903, + 0xE94D: 0x9909, + 0xE94E: 0x9912, + 0xE94F: 0x9914, + 0xE950: 0x9918, + 0xE951: 0x9921, + 0xE952: 0x991D, + 0xE953: 0x991E, + 0xE954: 0x9924, + 0xE955: 0x9920, + 0xE956: 0x992C, + 0xE957: 0x992E, + 0xE958: 0x993D, + 0xE959: 0x993E, + 0xE95A: 0x9942, + 0xE95B: 0x9949, + 0xE95C: 0x9945, + 0xE95D: 0x9950, + 0xE95E: 0x994B, + 0xE95F: 0x9951, + 0xE960: 0x9952, + 0xE961: 0x994C, + 0xE962: 0x9955, + 0xE963: 0x9997, + 0xE964: 0x9998, + 0xE965: 0x99A5, + 0xE966: 0x99AD, + 0xE967: 0x99AE, + 0xE968: 0x99BC, + 0xE969: 0x99DF, + 0xE96A: 0x99DB, + 0xE96B: 0x99DD, + 0xE96C: 0x99D8, + 0xE96D: 0x99D1, + 0xE96E: 0x99ED, + 0xE96F: 0x99EE, + 0xE970: 0x99F1, + 0xE971: 0x99F2, + 0xE972: 0x99FB, + 0xE973: 0x99F8, + 0xE974: 0x9A01, + 0xE975: 0x9A0F, + 0xE976: 0x9A05, + 0xE977: 0x99E2, + 0xE978: 0x9A19, + 0xE979: 0x9A2B, + 0xE97A: 0x9A37, + 0xE97B: 0x9A45, + 0xE97C: 0x9A42, + 0xE97D: 0x9A40, + 0xE97E: 0x9A43, + 0xE980: 0x9A3E, + 0xE981: 0x9A55, + 0xE982: 0x9A4D, + 0xE983: 0x9A5B, + 0xE984: 0x9A57, + 0xE985: 0x9A5F, + 0xE986: 0x9A62, + 0xE987: 0x9A65, + 0xE988: 0x9A64, + 0xE989: 0x9A69, + 0xE98A: 0x9A6B, + 0xE98B: 0x9A6A, + 0xE98C: 0x9AAD, + 0xE98D: 0x9AB0, + 0xE98E: 0x9ABC, + 0xE98F: 0x9AC0, + 0xE990: 0x9ACF, + 0xE991: 0x9AD1, + 0xE992: 0x9AD3, + 0xE993: 0x9AD4, + 0xE994: 0x9ADE, + 0xE995: 0x9ADF, + 0xE996: 0x9AE2, + 0xE997: 0x9AE3, + 0xE998: 0x9AE6, + 0xE999: 0x9AEF, + 0xE99A: 0x9AEB, + 0xE99B: 0x9AEE, + 0xE99C: 0x9AF4, + 0xE99D: 0x9AF1, + 0xE99E: 0x9AF7, + 0xE99F: 0x9AFB, + 0xE9A0: 0x9B06, + 0xE9A1: 0x9B18, + 0xE9A2: 0x9B1A, + 0xE9A3: 0x9B1F, + 0xE9A4: 0x9B22, + 0xE9A5: 0x9B23, + 0xE9A6: 0x9B25, + 0xE9A7: 0x9B27, + 0xE9A8: 0x9B28, + 0xE9A9: 0x9B29, + 0xE9AA: 0x9B2A, + 0xE9AB: 0x9B2E, + 0xE9AC: 0x9B2F, + 0xE9AD: 0x9B32, + 0xE9AE: 0x9B44, + 0xE9AF: 0x9B43, + 0xE9B0: 0x9B4F, + 0xE9B1: 0x9B4D, + 0xE9B2: 0x9B4E, + 0xE9B3: 0x9B51, + 0xE9B4: 0x9B58, + 0xE9B5: 0x9B74, + 0xE9B6: 0x9B93, + 0xE9B7: 0x9B83, + 0xE9B8: 0x9B91, + 0xE9B9: 0x9B96, + 0xE9BA: 0x9B97, + 0xE9BB: 0x9B9F, + 0xE9BC: 0x9BA0, + 0xE9BD: 0x9BA8, + 0xE9BE: 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0x9D48, + 0xEA40: 0x9D5D, + 0xEA41: 0x9D5E, + 0xEA42: 0x9D64, + 0xEA43: 0x9D51, + 0xEA44: 0x9D50, + 0xEA45: 0x9D59, + 0xEA46: 0x9D72, + 0xEA47: 0x9D89, + 0xEA48: 0x9D87, + 0xEA49: 0x9DAB, + 0xEA4A: 0x9D6F, + 0xEA4B: 0x9D7A, + 0xEA4C: 0x9D9A, + 0xEA4D: 0x9DA4, + 0xEA4E: 0x9DA9, + 0xEA4F: 0x9DB2, + 0xEA50: 0x9DC4, + 0xEA51: 0x9DC1, + 0xEA52: 0x9DBB, + 0xEA53: 0x9DB8, + 0xEA54: 0x9DBA, + 0xEA55: 0x9DC6, + 0xEA56: 0x9DCF, + 0xEA57: 0x9DC2, + 0xEA58: 0x9DD9, + 0xEA59: 0x9DD3, + 0xEA5A: 0x9DF8, + 0xEA5B: 0x9DE6, + 0xEA5C: 0x9DED, + 0xEA5D: 0x9DEF, + 0xEA5E: 0x9DFD, + 0xEA5F: 0x9E1A, + 0xEA60: 0x9E1B, + 0xEA61: 0x9E1E, + 0xEA62: 0x9E75, + 0xEA63: 0x9E79, + 0xEA64: 0x9E7D, + 0xEA65: 0x9E81, + 0xEA66: 0x9E88, + 0xEA67: 0x9E8B, + 0xEA68: 0x9E8C, + 0xEA69: 0x9E92, + 0xEA6A: 0x9E95, + 0xEA6B: 0x9E91, + 0xEA6C: 0x9E9D, + 0xEA6D: 0x9EA5, + 0xEA6E: 0x9EA9, + 0xEA6F: 0x9EB8, + 0xEA70: 0x9EAA, + 0xEA71: 0x9EAD, + 0xEA72: 0x9761, + 0xEA73: 0x9ECC, + 0xEA74: 0x9ECE, + 0xEA75: 0x9ECF, + 0xEA76: 0x9ED0, + 0xEA77: 0x9ED4, + 0xEA78: 0x9EDC, + 0xEA79: 0x9EDE, + 0xEA7A: 0x9EDD, + 0xEA7B: 0x9EE0, + 0xEA7C: 0x9EE5, + 0xEA7D: 0x9EE8, + 0xEA7E: 0x9EEF, + 0xEA80: 0x9EF4, + 0xEA81: 0x9EF6, + 0xEA82: 0x9EF7, + 0xEA83: 0x9EF9, + 0xEA84: 0x9EFB, + 0xEA85: 0x9EFC, + 0xEA86: 0x9EFD, + 0xEA87: 0x9F07, + 0xEA88: 0x9F08, + 0xEA89: 0x76B7, + 0xEA8A: 0x9F15, + 0xEA8B: 0x9F21, + 0xEA8C: 0x9F2C, + 0xEA8D: 0x9F3E, + 0xEA8E: 0x9F4A, + 0xEA8F: 0x9F52, + 0xEA90: 0x9F54, + 0xEA91: 0x9F63, + 0xEA92: 0x9F5F, + 0xEA93: 0x9F60, + 0xEA94: 0x9F61, + 0xEA95: 0x9F66, + 0xEA96: 0x9F67, + 0xEA97: 0x9F6C, + 0xEA98: 0x9F6A, + 0xEA99: 0x9F77, + 0xEA9A: 0x9F72, + 0xEA9B: 0x9F76, + 0xEA9C: 0x9F95, + 0xEA9D: 0x9F9C, + 0xEA9E: 0x9FA0, + 0xEA9F: 0x582F, + 0xEAA0: 0x69C7, + 0xEAA1: 0x9059, + 0xEAA2: 0x7464, + 0xEAA3: 0x51DC, + 0xEAA4: 0x7199, +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var GenericGF_1 = __webpack_require__(1); +var GenericGFPoly_1 = __webpack_require__(2); +function runEuclideanAlgorithm(field, a, b, R) { + var _a; + // Assume a's degree is >= b's + if (a.degree() < b.degree()) { + _a = [b, a], a = _a[0], b = _a[1]; + } + var rLast = a; + var r = b; + var tLast = field.zero; + var t = field.one; + // Run Euclidean algorithm until r's degree is less than R/2 + while (r.degree() >= R / 2) { + var rLastLast = rLast; + var tLastLast = tLast; + rLast = r; + tLast = t; + // Divide rLastLast by rLast, with quotient in q and remainder in r + if (rLast.isZero()) { + // Euclidean algorithm already terminated? + return null; + } + r = rLastLast; + var q = field.zero; + var denominatorLeadingTerm = rLast.getCoefficient(rLast.degree()); + var dltInverse = field.inverse(denominatorLeadingTerm); + while (r.degree() >= rLast.degree() && !r.isZero()) { + var degreeDiff = r.degree() - rLast.degree(); + var scale = field.multiply(r.getCoefficient(r.degree()), dltInverse); + q = q.addOrSubtract(field.buildMonomial(degreeDiff, scale)); + r = r.addOrSubtract(rLast.multiplyByMonomial(degreeDiff, scale)); + } + t = q.multiplyPoly(tLast).addOrSubtract(tLastLast); + if (r.degree() >= rLast.degree()) { + return null; + } + } + var sigmaTildeAtZero = t.getCoefficient(0); + if (sigmaTildeAtZero === 0) { + return null; + } + var inverse = field.inverse(sigmaTildeAtZero); + return [t.multiply(inverse), r.multiply(inverse)]; +} +function findErrorLocations(field, errorLocator) { + // This is a direct application of Chien's search + var numErrors = errorLocator.degree(); + if (numErrors === 1) { + return [errorLocator.getCoefficient(1)]; + } + var result = new Array(numErrors); + var errorCount = 0; + for (var i = 1; i < field.size && errorCount < numErrors; i++) { + if (errorLocator.evaluateAt(i) === 0) { + result[errorCount] = field.inverse(i); + errorCount++; + } + } + if (errorCount !== numErrors) { + return null; + } + return result; +} +function findErrorMagnitudes(field, errorEvaluator, errorLocations) { + // This is directly applying Forney's Formula + var s = errorLocations.length; + var result = new Array(s); + for (var i = 0; i < s; i++) { + var xiInverse = field.inverse(errorLocations[i]); + var denominator = 1; + for (var j = 0; j < s; j++) { + if (i !== j) { + denominator = field.multiply(denominator, GenericGF_1.addOrSubtractGF(1, field.multiply(errorLocations[j], xiInverse))); + } + } + result[i] = field.multiply(errorEvaluator.evaluateAt(xiInverse), field.inverse(denominator)); + if (field.generatorBase !== 0) { + result[i] = field.multiply(result[i], xiInverse); + } + } + return result; +} +function decode(bytes, twoS) { + var outputBytes = new Uint8ClampedArray(bytes.length); + outputBytes.set(bytes); + var field = new GenericGF_1.default(0x011D, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1 + var poly = new GenericGFPoly_1.default(field, outputBytes); + var syndromeCoefficients = new Uint8ClampedArray(twoS); + var error = false; + for (var s = 0; s < twoS; s++) { + var evaluation = poly.evaluateAt(field.exp(s + field.generatorBase)); + syndromeCoefficients[syndromeCoefficients.length - 1 - s] = evaluation; + if (evaluation !== 0) { + error = true; + } + } + if (!error) { + return outputBytes; + } + var syndrome = new GenericGFPoly_1.default(field, syndromeCoefficients); + var sigmaOmega = runEuclideanAlgorithm(field, field.buildMonomial(twoS, 1), syndrome, twoS); + if (sigmaOmega === null) { + return null; + } + var errorLocations = findErrorLocations(field, sigmaOmega[0]); + if (errorLocations == null) { + return null; + } + var errorMagnitudes = findErrorMagnitudes(field, sigmaOmega[1], errorLocations); + for (var i = 0; i < errorLocations.length; i++) { + var position = outputBytes.length - 1 - field.log(errorLocations[i]); + if (position < 0) { + return null; + } + outputBytes[position] = GenericGF_1.addOrSubtractGF(outputBytes[position], errorMagnitudes[i]); + } + return outputBytes; +} +exports.decode = decode; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VERSIONS = [ + { + infoBits: null, + versionNumber: 1, + alignmentPatternCenters: [], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 7, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 19 }], + }, + { + ecCodewordsPerBlock: 10, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }], + }, + { + ecCodewordsPerBlock: 13, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 13 }], + }, + { + ecCodewordsPerBlock: 17, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 9 }], + }, + ], + }, + { + infoBits: null, + versionNumber: 2, + alignmentPatternCenters: [6, 18], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 10, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 34 }], + }, + { + ecCodewordsPerBlock: 16, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 28 }], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 22 }], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }], + }, + ], + }, + { + infoBits: null, + versionNumber: 3, + alignmentPatternCenters: [6, 22], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 15, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 55 }], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 44 }], + }, + { + ecCodewordsPerBlock: 18, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 17 }], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 13 }], + }, + ], + }, + { + infoBits: null, + versionNumber: 4, + alignmentPatternCenters: [6, 26], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 20, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 80 }], + }, + { + ecCodewordsPerBlock: 18, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 32 }], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 24 }], + }, + { + ecCodewordsPerBlock: 16, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 9 }], + }, + ], + }, + { + infoBits: null, + versionNumber: 5, + alignmentPatternCenters: [6, 30], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 26, + ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 108 }], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 43 }], + }, + { + ecCodewordsPerBlock: 18, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 15 }, + { numBlocks: 2, dataCodewordsPerBlock: 16 }, + ], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 11 }, + { numBlocks: 2, dataCodewordsPerBlock: 12 }, + ], + }, + ], + }, + { + infoBits: null, + versionNumber: 6, + alignmentPatternCenters: [6, 34], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 18, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 68 }], + }, + { + ecCodewordsPerBlock: 16, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 27 }], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 19 }], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 15 }], + }, + ], + }, + { + infoBits: 0x07C94, + versionNumber: 7, + alignmentPatternCenters: [6, 22, 38], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 20, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 78 }], + }, + { + ecCodewordsPerBlock: 18, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 31 }], + }, + { + ecCodewordsPerBlock: 18, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 14 }, + { numBlocks: 4, dataCodewordsPerBlock: 15 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 13 }, + { numBlocks: 1, dataCodewordsPerBlock: 14 }, + ], + }, + ], + }, + { + infoBits: 0x085BC, + versionNumber: 8, + alignmentPatternCenters: [6, 24, 42], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 24, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 97 }], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 38 }, + { numBlocks: 2, dataCodewordsPerBlock: 39 }, + ], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 18 }, + { numBlocks: 2, dataCodewordsPerBlock: 19 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 14 }, + { numBlocks: 2, dataCodewordsPerBlock: 15 }, + ], + }, + ], + }, + { + infoBits: 0x09A99, + versionNumber: 9, + alignmentPatternCenters: [6, 26, 46], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 116 }], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 36 }, + { numBlocks: 2, dataCodewordsPerBlock: 37 }, + ], + }, + { + ecCodewordsPerBlock: 20, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 16 }, + { numBlocks: 4, dataCodewordsPerBlock: 17 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 12 }, + { numBlocks: 4, dataCodewordsPerBlock: 13 }, + ], + }, + ], + }, + { + infoBits: 0x0A4D3, + versionNumber: 10, + alignmentPatternCenters: [6, 28, 50], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 18, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 68 }, + { numBlocks: 2, dataCodewordsPerBlock: 69 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 43 }, + { numBlocks: 1, dataCodewordsPerBlock: 44 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 19 }, + { numBlocks: 2, dataCodewordsPerBlock: 20 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 15 }, + { numBlocks: 2, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x0BBF6, + versionNumber: 11, + alignmentPatternCenters: [6, 30, 54], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 20, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 81 }], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 1, dataCodewordsPerBlock: 50 }, + { numBlocks: 4, dataCodewordsPerBlock: 51 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 22 }, + { numBlocks: 4, dataCodewordsPerBlock: 23 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 12 }, + { numBlocks: 8, dataCodewordsPerBlock: 13 }, + ], + }, + ], + }, + { + infoBits: 0x0C762, + versionNumber: 12, + alignmentPatternCenters: [6, 32, 58], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 92 }, + { numBlocks: 2, dataCodewordsPerBlock: 93 }, + ], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 36 }, + { numBlocks: 2, dataCodewordsPerBlock: 37 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 20 }, + { numBlocks: 6, dataCodewordsPerBlock: 21 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 7, dataCodewordsPerBlock: 14 }, + { numBlocks: 4, dataCodewordsPerBlock: 15 }, + ], + }, + ], + }, + { + infoBits: 0x0D847, + versionNumber: 13, + alignmentPatternCenters: [6, 34, 62], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 26, + ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 107 }], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 37 }, + { numBlocks: 1, dataCodewordsPerBlock: 38 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 20 }, + { numBlocks: 4, dataCodewordsPerBlock: 21 }, + ], + }, + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 12, dataCodewordsPerBlock: 11 }, + { numBlocks: 4, dataCodewordsPerBlock: 12 }, + ], + }, + ], + }, + { + infoBits: 0x0E60D, + versionNumber: 14, + alignmentPatternCenters: [6, 26, 46, 66], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 115 }, + { numBlocks: 1, dataCodewordsPerBlock: 116 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 40 }, + { numBlocks: 5, dataCodewordsPerBlock: 41 }, + ], + }, + { + ecCodewordsPerBlock: 20, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 16 }, + { numBlocks: 5, dataCodewordsPerBlock: 17 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 12 }, + { numBlocks: 5, dataCodewordsPerBlock: 13 }, + ], + }, + ], + }, + { + infoBits: 0x0F928, + versionNumber: 15, + alignmentPatternCenters: [6, 26, 48, 70], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 22, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 87 }, + { numBlocks: 1, dataCodewordsPerBlock: 88 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 41 }, + { numBlocks: 5, dataCodewordsPerBlock: 42 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 24 }, + { numBlocks: 7, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 12 }, + { numBlocks: 7, dataCodewordsPerBlock: 13 }, + ], + }, + ], + }, + { + infoBits: 0x10B78, + versionNumber: 16, + alignmentPatternCenters: [6, 26, 50, 74], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 98 }, + { numBlocks: 1, dataCodewordsPerBlock: 99 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 7, dataCodewordsPerBlock: 45 }, + { numBlocks: 3, dataCodewordsPerBlock: 46 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [ + { numBlocks: 15, dataCodewordsPerBlock: 19 }, + { numBlocks: 2, dataCodewordsPerBlock: 20 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 15 }, + { numBlocks: 13, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1145D, + versionNumber: 17, + alignmentPatternCenters: [6, 30, 54, 78], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 1, dataCodewordsPerBlock: 107 }, + { numBlocks: 5, dataCodewordsPerBlock: 108 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 10, dataCodewordsPerBlock: 46 }, + { numBlocks: 1, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 1, dataCodewordsPerBlock: 22 }, + { numBlocks: 15, dataCodewordsPerBlock: 23 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 14 }, + { numBlocks: 17, dataCodewordsPerBlock: 15 }, + ], + }, + ], + }, + { + infoBits: 0x12A17, + versionNumber: 18, + alignmentPatternCenters: [6, 30, 56, 82], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 120 }, + { numBlocks: 1, dataCodewordsPerBlock: 121 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 9, dataCodewordsPerBlock: 43 }, + { numBlocks: 4, dataCodewordsPerBlock: 44 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 17, dataCodewordsPerBlock: 22 }, + { numBlocks: 1, dataCodewordsPerBlock: 23 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 14 }, + { numBlocks: 19, dataCodewordsPerBlock: 15 }, + ], + }, + ], + }, + { + infoBits: 0x13532, + versionNumber: 19, + alignmentPatternCenters: [6, 30, 58, 86], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 113 }, + { numBlocks: 4, dataCodewordsPerBlock: 114 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 44 }, + { numBlocks: 11, dataCodewordsPerBlock: 45 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 17, dataCodewordsPerBlock: 21 }, + { numBlocks: 4, dataCodewordsPerBlock: 22 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 9, dataCodewordsPerBlock: 13 }, + { numBlocks: 16, dataCodewordsPerBlock: 14 }, + ], + }, + ], + }, + { + infoBits: 0x149A6, + versionNumber: 20, + alignmentPatternCenters: [6, 34, 62, 90], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 107 }, + { numBlocks: 5, dataCodewordsPerBlock: 108 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 41 }, + { numBlocks: 13, dataCodewordsPerBlock: 42 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 15, dataCodewordsPerBlock: 24 }, + { numBlocks: 5, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 15, dataCodewordsPerBlock: 15 }, + { numBlocks: 10, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x15683, + versionNumber: 21, + alignmentPatternCenters: [6, 28, 50, 72, 94], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 116 }, + { numBlocks: 4, dataCodewordsPerBlock: 117 }, + ], + }, + { + ecCodewordsPerBlock: 26, + ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 42 }], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 17, dataCodewordsPerBlock: 22 }, + { numBlocks: 6, dataCodewordsPerBlock: 23 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 16 }, + { numBlocks: 6, dataCodewordsPerBlock: 17 }, + ], + }, + ], + }, + { + infoBits: 0x168C9, + versionNumber: 22, + alignmentPatternCenters: [6, 26, 50, 74, 98], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 111 }, + { numBlocks: 7, dataCodewordsPerBlock: 112 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 46 }], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 7, dataCodewordsPerBlock: 24 }, + { numBlocks: 16, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 24, + ecBlocks: [{ numBlocks: 34, dataCodewordsPerBlock: 13 }], + }, + ], + }, + { + infoBits: 0x177EC, + versionNumber: 23, + alignmentPatternCenters: [6, 30, 54, 74, 102], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 121 }, + { numBlocks: 5, dataCodewordsPerBlock: 122 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 47 }, + { numBlocks: 14, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 24 }, + { numBlocks: 14, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 16, dataCodewordsPerBlock: 15 }, + { numBlocks: 14, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x18EC4, + versionNumber: 24, + alignmentPatternCenters: [6, 28, 54, 80, 106], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 117 }, + { numBlocks: 4, dataCodewordsPerBlock: 118 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 45 }, + { numBlocks: 14, dataCodewordsPerBlock: 46 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 24 }, + { numBlocks: 16, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 30, dataCodewordsPerBlock: 16 }, + { numBlocks: 2, dataCodewordsPerBlock: 17 }, + ], + }, + ], + }, + { + infoBits: 0x191E1, + versionNumber: 25, + alignmentPatternCenters: [6, 32, 58, 84, 110], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 26, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 106 }, + { numBlocks: 4, dataCodewordsPerBlock: 107 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 47 }, + { numBlocks: 13, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 7, dataCodewordsPerBlock: 24 }, + { numBlocks: 22, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 22, dataCodewordsPerBlock: 15 }, + { numBlocks: 13, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1AFAB, + versionNumber: 26, + alignmentPatternCenters: [6, 30, 58, 86, 114], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 10, dataCodewordsPerBlock: 114 }, + { numBlocks: 2, dataCodewordsPerBlock: 115 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 46 }, + { numBlocks: 4, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 28, dataCodewordsPerBlock: 22 }, + { numBlocks: 6, dataCodewordsPerBlock: 23 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 33, dataCodewordsPerBlock: 16 }, + { numBlocks: 4, dataCodewordsPerBlock: 17 }, + ], + }, + ], + }, + { + infoBits: 0x1B08E, + versionNumber: 27, + alignmentPatternCenters: [6, 34, 62, 90, 118], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 122 }, + { numBlocks: 4, dataCodewordsPerBlock: 123 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 22, dataCodewordsPerBlock: 45 }, + { numBlocks: 3, dataCodewordsPerBlock: 46 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 8, dataCodewordsPerBlock: 23 }, + { numBlocks: 26, dataCodewordsPerBlock: 24 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 12, dataCodewordsPerBlock: 15 }, + { numBlocks: 28, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1CC1A, + versionNumber: 28, + alignmentPatternCenters: [6, 26, 50, 74, 98, 122], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 117 }, + { numBlocks: 10, dataCodewordsPerBlock: 118 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 3, dataCodewordsPerBlock: 45 }, + { numBlocks: 23, dataCodewordsPerBlock: 46 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 24 }, + { numBlocks: 31, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 15 }, + { numBlocks: 31, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1D33F, + versionNumber: 29, + alignmentPatternCenters: [6, 30, 54, 78, 102, 126], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 7, dataCodewordsPerBlock: 116 }, + { numBlocks: 7, dataCodewordsPerBlock: 117 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 21, dataCodewordsPerBlock: 45 }, + { numBlocks: 7, dataCodewordsPerBlock: 46 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 1, dataCodewordsPerBlock: 23 }, + { numBlocks: 37, dataCodewordsPerBlock: 24 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 15 }, + { numBlocks: 26, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1ED75, + versionNumber: 30, + alignmentPatternCenters: [6, 26, 52, 78, 104, 130], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 5, dataCodewordsPerBlock: 115 }, + { numBlocks: 10, dataCodewordsPerBlock: 116 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 47 }, + { numBlocks: 10, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 15, dataCodewordsPerBlock: 24 }, + { numBlocks: 25, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 23, dataCodewordsPerBlock: 15 }, + { numBlocks: 25, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x1F250, + versionNumber: 31, + alignmentPatternCenters: [6, 30, 56, 82, 108, 134], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 13, dataCodewordsPerBlock: 115 }, + { numBlocks: 3, dataCodewordsPerBlock: 116 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 46 }, + { numBlocks: 29, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 42, dataCodewordsPerBlock: 24 }, + { numBlocks: 1, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 23, dataCodewordsPerBlock: 15 }, + { numBlocks: 28, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x209D5, + versionNumber: 32, + alignmentPatternCenters: [6, 34, 60, 86, 112, 138], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 115 }], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 10, dataCodewordsPerBlock: 46 }, + { numBlocks: 23, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 10, dataCodewordsPerBlock: 24 }, + { numBlocks: 35, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 15 }, + { numBlocks: 35, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x216F0, + versionNumber: 33, + alignmentPatternCenters: [6, 30, 58, 86, 114, 142], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 17, dataCodewordsPerBlock: 115 }, + { numBlocks: 1, dataCodewordsPerBlock: 116 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 14, dataCodewordsPerBlock: 46 }, + { numBlocks: 21, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 29, dataCodewordsPerBlock: 24 }, + { numBlocks: 19, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 11, dataCodewordsPerBlock: 15 }, + { numBlocks: 46, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x228BA, + versionNumber: 34, + alignmentPatternCenters: [6, 34, 62, 90, 118, 146], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 13, dataCodewordsPerBlock: 115 }, + { numBlocks: 6, dataCodewordsPerBlock: 116 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 14, dataCodewordsPerBlock: 46 }, + { numBlocks: 23, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 44, dataCodewordsPerBlock: 24 }, + { numBlocks: 7, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 59, dataCodewordsPerBlock: 16 }, + { numBlocks: 1, dataCodewordsPerBlock: 17 }, + ], + }, + ], + }, + { + infoBits: 0x2379F, + versionNumber: 35, + alignmentPatternCenters: [6, 30, 54, 78, 102, 126, 150], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 12, dataCodewordsPerBlock: 121 }, + { numBlocks: 7, dataCodewordsPerBlock: 122 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 12, dataCodewordsPerBlock: 47 }, + { numBlocks: 26, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 39, dataCodewordsPerBlock: 24 }, + { numBlocks: 14, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 22, dataCodewordsPerBlock: 15 }, + { numBlocks: 41, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x24B0B, + versionNumber: 36, + alignmentPatternCenters: [6, 24, 50, 76, 102, 128, 154], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 121 }, + { numBlocks: 14, dataCodewordsPerBlock: 122 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 6, dataCodewordsPerBlock: 47 }, + { numBlocks: 34, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 46, dataCodewordsPerBlock: 24 }, + { numBlocks: 10, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 2, dataCodewordsPerBlock: 15 }, + { numBlocks: 64, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x2542E, + versionNumber: 37, + alignmentPatternCenters: [6, 28, 54, 80, 106, 132, 158], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 17, dataCodewordsPerBlock: 122 }, + { numBlocks: 4, dataCodewordsPerBlock: 123 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 29, dataCodewordsPerBlock: 46 }, + { numBlocks: 14, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 49, dataCodewordsPerBlock: 24 }, + { numBlocks: 10, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 24, dataCodewordsPerBlock: 15 }, + { numBlocks: 46, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x26A64, + versionNumber: 38, + alignmentPatternCenters: [6, 32, 58, 84, 110, 136, 162], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 4, dataCodewordsPerBlock: 122 }, + { numBlocks: 18, dataCodewordsPerBlock: 123 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 13, dataCodewordsPerBlock: 46 }, + { numBlocks: 32, dataCodewordsPerBlock: 47 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 48, dataCodewordsPerBlock: 24 }, + { numBlocks: 14, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 42, dataCodewordsPerBlock: 15 }, + { numBlocks: 32, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x27541, + versionNumber: 39, + alignmentPatternCenters: [6, 26, 54, 82, 110, 138, 166], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 20, dataCodewordsPerBlock: 117 }, + { numBlocks: 4, dataCodewordsPerBlock: 118 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 40, dataCodewordsPerBlock: 47 }, + { numBlocks: 7, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 43, dataCodewordsPerBlock: 24 }, + { numBlocks: 22, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 10, dataCodewordsPerBlock: 15 }, + { numBlocks: 67, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, + { + infoBits: 0x28C69, + versionNumber: 40, + alignmentPatternCenters: [6, 30, 58, 86, 114, 142, 170], + errorCorrectionLevels: [ + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 19, dataCodewordsPerBlock: 118 }, + { numBlocks: 6, dataCodewordsPerBlock: 119 }, + ], + }, + { + ecCodewordsPerBlock: 28, + ecBlocks: [ + { numBlocks: 18, dataCodewordsPerBlock: 47 }, + { numBlocks: 31, dataCodewordsPerBlock: 48 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 34, dataCodewordsPerBlock: 24 }, + { numBlocks: 34, dataCodewordsPerBlock: 25 }, + ], + }, + { + ecCodewordsPerBlock: 30, + ecBlocks: [ + { numBlocks: 20, dataCodewordsPerBlock: 15 }, + { numBlocks: 61, dataCodewordsPerBlock: 16 }, + ], + }, + ], + }, +]; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var BitMatrix_1 = __webpack_require__(0); +function squareToQuadrilateral(p1, p2, p3, p4) { + var dx3 = p1.x - p2.x + p3.x - p4.x; + var dy3 = p1.y - p2.y + p3.y - p4.y; + if (dx3 === 0 && dy3 === 0) { // Affine + return { + a11: p2.x - p1.x, + a12: p2.y - p1.y, + a13: 0, + a21: p3.x - p2.x, + a22: p3.y - p2.y, + a23: 0, + a31: p1.x, + a32: p1.y, + a33: 1, + }; + } + else { + var dx1 = p2.x - p3.x; + var dx2 = p4.x - p3.x; + var dy1 = p2.y - p3.y; + var dy2 = p4.y - p3.y; + var denominator = dx1 * dy2 - dx2 * dy1; + var a13 = (dx3 * dy2 - dx2 * dy3) / denominator; + var a23 = (dx1 * dy3 - dx3 * dy1) / denominator; + return { + a11: p2.x - p1.x + a13 * p2.x, + a12: p2.y - p1.y + a13 * p2.y, + a13: a13, + a21: p4.x - p1.x + a23 * p4.x, + a22: p4.y - p1.y + a23 * p4.y, + a23: a23, + a31: p1.x, + a32: p1.y, + a33: 1, + }; + } +} +function quadrilateralToSquare(p1, p2, p3, p4) { + // Here, the adjoint serves as the inverse: + var sToQ = squareToQuadrilateral(p1, p2, p3, p4); + return { + a11: sToQ.a22 * sToQ.a33 - sToQ.a23 * sToQ.a32, + a12: sToQ.a13 * sToQ.a32 - sToQ.a12 * sToQ.a33, + a13: sToQ.a12 * sToQ.a23 - sToQ.a13 * sToQ.a22, + a21: sToQ.a23 * sToQ.a31 - sToQ.a21 * sToQ.a33, + a22: sToQ.a11 * sToQ.a33 - sToQ.a13 * sToQ.a31, + a23: sToQ.a13 * sToQ.a21 - sToQ.a11 * sToQ.a23, + a31: sToQ.a21 * sToQ.a32 - sToQ.a22 * sToQ.a31, + a32: sToQ.a12 * sToQ.a31 - sToQ.a11 * sToQ.a32, + a33: sToQ.a11 * sToQ.a22 - sToQ.a12 * sToQ.a21, + }; +} +function times(a, b) { + return { + a11: a.a11 * b.a11 + a.a21 * b.a12 + a.a31 * b.a13, + a12: a.a12 * b.a11 + a.a22 * b.a12 + a.a32 * b.a13, + a13: a.a13 * b.a11 + a.a23 * b.a12 + a.a33 * b.a13, + a21: a.a11 * b.a21 + a.a21 * b.a22 + a.a31 * b.a23, + a22: a.a12 * b.a21 + a.a22 * b.a22 + a.a32 * b.a23, + a23: a.a13 * b.a21 + a.a23 * b.a22 + a.a33 * b.a23, + a31: a.a11 * b.a31 + a.a21 * b.a32 + a.a31 * b.a33, + a32: a.a12 * b.a31 + a.a22 * b.a32 + a.a32 * b.a33, + a33: a.a13 * b.a31 + a.a23 * b.a32 + a.a33 * b.a33, + }; +} +function extract(image, location) { + var qToS = quadrilateralToSquare({ x: 3.5, y: 3.5 }, { x: location.dimension - 3.5, y: 3.5 }, { x: location.dimension - 6.5, y: location.dimension - 6.5 }, { x: 3.5, y: location.dimension - 3.5 }); + var sToQ = squareToQuadrilateral(location.topLeft, location.topRight, location.alignmentPattern, location.bottomLeft); + var transform = times(sToQ, qToS); + var matrix = BitMatrix_1.BitMatrix.createEmpty(location.dimension, location.dimension); + var mappingFunction = function (x, y) { + var denominator = transform.a13 * x + transform.a23 * y + transform.a33; + return { + x: (transform.a11 * x + transform.a21 * y + transform.a31) / denominator, + y: (transform.a12 * x + transform.a22 * y + transform.a32) / denominator, + }; + }; + for (var y = 0; y < location.dimension; y++) { + for (var x = 0; x < location.dimension; x++) { + var xValue = x + 0.5; + var yValue = y + 0.5; + var sourcePixel = mappingFunction(xValue, yValue); + matrix.set(x, y, image.get(Math.floor(sourcePixel.x), Math.floor(sourcePixel.y))); + } + } + return { + matrix: matrix, + mappingFunction: mappingFunction, + }; +} +exports.extract = extract; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var MAX_FINDERPATTERNS_TO_SEARCH = 4; +var MIN_QUAD_RATIO = 0.5; +var MAX_QUAD_RATIO = 1.5; +var distance = function (a, b) { return Math.sqrt(Math.pow((b.x - a.x), 2) + Math.pow((b.y - a.y), 2)); }; +function sum(values) { + return values.reduce(function (a, b) { return a + b; }); +} +// Takes three finder patterns and organizes them into topLeft, topRight, etc +function reorderFinderPatterns(pattern1, pattern2, pattern3) { + var _a, _b, _c, _d; + // Find distances between pattern centers + var oneTwoDistance = distance(pattern1, pattern2); + var twoThreeDistance = distance(pattern2, pattern3); + var oneThreeDistance = distance(pattern1, pattern3); + var bottomLeft; + var topLeft; + var topRight; + // Assume one closest to other two is B; A and C will just be guesses at first + if (twoThreeDistance >= oneTwoDistance && twoThreeDistance >= oneThreeDistance) { + _a = [pattern2, pattern1, pattern3], bottomLeft = _a[0], topLeft = _a[1], topRight = _a[2]; + } + else if (oneThreeDistance >= twoThreeDistance && oneThreeDistance >= oneTwoDistance) { + _b = [pattern1, pattern2, pattern3], bottomLeft = _b[0], topLeft = _b[1], topRight = _b[2]; + } + else { + _c = [pattern1, pattern3, pattern2], bottomLeft = _c[0], topLeft = _c[1], topRight = _c[2]; + } + // Use cross product to figure out whether bottomLeft (A) and topRight (C) are correct or flipped in relation to topLeft (B) + // This asks whether BC x BA has a positive z component, which is the arrangement we want. If it's negative, then + // we've got it flipped around and should swap topRight and bottomLeft. + if (((topRight.x - topLeft.x) * (bottomLeft.y - topLeft.y)) - ((topRight.y - topLeft.y) * (bottomLeft.x - topLeft.x)) < 0) { + _d = [topRight, bottomLeft], bottomLeft = _d[0], topRight = _d[1]; + } + return { bottomLeft: bottomLeft, topLeft: topLeft, topRight: topRight }; +} +// Computes the dimension (number of modules on a side) of the QR Code based on the position of the finder patterns +function computeDimension(topLeft, topRight, bottomLeft, matrix) { + var moduleSize = (sum(countBlackWhiteRun(topLeft, bottomLeft, matrix, 5)) / 7 + // Divide by 7 since the ratio is 1:1:3:1:1 + sum(countBlackWhiteRun(topLeft, topRight, matrix, 5)) / 7 + + sum(countBlackWhiteRun(bottomLeft, topLeft, matrix, 5)) / 7 + + sum(countBlackWhiteRun(topRight, topLeft, matrix, 5)) / 7) / 4; + if (moduleSize < 1) { + throw new Error("Invalid module size"); + } + var topDimension = Math.round(distance(topLeft, topRight) / moduleSize); + var sideDimension = Math.round(distance(topLeft, bottomLeft) / moduleSize); + var dimension = Math.floor((topDimension + sideDimension) / 2) + 7; + switch (dimension % 4) { + case 0: + dimension++; + break; + case 2: + dimension--; + break; + } + return { dimension: dimension, moduleSize: moduleSize }; +} +// Takes an origin point and an end point and counts the sizes of the black white run from the origin towards the end point. +// Returns an array of elements, representing the pixel size of the black white run. +// Uses a variant of http://en.wikipedia.org/wiki/Bresenham's_line_algorithm +function countBlackWhiteRunTowardsPoint(origin, end, matrix, length) { + var switchPoints = [{ x: Math.floor(origin.x), y: Math.floor(origin.y) }]; + var steep = Math.abs(end.y - origin.y) > Math.abs(end.x - origin.x); + var fromX; + var fromY; + var toX; + var toY; + if (steep) { + fromX = Math.floor(origin.y); + fromY = Math.floor(origin.x); + toX = Math.floor(end.y); + toY = Math.floor(end.x); + } + else { + fromX = Math.floor(origin.x); + fromY = Math.floor(origin.y); + toX = Math.floor(end.x); + toY = Math.floor(end.y); + } + var dx = Math.abs(toX - fromX); + var dy = Math.abs(toY - fromY); + var error = Math.floor(-dx / 2); + var xStep = fromX < toX ? 1 : -1; + var yStep = fromY < toY ? 1 : -1; + var currentPixel = true; + // Loop up until x == toX, but not beyond + for (var x = fromX, y = fromY; x !== toX + xStep; x += xStep) { + // Does current pixel mean we have moved white to black or vice versa? + // Scanning black in state 0,2 and white in state 1, so if we find the wrong + // color, advance to next state or end if we are in state 2 already + var realX = steep ? y : x; + var realY = steep ? x : y; + if (matrix.get(realX, realY) !== currentPixel) { + currentPixel = !currentPixel; + switchPoints.push({ x: realX, y: realY }); + if (switchPoints.length === length + 1) { + break; + } + } + error += dy; + if (error > 0) { + if (y === toY) { + break; + } + y += yStep; + error -= dx; + } + } + var distances = []; + for (var i = 0; i < length; i++) { + if (switchPoints[i] && switchPoints[i + 1]) { + distances.push(distance(switchPoints[i], switchPoints[i + 1])); + } + else { + distances.push(0); + } + } + return distances; +} +// Takes an origin point and an end point and counts the sizes of the black white run in the origin point +// along the line that intersects with the end point. Returns an array of elements, representing the pixel sizes +// of the black white run. Takes a length which represents the number of switches from black to white to look for. +function countBlackWhiteRun(origin, end, matrix, length) { + var _a; + var rise = end.y - origin.y; + var run = end.x - origin.x; + var towardsEnd = countBlackWhiteRunTowardsPoint(origin, end, matrix, Math.ceil(length / 2)); + var awayFromEnd = countBlackWhiteRunTowardsPoint(origin, { x: origin.x - run, y: origin.y - rise }, matrix, Math.ceil(length / 2)); + var middleValue = towardsEnd.shift() + awayFromEnd.shift() - 1; // Substract one so we don't double count a pixel + return (_a = awayFromEnd.concat(middleValue)).concat.apply(_a, towardsEnd); +} +// Takes in a black white run and an array of expected ratios. Returns the average size of the run as well as the "error" - +// that is the amount the run diverges from the expected ratio +function scoreBlackWhiteRun(sequence, ratios) { + var averageSize = sum(sequence) / sum(ratios); + var error = 0; + ratios.forEach(function (ratio, i) { + error += Math.pow((sequence[i] - ratio * averageSize), 2); + }); + return { averageSize: averageSize, error: error }; +} +// Takes an X,Y point and an array of sizes and scores the point against those ratios. +// For example for a finder pattern takes the ratio list of 1:1:3:1:1 and checks horizontal, vertical and diagonal ratios +// against that. +function scorePattern(point, ratios, matrix) { + try { + var horizontalRun = countBlackWhiteRun(point, { x: -1, y: point.y }, matrix, ratios.length); + var verticalRun = countBlackWhiteRun(point, { x: point.x, y: -1 }, matrix, ratios.length); + var topLeftPoint = { + x: Math.max(0, point.x - point.y) - 1, + y: Math.max(0, point.y - point.x) - 1, + }; + var topLeftBottomRightRun = countBlackWhiteRun(point, topLeftPoint, matrix, ratios.length); + var bottomLeftPoint = { + x: Math.min(matrix.width, point.x + point.y) + 1, + y: Math.min(matrix.height, point.y + point.x) + 1, + }; + var bottomLeftTopRightRun = countBlackWhiteRun(point, bottomLeftPoint, matrix, ratios.length); + var horzError = scoreBlackWhiteRun(horizontalRun, ratios); + var vertError = scoreBlackWhiteRun(verticalRun, ratios); + var diagDownError = scoreBlackWhiteRun(topLeftBottomRightRun, ratios); + var diagUpError = scoreBlackWhiteRun(bottomLeftTopRightRun, ratios); + var ratioError = Math.sqrt(horzError.error * horzError.error + + vertError.error * vertError.error + + diagDownError.error * diagDownError.error + + diagUpError.error * diagUpError.error); + var avgSize = (horzError.averageSize + vertError.averageSize + diagDownError.averageSize + diagUpError.averageSize) / 4; + var sizeError = (Math.pow((horzError.averageSize - avgSize), 2) + + Math.pow((vertError.averageSize - avgSize), 2) + + Math.pow((diagDownError.averageSize - avgSize), 2) + + Math.pow((diagUpError.averageSize - avgSize), 2)) / avgSize; + return ratioError + sizeError; + } + catch (_a) { + return Infinity; + } +} +function recenterLocation(matrix, p) { + var leftX = Math.round(p.x); + while (matrix.get(leftX, Math.round(p.y))) { + leftX--; + } + var rightX = Math.round(p.x); + while (matrix.get(rightX, Math.round(p.y))) { + rightX++; + } + var x = (leftX + rightX) / 2; + var topY = Math.round(p.y); + while (matrix.get(Math.round(x), topY)) { + topY--; + } + var bottomY = Math.round(p.y); + while (matrix.get(Math.round(x), bottomY)) { + bottomY++; + } + var y = (topY + bottomY) / 2; + return { x: x, y: y }; +} +function locate(matrix) { + var finderPatternQuads = []; + var activeFinderPatternQuads = []; + var alignmentPatternQuads = []; + var activeAlignmentPatternQuads = []; + var _loop_1 = function (y) { + var length_1 = 0; + var lastBit = false; + var scans = [0, 0, 0, 0, 0]; + var _loop_2 = function (x) { + var v = matrix.get(x, y); + if (v === lastBit) { + length_1++; + } + else { + scans = [scans[1], scans[2], scans[3], scans[4], length_1]; + length_1 = 1; + lastBit = v; + // Do the last 5 color changes ~ match the expected ratio for a finder pattern? 1:1:3:1:1 of b:w:b:w:b + var averageFinderPatternBlocksize = sum(scans) / 7; + var validFinderPattern = Math.abs(scans[0] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize && + Math.abs(scans[1] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize && + Math.abs(scans[2] - 3 * averageFinderPatternBlocksize) < 3 * averageFinderPatternBlocksize && + Math.abs(scans[3] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize && + Math.abs(scans[4] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize && + !v; // And make sure the current pixel is white since finder patterns are bordered in white + // Do the last 3 color changes ~ match the expected ratio for an alignment pattern? 1:1:1 of w:b:w + var averageAlignmentPatternBlocksize = sum(scans.slice(-3)) / 3; + var validAlignmentPattern = Math.abs(scans[2] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize && + Math.abs(scans[3] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize && + Math.abs(scans[4] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize && + v; // Is the current pixel black since alignment patterns are bordered in black + if (validFinderPattern) { + // Compute the start and end x values of the large center black square + var endX_1 = x - scans[3] - scans[4]; + var startX_1 = endX_1 - scans[2]; + var line = { startX: startX_1, endX: endX_1, y: y }; + // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with + // that line as the starting point. + var matchingQuads = activeFinderPatternQuads.filter(function (q) { + return (startX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) || + (endX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) || + (startX_1 <= q.bottom.startX && endX_1 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO && + (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO)); + }); + if (matchingQuads.length > 0) { + matchingQuads[0].bottom = line; + } + else { + activeFinderPatternQuads.push({ top: line, bottom: line }); + } + } + if (validAlignmentPattern) { + // Compute the start and end x values of the center black square + var endX_2 = x - scans[4]; + var startX_2 = endX_2 - scans[3]; + var line = { startX: startX_2, y: y, endX: endX_2 }; + // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with + // that line as the starting point. + var matchingQuads = activeAlignmentPatternQuads.filter(function (q) { + return (startX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) || + (endX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) || + (startX_2 <= q.bottom.startX && endX_2 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO && + (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO)); + }); + if (matchingQuads.length > 0) { + matchingQuads[0].bottom = line; + } + else { + activeAlignmentPatternQuads.push({ top: line, bottom: line }); + } + } + } + }; + for (var x = -1; x <= matrix.width; x++) { + _loop_2(x); + } + finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y !== y && q.bottom.y - q.top.y >= 2; })); + activeFinderPatternQuads = activeFinderPatternQuads.filter(function (q) { return q.bottom.y === y; }); + alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y !== y; })); + activeAlignmentPatternQuads = activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y === y; }); + }; + for (var y = 0; y <= matrix.height; y++) { + _loop_1(y); + } + finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y - q.top.y >= 2; })); + alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads); + var finderPatternGroups = finderPatternQuads + .filter(function (q) { return q.bottom.y - q.top.y >= 2; }) // All quads must be at least 2px tall since the center square is larger than a block + .map(function (q) { + var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4; + var y = (q.top.y + q.bottom.y + 1) / 2; + if (!matrix.get(Math.round(x), Math.round(y))) { + return; + } + var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, q.bottom.y - q.top.y + 1]; + var size = sum(lengths) / lengths.length; + var score = scorePattern({ x: Math.round(x), y: Math.round(y) }, [1, 1, 3, 1, 1], matrix); + return { score: score, x: x, y: y, size: size }; + }) + .filter(function (q) { return !!q; }) // Filter out any rejected quads from above + .sort(function (a, b) { return a.score - b.score; }) + // Now take the top finder pattern options and try to find 2 other options with a similar size. + .map(function (point, i, finderPatterns) { + if (i > MAX_FINDERPATTERNS_TO_SEARCH) { + return null; + } + var otherPoints = finderPatterns + .filter(function (p, ii) { return i !== ii; }) + .map(function (p) { return ({ x: p.x, y: p.y, score: p.score + (Math.pow((p.size - point.size), 2)) / point.size, size: p.size }); }) + .sort(function (a, b) { return a.score - b.score; }); + if (otherPoints.length < 2) { + return null; + } + var score = point.score + otherPoints[0].score + otherPoints[1].score; + return { points: [point].concat(otherPoints.slice(0, 2)), score: score }; + }) + .filter(function (q) { return !!q; }) // Filter out any rejected finder patterns from above + .sort(function (a, b) { return a.score - b.score; }); + if (finderPatternGroups.length === 0) { + return null; + } + var _a = reorderFinderPatterns(finderPatternGroups[0].points[0], finderPatternGroups[0].points[1], finderPatternGroups[0].points[2]), topRight = _a.topRight, topLeft = _a.topLeft, bottomLeft = _a.bottomLeft; + var alignment = findAlignmentPattern(matrix, alignmentPatternQuads, topRight, topLeft, bottomLeft); + var result = []; + if (alignment) { + result.push({ + alignmentPattern: { x: alignment.alignmentPattern.x, y: alignment.alignmentPattern.y }, + bottomLeft: { x: bottomLeft.x, y: bottomLeft.y }, + dimension: alignment.dimension, + topLeft: { x: topLeft.x, y: topLeft.y }, + topRight: { x: topRight.x, y: topRight.y }, + }); + } + // We normally use the center of the quads as the location of the tracking points, which is optimal for most cases and will account + // for a skew in the image. However, In some cases, a slight skew might not be real and instead be caused by image compression + // errors and/or low resolution. For those cases, we'd be better off centering the point exactly in the middle of the black area. We + // compute and return the location data for the naively centered points as it is little additional work and allows for multiple + // attempts at decoding harder images. + var midTopRight = recenterLocation(matrix, topRight); + var midTopLeft = recenterLocation(matrix, topLeft); + var midBottomLeft = recenterLocation(matrix, bottomLeft); + var centeredAlignment = findAlignmentPattern(matrix, alignmentPatternQuads, midTopRight, midTopLeft, midBottomLeft); + if (centeredAlignment) { + result.push({ + alignmentPattern: { x: centeredAlignment.alignmentPattern.x, y: centeredAlignment.alignmentPattern.y }, + bottomLeft: { x: midBottomLeft.x, y: midBottomLeft.y }, + topLeft: { x: midTopLeft.x, y: midTopLeft.y }, + topRight: { x: midTopRight.x, y: midTopRight.y }, + dimension: centeredAlignment.dimension, + }); + } + if (result.length === 0) { + return null; + } + return result; +} +exports.locate = locate; +function findAlignmentPattern(matrix, alignmentPatternQuads, topRight, topLeft, bottomLeft) { + var _a; + // Now that we've found the three finder patterns we can determine the blockSize and the size of the QR code. + // We'll use these to help find the alignment pattern but also later when we do the extraction. + var dimension; + var moduleSize; + try { + (_a = computeDimension(topLeft, topRight, bottomLeft, matrix), dimension = _a.dimension, moduleSize = _a.moduleSize); + } + catch (e) { + return null; + } + // Now find the alignment pattern + var bottomRightFinderPattern = { + x: topRight.x - topLeft.x + bottomLeft.x, + y: topRight.y - topLeft.y + bottomLeft.y, + }; + var modulesBetweenFinderPatterns = ((distance(topLeft, bottomLeft) + distance(topLeft, topRight)) / 2 / moduleSize); + var correctionToTopLeft = 1 - (3 / modulesBetweenFinderPatterns); + var expectedAlignmentPattern = { + x: topLeft.x + correctionToTopLeft * (bottomRightFinderPattern.x - topLeft.x), + y: topLeft.y + correctionToTopLeft * (bottomRightFinderPattern.y - topLeft.y), + }; + var alignmentPatterns = alignmentPatternQuads + .map(function (q) { + var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4; + var y = (q.top.y + q.bottom.y + 1) / 2; + if (!matrix.get(Math.floor(x), Math.floor(y))) { + return; + } + var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, (q.bottom.y - q.top.y + 1)]; + var size = sum(lengths) / lengths.length; + var sizeScore = scorePattern({ x: Math.floor(x), y: Math.floor(y) }, [1, 1, 1], matrix); + var score = sizeScore + distance({ x: x, y: y }, expectedAlignmentPattern); + return { x: x, y: y, score: score }; + }) + .filter(function (v) { return !!v; }) + .sort(function (a, b) { return a.score - b.score; }); + // If there are less than 15 modules between finder patterns it's a version 1 QR code and as such has no alignmemnt pattern + // so we can only use our best guess. + var alignmentPattern = modulesBetweenFinderPatterns >= 15 && alignmentPatterns.length ? alignmentPatterns[0] : expectedAlignmentPattern; + return { alignmentPattern: alignmentPattern, dimension: dimension }; +} + + +/***/ }) +/******/ ])["default"]; +}); \ No newline at end of file diff --git a/node_modules/jsqr/dist/locator/index.d.ts b/node_modules/jsqr/dist/locator/index.d.ts new file mode 100644 index 0000000..1131606 --- /dev/null +++ b/node_modules/jsqr/dist/locator/index.d.ts @@ -0,0 +1,13 @@ +import { BitMatrix } from "../BitMatrix"; +export interface Point { + x: number; + y: number; +} +export interface QRLocation { + topRight: Point; + bottomLeft: Point; + topLeft: Point; + alignmentPattern: Point; + dimension: number; +} +export declare function locate(matrix: BitMatrix): QRLocation[]; diff --git a/node_modules/jsqr/package.json b/node_modules/jsqr/package.json new file mode 100644 index 0000000..1724343 --- /dev/null +++ b/node_modules/jsqr/package.json @@ -0,0 +1,61 @@ +{ + "name": "jsqr", + "version": "1.4.0", + "description": "A pure javascript QR code reading library that takes in raw images and will locate, extract and parse any QR code found within.", + "repository": "https://github.com/cozmo/jsQR", + "main": "./dist/jsQR.js", + "types": "./dist/index.d.ts", + "contributors": [ + { + "name": "Cosmo Wolfe", + "email": "cosmo.wolfe@gmail.com" + }, + { + "name": "Jefff Nelson", + "email": "gmjefff@gmail.com" + } + ], + "license": "Apache-2.0", + "devDependencies": { + "@types/fs-extra": "^4.0.2", + "@types/jest": "^20.0.8", + "@types/node": "^8.0.27", + "awesome-typescript-loader": "^3.2.3", + "fs-extra": "^4.0.1", + "jest": "^23.1.0", + "rimraf": "^2.6.2", + "ts-jest": "^23.0.4", + "ts-node": "^3.3.0", + "tslint": "^5.7.0", + "typescript": "^2.5.2", + "upng-js": "^1.0.1", + "webpack": "^3.10.0" + }, + "scripts": { + "prebuild": "rimraf dist", + "build": "webpack", + "watch": "webpack --watch", + "test": "jest", + "lint": "tslint --project .", + "generate-test-data": "ts-node --project tests/ tests/generate-test-data.ts" + }, + "jest": { + "testRegex": ".*test.ts", + "moduleFileExtensions": [ + "ts", + "js" + ], + "transform": { + "^.+\\.ts$": "/node_modules/ts-jest/preprocessor.js" + }, + "globals": { + "ts-jest": { + "tsConfig": { + "noImplicitAny": false, + "lib": ["es2015"], + "types": ["jest", "node"] + } + } + } + } +} diff --git a/node_modules/linebreak/LICENSE b/node_modules/linebreak/LICENSE new file mode 100644 index 0000000..34d1420 --- /dev/null +++ b/node_modules/linebreak/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-present Devon Govett + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/linebreak/dist/main.cjs b/node_modules/linebreak/dist/main.cjs new file mode 100644 index 0000000..b29fcb2 --- /dev/null +++ b/node_modules/linebreak/dist/main.cjs @@ -0,0 +1,1369 @@ +var $kQ2hT$unicodetrie = require("unicode-trie"); +var $kQ2hT$base64js = require("base64-js"); + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} + +"use strict"; + + + +const $60ff486a304db230$export$af862512e23cb54 = 0; // Opening punctuation +const $60ff486a304db230$export$9bf3043cb7503aa1 = 1; // Closing punctuation +const $60ff486a304db230$export$6d0b2a5dd774590a = 2; // Closing parenthesis +const $60ff486a304db230$export$bf0b2277bd569ea1 = 3; // Ambiguous quotation +const $60ff486a304db230$export$bad2a840ccda93b6 = 4; // Glue +const $60ff486a304db230$export$fb4028874a74450 = 5; // Non-starters +const $60ff486a304db230$export$463bd1ce0149c55e = 6; // Exclamation/Interrogation +const $60ff486a304db230$export$2e8caadc521d7cbb = 7; // Symbols allowing break after +const $60ff486a304db230$export$bfe27467c1de9413 = 8; // Infix separator +const $60ff486a304db230$export$af5f8d68aad3cd3a = 9; // Prefix +const $60ff486a304db230$export$6b7e017d6825d38f = 10; // Postfix +const $60ff486a304db230$export$8227ca023eb0daaa = 11; // Numeric +const $60ff486a304db230$export$1bb1140fe1358b00 = 12; // Alphabetic +const $60ff486a304db230$export$f3e416a182673355 = 13; // Hebrew Letter +const $60ff486a304db230$export$8be180ec26319f9f = 14; // Ideographic +const $60ff486a304db230$export$70824c8942178d60 = 15; // Inseparable characters +const $60ff486a304db230$export$24aa617c849a894a = 16; // Hyphen +const $60ff486a304db230$export$a73c4d14459b698d = 17; // Break after +const $60ff486a304db230$export$921068d8846a1559 = 18; // Break before +const $60ff486a304db230$export$8b85a4f193482778 = 19; // Break on either side (but not pair) +const $60ff486a304db230$export$b2fd9c01d360241f = 20; // Zero-width space +const $60ff486a304db230$export$dcd191669c0a595f = 21; // Combining marks +const $60ff486a304db230$export$9e5d732f3676a9ba = 22; // Word joiner +const $60ff486a304db230$export$cb94397127ac9363 = 23; // Hangul LV +const $60ff486a304db230$export$746be9e3a3dfff1f = 24; // Hangul LVT +const $60ff486a304db230$export$96e3e682276c47cf = 25; // Hangul L Jamo +const $60ff486a304db230$export$fc2ff69ee2cb01bf = 26; // Hangul V Jamo +const $60ff486a304db230$export$8999624a7bae9d04 = 27; // Hangul T Jamo +const $60ff486a304db230$export$1dff41d5c0caca01 = 28; // Regional Indicator +const $60ff486a304db230$export$ddb7a6c76d9d93eb = 29; // Emoji Base +const $60ff486a304db230$export$7e93eb3105e4786d = 30; // Emoji Modifier +const $60ff486a304db230$export$30a74a373318dec6 = 31; // Zero Width Joiner +const $60ff486a304db230$export$54caeea5e6dab1f = 32; // Contingent break +const $60ff486a304db230$export$d710c5f50fc7496a = 33; // Ambiguous (Alphabetic or Ideograph) +const $60ff486a304db230$export$66498d28055820a9 = 34; // Break (mandatory) +const $60ff486a304db230$export$eb6c6d0b7c8826f2 = 35; // Conditional Japanese Starter +const $60ff486a304db230$export$de92be486109a1df = 36; // Carriage return +const $60ff486a304db230$export$606cfc2a8896c91f = 37; // Line feed +const $60ff486a304db230$export$e51d3c675bb0140d = 38; // Next line +const $60ff486a304db230$export$da51c6332ad11d7b = 39; // South-East Asian +const $60ff486a304db230$export$bea437c40441867d = 40; // Surrogates +const $60ff486a304db230$export$c4c7eecbfed13dc9 = 41; // Space +const $60ff486a304db230$export$98e1f8a379849661 = 42; // Unknown + + +const $1b6fba3281342923$export$98f50d781a474745 = 0; // Direct break opportunity +const $1b6fba3281342923$export$12ee1f8f5315ca7e = 1; // Indirect break opportunity +const $1b6fba3281342923$export$e4965ce242860454 = 2; // Indirect break opportunity for combining marks +const $1b6fba3281342923$export$8f14048969dcd45e = 3; // Prohibited break for combining marks +const $1b6fba3281342923$export$133eb141bf58aff4 = 4; // Prohibited break +const $1b6fba3281342923$export$5bdb8ccbf5c57afc = [ + //OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB + [ + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$8f14048969dcd45e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ], + [ + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$e4965ce242860454, + $1b6fba3281342923$export$133eb141bf58aff4, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$98f50d781a474745, + $1b6fba3281342923$export$12ee1f8f5315ca7e, + $1b6fba3281342923$export$98f50d781a474745 + ] // CB +]; + + +const $f898ea50f3b38ab8$var$data = ($parcel$interopDefault($kQ2hT$base64js)).toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+CzWAb+An4KfgFeAzsYWWfYuFz4CXwGvgb+Dfo6yNkEEwGh4CZYB44FpwI3g1OY+kfBItZOo2fB84Hy8DF4HJwNbiWpV8PVoO1LH4n2NRXyN+KcAd4kNVP9XsY4aPgcfAbsBfs6SniL4K/sPjfEf6HlanXCRkCw2BGvUh/keWfXS/CY+pFXs7x9XHmM94LTmWIeU2cgbxnS/k/B3kf86jDhU8L9V2E40vAFWAlWFUfb++NOL4F3C7JX4/4GiE+hvgWsF0oS7mXldspnN+F493gyXrh9xTav0cg3EvzgVfBG6wsmVSEkxBOBgdPGpd7JI6PnqRvJ68/xlbHof53gPeA94OzwLngk+ACsAwsByvASrAK3MB0Ws3CtQjvBJvAVrADPMDSHkb4CNijaccTwvnf4fiPEs8Lxy+D18A/QU8/xjgYBjPAbDAKTgYLwOngTHAO+EQ/8wuEF4EvsPiVCFf2+9tsFStzA8LVHuXXBsi6QyqzUYiPMR/7Mc7dAx7oL8bzw/3u/Bw8Bp4Az4AXwCtgHzsmDXP5fiF9iiVvly5d0sHngar16NKlS5cuXbp06fLmYlqHXrcd3ph4P0THUY3iXh49novju4S0tzfs5d+JPKewfAsRntZb3K9ZhOMl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$interopDefault($kQ2hT$unicodetrie))($f898ea50f3b38ab8$var$data); +const $f898ea50f3b38ab8$var$mapClass = function(c) { + switch(c){ + case $60ff486a304db230$export$d710c5f50fc7496a: + return $60ff486a304db230$export$1bb1140fe1358b00; + case $60ff486a304db230$export$da51c6332ad11d7b: + case $60ff486a304db230$export$bea437c40441867d: + case $60ff486a304db230$export$98e1f8a379849661: + return $60ff486a304db230$export$1bb1140fe1358b00; + case $60ff486a304db230$export$eb6c6d0b7c8826f2: + return $60ff486a304db230$export$fb4028874a74450; + default: + return c; + } +}; +const $f898ea50f3b38ab8$var$mapFirst = function(c) { + switch(c){ + case $60ff486a304db230$export$606cfc2a8896c91f: + case $60ff486a304db230$export$e51d3c675bb0140d: + return $60ff486a304db230$export$66498d28055820a9; + case $60ff486a304db230$export$c4c7eecbfed13dc9: + return $60ff486a304db230$export$9e5d732f3676a9ba; + default: + return c; + } +}; +class $f898ea50f3b38ab8$var$Break { + constructor(position, required = false){ + this.position = position; + this.required = required; + } +} +class $f898ea50f3b38ab8$var$LineBreaker { + nextCodePoint() { + const code = this.string.charCodeAt(this.pos++); + const next = this.string.charCodeAt(this.pos); + // If a surrogate pair + if (0xd800 <= code && code <= 0xdbff && 0xdc00 <= next && next <= 0xdfff) { + this.pos++; + return (code - 0xd800) * 0x400 + (next - 0xdc00) + 0x10000; + } + return code; + } + nextCharClass() { + return $f898ea50f3b38ab8$var$mapClass($f898ea50f3b38ab8$var$classTrie.get(this.nextCodePoint())); + } + getSimpleBreak() { + // handle classes not handled by the pair table + switch(this.nextClass){ + case $60ff486a304db230$export$c4c7eecbfed13dc9: + return false; + case $60ff486a304db230$export$66498d28055820a9: + case $60ff486a304db230$export$606cfc2a8896c91f: + case $60ff486a304db230$export$e51d3c675bb0140d: + this.curClass = $60ff486a304db230$export$66498d28055820a9; + return false; + case $60ff486a304db230$export$de92be486109a1df: + this.curClass = $60ff486a304db230$export$de92be486109a1df; + return false; + } + return null; + } + getPairTableBreak(lastClass) { + // if not handled already, use the pair table + let shouldBreak = false; + switch($1b6fba3281342923$export$5bdb8ccbf5c57afc[this.curClass][this.nextClass]){ + case $1b6fba3281342923$export$98f50d781a474745: + shouldBreak = true; + break; + case $1b6fba3281342923$export$12ee1f8f5315ca7e: + shouldBreak = lastClass === $60ff486a304db230$export$c4c7eecbfed13dc9; + break; + case $1b6fba3281342923$export$e4965ce242860454: + shouldBreak = lastClass === $60ff486a304db230$export$c4c7eecbfed13dc9; + if (!shouldBreak) { + shouldBreak = false; + return shouldBreak; + } + break; + case $1b6fba3281342923$export$8f14048969dcd45e: + if (lastClass !== $60ff486a304db230$export$c4c7eecbfed13dc9) return shouldBreak; + break; + case $1b6fba3281342923$export$133eb141bf58aff4: + break; + } + if (this.LB8a) shouldBreak = false; + // Rule LB21a + if (this.LB21a && (this.curClass === $60ff486a304db230$export$24aa617c849a894a || this.curClass === $60ff486a304db230$export$a73c4d14459b698d)) { + shouldBreak = false; + this.LB21a = false; + } else this.LB21a = this.curClass === $60ff486a304db230$export$f3e416a182673355; + // Rule LB30a + if (this.curClass === $60ff486a304db230$export$1dff41d5c0caca01) { + this.LB30a++; + if (this.LB30a == 2 && this.nextClass === $60ff486a304db230$export$1dff41d5c0caca01) { + shouldBreak = true; + this.LB30a = 0; + } + } else this.LB30a = 0; + this.curClass = this.nextClass; + return shouldBreak; + } + nextBreak() { + // get the first char if we're at the beginning of the string + if (this.curClass == null) { + let firstClass = this.nextCharClass(); + this.curClass = $f898ea50f3b38ab8$var$mapFirst(firstClass); + this.nextClass = firstClass; + this.LB8a = firstClass === $60ff486a304db230$export$30a74a373318dec6; + this.LB30a = 0; + } + while(this.pos < this.string.length){ + this.lastPos = this.pos; + const lastClass = this.nextClass; + this.nextClass = this.nextCharClass(); + // explicit newline + if (this.curClass === $60ff486a304db230$export$66498d28055820a9 || this.curClass === $60ff486a304db230$export$de92be486109a1df && this.nextClass !== $60ff486a304db230$export$606cfc2a8896c91f) { + this.curClass = $f898ea50f3b38ab8$var$mapFirst($f898ea50f3b38ab8$var$mapClass(this.nextClass)); + return new $f898ea50f3b38ab8$var$Break(this.lastPos, true); + } + let shouldBreak = this.getSimpleBreak(); + if (shouldBreak === null) shouldBreak = this.getPairTableBreak(lastClass); + // Rule LB8a + this.LB8a = this.nextClass === $60ff486a304db230$export$30a74a373318dec6; + if (shouldBreak) return new $f898ea50f3b38ab8$var$Break(this.lastPos); + } + if (this.lastPos < this.string.length) { + this.lastPos = this.string.length; + return new $f898ea50f3b38ab8$var$Break(this.string.length); + } + return null; + } + constructor(string){ + this.string = string; + this.pos = 0; + this.lastPos = 0; + this.curClass = null; + this.nextClass = null; + this.LB8a = false; + this.LB21a = false; + this.LB30a = 0; + } +} +module.exports = $f898ea50f3b38ab8$var$LineBreaker; + + +//# sourceMappingURL=main.cjs.map diff --git a/node_modules/linebreak/dist/main.cjs.map b/node_modules/linebreak/dist/main.cjs.map new file mode 100644 index 0000000..5f8125e --- /dev/null +++ b/node_modules/linebreak/dist/main.cjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;AAAA;ACAA,YAAY,CAAC;;;;ACCN,MAAM,wCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,OAAO;AACvB,MAAM,wCAAE,GAAG,CAAC,AAAC,EAAG,eAAe;AAC/B,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,4BAA4B;AAC5C,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,+BAA+B;AAC/C,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,kBAAkB;AAClC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,SAAS;AACzB,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,U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G,IAAI,CAAC,cAAc,EAAE,AAAC;YAExC,IAAI,WAAW,KAAK,IAAI,EACtB,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAGlD,YAAY;YACZ,IAAI,CAAC,IAAI,GAAI,IAAI,CAAC,SAAS,KAAK,yCAAG,AAAC,CAAC;YAErC,IAAI,WAAW,EACb,OAAO,IAAI,2BAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAElC;QAED,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YAClC,OAAO,IAAI,2BAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACtC;QAED,OAAO,IAAI,CAAC;KACb;IAnJD,YAAY,MAAM,CAAE;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;KAChB;CA2IF;AAED,cAAc,GAAG,iCAAW,CAAC","sources":["src/linebreaker.js","node_modules/@parcel/node-resolver-core/lib/_empty.js","src/classes.js","src/pairs.js"],"sourcesContent":["import UnicodeTrie from 'unicode-trie';\nimport fs from 'fs';\nimport base64 from 'base64-js';\nimport { BK, CR, LF, NL, SG, WJ, SP, ZWJ, BA, HY, NS, AI, AL, CJ, HL, RI, SA, XX } from './classes';\nimport { DI_BRK, IN_BRK, CI_BRK, CP_BRK, PR_BRK, pairTable } from './pairs';\n\nconst data = base64.toByteArray(fs.readFileSync(__dirname + '/classes.trie', 'base64'));\nconst classTrie = new UnicodeTrie(data);\n\nconst mapClass = function (c) {\n switch (c) {\n case AI:\n return AL;\n\n case SA:\n case SG:\n case XX:\n return AL;\n\n case CJ:\n return NS;\n\n default:\n return c;\n }\n};\n\nconst mapFirst = function (c) {\n switch (c) {\n case LF:\n case NL:\n return BK;\n\n case SP:\n return WJ;\n\n default:\n return c;\n }\n};\n\nclass Break {\n constructor(position, required = false) {\n this.position = position;\n this.required = required;\n }\n}\n\nclass LineBreaker {\n constructor(string) {\n this.string = string;\n this.pos = 0;\n this.lastPos = 0;\n this.curClass = null;\n this.nextClass = null;\n this.LB8a = false;\n this.LB21a = false;\n this.LB30a = 0;\n }\n\n nextCodePoint() {\n const code = this.string.charCodeAt(this.pos++);\n const next = this.string.charCodeAt(this.pos);\n\n // If a surrogate pair\n if ((0xd800 <= code && code <= 0xdbff) && (0xdc00 <= next && next <= 0xdfff)) {\n this.pos++;\n return ((code - 0xd800) * 0x400) + (next - 0xdc00) + 0x10000;\n }\n\n return code;\n }\n\n nextCharClass() {\n return mapClass(classTrie.get(this.nextCodePoint()));\n }\n\n getSimpleBreak() {\n // handle classes not handled by the pair table\n switch (this.nextClass) {\n case SP:\n return false;\n\n case BK:\n case LF:\n case NL:\n this.curClass = BK;\n return false;\n\n case CR:\n this.curClass = CR;\n return false;\n }\n\n return null;\n }\n\n getPairTableBreak(lastClass) {\n // if not handled already, use the pair table\n let shouldBreak = false;\n switch (pairTable[this.curClass][this.nextClass]) {\n case DI_BRK: // Direct break\n shouldBreak = true;\n break;\n\n case IN_BRK: // possible indirect break\n shouldBreak = lastClass === SP;\n break;\n\n case CI_BRK:\n shouldBreak = lastClass === SP;\n if (!shouldBreak) {\n shouldBreak = false;\n return shouldBreak;\n }\n break;\n\n case CP_BRK: // prohibited for combining marks\n if (lastClass !== SP) {\n return shouldBreak;\n }\n break;\n\n case PR_BRK:\n break;\n }\n\n if (this.LB8a) {\n shouldBreak = false;\n }\n\n // Rule LB21a\n if (this.LB21a && (this.curClass === HY || this.curClass === BA)) {\n shouldBreak = false;\n this.LB21a = false;\n } else {\n this.LB21a = (this.curClass === HL);\n }\n\n // Rule LB30a\n if (this.curClass === RI) {\n this.LB30a++;\n if (this.LB30a == 2 && (this.nextClass === RI)) {\n shouldBreak = true;\n this.LB30a = 0;\n }\n } else {\n this.LB30a = 0;\n }\n\n this.curClass = this.nextClass;\n\n return shouldBreak;\n }\n\n nextBreak() {\n // get the first char if we're at the beginning of the string\n if (this.curClass == null) {\n let firstClass = this.nextCharClass();\n this.curClass = mapFirst(firstClass);\n this.nextClass = firstClass;\n this.LB8a = (firstClass === ZWJ);\n this.LB30a = 0;\n }\n\n while (this.pos < this.string.length) {\n this.lastPos = this.pos;\n const lastClass = this.nextClass;\n this.nextClass = this.nextCharClass();\n\n // explicit newline\n if ((this.curClass === BK) || ((this.curClass === CR) && (this.nextClass !== LF))) {\n this.curClass = mapFirst(mapClass(this.nextClass));\n return new Break(this.lastPos, true);\n }\n\n let shouldBreak = this.getSimpleBreak();\n\n if (shouldBreak === null) {\n shouldBreak = this.getPairTableBreak(lastClass);\n }\n\n // Rule LB8a\n this.LB8a = (this.nextClass === ZWJ);\n\n if (shouldBreak) {\n return new Break(this.lastPos);\n }\n }\n\n if (this.lastPos < this.string.length) {\n this.lastPos = this.string.length;\n return new Break(this.string.length);\n }\n\n return null;\n }\n}\n\nmodule.exports = LineBreaker;\n","\"use strict\";","// The following break classes are handled by the pair table\nexport const OP = 0; // Opening punctuation\nexport const CL = 1; // Closing punctuation\nexport const CP = 2; // Closing parenthesis\nexport const QU = 3; // Ambiguous quotation\nexport const GL = 4; // Glue\nexport const NS = 5; // Non-starters\nexport const EX = 6; // Exclamation/Interrogation\nexport const SY = 7; // Symbols allowing break after\nexport const IS = 8; // Infix separator\nexport const PR = 9; // Prefix\nexport const PO = 10; // Postfix\nexport const NU = 11; // Numeric\nexport const AL = 12; // Alphabetic\nexport const HL = 13; // Hebrew Letter\nexport const ID = 14; // Ideographic\nexport const IN = 15; // Inseparable characters\nexport const HY = 16; // Hyphen\nexport const BA = 17; // Break after\nexport const BB = 18; // Break before\nexport const B2 = 19; // Break on either side (but not pair)\nexport const ZW = 20; // Zero-width space\nexport const CM = 21; // Combining marks\nexport const WJ = 22; // Word joiner\nexport const H2 = 23; // Hangul LV\nexport const H3 = 24; // Hangul LVT\nexport const JL = 25; // Hangul L Jamo\nexport const JV = 26; // Hangul V Jamo\nexport const JT = 27; // Hangul T Jamo\nexport const RI = 28; // Regional Indicator\nexport const EB = 29; // Emoji Base\nexport const EM = 30; // Emoji Modifier\nexport const ZWJ = 31; // Zero Width Joiner\nexport const CB = 32; // Contingent break\n\n// The following break classes are not handled by the pair table\nexport const AI = 33; // Ambiguous (Alphabetic or Ideograph)\nexport const BK = 34; // Break (mandatory)\nexport const CJ = 35; // Conditional Japanese Starter\nexport const CR = 36; // Carriage return\nexport const LF = 37; // Line feed\nexport const NL = 38; // Next line\nexport const SA = 39; // South-East Asian\nexport const SG = 40; // Surrogates\nexport const SP = 41; // Space\nexport const XX = 42; // Unknown\n","export const DI_BRK = 0; // Direct break opportunity\nexport const IN_BRK = 1; // Indirect break opportunity\nexport const CI_BRK = 2; // Indirect break opportunity for combining marks\nexport const CP_BRK = 3; // Prohibited break for combining marks\nexport const PR_BRK = 4; // Prohibited break\n\n// Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2\n// - ZWJ special processing for LB8a of Revision 41\n// - CB manually added as per Rule LB20\n// - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45\nexport const pairTable = [\n //OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB\n [PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, CP_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK], // OP\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CP\n [PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // QU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // GL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NS\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EX\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // SY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IS\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // PR\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // PO\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // AL\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ID\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IN\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // BA\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // BB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // B2\n [DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK], // ZW\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // WJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H2\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H3\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JV\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JT\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // RI\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK], // EB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ZWJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK] // CB\n];"],"names":[],"version":3,"file":"main.cjs.map"} \ No newline at end of file diff --git a/node_modules/linebreak/dist/module.mjs b/node_modules/linebreak/dist/module.mjs new file mode 100644 index 0000000..b4c5c6e --- /dev/null +++ b/node_modules/linebreak/dist/module.mjs @@ -0,0 +1,1368 @@ +import $hJqJp$unicodetrie from "unicode-trie"; +import $hJqJp$base64js from "base64-js"; + +var $557adaaeb0c7885f$exports = {}; + +"use strict"; + + + +const $1627905f8be2ef3f$export$af862512e23cb54 = 0; // Opening punctuation +const $1627905f8be2ef3f$export$9bf3043cb7503aa1 = 1; // Closing punctuation +const $1627905f8be2ef3f$export$6d0b2a5dd774590a = 2; // Closing parenthesis +const $1627905f8be2ef3f$export$bf0b2277bd569ea1 = 3; // Ambiguous quotation +const $1627905f8be2ef3f$export$bad2a840ccda93b6 = 4; // Glue +const $1627905f8be2ef3f$export$fb4028874a74450 = 5; // Non-starters +const $1627905f8be2ef3f$export$463bd1ce0149c55e = 6; // Exclamation/Interrogation +const $1627905f8be2ef3f$export$2e8caadc521d7cbb = 7; // Symbols allowing break after +const $1627905f8be2ef3f$export$bfe27467c1de9413 = 8; // Infix separator +const $1627905f8be2ef3f$export$af5f8d68aad3cd3a = 9; // Prefix +const $1627905f8be2ef3f$export$6b7e017d6825d38f = 10; // Postfix +const $1627905f8be2ef3f$export$8227ca023eb0daaa = 11; // Numeric +const $1627905f8be2ef3f$export$1bb1140fe1358b00 = 12; // Alphabetic +const $1627905f8be2ef3f$export$f3e416a182673355 = 13; // Hebrew Letter +const $1627905f8be2ef3f$export$8be180ec26319f9f = 14; // Ideographic +const $1627905f8be2ef3f$export$70824c8942178d60 = 15; // Inseparable characters +const $1627905f8be2ef3f$export$24aa617c849a894a = 16; // Hyphen +const $1627905f8be2ef3f$export$a73c4d14459b698d = 17; // Break after +const $1627905f8be2ef3f$export$921068d8846a1559 = 18; // Break before +const $1627905f8be2ef3f$export$8b85a4f193482778 = 19; // Break on either side (but not pair) +const $1627905f8be2ef3f$export$b2fd9c01d360241f = 20; // Zero-width space +const $1627905f8be2ef3f$export$dcd191669c0a595f = 21; // Combining marks +const $1627905f8be2ef3f$export$9e5d732f3676a9ba = 22; // Word joiner +const $1627905f8be2ef3f$export$cb94397127ac9363 = 23; // Hangul LV +const $1627905f8be2ef3f$export$746be9e3a3dfff1f = 24; // Hangul LVT +const $1627905f8be2ef3f$export$96e3e682276c47cf = 25; // Hangul L Jamo +const $1627905f8be2ef3f$export$fc2ff69ee2cb01bf = 26; // Hangul V Jamo +const $1627905f8be2ef3f$export$8999624a7bae9d04 = 27; // Hangul T Jamo +const $1627905f8be2ef3f$export$1dff41d5c0caca01 = 28; // Regional Indicator +const $1627905f8be2ef3f$export$ddb7a6c76d9d93eb = 29; // Emoji Base +const $1627905f8be2ef3f$export$7e93eb3105e4786d = 30; // Emoji Modifier +const $1627905f8be2ef3f$export$30a74a373318dec6 = 31; // Zero Width Joiner +const $1627905f8be2ef3f$export$54caeea5e6dab1f = 32; // Contingent break +const $1627905f8be2ef3f$export$d710c5f50fc7496a = 33; // Ambiguous (Alphabetic or Ideograph) +const $1627905f8be2ef3f$export$66498d28055820a9 = 34; // Break (mandatory) +const $1627905f8be2ef3f$export$eb6c6d0b7c8826f2 = 35; // Conditional Japanese Starter +const $1627905f8be2ef3f$export$de92be486109a1df = 36; // Carriage return +const $1627905f8be2ef3f$export$606cfc2a8896c91f = 37; // Line feed +const $1627905f8be2ef3f$export$e51d3c675bb0140d = 38; // Next line +const $1627905f8be2ef3f$export$da51c6332ad11d7b = 39; // South-East Asian +const $1627905f8be2ef3f$export$bea437c40441867d = 40; // Surrogates +const $1627905f8be2ef3f$export$c4c7eecbfed13dc9 = 41; // Space +const $1627905f8be2ef3f$export$98e1f8a379849661 = 42; // Unknown + + +const $32627af916ac1b00$export$98f50d781a474745 = 0; // Direct break opportunity +const $32627af916ac1b00$export$12ee1f8f5315ca7e = 1; // Indirect break opportunity +const $32627af916ac1b00$export$e4965ce242860454 = 2; // Indirect break opportunity for combining marks +const $32627af916ac1b00$export$8f14048969dcd45e = 3; // Prohibited break for combining marks +const $32627af916ac1b00$export$133eb141bf58aff4 = 4; // Prohibited break +const $32627af916ac1b00$export$5bdb8ccbf5c57afc = [ + //OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB + [ + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$8f14048969dcd45e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ], + [ + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$e4965ce242860454, + $32627af916ac1b00$export$133eb141bf58aff4, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$98f50d781a474745, + $32627af916ac1b00$export$12ee1f8f5315ca7e, + $32627af916ac1b00$export$98f50d781a474745 + ] // CB +]; + + +const $557adaaeb0c7885f$var$data = $hJqJp$base64js.toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+CzWAb+An4KfgFeAzsYWWf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/l9cb2rwsu9rSNl06ZP2Pmxtz+rNMx93yno0n2/82rVH7rQ+y9P15H6FyRun9ViH81ATmffI7nJ5r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/"); +const $557adaaeb0c7885f$var$classTrie = new $hJqJp$unicodetrie($557adaaeb0c7885f$var$data); +const $557adaaeb0c7885f$var$mapClass = function(c) { + switch(c){ + case $1627905f8be2ef3f$export$d710c5f50fc7496a: + return $1627905f8be2ef3f$export$1bb1140fe1358b00; + case $1627905f8be2ef3f$export$da51c6332ad11d7b: + case $1627905f8be2ef3f$export$bea437c40441867d: + case $1627905f8be2ef3f$export$98e1f8a379849661: + return $1627905f8be2ef3f$export$1bb1140fe1358b00; + case $1627905f8be2ef3f$export$eb6c6d0b7c8826f2: + return $1627905f8be2ef3f$export$fb4028874a74450; + default: + return c; + } +}; +const $557adaaeb0c7885f$var$mapFirst = function(c) { + switch(c){ + case $1627905f8be2ef3f$export$606cfc2a8896c91f: + case $1627905f8be2ef3f$export$e51d3c675bb0140d: + return $1627905f8be2ef3f$export$66498d28055820a9; + case $1627905f8be2ef3f$export$c4c7eecbfed13dc9: + return $1627905f8be2ef3f$export$9e5d732f3676a9ba; + default: + return c; + } +}; +class $557adaaeb0c7885f$var$Break { + constructor(position, required = false){ + this.position = position; + this.required = required; + } +} +class $557adaaeb0c7885f$var$LineBreaker { + nextCodePoint() { + const code = this.string.charCodeAt(this.pos++); + const next = this.string.charCodeAt(this.pos); + // If a surrogate pair + if (0xd800 <= code && code <= 0xdbff && 0xdc00 <= next && next <= 0xdfff) { + this.pos++; + return (code - 0xd800) * 0x400 + (next - 0xdc00) + 0x10000; + } + return code; + } + nextCharClass() { + return $557adaaeb0c7885f$var$mapClass($557adaaeb0c7885f$var$classTrie.get(this.nextCodePoint())); + } + getSimpleBreak() { + // handle classes not handled by the pair table + switch(this.nextClass){ + case $1627905f8be2ef3f$export$c4c7eecbfed13dc9: + return false; + case $1627905f8be2ef3f$export$66498d28055820a9: + case $1627905f8be2ef3f$export$606cfc2a8896c91f: + case $1627905f8be2ef3f$export$e51d3c675bb0140d: + this.curClass = $1627905f8be2ef3f$export$66498d28055820a9; + return false; + case $1627905f8be2ef3f$export$de92be486109a1df: + this.curClass = $1627905f8be2ef3f$export$de92be486109a1df; + return false; + } + return null; + } + getPairTableBreak(lastClass) { + // if not handled already, use the pair table + let shouldBreak = false; + switch($32627af916ac1b00$export$5bdb8ccbf5c57afc[this.curClass][this.nextClass]){ + case $32627af916ac1b00$export$98f50d781a474745: + shouldBreak = true; + break; + case $32627af916ac1b00$export$12ee1f8f5315ca7e: + shouldBreak = lastClass === $1627905f8be2ef3f$export$c4c7eecbfed13dc9; + break; + case $32627af916ac1b00$export$e4965ce242860454: + shouldBreak = lastClass === $1627905f8be2ef3f$export$c4c7eecbfed13dc9; + if (!shouldBreak) { + shouldBreak = false; + return shouldBreak; + } + break; + case $32627af916ac1b00$export$8f14048969dcd45e: + if (lastClass !== $1627905f8be2ef3f$export$c4c7eecbfed13dc9) return shouldBreak; + break; + case $32627af916ac1b00$export$133eb141bf58aff4: + break; + } + if (this.LB8a) shouldBreak = false; + // Rule LB21a + if (this.LB21a && (this.curClass === $1627905f8be2ef3f$export$24aa617c849a894a || this.curClass === $1627905f8be2ef3f$export$a73c4d14459b698d)) { + shouldBreak = false; + this.LB21a = false; + } else this.LB21a = this.curClass === $1627905f8be2ef3f$export$f3e416a182673355; + // Rule LB30a + if (this.curClass === $1627905f8be2ef3f$export$1dff41d5c0caca01) { + this.LB30a++; + if (this.LB30a == 2 && this.nextClass === $1627905f8be2ef3f$export$1dff41d5c0caca01) { + shouldBreak = true; + this.LB30a = 0; + } + } else this.LB30a = 0; + this.curClass = this.nextClass; + return shouldBreak; + } + nextBreak() { + // get the first char if we're at the beginning of the string + if (this.curClass == null) { + let firstClass = this.nextCharClass(); + this.curClass = $557adaaeb0c7885f$var$mapFirst(firstClass); + this.nextClass = firstClass; + this.LB8a = firstClass === $1627905f8be2ef3f$export$30a74a373318dec6; + this.LB30a = 0; + } + while(this.pos < this.string.length){ + this.lastPos = this.pos; + const lastClass = this.nextClass; + this.nextClass = this.nextCharClass(); + // explicit newline + if (this.curClass === $1627905f8be2ef3f$export$66498d28055820a9 || this.curClass === $1627905f8be2ef3f$export$de92be486109a1df && this.nextClass !== $1627905f8be2ef3f$export$606cfc2a8896c91f) { + this.curClass = $557adaaeb0c7885f$var$mapFirst($557adaaeb0c7885f$var$mapClass(this.nextClass)); + return new $557adaaeb0c7885f$var$Break(this.lastPos, true); + } + let shouldBreak = this.getSimpleBreak(); + if (shouldBreak === null) shouldBreak = this.getPairTableBreak(lastClass); + // Rule LB8a + this.LB8a = this.nextClass === $1627905f8be2ef3f$export$30a74a373318dec6; + if (shouldBreak) return new $557adaaeb0c7885f$var$Break(this.lastPos); + } + if (this.lastPos < this.string.length) { + this.lastPos = this.string.length; + return new $557adaaeb0c7885f$var$Break(this.string.length); + } + return null; + } + constructor(string){ + this.string = string; + this.pos = 0; + this.lastPos = 0; + this.curClass = null; + this.nextClass = null; + this.LB8a = false; + this.LB21a = false; + this.LB30a = 0; + } +} +$557adaaeb0c7885f$exports = $557adaaeb0c7885f$var$LineBreaker; + + +export {$557adaaeb0c7885f$exports as default}; +//# sourceMappingURL=module.mjs.map diff --git a/node_modules/linebreak/dist/module.mjs.map b/node_modules/linebreak/dist/module.mjs.map new file mode 100644 index 0000000..6e8b104 --- /dev/null +++ b/node_modules/linebreak/dist/module.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;AAAA;ACAA,YAAY,CAAC;;;;ACCN,MAAM,wCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,sBAAsB;AACtC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,OAAO;AACvB,MAAM,wCAAE,GAAG,CAAC,AAAC,EAAG,eAAe;AAC/B,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,4BAA4B;AAC5C,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,+BAA+B;AAC/C,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,kBAAkB;AAClC,MAAM,yCAAE,GAAG,CAAC,AAAC,EAAG,SAAS;AACzB,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,UAAU;AAC1B,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,UAAU;AAC1B,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,aAAa;AAC7B,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,gBAAgB;AAChC,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,cAAc;AAC9B,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,yBAAyB;AACzC,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,SAAS;AACzB,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE,cAAc;AAC9B,MAAM,yCAAE,GAAG,EAAE,AAAC,EAAE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AAC,MAAM,CAAC,MAAM,CAAC;YAClC,OAAO,IAAI,2BAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACtC;QAED,OAAO,IAAI,CAAC;KACb;IAnJD,YAAY,MAAM,CAAE;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;KAChB;CA2IF;AAED,yBAAc,GAAG,iCAAW,CAAC","sources":["src/linebreaker.js","node_modules/@parcel/node-resolver-core/lib/_empty.js","src/classes.js","src/pairs.js"],"sourcesContent":["import UnicodeTrie from 'unicode-trie';\nimport fs from 'fs';\nimport base64 from 'base64-js';\nimport { BK, CR, LF, NL, SG, WJ, SP, ZWJ, BA, HY, NS, AI, AL, CJ, HL, RI, SA, XX } from './classes';\nimport { DI_BRK, IN_BRK, CI_BRK, CP_BRK, PR_BRK, pairTable } from './pairs';\n\nconst data = base64.toByteArray(fs.readFileSync(__dirname + '/classes.trie', 'base64'));\nconst classTrie = new UnicodeTrie(data);\n\nconst mapClass = function (c) {\n switch (c) {\n case AI:\n return AL;\n\n case SA:\n case SG:\n case XX:\n return AL;\n\n case CJ:\n return NS;\n\n default:\n return c;\n }\n};\n\nconst mapFirst = function (c) {\n switch (c) {\n case LF:\n case NL:\n return BK;\n\n case SP:\n return WJ;\n\n default:\n return c;\n }\n};\n\nclass Break {\n constructor(position, required = false) {\n this.position = position;\n this.required = required;\n }\n}\n\nclass LineBreaker {\n constructor(string) {\n this.string = string;\n this.pos = 0;\n this.lastPos = 0;\n this.curClass = null;\n this.nextClass = null;\n this.LB8a = false;\n this.LB21a = false;\n this.LB30a = 0;\n }\n\n nextCodePoint() {\n const code = this.string.charCodeAt(this.pos++);\n const next = this.string.charCodeAt(this.pos);\n\n // If a surrogate pair\n if ((0xd800 <= code && code <= 0xdbff) && (0xdc00 <= next && next <= 0xdfff)) {\n this.pos++;\n return ((code - 0xd800) * 0x400) + (next - 0xdc00) + 0x10000;\n }\n\n return code;\n }\n\n nextCharClass() {\n return mapClass(classTrie.get(this.nextCodePoint()));\n }\n\n getSimpleBreak() {\n // handle classes not handled by the pair table\n switch (this.nextClass) {\n case SP:\n return false;\n\n case BK:\n case LF:\n case NL:\n this.curClass = BK;\n return false;\n\n case CR:\n this.curClass = CR;\n return false;\n }\n\n return null;\n }\n\n getPairTableBreak(lastClass) {\n // if not handled already, use the pair table\n let shouldBreak = false;\n switch (pairTable[this.curClass][this.nextClass]) {\n case DI_BRK: // Direct break\n shouldBreak = true;\n break;\n\n case IN_BRK: // possible indirect break\n shouldBreak = lastClass === SP;\n break;\n\n case CI_BRK:\n shouldBreak = lastClass === SP;\n if (!shouldBreak) {\n shouldBreak = false;\n return shouldBreak;\n }\n break;\n\n case CP_BRK: // prohibited for combining marks\n if (lastClass !== SP) {\n return shouldBreak;\n }\n break;\n\n case PR_BRK:\n break;\n }\n\n if (this.LB8a) {\n shouldBreak = false;\n }\n\n // Rule LB21a\n if (this.LB21a && (this.curClass === HY || this.curClass === BA)) {\n shouldBreak = false;\n this.LB21a = false;\n } else {\n this.LB21a = (this.curClass === HL);\n }\n\n // Rule LB30a\n if (this.curClass === RI) {\n this.LB30a++;\n if (this.LB30a == 2 && (this.nextClass === RI)) {\n shouldBreak = true;\n this.LB30a = 0;\n }\n } else {\n this.LB30a = 0;\n }\n\n this.curClass = this.nextClass;\n\n return shouldBreak;\n }\n\n nextBreak() {\n // get the first char if we're at the beginning of the string\n if (this.curClass == null) {\n let firstClass = this.nextCharClass();\n this.curClass = mapFirst(firstClass);\n this.nextClass = firstClass;\n this.LB8a = (firstClass === ZWJ);\n this.LB30a = 0;\n }\n\n while (this.pos < this.string.length) {\n this.lastPos = this.pos;\n const lastClass = this.nextClass;\n this.nextClass = this.nextCharClass();\n\n // explicit newline\n if ((this.curClass === BK) || ((this.curClass === CR) && (this.nextClass !== LF))) {\n this.curClass = mapFirst(mapClass(this.nextClass));\n return new Break(this.lastPos, true);\n }\n\n let shouldBreak = this.getSimpleBreak();\n\n if (shouldBreak === null) {\n shouldBreak = this.getPairTableBreak(lastClass);\n }\n\n // Rule LB8a\n this.LB8a = (this.nextClass === ZWJ);\n\n if (shouldBreak) {\n return new Break(this.lastPos);\n }\n }\n\n if (this.lastPos < this.string.length) {\n this.lastPos = this.string.length;\n return new Break(this.string.length);\n }\n\n return null;\n }\n}\n\nmodule.exports = LineBreaker;\n","\"use strict\";","// The following break classes are handled by the pair table\nexport const OP = 0; // Opening punctuation\nexport const CL = 1; // Closing punctuation\nexport const CP = 2; // Closing parenthesis\nexport const QU = 3; // Ambiguous quotation\nexport const GL = 4; // Glue\nexport const NS = 5; // Non-starters\nexport const EX = 6; // Exclamation/Interrogation\nexport const SY = 7; // Symbols allowing break after\nexport const IS = 8; // Infix separator\nexport const PR = 9; // Prefix\nexport const PO = 10; // Postfix\nexport const NU = 11; // Numeric\nexport const AL = 12; // Alphabetic\nexport const HL = 13; // Hebrew Letter\nexport const ID = 14; // Ideographic\nexport const IN = 15; // Inseparable characters\nexport const HY = 16; // Hyphen\nexport const BA = 17; // Break after\nexport const BB = 18; // Break before\nexport const B2 = 19; // Break on either side (but not pair)\nexport const ZW = 20; // Zero-width space\nexport const CM = 21; // Combining marks\nexport const WJ = 22; // Word joiner\nexport const H2 = 23; // Hangul LV\nexport const H3 = 24; // Hangul LVT\nexport const JL = 25; // Hangul L Jamo\nexport const JV = 26; // Hangul V Jamo\nexport const JT = 27; // Hangul T Jamo\nexport const RI = 28; // Regional Indicator\nexport const EB = 29; // Emoji Base\nexport const EM = 30; // Emoji Modifier\nexport const ZWJ = 31; // Zero Width Joiner\nexport const CB = 32; // Contingent break\n\n// The following break classes are not handled by the pair table\nexport const AI = 33; // Ambiguous (Alphabetic or Ideograph)\nexport const BK = 34; // Break (mandatory)\nexport const CJ = 35; // Conditional Japanese Starter\nexport const CR = 36; // Carriage return\nexport const LF = 37; // Line feed\nexport const NL = 38; // Next line\nexport const SA = 39; // South-East Asian\nexport const SG = 40; // Surrogates\nexport const SP = 41; // Space\nexport const XX = 42; // Unknown\n","export const DI_BRK = 0; // Direct break opportunity\nexport const IN_BRK = 1; // Indirect break opportunity\nexport const CI_BRK = 2; // Indirect break opportunity for combining marks\nexport const CP_BRK = 3; // Prohibited break for combining marks\nexport const PR_BRK = 4; // Prohibited break\n\n// Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2\n// - ZWJ special processing for LB8a of Revision 41\n// - CB manually added as per Rule LB20\n// - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45\nexport const pairTable = [\n //OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB\n [PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, CP_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK], // OP\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CP\n [PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // QU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // GL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NS\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EX\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // SY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IS\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // PR\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // PO\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NU\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // AL\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ID\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IN\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HY\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // BA\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // BB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // B2\n [DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK], // ZW\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // WJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H2\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H3\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JL\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JV\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JT\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // RI\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK], // EB\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EM\n [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ZWJ\n [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK] // CB\n];"],"names":[],"version":3,"file":"module.mjs.map"} \ No newline at end of file diff --git a/node_modules/linebreak/node_modules/base64-js/.travis.yml b/node_modules/linebreak/node_modules/base64-js/.travis.yml new file mode 100644 index 0000000..939cb51 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" \ No newline at end of file diff --git a/node_modules/linebreak/node_modules/base64-js/LICENSE.MIT b/node_modules/linebreak/node_modules/base64-js/LICENSE.MIT new file mode 100644 index 0000000..96d3f68 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/LICENSE.MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/linebreak/node_modules/base64-js/README.md b/node_modules/linebreak/node_modules/base64-js/README.md new file mode 100644 index 0000000..ed31d1a --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/README.md @@ -0,0 +1,31 @@ +base64-js +========= + +`base64-js` does basic base64 encoding/decoding in pure JS. + +[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) + +[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js) + +Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. + +Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. + +## install + +With [npm](https://npmjs.org) do: + +`npm install base64-js` + +## methods + +`var base64 = require('base64-js')` + +`base64` has two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT \ No newline at end of file diff --git a/node_modules/linebreak/node_modules/base64-js/bench/bench.js b/node_modules/linebreak/node_modules/base64-js/bench/bench.js new file mode 100644 index 0000000..0689e08 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/bench/bench.js @@ -0,0 +1,19 @@ +var random = require('crypto').pseudoRandomBytes + +var b64 = require('../') +var fs = require('fs') +var path = require('path') +var data = random(1e6).toString('base64') +//fs.readFileSync(path.join(__dirname, 'example.b64'), 'ascii').split('\n').join('') +var start = Date.now() +var raw = b64.toByteArray(data) +var middle = Date.now() +var data = b64.fromByteArray(raw) +var end = Date.now() + +console.log('decode ms, decode ops/ms, encode ms, encode ops/ms') +console.log( + middle - start, data.length / (middle - start), + end - middle, data.length / (end - middle)) +//console.log(data) + diff --git a/node_modules/linebreak/node_modules/base64-js/lib/b64.js b/node_modules/linebreak/node_modules/base64-js/lib/b64.js new file mode 100644 index 0000000..46001d2 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/lib/b64.js @@ -0,0 +1,124 @@ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) diff --git a/node_modules/linebreak/node_modules/base64-js/package.json b/node_modules/linebreak/node_modules/base64-js/package.json new file mode 100644 index 0000000..a7e6099 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/package.json @@ -0,0 +1,34 @@ +{ + "author": "T. Jameson Little ", + "name": "base64-js", + "description": "Base64 encoding/decoding in pure JS", + "version": "0.0.8", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "main": "lib/b64.js", + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "chrome/4..latest", + "firefox/3..latest", + "safari/5.1..latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "tape": "~2.3.2" + } +} diff --git a/node_modules/linebreak/node_modules/base64-js/test/convert.js b/node_modules/linebreak/node_modules/base64-js/test/convert.js new file mode 100644 index 0000000..60b09c0 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/test/convert.js @@ -0,0 +1,51 @@ +var test = require('tape'), + b64 = require('../lib/b64'), + checks = [ + 'a', + 'aa', + 'aaa', + 'hi', + 'hi!', + 'hi!!', + 'sup', + 'sup?', + 'sup?!' + ]; + +test('convert to base64 and back', function (t) { + t.plan(checks.length); + + for (var i = 0; i < checks.length; i++) { + var check = checks[i], + b64Str, + arr, + str; + + b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0); })); + + arr = b64.toByteArray(b64Str); + str = map(arr, function (byte) { return String.fromCharCode(byte); }).join(''); + + t.equal(check, str, 'Checked ' + check); + } + +}); + +function map (arr, callback) { + var res = [], + kValue, + mappedValue; + + for (var k = 0, len = arr.length; k < len; k++) { + if ((typeof arr === 'string' && !!arr.charAt(k))) { + kValue = arr.charAt(k); + mappedValue = callback(kValue, k, arr); + res[k] = mappedValue; + } else if (typeof arr !== 'string' && k in arr) { + kValue = arr[k]; + mappedValue = callback(kValue, k, arr); + res[k] = mappedValue; + } + } + return res; +} diff --git a/node_modules/linebreak/node_modules/base64-js/test/url-safe.js b/node_modules/linebreak/node_modules/base64-js/test/url-safe.js new file mode 100644 index 0000000..dc437e9 --- /dev/null +++ b/node_modules/linebreak/node_modules/base64-js/test/url-safe.js @@ -0,0 +1,18 @@ +var test = require('tape'), + b64 = require('../lib/b64'); + +test('decode url-safe style base64 strings', function (t) { + var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff]; + + var actual = b64.toByteArray('//++/++/++//'); + for (var i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + actual = b64.toByteArray('__--_--_--__'); + for (var i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + t.end(); +}); diff --git a/node_modules/linebreak/package.json b/node_modules/linebreak/package.json new file mode 100644 index 0000000..5b22a30 --- /dev/null +++ b/node_modules/linebreak/package.json @@ -0,0 +1,57 @@ +{ + "name": "linebreak", + "version": "1.1.0", + "description": "An implementation of the Unicode Line Breaking Algorithm (UAX #14)", + "source": "src/linebreaker.js", + "type": "module", + "main": "dist/main.cjs", + "module": "dist/module.mjs", + "exports": { + "require": "./dist/main.cjs", + "import": "./dist/module.mjs" + }, + "files": [ + "dist" + ], + "repository": { + "type": "git", + "url": "https://github.com/devongovett/linebreaker.git" + }, + "keywords": [ + "unicode", + "text", + "wrapping" + ], + "author": "Devon Govett ", + "license": "MIT", + "bugs": { + "url": "https://github.com/devongovett/linebreaker/issues" + }, + "homepage": "https://github.com/devongovett/linebreaker", + "dependencies": { + "base64-js": "0.0.8", + "unicode-trie": "^2.0.0" + }, + "devDependencies": { + "mocha": "^10.0.0", + "parcel": "^2.5.0", + "request": "^2.88.0" + }, + "scripts": { + "test": "parcel build && mocha --reporter landing", + "build": "parcel build", + "prepublishOnly": "parcel build" + }, + "targets": { + "main": { + "includeNodeModules": [ + "fs" + ] + }, + "module": { + "includeNodeModules": [ + "fs" + ] + } + } +} diff --git a/node_modules/linebreak/readme.md b/node_modules/linebreak/readme.md new file mode 100644 index 0000000..55bb915 --- /dev/null +++ b/node_modules/linebreak/readme.md @@ -0,0 +1,62 @@ +# linebreak +An implementation of the Unicode Line Breaking Algorithm (UAX #14) + +> Line breaking, also known as word wrapping, is the process of breaking a section of text into lines such that it will fit in the +> available width of a page, window or other display area. The Unicode Line Breaking Algorithm performs part of this process. +> Given an input text, it produces a set of positions called "break opportunities" that are appropriate points to begin a new line. +> The selection of actual line break positions from the set of break opportunities is not covered by the Unicode Line Breaking Algorithm, +> but is in the domain of higher level software with knowledge of the available width and the display size of the text. + +This is a JavaScript implementation of the [Unicode Line Breaking Algorithm](http://www.unicode.org/reports/tr14/#SampleCode) for Node.js +(and browsers I guess). Currently supports Unicode version 13. It is used by [PDFKit](http://github.com/devongovett/pdfkit/) for +line wrapping text in PDF documents, but since the algorithm knows nothing about the actual visual appearance or layout of text, +it could be used for other things as well. + +## Installation + +You can install via npm + + npm install linebreak + +## Example + +```javascript +var LineBreaker = require('linebreak'); + +var lorem = 'lorem ipsum...'; +var breaker = new LineBreaker(lorem); +var last = 0; +var bk; + +while (bk = breaker.nextBreak()) { + // get the string between the last break and this one + var word = lorem.slice(last, bk.position); + console.log(word); + + // you can also check bk.required to see if this was a required break... + if (bk.required) { + console.log('\n\n'); + } + + last = bk.position; +} +``` + +## Development Notes + +In order to use the library, you shouldn't need to know this, but if you're interested in +contributing or fixing bugs, these things might be of interest. + +* The `src/classes.js` file is automatically generated from `LineBreak.txt` in the Unicode + database by `src/generate_data.js`. It should be rare that you need to run this, but + you may if, for instance, you want to change the Unicode version. + +* You can run the tests using `npm test`. They are written using `mocha`, and generated from + `LineBreakTest.txt` from the Unicode database, which is included in the repository for performance + reasons while running them. About 50 of the over 7600 tests are currently skipped due to + implementation differences. It appears that some of the tests may be wrong or use different + tailoring from the spec. + +## License + +MIT diff --git a/node_modules/locate-path/index.d.ts b/node_modules/locate-path/index.d.ts new file mode 100644 index 0000000..fbde526 --- /dev/null +++ b/node_modules/locate-path/index.d.ts @@ -0,0 +1,83 @@ +declare namespace locatePath { + interface Options { + /** + Current working directory. + + @default process.cwd() + */ + readonly cwd?: string; + + /** + Type of path to match. + + @default 'file' + */ + readonly type?: 'file' | 'directory'; + + /** + Allow symbolic links to match if they point to the requested path type. + + @default true + */ + readonly allowSymlinks?: boolean; + } + + interface AsyncOptions extends Options { + /** + Number of concurrently pending promises. Minimum: `1`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + Preserve `paths` order when searching. + + Disable this to improve performance if you don't care about the order. + + @default true + */ + readonly preserveOrder?: boolean; + } +} + +declare const locatePath: { + /** + Get the first path that exists on disk of multiple paths. + + @param paths - Paths to check. + @returns The first path that exists or `undefined` if none exists. + + @example + ``` + import locatePath = require('locate-path'); + + const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' + ]; + + (async () => { + console(await locatePath(files)); + //=> 'rainbow' + })(); + ``` + */ + (paths: Iterable, options?: locatePath.AsyncOptions): Promise< + string | undefined + >; + + /** + Synchronously get the first path that exists on disk of multiple paths. + + @param paths - Paths to check. + @returns The first path that exists or `undefined` if none exists. + */ + sync( + paths: Iterable, + options?: locatePath.Options + ): string | undefined; +}; + +export = locatePath; diff --git a/node_modules/locate-path/index.js b/node_modules/locate-path/index.js new file mode 100644 index 0000000..4604bbf --- /dev/null +++ b/node_modules/locate-path/index.js @@ -0,0 +1,65 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const {promisify} = require('util'); +const pLocate = require('p-locate'); + +const fsStat = promisify(fs.stat); +const fsLStat = promisify(fs.lstat); + +const typeMappings = { + directory: 'isDirectory', + file: 'isFile' +}; + +function checkType({type}) { + if (type in typeMappings) { + return; + } + + throw new Error(`Invalid type specified: ${type}`); +} + +const matchType = (type, stat) => type === undefined || stat[typeMappings[type]](); + +module.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: 'file', + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + + return pLocate(paths, async path_ => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch (_) { + return false; + } + }, options); +}; + +module.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: 'file', + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + + if (matchType(options.type, stat)) { + return path_; + } + } catch (_) { + } + } +}; diff --git a/node_modules/locate-path/license b/node_modules/locate-path/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/locate-path/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/locate-path/package.json b/node_modules/locate-path/package.json new file mode 100644 index 0000000..063b290 --- /dev/null +++ b/node_modules/locate-path/package.json @@ -0,0 +1,45 @@ +{ + "name": "locate-path", + "version": "5.0.0", + "description": "Get the first path that exists on disk of multiple paths", + "license": "MIT", + "repository": "sindresorhus/locate-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "dependencies": { + "p-locate": "^4.1.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/locate-path/readme.md b/node_modules/locate-path/readme.md new file mode 100644 index 0000000..2184c6f --- /dev/null +++ b/node_modules/locate-path/readme.md @@ -0,0 +1,122 @@ +# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + + +## Install + +``` +$ npm install locate-path +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + console(await locatePath(files)); + //=> 'rainbow' +})(); +``` + + +## API + +### locatePath(paths, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `paths` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory. + +##### type + +Type: `string`
+Default: `file`
+Values: `file` `directory` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`
+Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### locatePath.sync(paths, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +Same as above. + +##### type + +Same as above. + +##### allowSymlinks + +Same as above. + + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mupdf/LICENSE b/node_modules/mupdf/LICENSE new file mode 100644 index 0000000..dba13ed --- /dev/null +++ b/node_modules/mupdf/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/node_modules/mupdf/README.md b/node_modules/mupdf/README.md new file mode 100644 index 0000000..d13bca3 --- /dev/null +++ b/node_modules/mupdf/README.md @@ -0,0 +1,46 @@ +# MuPDF.js + +Welcome to the official MuPDF.js library from [Artifex](https://artifex.com). + +Use [MuPDF](https://mupdf.com) in your JavaScript and TypeScript projects! + +This library is powered by WebAssembly and can be used in all the usual +JavaScript environments: Node, Bun, Firefox, Safari, Chrome, etc. + +## License + +MuPDF.js is available under Open Source +[AGPL](https://www.gnu.org/licenses/agpl-3.0.html) and commercial license +agreements. + +> If you cannot meet the requirements of the AGPL, please contact +> [Artifex](https://artifex.com/contact/mupdf-js) regarding a +> commercial license. + +## Installation + + npm install mupdf + +## Usage + +The module is only available as an ESM module! + + import mupdf from "mupdf" + + var doc = mupdf.Document.openDocument("test.pdf") + console.log(doc.countPages()) + +Check out the example projects to help you get started: + +- [github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples](https://github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples) +- [github.com/ArtifexSoftware/mupdf.js/tree/master/examples](https://github.com/ArtifexSoftware/mupdf.js/tree/master/examples) + +## Documentation + +- [MuPDF.js Reference](https://mupdf.readthedocs.io/en/latest/reference/javascript/) +- [Getting Started & Examples](https://mupdfjs.readthedocs.io/en/latest/) + +## Contact + +Join the Discord at [#mupdf.js](https://discord.gg/zpyAHM7XtF) to chat with the +developers directly. diff --git a/node_modules/mupdf/dist/mupdf-wasm.d.ts b/node_modules/mupdf/dist/mupdf-wasm.d.ts new file mode 100644 index 0000000..ae141ef --- /dev/null +++ b/node_modules/mupdf/dist/mupdf-wasm.d.ts @@ -0,0 +1,572 @@ +export default libmupdf_wasm +declare function libmupdf_wasm(Module: any): Promise +declare const _brand: unique symbol +export type Pointer = number & { readonly [_brand]: B } +export { libmupdf_wasm } +interface Libmupdf { + UTF8ToString(ptr: Pointer<"char">): string, + stringToUTF8(str: string, outPtr: Pointer<"char">, maxBytesToWrite: number): number, + lengthBytesUTF8(str: string): number, + HEAP8: Int8Array, + HEAP16: Int16Array, + HEAPU8: Uint8Array, + HEAPU16: Uint16Array, + HEAP32: Int32Array, + HEAPU32: Uint32Array, + HEAPF32: Float32Array, + HEAPF64: Float64Array, + + _wasm_init_context(): void, + _wasm_malloc(size: number): Pointer<"void">, + _wasm_free(p: Pointer<"void">): void, + _wasm_enable_icc(): void, + _wasm_disable_icc(): void, + _wasm_set_user_css(text: Pointer<"char">): void, + _wasm_empty_store(): void, + _wasm_shrink_store(percent: number): boolean, + _wasm_Memento_checkAllMemory(): void, + _wasm_Memento_listBlocks(): void, + _wasm_keep_buffer(p: Pointer<"fz_buffer">): Pointer<"fz_buffer">, + _wasm_drop_buffer(p: Pointer<"fz_buffer">): void, + _wasm_keep_stream(p: Pointer<"fz_stream">): Pointer<"fz_stream">, + _wasm_drop_stream(p: Pointer<"fz_stream">): void, + _wasm_keep_colorspace(p: Pointer<"fz_colorspace">): Pointer<"fz_colorspace">, + _wasm_drop_colorspace(p: Pointer<"fz_colorspace">): void, + _wasm_keep_pixmap(p: Pointer<"fz_pixmap">): Pointer<"fz_pixmap">, + _wasm_drop_pixmap(p: Pointer<"fz_pixmap">): void, + _wasm_keep_font(p: Pointer<"fz_font">): Pointer<"fz_font">, + _wasm_drop_font(p: Pointer<"fz_font">): void, + _wasm_keep_stroke_state(p: Pointer<"fz_stroke_state">): Pointer<"fz_stroke_state">, + _wasm_drop_stroke_state(p: Pointer<"fz_stroke_state">): void, + _wasm_keep_image(p: Pointer<"fz_image">): Pointer<"fz_image">, + _wasm_drop_image(p: Pointer<"fz_image">): void, + _wasm_keep_shade(p: Pointer<"fz_shade">): Pointer<"fz_shade">, + _wasm_drop_shade(p: Pointer<"fz_shade">): void, + _wasm_keep_path(p: Pointer<"fz_path">): Pointer<"fz_path">, + _wasm_drop_path(p: Pointer<"fz_path">): void, + _wasm_keep_text(p: Pointer<"fz_text">): Pointer<"fz_text">, + _wasm_drop_text(p: Pointer<"fz_text">): void, + _wasm_keep_device(p: Pointer<"fz_device">): Pointer<"fz_device">, + _wasm_drop_device(p: Pointer<"fz_device">): void, + _wasm_keep_display_list(p: Pointer<"fz_display_list">): Pointer<"fz_display_list">, + _wasm_drop_display_list(p: Pointer<"fz_display_list">): void, + _wasm_drop_stext_page(p: Pointer<"fz_stext_page">): void, + _wasm_drop_document_writer(p: Pointer<"fz_document_writer">): void, + _wasm_drop_outline_iterator(p: Pointer<"fz_outline_iterator">): void, + _wasm_keep_document(p: Pointer<"any_document">): Pointer<"any_document">, + _wasm_drop_document(p: Pointer<"any_document">): void, + _wasm_keep_page(p: Pointer<"any_page">): Pointer<"any_page">, + _wasm_drop_page(p: Pointer<"any_page">): void, + _wasm_keep_link(p: Pointer<"fz_link">): Pointer<"fz_link">, + _wasm_drop_link(p: Pointer<"fz_link">): void, + _wasm_keep_outline(p: Pointer<"fz_outline">): Pointer<"fz_outline">, + _wasm_drop_outline(p: Pointer<"fz_outline">): void, + _wasm_pdf_keep_annot(p: Pointer<"pdf_annot">): Pointer<"pdf_annot">, + _wasm_pdf_drop_annot(p: Pointer<"pdf_annot">): void, + _wasm_pdf_keep_obj(p: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_drop_obj(p: Pointer<"pdf_obj">): void, + _wasm_pdf_keep_graft_map(p: Pointer<"pdf_graft_map">): Pointer<"pdf_graft_map">, + _wasm_pdf_drop_graft_map(p: Pointer<"pdf_graft_map">): void, + _wasm_buffer_get_data(p: Pointer<"fz_buffer">): Pointer<"void">, + _wasm_buffer_get_len(p: Pointer<"fz_buffer">): number, + _wasm_colorspace_get_type(p: Pointer<"fz_colorspace">): number, + _wasm_colorspace_get_n(p: Pointer<"fz_colorspace">): number, + _wasm_colorspace_get_name(p: Pointer<"fz_colorspace">): Pointer<"char">, + _wasm_pixmap_get_w(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_h(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_x(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_y(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_n(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_stride(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_alpha(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_xres(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_yres(p: Pointer<"fz_pixmap">): number, + _wasm_pixmap_get_colorspace(p: Pointer<"fz_pixmap">): Pointer<"fz_colorspace">, + _wasm_pixmap_get_samples(p: Pointer<"fz_pixmap">): Pointer<"char">, + _wasm_pixmap_set_xres(p: Pointer<"fz_pixmap">, v: number): void, + _wasm_pixmap_set_yres(p: Pointer<"fz_pixmap">, v: number): void, + _wasm_font_get_name(p: Pointer<"fz_font">): Pointer<"char">, + _wasm_stroke_state_get_start_cap(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_start_cap(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_dash_cap(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_dash_cap(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_end_cap(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_end_cap(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_linejoin(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_linejoin(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_linewidth(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_linewidth(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_miterlimit(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_miterlimit(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_dash_phase(p: Pointer<"fz_stroke_state">): number, + _wasm_stroke_state_set_dash_phase(p: Pointer<"fz_stroke_state">, v: number): void, + _wasm_stroke_state_get_dash_len(p: Pointer<"fz_stroke_state">): number, + _wasm_image_get_w(p: Pointer<"fz_image">): number, + _wasm_image_get_h(p: Pointer<"fz_image">): number, + _wasm_image_get_n(p: Pointer<"fz_image">): number, + _wasm_image_get_bpc(p: Pointer<"fz_image">): number, + _wasm_image_get_xres(p: Pointer<"fz_image">): number, + _wasm_image_get_yres(p: Pointer<"fz_image">): number, + _wasm_image_get_imagemask(p: Pointer<"fz_image">): boolean, + _wasm_image_get_colorspace(p: Pointer<"fz_image">): Pointer<"fz_colorspace">, + _wasm_image_get_mask(p: Pointer<"fz_image">): Pointer<"fz_image">, + _wasm_outline_get_title(p: Pointer<"fz_outline">): Pointer<"char">, + _wasm_outline_get_uri(p: Pointer<"fz_outline">): Pointer<"char">, + _wasm_outline_get_next(p: Pointer<"fz_outline">): Pointer<"fz_outline">, + _wasm_outline_get_down(p: Pointer<"fz_outline">): Pointer<"fz_outline">, + _wasm_outline_get_is_open(p: Pointer<"fz_outline">): boolean, + _wasm_outline_item_get_title(p: Pointer<"fz_outline_item">): Pointer<"char">, + _wasm_outline_item_get_uri(p: Pointer<"fz_outline_item">): Pointer<"char">, + _wasm_outline_item_get_is_open(p: Pointer<"fz_outline_item">): boolean, + _wasm_link_get_rect(p: Pointer<"fz_link">): Pointer<"fz_rect">, + _wasm_link_get_uri(p: Pointer<"fz_link">): Pointer<"char">, + _wasm_link_get_next(p: Pointer<"fz_link">): Pointer<"fz_link">, + _wasm_stext_page_get_mediabox(p: Pointer<"fz_stext_page">): Pointer<"fz_rect">, + _wasm_stext_page_get_first_block(p: Pointer<"fz_stext_page">): Pointer<"fz_stext_block">, + _wasm_stext_block_get_next(p: Pointer<"fz_stext_block">): Pointer<"fz_stext_block">, + _wasm_stext_block_get_type(p: Pointer<"fz_stext_block">): number, + _wasm_stext_block_get_bbox(p: Pointer<"fz_stext_block">): Pointer<"fz_rect">, + _wasm_stext_block_get_first_line(p: Pointer<"fz_stext_block">): Pointer<"fz_stext_line">, + _wasm_stext_block_get_transform(p: Pointer<"fz_stext_block">): Pointer<"fz_matrix">, + _wasm_stext_block_get_image(p: Pointer<"fz_stext_block">): Pointer<"fz_image">, + _wasm_stext_block_get_v_flags(p: Pointer<"fz_stext_block">): number, + _wasm_stext_block_get_v_argb(p: Pointer<"fz_stext_block">): number, + _wasm_stext_line_get_next(p: Pointer<"fz_stext_line">): Pointer<"fz_stext_line">, + _wasm_stext_line_get_wmode(p: Pointer<"fz_stext_line">): number, + _wasm_stext_line_get_dir(p: Pointer<"fz_stext_line">): Pointer<"fz_point">, + _wasm_stext_line_get_bbox(p: Pointer<"fz_stext_line">): Pointer<"fz_rect">, + _wasm_stext_line_get_first_char(p: Pointer<"fz_stext_line">): Pointer<"fz_stext_char">, + _wasm_stext_char_get_next(p: Pointer<"fz_stext_char">): Pointer<"fz_stext_char">, + _wasm_stext_char_get_c(p: Pointer<"fz_stext_char">): number, + _wasm_stext_char_get_origin(p: Pointer<"fz_stext_char">): Pointer<"fz_point">, + _wasm_stext_char_get_quad(p: Pointer<"fz_stext_char">): Pointer<"fz_quad">, + _wasm_stext_char_get_size(p: Pointer<"fz_stext_char">): number, + _wasm_stext_char_get_font(p: Pointer<"fz_stext_char">): Pointer<"fz_font">, + _wasm_stext_char_get_argb(p: Pointer<"fz_stext_char">): number, + _wasm_stext_char_get_bidi(p: Pointer<"fz_stext_char">): number, + _wasm_link_dest_get_chapter(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_page(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_type(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_x(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_y(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_w(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_h(p: Pointer<"fz_link_dest">): number, + _wasm_link_dest_get_zoom(p: Pointer<"fz_link_dest">): number, + _wasm_pdf_layer_config_ui_get_text(p: Pointer<"pdf_layer_config_ui">): Pointer<"char">, + _wasm_pdf_layer_config_ui_get_depth(p: Pointer<"pdf_layer_config_ui">): number, + _wasm_pdf_layer_config_ui_get_type(p: Pointer<"pdf_layer_config_ui">): number, + _wasm_pdf_layer_config_ui_get_selected(p: Pointer<"pdf_layer_config_ui">): number, + _wasm_pdf_layer_config_ui_get_locked(p: Pointer<"pdf_layer_config_ui">): number, + _wasm_pdf_filespec_params_get_filename(p: Pointer<"pdf_filespec_params">): Pointer<"char">, + _wasm_pdf_filespec_params_get_mimetype(p: Pointer<"pdf_filespec_params">): Pointer<"char">, + _wasm_pdf_filespec_params_get_size(p: Pointer<"pdf_filespec_params">): number, + _wasm_pdf_filespec_params_get_created(p: Pointer<"pdf_filespec_params">): number, + _wasm_pdf_filespec_params_get_modified(p: Pointer<"pdf_filespec_params">): number, + _wasm_pdf_page_get_obj(p: Pointer<"any_page">): Pointer<"pdf_obj">, + _wasm_new_buffer(capacity: number): Pointer<"fz_buffer">, + _wasm_new_buffer_from_data(data: Pointer<"char">, size: number): Pointer<"fz_buffer">, + _wasm_append_string(buf: Pointer<"fz_buffer">, str: Pointer<"char">): void, + _wasm_append_byte(buf: Pointer<"fz_buffer">, c: number): void, + _wasm_append_buffer(buf: Pointer<"fz_buffer">, src: Pointer<"fz_buffer">): void, + _wasm_slice_buffer(buf: Pointer<"fz_buffer">, start: number, end: number): Pointer<"fz_buffer">, + _wasm_string_from_buffer(buf: Pointer<"fz_buffer">): Pointer<"char">, + _wasm_device_gray(): Pointer<"fz_colorspace">, + _wasm_device_rgb(): Pointer<"fz_colorspace">, + _wasm_device_bgr(): Pointer<"fz_colorspace">, + _wasm_device_cmyk(): Pointer<"fz_colorspace">, + _wasm_device_lab(): Pointer<"fz_colorspace">, + _wasm_new_icc_colorspace(name: Pointer<"char">, buffer: Pointer<"fz_buffer">): Pointer<"fz_colorspace">, + _wasm_new_stroke_state(dash_len: number): Pointer<"fz_stroke_state">, + _wasm_stroke_state_get_dash_item(stroke: Pointer<"fz_stroke_state">, i: number): number, + _wasm_stroke_state_set_dash_item(stroke: Pointer<"fz_stroke_state">, i: number, x: number): void, + _wasm_new_base14_font(name: Pointer<"char">): Pointer<"fz_font">, + _wasm_new_cjk_font(ordering: number): Pointer<"fz_font">, + _wasm_new_font_from_buffer(name: Pointer<"char">, buf: Pointer<"fz_buffer">, subfont: number): Pointer<"fz_font">, + _wasm_encode_character(font: Pointer<"fz_font">, unicode: number): number, + _wasm_advance_glyph(font: Pointer<"fz_font">, glyph: number, wmode: number): number, + _wasm_font_is_monospaced(font: Pointer<"fz_font">): number, + _wasm_font_is_serif(font: Pointer<"fz_font">): number, + _wasm_font_is_bold(font: Pointer<"fz_font">): number, + _wasm_font_is_italic(font: Pointer<"fz_font">): number, + _wasm_new_image_from_pixmap(pix: Pointer<"fz_pixmap">, mask: Pointer<"fz_image">): Pointer<"fz_image">, + _wasm_new_image_from_buffer(buf: Pointer<"fz_buffer">): Pointer<"fz_image">, + _wasm_get_pixmap_from_image(image: Pointer<"fz_image">): Pointer<"fz_pixmap">, + _wasm_new_pixmap_from_page(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">, + _wasm_new_pixmap_from_page_contents(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">, + _wasm_pdf_new_pixmap_from_page_with_usage(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean, usage: Pointer<"char">, box: number): Pointer<"fz_pixmap">, + _wasm_pdf_new_pixmap_from_page_contents_with_usage(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean, usage: Pointer<"char">, box: number): Pointer<"fz_pixmap">, + _wasm_new_pixmap_with_bbox(colorspace: Pointer<"fz_colorspace">, bbox: Pointer<"fz_rect">, alpha: boolean): Pointer<"fz_pixmap">, + _wasm_clear_pixmap(pix: Pointer<"fz_pixmap">): void, + _wasm_clear_pixmap_with_value(pix: Pointer<"fz_pixmap">, value: number): void, + _wasm_invert_pixmap(pix: Pointer<"fz_pixmap">): void, + _wasm_invert_pixmap_luminance(pix: Pointer<"fz_pixmap">): void, + _wasm_gamma_pixmap(pix: Pointer<"fz_pixmap">, gamma: number): void, + _wasm_tint_pixmap(pix: Pointer<"fz_pixmap">, black_hex_color: number, white_hex_color: number): void, + _wasm_new_buffer_from_pixmap_as_png(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">, + _wasm_new_buffer_from_pixmap_as_pam(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">, + _wasm_new_buffer_from_pixmap_as_psd(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">, + _wasm_new_buffer_from_pixmap_as_jpeg(pix: Pointer<"fz_pixmap">, quality: number, invert_cmyk: boolean): Pointer<"fz_buffer">, + _wasm_convert_pixmap(pixmap: Pointer<"fz_pixmap">, colorspace: Pointer<"fz_colorspace">, keep_alpha: boolean): Pointer<"fz_pixmap">, + _wasm_warp_pixmap(pixmap: Pointer<"fz_pixmap">, q: Pointer<"fz_quad">, w: number, h: number): Pointer<"fz_pixmap">, + _wasm_bound_shade(shade: Pointer<"fz_shade">): Pointer<"fz_rect">, + _wasm_new_display_list(mediabox: Pointer<"fz_rect">): Pointer<"fz_display_list">, + _wasm_bound_display_list(list: Pointer<"fz_display_list">): Pointer<"fz_rect">, + _wasm_run_display_list(display_list: Pointer<"fz_display_list">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_new_pixmap_from_display_list(display_list: Pointer<"fz_display_list">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">, + _wasm_new_stext_page_from_display_list(display_list: Pointer<"fz_display_list">, option_string: Pointer<"char">): Pointer<"fz_stext_page">, + _wasm_search_display_list(display_list: Pointer<"fz_display_list">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number, + _wasm_new_path(): Pointer<"fz_path">, + _wasm_moveto(path: Pointer<"fz_path">, x: number, y: number): void, + _wasm_lineto(path: Pointer<"fz_path">, x: number, y: number): void, + _wasm_curveto(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void, + _wasm_curvetov(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void, + _wasm_curvetoy(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void, + _wasm_closepath(path: Pointer<"fz_path">): void, + _wasm_rectto(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void, + _wasm_transform_path(path: Pointer<"fz_path">, ctm: Pointer<"fz_matrix">): void, + _wasm_bound_path(path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): Pointer<"fz_rect">, + _wasm_new_text(): Pointer<"fz_text">, + _wasm_bound_text(text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): Pointer<"fz_rect">, + _wasm_show_glyph(text: Pointer<"fz_text">, font: Pointer<"fz_font">, trm: Pointer<"fz_matrix">, gid: number, ucs: number, wmode: number): void, + _wasm_show_string(text: Pointer<"fz_text">, font: Pointer<"fz_font">, trm: Pointer<"fz_matrix">, string: Pointer<"char">, wmode: number): Pointer<"fz_matrix">, + _wasm_new_draw_device(ctm: Pointer<"fz_matrix">, dest: Pointer<"fz_pixmap">): Pointer<"fz_device">, + _wasm_new_display_list_device(list: Pointer<"fz_display_list">): Pointer<"fz_device">, + _wasm_close_device(dev: Pointer<"fz_device">): void, + _wasm_fill_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, evenOdd: boolean, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void, + _wasm_stroke_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void, + _wasm_clip_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, evenOdd: boolean, ctm: Pointer<"fz_matrix">): void, + _wasm_clip_stroke_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): void, + _wasm_fill_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void, + _wasm_stroke_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void, + _wasm_clip_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">): void, + _wasm_clip_stroke_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): void, + _wasm_ignore_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">): void, + _wasm_fill_shade(dev: Pointer<"fz_device">, shade: Pointer<"fz_shade">, ctm: Pointer<"fz_matrix">, alpha: number): void, + _wasm_fill_image(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">, alpha: number): void, + _wasm_fill_image_mask(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void, + _wasm_clip_image_mask(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">): void, + _wasm_pop_clip(dev: Pointer<"fz_device">): void, + _wasm_begin_mask(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, luminosity: boolean, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">): void, + _wasm_end_mask(dev: Pointer<"fz_device">): void, + _wasm_begin_group(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, colorspace: Pointer<"fz_colorspace">, isolated: boolean, knockout: boolean, blendmode: number, alpha: number): void, + _wasm_end_group(dev: Pointer<"fz_device">): void, + _wasm_begin_tile(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, view: Pointer<"fz_rect">, xstep: number, ystep: number, ctm: Pointer<"fz_matrix">, id: number, doc_id: number): number, + _wasm_end_tile(dev: Pointer<"fz_device">): void, + _wasm_begin_layer(dev: Pointer<"fz_device">, name: Pointer<"char">): void, + _wasm_end_layer(dev: Pointer<"fz_device">): void, + _wasm_new_document_writer_with_buffer(buf: Pointer<"fz_buffer">, format: Pointer<"char">, options: Pointer<"char">): Pointer<"fz_document_writer">, + _wasm_begin_page(wri: Pointer<"fz_document_writer">, mediabox: Pointer<"fz_rect">): Pointer<"fz_device">, + _wasm_end_page(wri: Pointer<"fz_document_writer">): void, + _wasm_close_document_writer(wri: Pointer<"fz_document_writer">): void, + _wasm_print_stext_page_as_json(page: Pointer<"fz_stext_page">, scale: number): Pointer<"char">, + _wasm_search_stext_page(text: Pointer<"fz_stext_page">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number, + _wasm_snap_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">, mode: number): Pointer<"fz_quad">, + _wasm_copy_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">): Pointer<"char">, + _wasm_highlight_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">, hits: Pointer<"fz_quad">, n: number): number, + _wasm_print_stext_page_as_html(page: Pointer<"fz_stext_page">, id: number): Pointer<"char">, + _wasm_print_stext_page_as_text(page: Pointer<"fz_stext_page">): Pointer<"char">, + _wasm_open_document_with_buffer(magic: Pointer<"char">, buffer: Pointer<"fz_buffer">): Pointer<"any_document">, + _wasm_open_document_with_stream(magic: Pointer<"char">, stream: Pointer<"fz_stream">): Pointer<"any_document">, + _wasm_format_link_uri(doc: Pointer<"any_document">, ch: number, pg: number, ty: number, x: number, y: number, w: number, h: number, z: number): Pointer<"char">, + _wasm_needs_password(doc: Pointer<"any_document">): number, + _wasm_authenticate_password(doc: Pointer<"any_document">, password: Pointer<"char">): number, + _wasm_has_permission(doc: Pointer<"any_document">, perm: number): number, + _wasm_count_pages(doc: Pointer<"any_document">): number, + _wasm_load_page(doc: Pointer<"any_document">, number: number): Pointer<"any_page">, + _wasm_lookup_metadata(doc: Pointer<"any_document">, key: Pointer<"char">): Pointer<"char">, + _wasm_set_metadata(doc: Pointer<"any_document">, key: Pointer<"char">, value: Pointer<"char">): void, + _wasm_resolve_link(doc: Pointer<"any_document">, uri: Pointer<"char">): number, + _wasm_resolve_link_dest(doc: Pointer<"any_document">, uri: Pointer<"char">): Pointer<"fz_link_dest">, + _wasm_load_outline(doc: Pointer<"any_document">): Pointer<"fz_outline">, + _wasm_outline_get_page(doc: Pointer<"any_document">, outline: Pointer<"fz_outline">): number, + _wasm_style_document(doc: Pointer<"any_document">, publisher_css: boolean, user_css: Pointer<"char">): void, + _wasm_layout_document(doc: Pointer<"any_document">, w: number, h: number, em: number): void, + _wasm_is_document_reflowable(doc: Pointer<"any_document">): boolean, + _wasm_link_set_rect(link: Pointer<"fz_link">, rect: Pointer<"fz_rect">): void, + _wasm_link_set_uri(link: Pointer<"fz_link">, uri: Pointer<"char">): void, + _wasm_bound_page(page: Pointer<"any_page">, box_type: number): Pointer<"fz_rect">, + _wasm_load_links(page: Pointer<"any_page">): Pointer<"fz_link">, + _wasm_create_link(page: Pointer<"any_page">, bbox: Pointer<"fz_rect">, uri: Pointer<"char">): Pointer<"fz_link">, + _wasm_delete_link(page: Pointer<"any_page">, link: Pointer<"fz_link">): void, + _wasm_run_page(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_run_page_contents(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_run_page_annots(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_run_page_widgets(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_new_stext_page_from_page(page: Pointer<"any_page">, option_string: Pointer<"char">): Pointer<"fz_stext_page">, + _wasm_new_display_list_from_page(page: Pointer<"any_page">): Pointer<"fz_display_list">, + _wasm_new_display_list_from_page_contents(page: Pointer<"any_page">): Pointer<"fz_display_list">, + _wasm_page_label(page: Pointer<"any_page">): Pointer<"char">, + _wasm_search_page(page: Pointer<"any_page">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number, + _wasm_new_outline_iterator(doc: Pointer<"any_document">): Pointer<"fz_outline_iterator">, + _wasm_outline_iterator_next(iter: Pointer<"fz_outline_iterator">): number, + _wasm_outline_iterator_prev(iter: Pointer<"fz_outline_iterator">): number, + _wasm_outline_iterator_up(iter: Pointer<"fz_outline_iterator">): number, + _wasm_outline_iterator_down(iter: Pointer<"fz_outline_iterator">): number, + _wasm_outline_iterator_delete(iter: Pointer<"fz_outline_iterator">): number, + _wasm_outline_iterator_item(iter: Pointer<"fz_outline_iterator">): Pointer<"fz_outline_item">, + _wasm_outline_iterator_insert(iter: Pointer<"fz_outline_iterator">, title: Pointer<"char">, uri: Pointer<"char">, is_open: boolean): number, + _wasm_outline_iterator_update(iter: Pointer<"fz_outline_iterator">, title: Pointer<"char">, uri: Pointer<"char">, is_open: boolean): void, + _wasm_pdf_document_from_fz_document(document: Pointer<"any_document">): Pointer<"any_document">, + _wasm_pdf_page_from_fz_page(page: Pointer<"any_page">): Pointer<"any_page">, + _wasm_pdf_create_document(): Pointer<"any_document">, + _wasm_pdf_version(doc: Pointer<"any_document">): number, + _wasm_pdf_was_repaired(doc: Pointer<"any_document">): number, + _wasm_pdf_has_unsaved_changes(doc: Pointer<"any_document">): number, + _wasm_pdf_can_be_saved_incrementally(doc: Pointer<"any_document">): number, + _wasm_pdf_count_versions(doc: Pointer<"any_document">): number, + _wasm_pdf_count_unsaved_versions(doc: Pointer<"any_document">): number, + _wasm_pdf_validate_change_history(doc: Pointer<"any_document">): number, + _wasm_pdf_enable_journal(doc: Pointer<"any_document">): void, + _wasm_pdf_undoredo_state_position(doc: Pointer<"any_document">): number, + _wasm_pdf_undoredo_state_count(doc: Pointer<"any_document">): number, + _wasm_pdf_undoredo_step(doc: Pointer<"any_document">, step: number): Pointer<"char">, + _wasm_pdf_begin_operation(doc: Pointer<"any_document">, op: Pointer<"char">): void, + _wasm_pdf_begin_implicit_operation(doc: Pointer<"any_document">): void, + _wasm_pdf_end_operation(doc: Pointer<"any_document">): void, + _wasm_pdf_abandon_operation(doc: Pointer<"any_document">): void, + _wasm_pdf_undo(doc: Pointer<"any_document">): void, + _wasm_pdf_redo(doc: Pointer<"any_document">): void, + _wasm_pdf_can_undo(doc: Pointer<"any_document">): number, + _wasm_pdf_can_redo(doc: Pointer<"any_document">): number, + _wasm_pdf_document_language(doc: Pointer<"any_document">): Pointer<"char">, + _wasm_pdf_set_document_language(doc: Pointer<"any_document">, str: Pointer<"char">): void, + _wasm_pdf_trailer(doc: Pointer<"any_document">): Pointer<"pdf_obj">, + _wasm_pdf_xref_len(doc: Pointer<"any_document">): number, + _wasm_pdf_lookup_page_obj(doc: Pointer<"any_document">, index: number): Pointer<"pdf_obj">, + _wasm_pdf_add_object(doc: Pointer<"any_document">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_create_object(doc: Pointer<"any_document">): number, + _wasm_pdf_delete_object(doc: Pointer<"any_document">, num: number): void, + _wasm_pdf_add_stream(doc: Pointer<"any_document">, buf: Pointer<"fz_buffer">, obj: Pointer<"pdf_obj">, compress: number): Pointer<"pdf_obj">, + _wasm_pdf_add_simple_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">, encoding: number): Pointer<"pdf_obj">, + _wasm_pdf_add_cjk_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">, ordering: number, wmode: number, serif: boolean): Pointer<"pdf_obj">, + _wasm_pdf_add_cid_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">): Pointer<"pdf_obj">, + _wasm_pdf_add_image(doc: Pointer<"any_document">, image: Pointer<"fz_image">): Pointer<"pdf_obj">, + _wasm_pdf_load_image(doc: Pointer<"any_document">, ref: Pointer<"pdf_obj">): Pointer<"fz_image">, + _wasm_pdf_set_page_tree_cache(doc: Pointer<"any_document">, enabled: boolean): void, + _wasm_pdf_add_page(doc: Pointer<"any_document">, mediabox: Pointer<"fz_rect">, rotate: number, resources: Pointer<"pdf_obj">, contents: Pointer<"fz_buffer">): Pointer<"pdf_obj">, + _wasm_pdf_insert_page(doc: Pointer<"any_document">, index: number, obj: Pointer<"pdf_obj">): void, + _wasm_pdf_delete_page(doc: Pointer<"any_document">, index: number): void, + _wasm_pdf_set_page_labels(doc: Pointer<"any_document">, index: number, style: number, prefix: Pointer<"char">, start: number): void, + _wasm_pdf_delete_page_labels(doc: Pointer<"any_document">, index: number): void, + _wasm_pdf_is_embedded_file(ref: Pointer<"pdf_obj">): number, + _wasm_pdf_get_filespec_params(ref: Pointer<"pdf_obj">): Pointer<"pdf_filespec_params">, + _wasm_pdf_add_embedded_file(doc: Pointer<"any_document">, filename: Pointer<"char">, mimetype: Pointer<"char">, contents: Pointer<"fz_buffer">, created: number, modified: number, checksum: boolean): Pointer<"pdf_obj">, + _wasm_pdf_load_embedded_file_contents(fs: Pointer<"pdf_obj">): Pointer<"fz_buffer">, + _wasm_pdf_write_document_buffer(doc: Pointer<"any_document">, options: Pointer<"char">): Pointer<"fz_buffer">, + _wasm_pdf_js_supported(doc: Pointer<"any_document">): number, + _wasm_pdf_enable_js(doc: Pointer<"any_document">): void, + _wasm_pdf_disable_js(doc: Pointer<"any_document">): void, + _wasm_pdf_rearrange_pages(doc: Pointer<"any_document">, n: number, pages: Pointer<"int">): void, + _wasm_pdf_subset_fonts(doc: Pointer<"any_document">): void, + _wasm_pdf_bake_document(doc: Pointer<"any_document">, bake_annots: boolean, bake_widgets: boolean): void, + _wasm_pdf_count_layer_configs(doc: Pointer<"any_document">): number, + _wasm_pdf_layer_config_creator(doc: Pointer<"any_document">, config: number): Pointer<"char">, + _wasm_pdf_layer_config_name(doc: Pointer<"any_document">, config: number): Pointer<"char">, + _wasm_pdf_select_layer_config(doc: Pointer<"any_document">, config: number): void, + _wasm_pdf_count_layer_config_uis(doc: Pointer<"any_document">): number, + _wasm_pdf_layer_config_ui_info(doc: Pointer<"any_document">, configui: number): Pointer<"pdf_layer_config_ui">, + _wasm_pdf_count_layers(doc: Pointer<"any_document">): number, + _wasm_pdf_layer_name(doc: Pointer<"any_document">, layer: number): Pointer<"char">, + _wasm_pdf_layer_is_enabled(doc: Pointer<"any_document">, layer: number): number, + _wasm_pdf_enable_layer(doc: Pointer<"any_document">, layer: number, state: number): void, + _wasm_pdf_page_transform(page: Pointer<"any_page">): Pointer<"fz_matrix">, + _wasm_pdf_set_page_box(page: Pointer<"any_page">, which: number, rect: Pointer<"fz_rect">): void, + _wasm_pdf_first_annot(page: Pointer<"any_page">): Pointer<"pdf_annot">, + _wasm_pdf_next_annot(annot: Pointer<"pdf_annot">): Pointer<"pdf_annot">, + _wasm_pdf_first_widget(page: Pointer<"any_page">): Pointer<"pdf_annot">, + _wasm_pdf_next_widget(annot: Pointer<"pdf_annot">): Pointer<"pdf_annot">, + _wasm_pdf_create_annot(page: Pointer<"any_page">, type: number): Pointer<"pdf_annot">, + _wasm_pdf_delete_annot(page: Pointer<"any_page">, annot: Pointer<"pdf_annot">): void, + _wasm_pdf_update_page(page: Pointer<"any_page">): number, + _wasm_pdf_redact_page(page: Pointer<"any_page">, black_boxes: number, image_method: number, line_art_method: number, text_method: number): void, + _wasm_pdf_new_graft_map(doc: Pointer<"any_document">): Pointer<"pdf_graft_map">, + _wasm_pdf_graft_mapped_object(map: Pointer<"pdf_graft_map">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_graft_object(dst: Pointer<"any_document">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_graft_mapped_page(map: Pointer<"pdf_graft_map">, to: number, src: Pointer<"any_document">, from: number): void, + _wasm_pdf_graft_page(dst: Pointer<"any_document">, to: number, src: Pointer<"any_document">, from: number): void, + _wasm_pdf_bound_annot(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">, + _wasm_pdf_run_annot(annot: Pointer<"pdf_annot">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void, + _wasm_pdf_new_pixmap_from_annot(annot: Pointer<"pdf_annot">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">, + _wasm_pdf_new_display_list_from_annot(annot: Pointer<"pdf_annot">): Pointer<"fz_display_list">, + _wasm_pdf_update_annot(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_obj(annot: Pointer<"pdf_annot">): Pointer<"pdf_obj">, + _wasm_pdf_annot_type(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_flags(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_flags(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_contents(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_contents(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_name(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_name(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_author(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_author(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_subject(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_subject(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_creation_date(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_creation_date(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_modification_date(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_modification_date(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_border_width(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_border_width(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_border_style(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_border_style(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_border_effect(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_border_effect(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_border_effect_intensity(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_border_effect_intensity(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_opacity(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_opacity(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_filespec(annot: Pointer<"pdf_annot">): Pointer<"pdf_obj">, + _wasm_pdf_set_annot_filespec(annot: Pointer<"pdf_annot">, v: Pointer<"pdf_obj">): void, + _wasm_pdf_annot_quadding(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_quadding(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_is_open(annot: Pointer<"pdf_annot">): boolean, + _wasm_pdf_set_annot_is_open(annot: Pointer<"pdf_annot">, v: boolean): void, + _wasm_pdf_annot_hidden_for_editing(annot: Pointer<"pdf_annot">): boolean, + _wasm_pdf_set_annot_hidden_for_editing(annot: Pointer<"pdf_annot">, v: boolean): void, + _wasm_pdf_annot_icon_name(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_icon_name(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_intent(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_intent(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_callout_style(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_callout_style(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_line_leader(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_line_leader(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_line_leader_extension(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_line_leader_extension(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_line_leader_offset(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_line_leader_offset(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_line_caption(annot: Pointer<"pdf_annot">): boolean, + _wasm_pdf_set_annot_line_caption(annot: Pointer<"pdf_annot">, v: boolean): void, + _wasm_pdf_annot_rich_defaults(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_rich_defaults(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void, + _wasm_pdf_annot_callout_point(annot: Pointer<"pdf_annot">): Pointer<"fz_point">, + _wasm_pdf_annot_line_caption_offset(annot: Pointer<"pdf_annot">): Pointer<"fz_point">, + _wasm_pdf_annot_rect(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">, + _wasm_pdf_annot_popup(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">, + _wasm_pdf_annot_quad_point_count(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_quad_point(annot: Pointer<"pdf_annot">, idx: number): Pointer<"fz_quad">, + _wasm_pdf_annot_vertex_count(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_vertex(annot: Pointer<"pdf_annot">, idx: number): Pointer<"fz_point">, + _wasm_pdf_annot_ink_list_count(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_ink_list_stroke_count(annot: Pointer<"pdf_annot">, idx: number): number, + _wasm_pdf_annot_ink_list_stroke_vertex(annot: Pointer<"pdf_annot">, a: number, b: number): Pointer<"fz_point">, + _wasm_pdf_annot_rich_contents(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_annot_border_dash_count(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_border_dash_item(annot: Pointer<"pdf_annot">, idx: number): number, + _wasm_pdf_annot_has_rect(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_ink_list(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_quad_points(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_vertices(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_line(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_interior_color(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_line_ending_styles(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_border(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_border_effect(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_icon_name(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_open(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_author(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_subject(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_filespec(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_callout(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_has_rich_contents(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_language(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_set_annot_language(annot: Pointer<"pdf_annot">, str: Pointer<"char">): void, + _wasm_pdf_set_annot_popup(annot: Pointer<"pdf_annot">, rect: Pointer<"fz_rect">): void, + _wasm_pdf_set_annot_rect(annot: Pointer<"pdf_annot">, rect: Pointer<"fz_rect">): void, + _wasm_pdf_clear_annot_quad_points(annot: Pointer<"pdf_annot">): void, + _wasm_pdf_clear_annot_vertices(annot: Pointer<"pdf_annot">): void, + _wasm_pdf_clear_annot_ink_list(annot: Pointer<"pdf_annot">): void, + _wasm_pdf_clear_annot_border_dash(annot: Pointer<"pdf_annot">): void, + _wasm_pdf_add_annot_quad_point(annot: Pointer<"pdf_annot">, quad: Pointer<"fz_quad">): void, + _wasm_pdf_add_annot_vertex(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void, + _wasm_pdf_add_annot_ink_list_stroke(annot: Pointer<"pdf_annot">): void, + _wasm_pdf_add_annot_ink_list_stroke_vertex(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void, + _wasm_pdf_add_annot_border_dash_item(annot: Pointer<"pdf_annot">, v: number): void, + _wasm_pdf_annot_line_ending_styles_start(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_line_1(annot: Pointer<"pdf_annot">): Pointer<"fz_point">, + _wasm_pdf_annot_line_2(annot: Pointer<"pdf_annot">): Pointer<"fz_point">, + _wasm_pdf_set_annot_line(annot: Pointer<"pdf_annot">, a: Pointer<"fz_point">, b: Pointer<"fz_point">): void, + _wasm_pdf_set_annot_callout_point(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void, + _wasm_pdf_annot_callout_line(annot: Pointer<"pdf_annot">, line: Pointer<"fz_point">): number, + _wasm_pdf_set_annot_callout_line(annot: Pointer<"pdf_annot">, n: number, a: Pointer<"fz_point">, b: Pointer<"fz_point">, c: Pointer<"fz_point">): void, + _wasm_pdf_set_annot_line_caption_offset(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void, + _wasm_pdf_annot_line_ending_styles_end(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_line_ending_styles(annot: Pointer<"pdf_annot">, start: number, end: number): void, + _wasm_pdf_annot_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number, + _wasm_pdf_annot_interior_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number, + _wasm_pdf_set_annot_color(annot: Pointer<"pdf_annot">, n: number, color: Pointer<"float">): void, + _wasm_pdf_set_annot_interior_color(annot: Pointer<"pdf_annot">, n: number, color: Pointer<"float">): void, + _wasm_pdf_set_annot_default_appearance(annot: Pointer<"pdf_annot">, font: Pointer<"char">, size: number, ncolor: number, color: Pointer<"float">): void, + _wasm_pdf_annot_default_appearance_font(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_annot_default_appearance_size(annot: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_default_appearance_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number, + _wasm_pdf_set_annot_rich_contents(annot: Pointer<"pdf_annot">, plain: Pointer<"char">, rich: Pointer<"char">): void, + _wasm_pdf_set_annot_stamp_image(annot: Pointer<"pdf_annot">, img: Pointer<"fz_image">): void, + _wasm_pdf_set_annot_appearance_from_display_list(annot: Pointer<"pdf_annot">, appearance: Pointer<"char">, state: Pointer<"char">, ctm: Pointer<"fz_matrix">, list: Pointer<"fz_display_list">): void, + _wasm_pdf_set_annot_appearance(annot: Pointer<"pdf_annot">, appearance: Pointer<"char">, state: Pointer<"char">, ctm: Pointer<"fz_matrix">, bbox: Pointer<"fz_rect">, resources: Pointer<"pdf_obj">, contents: Pointer<"fz_buffer">): void, + _wasm_pdf_apply_redaction(annot: Pointer<"pdf_annot">, black_boxes: number, image_method: number, line_art_method: number, text_method: number): void, + _wasm_pdf_reset_form(doc: Pointer<"any_document">, fields: Pointer<"pdf_obj">, exclude: number): void, + _wasm_pdf_annot_field_type(widget: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_field_flags(widget: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_field_label(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_annot_field_value(annot: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_load_field_name(widget: Pointer<"pdf_annot">): Pointer<"char">, + _wasm_pdf_annot_text_widget_max_len(widget: Pointer<"pdf_annot">): number, + _wasm_pdf_set_annot_text_field_value(widget: Pointer<"pdf_annot">, value: Pointer<"char">): number, + _wasm_pdf_set_annot_choice_field_value(widget: Pointer<"pdf_annot">, value: Pointer<"char">): number, + _wasm_pdf_annot_choice_field_option_count(widget: Pointer<"pdf_annot">): number, + _wasm_pdf_annot_choice_field_option(widget: Pointer<"pdf_annot">, is_export: boolean, i: number): Pointer<"char">, + _wasm_pdf_toggle_widget(widget: Pointer<"pdf_annot">): number, + _wasm_pdf_is_indirect(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_bool(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_int(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_real(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_number(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_name(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_string(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_array(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_dict(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_is_stream(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_to_num(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_to_bool(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_to_real(obj: Pointer<"pdf_obj">): number, + _wasm_pdf_to_name(obj: Pointer<"pdf_obj">): Pointer<"char">, + _wasm_pdf_to_text_string(obj: Pointer<"pdf_obj">): Pointer<"char">, + _wasm_pdf_new_indirect(doc: Pointer<"any_document">, num: number): Pointer<"pdf_obj">, + _wasm_pdf_new_array(doc: Pointer<"any_document">): Pointer<"pdf_obj">, + _wasm_pdf_new_dict(doc: Pointer<"any_document">): Pointer<"pdf_obj">, + _wasm_pdf_new_bool(v: boolean): Pointer<"pdf_obj">, + _wasm_pdf_new_int(v: number): Pointer<"pdf_obj">, + _wasm_pdf_new_real(v: number): Pointer<"pdf_obj">, + _wasm_pdf_new_name(v: Pointer<"char">): Pointer<"pdf_obj">, + _wasm_pdf_new_text_string(v: Pointer<"char">): Pointer<"pdf_obj">, + _wasm_pdf_new_string(ptr: Pointer<"char">, len: number): Pointer<"pdf_obj">, + _wasm_pdf_resolve_indirect(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_array_len(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_array_get(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">, + _wasm_pdf_dict_get(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_dict_len(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_dict_get_key(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">, + _wasm_pdf_dict_get_val(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">, + _wasm_pdf_dict_get_inheritable(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): Pointer<"pdf_obj">, + _wasm_pdf_dict_gets(obj: Pointer<"pdf_obj">, key: Pointer<"char">): Pointer<"pdf_obj">, + _wasm_pdf_dict_gets_inheritable(obj: Pointer<"pdf_obj">, key: Pointer<"char">): Pointer<"pdf_obj">, + _wasm_pdf_dict_put(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">, val: Pointer<"pdf_obj">): void, + _wasm_pdf_dict_puts(obj: Pointer<"pdf_obj">, key: Pointer<"char">, val: Pointer<"pdf_obj">): void, + _wasm_pdf_dict_del(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): void, + _wasm_pdf_dict_dels(obj: Pointer<"pdf_obj">, key: Pointer<"char">): void, + _wasm_pdf_array_put(obj: Pointer<"pdf_obj">, key: number, val: Pointer<"pdf_obj">): void, + _wasm_pdf_array_push(obj: Pointer<"pdf_obj">, val: Pointer<"pdf_obj">): void, + _wasm_pdf_array_delete(obj: Pointer<"pdf_obj">, key: number): void, + _wasm_pdf_sprint_obj(obj: Pointer<"pdf_obj">, tight: boolean, ascii: boolean): Pointer<"char">, + _wasm_pdf_load_stream(obj: Pointer<"pdf_obj">): Pointer<"fz_buffer">, + _wasm_pdf_load_raw_stream(obj: Pointer<"pdf_obj">): Pointer<"fz_buffer">, + _wasm_pdf_update_object(doc: Pointer<"any_document">, num: number, obj: Pointer<"pdf_obj">): void, + _wasm_pdf_update_stream(doc: Pointer<"any_document">, ref: Pointer<"pdf_obj">, buf: Pointer<"fz_buffer">, raw: number): void, + _wasm_pdf_to_string(obj: Pointer<"pdf_obj">, size: Pointer<"int">): Pointer<"char">, + _wasm_new_stream(id: number): Pointer<"fz_stream">, + _wasm_walk_path(path: Pointer<"fz_path">, walk_id: number): void, + _wasm_walk_text(text: Pointer<"fz_text">, walk_id: number): void, + _wasm_enable_log_callback(enable: boolean): void, + _wasm_new_js_device(id: number): Pointer<"fz_device">, +} diff --git a/node_modules/mupdf/dist/mupdf-wasm.js b/node_modules/mupdf/dist/mupdf-wasm.js new file mode 100644 index 0000000..5c11f3b --- /dev/null +++ b/node_modules/mupdf/dist/mupdf-wasm.js @@ -0,0 +1 @@ +var _=async function(_={}){var a,e,t=_,s=new Promise((_,t)=>{a=_,e=t}),n="object"==typeof window,i="undefined"!=typeof WorkerGlobalScope,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type;if(m){const{createRequire:_}=await(import("module"));var o=_(import.meta.url)}var r,p,d="./this.program",w=(_,a)=>{throw a},f=import.meta.url,l="";if(m){var c=o("fs"),g=o("path");f.startsWith("file:")&&(l=g.dirname(o("url").fileURLToPath(f))+"/"),p=_=>(_=U(_)?new URL(_):_,c.readFileSync(_)),r=async(_,a=!0)=>(_=U(_)?new URL(_):_,c.readFileSync(_,a?void 0:"utf8")),process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),w=(_,a)=>{throw process.exitCode=_,a}}else if(n||i){try{l=new URL(".",f).href}catch{}i&&(p=_=>{var a=new XMLHttpRequest;return a.open("GET",_,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),r=async _=>{if(U(_))return new Promise((a,e)=>{var t=new XMLHttpRequest;t.open("GET",_,!0),t.responseType="arraybuffer",t.onload=()=>{200==t.status||0==t.status&&t.response?a(t.response):e(t.status)},t.onerror=e,t.send(null)});var a=await fetch(_,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw new Error(a.status+" : "+a.url)}}var u,b,h,v,y,x,k,T=console.log.bind(console),j=console.error.bind(console),$=!1,A=!1,U=_=>_.startsWith("file://");function R(){var _=b.buffer;new Int8Array(_),new Int16Array(_),t.HEAPU8=h=new Uint8Array(_),new Uint16Array(_),t.HEAP32=v=new Int32Array(_),t.HEAPU32=y=new Uint32Array(_),t.HEAPF32=new Float32Array(_),k=new Float64Array(_),x=new BigInt64Array(_),new BigUint64Array(_)}var E,C=0,S=null;function M(_){t.onAbort?.(_),j(_="Aborted("+_+")"),$=!0,_+=". Build with -sASSERTIONS for more info.",A&&p_();var a=new WebAssembly.RuntimeError(_);throw e(a),a}function D(){return t.locateFile?(_="mupdf-wasm.wasm",t.locateFile?t.locateFile(_,l):l+_):new URL("mupdf-wasm.wasm",import.meta.url).href;var _}async function F(_){if(!u)try{var a=await r(_);return new Uint8Array(a)}catch{}return function(_){if(_==E&&u)return new Uint8Array(u);if(p)return p(_);throw"both async and sync fetching of the wasm failed"}(_)}async function I(_,a,e){if(!_&&"function"==typeof WebAssembly.instantiateStreaming&&!U(a)&&!m)try{var t=fetch(a,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(t,e)}catch(_){j(`wasm streaming compile failed: ${_}`),j("falling back to ArrayBuffer instantiation")}return async function(_,a){try{var e=await F(_);return await WebAssembly.instantiate(e,a)}catch(_){j(`failed to asynchronously prepare wasm: ${_}`),M(_)}}(a,e)}class P{name="ExitStatus";constructor(_){this.message=`Program terminated with exit(${_})`,this.status=_}}var B=_=>{for(;_.length>0;)_.shift()(t)},q=[],L=_=>q.push(_),z=[],H=_=>z.push(_),W=!0,N=new TextDecoder,G=(_,a)=>{if(!_)return"";for(var e=_+a,t=_;!(t>=e)&&h[t];)++t;return N.decode(h.subarray(_,t))},O={varargs:void 0,getStr:_=>G(_)},Y=_=>_<-9007199254740992||_>9007199254740992?NaN:Number(_),X=(_,a,e)=>((_,a,e,t)=>{if(!(t>0))return 0;for(var s=e,n=e+t-1,i=0;i<_.length;++i){var m=_.charCodeAt(i);if(m>=55296&&m<=57343&&(m=65536+((1023&m)<<10)|1023&_.charCodeAt(++i)),m<=127){if(e>=n)break;a[e++]=m}else if(m<=2047){if(e+1>=n)break;a[e++]=192|m>>6,a[e++]=128|63&m}else if(m<=65535){if(e+2>=n)break;a[e++]=224|m>>12,a[e++]=128|m>>6&63,a[e++]=128|63&m}else{if(e+3>=n)break;a[e++]=240|m>>18,a[e++]=128|m>>12&63,a[e++]=128|m>>6&63,a[e++]=128|63&m}}return a[e]=0,e-s})(_,h,a,e),J=()=>Date.now(),K=[],Q=(_,a,e)=>{var t=((_,a)=>{var e;for(K.length=0;e=h[_++];){var t=105!=e;a+=(t&=112!=e)&&a%8?4:0,K.push(112==e?y[a>>2]:106==e?x[a>>3]:105==e?v[a>>2]:k[a>>3]),a+=t?8:4}return K})(a,e);return m_[_](...t)},V=(_,a)=>Math.ceil(_/a)*a,Z=_=>{var a=(_-b.buffer.byteLength+65535)/65536|0;try{return b.grow(a),R(),1}catch(_){}},__={},a_=()=>{if(!a_.strings){var _={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:d||"./this.program"};for(var a in __)void 0===__[a]?delete _[a]:_[a]=__[a];var e=[];for(var a in _)e.push(`${a}=${_[a]}`);a_.strings=e}return a_.strings},e_=_=>{for(var a=0,e=0;e<_.length;++e){var t=_.charCodeAt(e);t<=127?a++:t<=2047?a+=2:t>=55296&&t<=57343?(a+=4,++e):a+=3}return a},t_=_=>{W||(t.onExit?.(_),$=!0),w(_,new P(_))},s_=(_,a)=>{t_(_)},n_=[null,[],[]],i_=(_,a)=>{var e=n_[_];0===a||10===a?((1===_?T:j)(((_,a=0,e=NaN)=>{for(var t=a+e,s=a;_[s]&&!(s>=t);)++s;return N.decode(_.buffer?_.subarray(a,s):new Uint8Array(_.slice(a,s)))})(e)),e.length=0):e.push(a)};t.noExitRuntime&&(W=t.noExitRuntime),t.print&&(T=t.print),t.printErr&&(j=t.printErr),t.wasmBinary&&(u=t.wasmBinary),t.arguments&&t.arguments,t.thisProgram&&(d=t.thisProgram),t.UTF8ToString=G,t.stringToUTF8=X,t.lengthBytesUTF8=e_;var m_={6168464:()=>{throw"TRYLATER"},6168486:()=>{throw"ABORT"},6168505:_=>{throw new Error(G(_))},6168544:()=>{throw new Error("Cannot create MuPDF context!")},6168597:(_,a,e,t,s,n,i)=>{globalThis.$libmupdf_text_walk.begin_span(_,a,e,t,s,n,i)},6168671:(_,a,e,t,s,n,i,m)=>{globalThis.$libmupdf_text_walk.show_glyph(_,a,e,t,s,n,i,m)},6168749:_=>{globalThis.$libmupdf_text_walk.end_span(_)},6168797:(_,a,e,t)=>globalThis.$libmupdf_load_font_file(_,a,e,t),6168860:(_,a,e,t)=>globalThis.$libmupdf_stm_read(_,a,e,t),6168918:_=>{globalThis.$libmupdf_stm_close(_)},6168958:(_,a,e,t)=>globalThis.$libmupdf_stm_seek(_,a,e,t),6169016:(_,a,e)=>{globalThis.$libmupdf_path_walk.moveto(_,a,e)},6169070:(_,a,e)=>{globalThis.$libmupdf_path_walk.lineto(_,a,e)},6169124:(_,a,e,t,s,n,i)=>{globalThis.$libmupdf_path_walk.curveto(_,a,e,t,s,n,i)},6169195:_=>{globalThis.$libmupdf_path_walk.closepath(_)},6169244:_=>{globalThis.$libmupdf_log_error(_)},6169283:_=>{globalThis.$libmupdf_log_warning(_)},6169324:_=>{globalThis.$libmupdf_device.close_device(_)},6169373:_=>{globalThis.$libmupdf_device.drop_device(_)},6169421:(_,a,e,t,s,n,i,m)=>{globalThis.$libmupdf_device.fill_path(_,a,e,t,s,n,i,m)},6169495:(_,a,e,t,s,n,i,m)=>{globalThis.$libmupdf_device.stroke_path(_,a,e,t,s,n,i,m)},6169571:(_,a,e,t)=>{globalThis.$libmupdf_device.clip_path(_,a,e,t)},6169629:(_,a,e,t)=>{globalThis.$libmupdf_device.clip_stroke_path(_,a,e,t)},6169694:(_,a,e,t,s,n,i)=>{globalThis.$libmupdf_device.fill_text(_,a,e,t,s,n,i)},6169764:(_,a,e,t,s,n,i,m)=>{globalThis.$libmupdf_device.stroke_text(_,a,e,t,s,n,i,m)},6169840:(_,a,e)=>{globalThis.$libmupdf_device.clip_text(_,a,e)},6169894:(_,a,e,t)=>{globalThis.$libmupdf_device.clip_stroke_text(_,a,e,t)},6169959:(_,a,e)=>{globalThis.$libmupdf_device.ignore_text(_,a,e)},6170015:(_,a,e,t)=>{globalThis.$libmupdf_device.fill_shade(_,a,e,t)},6170074:(_,a,e,t)=>{globalThis.$libmupdf_device.fill_image(_,a,e,t)},6170133:(_,a,e,t,s,n,i)=>{globalThis.$libmupdf_device.fill_image_mask(_,a,e,t,s,n,i)},6170209:(_,a,e)=>{globalThis.$libmupdf_device.clip_image_mask(_,a,e)},6170269:_=>{globalThis.$libmupdf_device.pop_clip(_)},6170314:(_,a,e,t,s,n)=>{globalThis.$libmupdf_device.begin_mask(_,a,e,t,s,n)},6170381:(_,a)=>{globalThis.$libmupdf_device.end_mask(_,a)},6170430:(_,a,e,t,s,n,i)=>{globalThis.$libmupdf_device.begin_group(_,a,e,t,s,n,i)},6170502:_=>{globalThis.$libmupdf_device.end_group(_)},6170548:(_,a,e,t,s,n,i)=>globalThis.$libmupdf_device.begin_tile(_,a,e,t,s,n,i),6170626:_=>{globalThis.$libmupdf_device.end_tile(_)},6170671:(_,a)=>{globalThis.$libmupdf_device.begin_layer(_,a)},6170723:_=>{globalThis.$libmupdf_device.end_layer(_)}},o_={g:function(_,a,e){return O.varargs=e,0},v:function(_,a){a=Y(a)},u:function(_,a,e){return O.varargs=e,0},f:function(_,a,e,t){O.varargs=t},t:_=>{},e:(_,a,e)=>{},n:()=>M(""),m:function(_,a){_=Y(_);var e=new Date(1e3*_);v[a>>2]=e.getUTCSeconds(),v[a+4>>2]=e.getUTCMinutes(),v[a+8>>2]=e.getUTCHours(),v[a+12>>2]=e.getUTCDate(),v[a+16>>2]=e.getUTCMonth(),v[a+20>>2]=e.getUTCFullYear()-1900,v[a+24>>2]=e.getUTCDay();var t=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),s=(e.getTime()-t)/864e5|0;v[a+28>>2]=s},l:function(_){var a=(()=>{var a=Date.UTC(v[_+20>>2]+1900,v[_+16>>2],v[_+12>>2],v[_+8>>2],v[_+4>>2],v[_>>2],0),e=new Date(a);v[_+24>>2]=e.getUTCDay();var t=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),s=(e.getTime()-t)/864e5|0;return v[_+28>>2]=s,e.getTime()/1e3})();return BigInt(a)},k:(_,a,e,t)=>{var s=(new Date).getFullYear(),n=new Date(s,0,1),i=new Date(s,6,1),m=n.getTimezoneOffset(),o=i.getTimezoneOffset(),r=Math.max(m,o);y[_>>2]=60*r,v[a>>2]=Number(m!=o);var p=_=>{var a=_>=0?"-":"+",e=Math.abs(_);return`UTC${a}${String(Math.floor(e/60)).padStart(2,"0")}${String(e%60).padStart(2,"0")}`},d=p(m),w=p(o);o=0&&t<=3))return 28;var t,s;s=0===_?J():performance.now();var n=Math.round(1e3*s*1e3);return x[e>>3]=BigInt(n),0},a:(_,a,e)=>Q(_,a,e),j:(_,a,e)=>Q(_,a,e),i:J,h:_=>{var a=h.length,e=2147483648;if((_>>>=0)>e)return!1;for(var t=1;t<=4;t*=2){var s=a*(1+.2/t);s=Math.min(s,_+100663296);var n=Math.min(e,V(Math.max(_,s),65536));if(Z(n))return!0}return!1},r:(_,a)=>{var e=0,t=0;for(var s of a_()){var n=a+e;y[_+t>>2]=n,e+=X(s,n,1/0)+1,t+=4}return 0},q:(_,a)=>{var e=a_();y[_>>2]=e.length;var t=0;for(var s of e)t+=e_(s)+1;return y[a>>2]=t,0},b:s_,d:_=>52,p:(_,a,e,t)=>52,o:function(_,a,e,t){return a=Y(a),70},c:(_,a,e,t)=>{for(var s=0,n=0;n>2],m=y[a+4>>2];a+=8;for(var o=0;o>2]=s,0}},r_=await async function(){function _(_,a){return r_=_.exports,b=r_.w,R(),function(){if(C--,t.monitorRunDependencies?.(C),0==C&&S){var _=S;S=null,_()}}(),r_}C++,t.monitorRunDependencies?.(C);var a={a:o_};if(t.instantiateWasm)return new Promise((e,s)=>{t.instantiateWasm(a,(a,t)=>{e(_(a))})});E??=D();try{var s=function(a){return _(a.instance)}(await I(u,E,a));return s}catch(_){return e(_),Promise.reject(_)}}(),p_=(r_.x,t._wasm_init_context=r_.y,t._wasm_malloc=r_.z,t._wasm_free=r_.A,t._wasm_enable_icc=r_.B,t._wasm_disable_icc=r_.C,t._wasm_set_user_css=r_.D,t._wasm_empty_store=r_.E,t._wasm_shrink_store=r_.F,t._wasm_Memento_checkAllMemory=r_.G,t._wasm_Memento_listBlocks=r_.H,t._wasm_keep_buffer=r_.I,t._wasm_drop_buffer=r_.J,t._wasm_keep_stream=r_.K,t._wasm_drop_stream=r_.L,t._wasm_keep_colorspace=r_.M,t._wasm_drop_colorspace=r_.N,t._wasm_keep_pixmap=r_.O,t._wasm_drop_pixmap=r_.P,t._wasm_keep_font=r_.Q,t._wasm_drop_font=r_.R,t._wasm_keep_stroke_state=r_.S,t._wasm_drop_stroke_state=r_.T,t._wasm_keep_image=r_.U,t._wasm_drop_image=r_.V,t._wasm_keep_shade=r_.W,t._wasm_drop_shade=r_.X,t._wasm_keep_path=r_.Y,t._wasm_drop_path=r_.Z,t._wasm_keep_text=r_._,t._wasm_drop_text=r_.$,t._wasm_keep_device=r_.aa,t._wasm_drop_device=r_.ba,t._wasm_keep_display_list=r_.ca,t._wasm_drop_display_list=r_.da,t._wasm_drop_stext_page=r_.ea,t._wasm_drop_document_writer=r_.fa,t._wasm_drop_outline_iterator=r_.ga,t._wasm_keep_document=r_.ha,t._wasm_drop_document=r_.ia,t._wasm_keep_page=r_.ja,t._wasm_drop_page=r_.ka,t._wasm_keep_link=r_.la,t._wasm_drop_link=r_.ma,t._wasm_keep_outline=r_.na,t._wasm_drop_outline=r_.oa,t._wasm_pdf_keep_annot=r_.pa,t._wasm_pdf_drop_annot=r_.qa,t._wasm_pdf_keep_obj=r_.ra,t._wasm_pdf_drop_obj=r_.sa,t._wasm_pdf_keep_graft_map=r_.ta,t._wasm_pdf_drop_graft_map=r_.ua,t._wasm_buffer_get_data=r_.va,t._wasm_buffer_get_len=r_.wa,t._wasm_colorspace_get_type=r_.xa,t._wasm_colorspace_get_n=r_.ya,t._wasm_colorspace_get_name=r_.za,t._wasm_pixmap_get_w=r_.Aa,t._wasm_pixmap_get_h=r_.Ba,t._wasm_pixmap_get_x=r_.Ca,t._wasm_pixmap_get_y=r_.Da,t._wasm_pixmap_get_n=r_.Ea,t._wasm_pixmap_get_stride=r_.Fa,t._wasm_pixmap_get_alpha=r_.Ga,t._wasm_pixmap_get_xres=r_.Ha,t._wasm_pixmap_get_yres=r_.Ia,t._wasm_pixmap_get_colorspace=r_.Ja,t._wasm_pixmap_get_samples=r_.Ka,t._wasm_pixmap_set_xres=r_.La,t._wasm_pixmap_set_yres=r_.Ma,t._wasm_font_get_name=r_.Na,t._wasm_stroke_state_get_start_cap=r_.Oa,t._wasm_stroke_state_set_start_cap=r_.Pa,t._wasm_stroke_state_get_dash_cap=r_.Qa,t._wasm_stroke_state_set_dash_cap=r_.Ra,t._wasm_stroke_state_get_end_cap=r_.Sa,t._wasm_stroke_state_set_end_cap=r_.Ta,t._wasm_stroke_state_get_linejoin=r_.Ua,t._wasm_stroke_state_set_linejoin=r_.Va,t._wasm_stroke_state_get_linewidth=r_.Wa,t._wasm_stroke_state_set_linewidth=r_.Xa,t._wasm_stroke_state_get_miterlimit=r_.Ya,t._wasm_stroke_state_set_miterlimit=r_.Za,t._wasm_stroke_state_get_dash_phase=r_._a,t._wasm_stroke_state_set_dash_phase=r_.$a,t._wasm_stroke_state_get_dash_len=r_.ab,t._wasm_image_get_w=r_.bb,t._wasm_image_get_h=r_.cb,t._wasm_image_get_n=r_.db,t._wasm_image_get_bpc=r_.eb,t._wasm_image_get_xres=r_.fb,t._wasm_image_get_yres=r_.gb,t._wasm_image_get_imagemask=r_.hb,t._wasm_image_get_colorspace=r_.ib,t._wasm_image_get_mask=r_.jb,t._wasm_outline_get_title=r_.kb,t._wasm_outline_get_uri=r_.lb,t._wasm_outline_get_next=r_.mb,t._wasm_outline_get_down=r_.nb,t._wasm_outline_get_is_open=r_.ob,t._wasm_outline_item_get_title=r_.pb,t._wasm_outline_item_get_uri=r_.qb,t._wasm_outline_item_get_is_open=r_.rb,t._wasm_link_get_rect=r_.sb,t._wasm_link_get_uri=r_.tb,t._wasm_link_get_next=r_.ub,t._wasm_stext_page_get_mediabox=r_.vb,t._wasm_stext_page_get_first_block=r_.wb,t._wasm_stext_block_get_next=r_.xb,t._wasm_stext_block_get_type=r_.yb,t._wasm_stext_block_get_bbox=r_.zb,t._wasm_stext_block_get_first_line=r_.Ab,t._wasm_stext_block_get_transform=r_.Bb,t._wasm_stext_block_get_image=r_.Cb,t._wasm_stext_block_get_v_flags=r_.Db,t._wasm_stext_block_get_v_argb=r_.Eb,t._wasm_stext_line_get_next=r_.Fb,t._wasm_stext_line_get_wmode=r_.Gb,t._wasm_stext_line_get_dir=r_.Hb,t._wasm_stext_line_get_bbox=r_.Ib,t._wasm_stext_line_get_first_char=r_.Jb,t._wasm_stext_char_get_next=r_.Kb,t._wasm_stext_char_get_c=r_.Lb,t._wasm_stext_char_get_origin=r_.Mb,t._wasm_stext_char_get_quad=r_.Nb,t._wasm_stext_char_get_size=r_.Ob,t._wasm_stext_char_get_font=r_.Pb,t._wasm_stext_char_get_argb=r_.Qb,t._wasm_stext_char_get_bidi=r_.Rb,t._wasm_link_dest_get_chapter=r_.Sb,t._wasm_link_dest_get_page=r_.Tb,t._wasm_link_dest_get_type=r_.Ub,t._wasm_link_dest_get_x=r_.Vb,t._wasm_link_dest_get_y=r_.Wb,t._wasm_link_dest_get_w=r_.Xb,t._wasm_link_dest_get_h=r_.Yb,t._wasm_link_dest_get_zoom=r_.Zb,t._wasm_pdf_layer_config_ui_get_text=r_._b,t._wasm_pdf_layer_config_ui_get_depth=r_.$b,t._wasm_pdf_layer_config_ui_get_type=r_.ac,t._wasm_pdf_layer_config_ui_get_selected=r_.bc,t._wasm_pdf_layer_config_ui_get_locked=r_.cc,t._wasm_pdf_filespec_params_get_filename=r_.dc,t._wasm_pdf_filespec_params_get_mimetype=r_.ec,t._wasm_pdf_filespec_params_get_size=r_.fc,t._wasm_pdf_filespec_params_get_created=r_.gc,t._wasm_pdf_filespec_params_get_modified=r_.hc,t._wasm_pdf_page_get_obj=r_.ic,t._wasm_new_buffer=r_.jc,t._wasm_new_buffer_from_data=r_.kc,t._wasm_append_string=r_.lc,t._wasm_append_byte=r_.mc,t._wasm_append_buffer=r_.nc,t._wasm_slice_buffer=r_.oc,t._wasm_string_from_buffer=r_.pc,t._wasm_device_gray=r_.qc,t._wasm_device_rgb=r_.rc,t._wasm_device_bgr=r_.sc,t._wasm_device_cmyk=r_.tc,t._wasm_device_lab=r_.uc,t._wasm_new_icc_colorspace=r_.vc,t._wasm_new_stroke_state=r_.wc,t._wasm_stroke_state_get_dash_item=r_.xc,t._wasm_stroke_state_set_dash_item=r_.yc,t._wasm_new_base14_font=r_.zc,t._wasm_new_cjk_font=r_.Ac,t._wasm_new_font_from_buffer=r_.Bc,t._wasm_encode_character=r_.Cc,t._wasm_advance_glyph=r_.Dc,t._wasm_font_is_monospaced=r_.Ec,t._wasm_font_is_serif=r_.Fc,t._wasm_font_is_bold=r_.Gc,t._wasm_font_is_italic=r_.Hc,t._wasm_new_image_from_pixmap=r_.Ic,t._wasm_new_image_from_buffer=r_.Jc,t._wasm_get_pixmap_from_image=r_.Kc,t._wasm_new_pixmap_from_page=r_.Lc,t._wasm_new_pixmap_from_page_contents=r_.Mc,t._wasm_pdf_new_pixmap_from_page_with_usage=r_.Nc,t._wasm_pdf_new_pixmap_from_page_contents_with_usage=r_.Oc,t._wasm_new_pixmap_with_bbox=r_.Pc,t._wasm_clear_pixmap=r_.Qc,t._wasm_clear_pixmap_with_value=r_.Rc,t._wasm_invert_pixmap=r_.Sc,t._wasm_invert_pixmap_luminance=r_.Tc,t._wasm_gamma_pixmap=r_.Uc,t._wasm_tint_pixmap=r_.Vc,t._wasm_new_buffer_from_pixmap_as_png=r_.Wc,t._wasm_new_buffer_from_pixmap_as_pam=r_.Xc,t._wasm_new_buffer_from_pixmap_as_psd=r_.Yc,t._wasm_new_buffer_from_pixmap_as_jpeg=r_.Zc,t._wasm_convert_pixmap=r_._c,t._wasm_warp_pixmap=r_.$c,t._wasm_bound_shade=r_.ad,t._wasm_new_display_list=r_.bd,t._wasm_bound_display_list=r_.cd,t._wasm_run_display_list=r_.dd,t._wasm_new_pixmap_from_display_list=r_.ed,t._wasm_new_stext_page_from_display_list=r_.fd,t._wasm_search_display_list=r_.gd,t._wasm_new_path=r_.hd,t._wasm_moveto=r_.id,t._wasm_lineto=r_.jd,t._wasm_curveto=r_.kd,t._wasm_curvetov=r_.ld,t._wasm_curvetoy=r_.md,t._wasm_closepath=r_.nd,t._wasm_rectto=r_.od,t._wasm_transform_path=r_.pd,t._wasm_bound_path=r_.qd,t._wasm_new_text=r_.rd,t._wasm_bound_text=r_.sd,t._wasm_show_glyph=r_.td,t._wasm_show_string=r_.ud,t._wasm_new_draw_device=r_.vd,t._wasm_new_display_list_device=r_.wd,t._wasm_close_device=r_.xd,t._wasm_fill_path=r_.yd,t._wasm_stroke_path=r_.zd,t._wasm_clip_path=r_.Ad,t._wasm_clip_stroke_path=r_.Bd,t._wasm_fill_text=r_.Cd,t._wasm_stroke_text=r_.Dd,t._wasm_clip_text=r_.Ed,t._wasm_clip_stroke_text=r_.Fd,t._wasm_ignore_text=r_.Gd,t._wasm_fill_shade=r_.Hd,t._wasm_fill_image=r_.Id,t._wasm_fill_image_mask=r_.Jd,t._wasm_clip_image_mask=r_.Kd,t._wasm_pop_clip=r_.Ld,t._wasm_begin_mask=r_.Md,t._wasm_end_mask=r_.Nd,t._wasm_begin_group=r_.Od,t._wasm_end_group=r_.Pd,t._wasm_begin_tile=r_.Qd,t._wasm_end_tile=r_.Rd,t._wasm_begin_layer=r_.Sd,t._wasm_end_layer=r_.Td,t._wasm_new_document_writer_with_buffer=r_.Ud,t._wasm_begin_page=r_.Vd,t._wasm_end_page=r_.Wd,t._wasm_close_document_writer=r_.Xd,t._wasm_print_stext_page_as_json=r_.Yd,t._wasm_search_stext_page=r_.Zd,t._wasm_snap_selection=r_._d,t._wasm_copy_selection=r_.$d,t._wasm_highlight_selection=r_.ae,t._wasm_print_stext_page_as_html=r_.be,t._wasm_print_stext_page_as_text=r_.ce,t._wasm_open_document_with_buffer=r_.de,t._wasm_open_document_with_stream=r_.ee,t._wasm_format_link_uri=r_.fe,t._wasm_needs_password=r_.ge,t._wasm_authenticate_password=r_.he,t._wasm_has_permission=r_.ie,t._wasm_count_pages=r_.je,t._wasm_load_page=r_.ke,t._wasm_lookup_metadata=r_.le,t._wasm_set_metadata=r_.me,t._wasm_resolve_link=r_.ne,t._wasm_resolve_link_dest=r_.oe,t._wasm_load_outline=r_.pe,t._wasm_outline_get_page=r_.qe,t._wasm_style_document=r_.re,t._wasm_layout_document=r_.se,t._wasm_is_document_reflowable=r_.te,t._wasm_link_set_rect=r_.ue,t._wasm_link_set_uri=r_.ve,t._wasm_bound_page=r_.we,t._wasm_load_links=r_.xe,t._wasm_create_link=r_.ye,t._wasm_delete_link=r_.ze,t._wasm_run_page=r_.Ae,t._wasm_run_page_contents=r_.Be,t._wasm_run_page_annots=r_.Ce,t._wasm_run_page_widgets=r_.De,t._wasm_new_stext_page_from_page=r_.Ee,t._wasm_new_display_list_from_page=r_.Fe,t._wasm_new_display_list_from_page_contents=r_.Ge,t._wasm_page_label=r_.He,t._wasm_search_page=r_.Ie,t._wasm_new_outline_iterator=r_.Je,t._wasm_outline_iterator_next=r_.Ke,t._wasm_outline_iterator_prev=r_.Le,t._wasm_outline_iterator_up=r_.Me,t._wasm_outline_iterator_down=r_.Ne,t._wasm_outline_iterator_delete=r_.Oe,t._wasm_outline_iterator_item=r_.Pe,t._wasm_outline_iterator_insert=r_.Qe,t._wasm_outline_iterator_update=r_.Re,t._wasm_pdf_document_from_fz_document=r_.Se,t._wasm_pdf_page_from_fz_page=r_.Te,t._wasm_pdf_create_document=r_.Ue,t._wasm_pdf_version=r_.Ve,t._wasm_pdf_was_repaired=r_.We,t._wasm_pdf_has_unsaved_changes=r_.Xe,t._wasm_pdf_can_be_saved_incrementally=r_.Ye,t._wasm_pdf_count_versions=r_.Ze,t._wasm_pdf_count_unsaved_versions=r_._e,t._wasm_pdf_validate_change_history=r_.$e,t._wasm_pdf_enable_journal=r_.af,t._wasm_pdf_undoredo_state_position=r_.bf,t._wasm_pdf_undoredo_state_count=r_.cf,t._wasm_pdf_undoredo_step=r_.df,t._wasm_pdf_begin_operation=r_.ef,t._wasm_pdf_begin_implicit_operation=r_.ff,t._wasm_pdf_end_operation=r_.gf,t._wasm_pdf_abandon_operation=r_.hf,t._wasm_pdf_undo=r_.jf,t._wasm_pdf_redo=r_.kf,t._wasm_pdf_can_undo=r_.lf,t._wasm_pdf_can_redo=r_.mf,t._wasm_pdf_document_language=r_.nf,t._wasm_pdf_set_document_language=r_.of,t._wasm_pdf_trailer=r_.pf,t._wasm_pdf_xref_len=r_.qf,t._wasm_pdf_lookup_page_obj=r_.rf,t._wasm_pdf_add_object=r_.sf,t._wasm_pdf_create_object=r_.tf,t._wasm_pdf_delete_object=r_.uf,t._wasm_pdf_add_stream=r_.vf,t._wasm_pdf_add_simple_font=r_.wf,t._wasm_pdf_add_cjk_font=r_.xf,t._wasm_pdf_add_cid_font=r_.yf,t._wasm_pdf_add_image=r_.zf,t._wasm_pdf_load_image=r_.Af,t._wasm_pdf_set_page_tree_cache=r_.Bf,t._wasm_pdf_add_page=r_.Cf,t._wasm_pdf_insert_page=r_.Df,t._wasm_pdf_delete_page=r_.Ef,t._wasm_pdf_set_page_labels=r_.Ff,t._wasm_pdf_delete_page_labels=r_.Gf,t._wasm_pdf_is_embedded_file=r_.Hf,t._wasm_pdf_get_filespec_params=r_.If,t._wasm_pdf_add_embedded_file=r_.Jf,t._wasm_pdf_load_embedded_file_contents=r_.Kf,t._wasm_pdf_write_document_buffer=r_.Lf,t._wasm_pdf_js_supported=r_.Mf,t._wasm_pdf_enable_js=r_.Nf,t._wasm_pdf_disable_js=r_.Of,t._wasm_pdf_rearrange_pages=r_.Pf,t._wasm_pdf_subset_fonts=r_.Qf,t._wasm_pdf_bake_document=r_.Rf,t._wasm_pdf_count_layer_configs=r_.Sf,t._wasm_pdf_layer_config_creator=r_.Tf,t._wasm_pdf_layer_config_name=r_.Uf,t._wasm_pdf_select_layer_config=r_.Vf,t._wasm_pdf_count_layer_config_uis=r_.Wf,t._wasm_pdf_layer_config_ui_info=r_.Xf,t._wasm_pdf_count_layers=r_.Yf,t._wasm_pdf_layer_name=r_.Zf,t._wasm_pdf_layer_is_enabled=r_._f,t._wasm_pdf_enable_layer=r_.$f,t._wasm_pdf_page_transform=r_.ag,t._wasm_pdf_set_page_box=r_.bg,t._wasm_pdf_first_annot=r_.cg,t._wasm_pdf_next_annot=r_.dg,t._wasm_pdf_first_widget=r_.eg,t._wasm_pdf_next_widget=r_.fg,t._wasm_pdf_create_annot=r_.gg,t._wasm_pdf_delete_annot=r_.hg,t._wasm_pdf_update_page=r_.ig,t._wasm_pdf_redact_page=r_.jg,t._wasm_pdf_new_graft_map=r_.kg,t._wasm_pdf_graft_mapped_object=r_.lg,t._wasm_pdf_graft_object=r_.mg,t._wasm_pdf_graft_mapped_page=r_.ng,t._wasm_pdf_graft_page=r_.og,t._wasm_pdf_bound_annot=r_.pg,t._wasm_pdf_run_annot=r_.qg,t._wasm_pdf_new_pixmap_from_annot=r_.rg,t._wasm_pdf_new_display_list_from_annot=r_.sg,t._wasm_pdf_update_annot=r_.tg,t._wasm_pdf_annot_obj=r_.ug,t._wasm_pdf_annot_type=r_.vg,t._wasm_pdf_annot_flags=r_.wg,t._wasm_pdf_set_annot_flags=r_.xg,t._wasm_pdf_annot_contents=r_.yg,t._wasm_pdf_set_annot_contents=r_.zg,t._wasm_pdf_annot_name=r_.Ag,t._wasm_pdf_set_annot_name=r_.Bg,t._wasm_pdf_annot_author=r_.Cg,t._wasm_pdf_set_annot_author=r_.Dg,t._wasm_pdf_annot_subject=r_.Eg,t._wasm_pdf_set_annot_subject=r_.Fg,t._wasm_pdf_annot_creation_date=r_.Gg,t._wasm_pdf_set_annot_creation_date=r_.Hg,t._wasm_pdf_annot_modification_date=r_.Ig,t._wasm_pdf_set_annot_modification_date=r_.Jg,t._wasm_pdf_annot_border_width=r_.Kg,t._wasm_pdf_set_annot_border_width=r_.Lg,t._wasm_pdf_annot_border_style=r_.Mg,t._wasm_pdf_set_annot_border_style=r_.Ng,t._wasm_pdf_annot_border_effect=r_.Og,t._wasm_pdf_set_annot_border_effect=r_.Pg,t._wasm_pdf_annot_border_effect_intensity=r_.Qg,t._wasm_pdf_set_annot_border_effect_intensity=r_.Rg,t._wasm_pdf_annot_opacity=r_.Sg,t._wasm_pdf_set_annot_opacity=r_.Tg,t._wasm_pdf_annot_filespec=r_.Ug,t._wasm_pdf_set_annot_filespec=r_.Vg,t._wasm_pdf_annot_quadding=r_.Wg,t._wasm_pdf_set_annot_quadding=r_.Xg,t._wasm_pdf_annot_is_open=r_.Yg,t._wasm_pdf_set_annot_is_open=r_.Zg,t._wasm_pdf_annot_hidden_for_editing=r_._g,t._wasm_pdf_set_annot_hidden_for_editing=r_.$g,t._wasm_pdf_annot_icon_name=r_.ah,t._wasm_pdf_set_annot_icon_name=r_.bh,t._wasm_pdf_annot_intent=r_.ch,t._wasm_pdf_set_annot_intent=r_.dh,t._wasm_pdf_annot_callout_style=r_.eh,t._wasm_pdf_set_annot_callout_style=r_.fh,t._wasm_pdf_annot_line_leader=r_.gh,t._wasm_pdf_set_annot_line_leader=r_.hh,t._wasm_pdf_annot_line_leader_extension=r_.ih,t._wasm_pdf_set_annot_line_leader_extension=r_.jh,t._wasm_pdf_annot_line_leader_offset=r_.kh,t._wasm_pdf_set_annot_line_leader_offset=r_.lh,t._wasm_pdf_annot_line_caption=r_.mh,t._wasm_pdf_set_annot_line_caption=r_.nh,t._wasm_pdf_annot_rich_defaults=r_.oh,t._wasm_pdf_set_annot_rich_defaults=r_.ph,t._wasm_pdf_annot_callout_point=r_.qh,t._wasm_pdf_annot_line_caption_offset=r_.rh,t._wasm_pdf_annot_rect=r_.sh,t._wasm_pdf_annot_popup=r_.th,t._wasm_pdf_annot_quad_point_count=r_.uh,t._wasm_pdf_annot_quad_point=r_.vh,t._wasm_pdf_annot_vertex_count=r_.wh,t._wasm_pdf_annot_vertex=r_.xh,t._wasm_pdf_annot_ink_list_count=r_.yh,t._wasm_pdf_annot_ink_list_stroke_count=r_.zh,t._wasm_pdf_annot_ink_list_stroke_vertex=r_.Ah,t._wasm_pdf_annot_rich_contents=r_.Bh,t._wasm_pdf_annot_border_dash_count=r_.Ch,t._wasm_pdf_annot_border_dash_item=r_.Dh,t._wasm_pdf_annot_has_rect=r_.Eh,t._wasm_pdf_annot_has_ink_list=r_.Fh,t._wasm_pdf_annot_has_quad_points=r_.Gh,t._wasm_pdf_annot_has_vertices=r_.Hh,t._wasm_pdf_annot_has_line=r_.Ih,t._wasm_pdf_annot_has_interior_color=r_.Jh,t._wasm_pdf_annot_has_line_ending_styles=r_.Kh,t._wasm_pdf_annot_has_border=r_.Lh,t._wasm_pdf_annot_has_border_effect=r_.Mh,t._wasm_pdf_annot_has_icon_name=r_.Nh,t._wasm_pdf_annot_has_open=r_.Oh,t._wasm_pdf_annot_has_author=r_.Ph,t._wasm_pdf_annot_has_subject=r_.Qh,t._wasm_pdf_annot_has_filespec=r_.Rh,t._wasm_pdf_annot_has_callout=r_.Sh,t._wasm_pdf_annot_has_rich_contents=r_.Th,t._wasm_pdf_annot_language=r_.Uh,t._wasm_pdf_set_annot_language=r_.Vh,t._wasm_pdf_set_annot_popup=r_.Wh,t._wasm_pdf_set_annot_rect=r_.Xh,t._wasm_pdf_clear_annot_quad_points=r_.Yh,t._wasm_pdf_clear_annot_vertices=r_.Zh,t._wasm_pdf_clear_annot_ink_list=r_._h,t._wasm_pdf_clear_annot_border_dash=r_.$h,t._wasm_pdf_add_annot_quad_point=r_.ai,t._wasm_pdf_add_annot_vertex=r_.bi,t._wasm_pdf_add_annot_ink_list_stroke=r_.ci,t._wasm_pdf_add_annot_ink_list_stroke_vertex=r_.di,t._wasm_pdf_add_annot_border_dash_item=r_.ei,t._wasm_pdf_annot_line_ending_styles_start=r_.fi,t._wasm_pdf_annot_line_1=r_.gi,t._wasm_pdf_annot_line_2=r_.hi,t._wasm_pdf_set_annot_line=r_.ii,t._wasm_pdf_set_annot_callout_point=r_.ji,t._wasm_pdf_annot_callout_line=r_.ki,t._wasm_pdf_set_annot_callout_line=r_.li,t._wasm_pdf_set_annot_line_caption_offset=r_.mi,t._wasm_pdf_annot_line_ending_styles_end=r_.ni,t._wasm_pdf_set_annot_line_ending_styles=r_.oi,t._wasm_pdf_annot_color=r_.pi,t._wasm_pdf_annot_interior_color=r_.qi,t._wasm_pdf_set_annot_color=r_.ri,t._wasm_pdf_set_annot_interior_color=r_.si,t._wasm_pdf_set_annot_default_appearance=r_.ti,t._wasm_pdf_annot_default_appearance_font=r_.ui,t._wasm_pdf_annot_default_appearance_size=r_.vi,t._wasm_pdf_annot_default_appearance_color=r_.wi,t._wasm_pdf_set_annot_rich_contents=r_.xi,t._wasm_pdf_set_annot_stamp_image=r_.yi,t._wasm_pdf_set_annot_appearance_from_display_list=r_.zi,t._wasm_pdf_set_annot_appearance=r_.Ai,t._wasm_pdf_apply_redaction=r_.Bi,t._wasm_pdf_reset_form=r_.Ci,t._wasm_pdf_annot_field_type=r_.Di,t._wasm_pdf_annot_field_flags=r_.Ei,t._wasm_pdf_annot_field_label=r_.Fi,t._wasm_pdf_annot_field_value=r_.Gi,t._wasm_pdf_load_field_name=r_.Hi,t._wasm_pdf_annot_text_widget_max_len=r_.Ii,t._wasm_pdf_set_annot_text_field_value=r_.Ji,t._wasm_pdf_set_annot_choice_field_value=r_.Ki,t._wasm_pdf_annot_choice_field_option_count=r_.Li,t._wasm_pdf_annot_choice_field_option=r_.Mi,t._wasm_pdf_toggle_widget=r_.Ni,t._wasm_pdf_is_indirect=r_.Oi,t._wasm_pdf_is_bool=r_.Pi,t._wasm_pdf_is_int=r_.Qi,t._wasm_pdf_is_real=r_.Ri,t._wasm_pdf_is_number=r_.Si,t._wasm_pdf_is_name=r_.Ti,t._wasm_pdf_is_string=r_.Ui,t._wasm_pdf_is_array=r_.Vi,t._wasm_pdf_is_dict=r_.Wi,t._wasm_pdf_is_stream=r_.Xi,t._wasm_pdf_to_num=r_.Yi,t._wasm_pdf_to_bool=r_.Zi,t._wasm_pdf_to_real=r_._i,t._wasm_pdf_to_name=r_.$i,t._wasm_pdf_to_text_string=r_.aj,t._wasm_pdf_new_indirect=r_.bj,t._wasm_pdf_new_array=r_.cj,t._wasm_pdf_new_dict=r_.dj,t._wasm_pdf_new_bool=r_.ej,t._wasm_pdf_new_int=r_.fj,t._wasm_pdf_new_real=r_.gj,t._wasm_pdf_new_name=r_.hj,t._wasm_pdf_new_text_string=r_.ij,t._wasm_pdf_new_string=r_.jj,t._wasm_pdf_resolve_indirect=r_.kj,t._wasm_pdf_array_len=r_.lj,t._wasm_pdf_array_get=r_.mj,t._wasm_pdf_dict_get=r_.nj,t._wasm_pdf_dict_len=r_.oj,t._wasm_pdf_dict_get_key=r_.pj,t._wasm_pdf_dict_get_val=r_.qj,t._wasm_pdf_dict_get_inheritable=r_.rj,t._wasm_pdf_dict_gets=r_.sj,t._wasm_pdf_dict_gets_inheritable=r_.tj,t._wasm_pdf_dict_put=r_.uj,t._wasm_pdf_dict_puts=r_.vj,t._wasm_pdf_dict_del=r_.wj,t._wasm_pdf_dict_dels=r_.xj,t._wasm_pdf_array_put=r_.yj,t._wasm_pdf_array_push=r_.zj,t._wasm_pdf_array_delete=r_.Aj,t._wasm_pdf_sprint_obj=r_.Bj,t._wasm_pdf_load_stream=r_.Cj,t._wasm_pdf_load_raw_stream=r_.Dj,t._wasm_pdf_update_object=r_.Ej,t._wasm_pdf_update_stream=r_.Fj,t._wasm_pdf_to_string=r_.Gj,t._wasm_new_stream=r_.Hj,t._wasm_walk_path=r_.Ij,t._wasm_walk_text=r_.Jj,t._wasm_enable_log_callback=r_.Kj,t._wasm_new_js_device=r_.Lj,r_.Mj);return function(){if(t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.shift()()}(),function _(){function e(){t.calledRun=!0,$||(A=!0,r_.x(),a(t),t.onRuntimeInitialized?.(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)L(t.postRun.shift());B(q)}())}C>0?S=_:(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)H(t.preRun.shift());B(z)}(),C>0?S=_:t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),e()},1)):e())}(),s};export default _; \ No newline at end of file diff --git a/node_modules/mupdf/dist/mupdf-wasm.js.br b/node_modules/mupdf/dist/mupdf-wasm.js.br new file mode 100644 index 0000000..ef0fdb2 Binary files /dev/null and b/node_modules/mupdf/dist/mupdf-wasm.js.br differ diff --git a/node_modules/mupdf/dist/mupdf-wasm.wasm b/node_modules/mupdf/dist/mupdf-wasm.wasm new file mode 100644 index 0000000..8288739 Binary files /dev/null and b/node_modules/mupdf/dist/mupdf-wasm.wasm differ diff --git a/node_modules/mupdf/dist/mupdf-wasm.wasm.br b/node_modules/mupdf/dist/mupdf-wasm.wasm.br new file mode 100644 index 0000000..412bcff Binary files /dev/null and b/node_modules/mupdf/dist/mupdf-wasm.wasm.br differ diff --git a/node_modules/mupdf/dist/mupdf.d.ts b/node_modules/mupdf/dist/mupdf.d.ts new file mode 100644 index 0000000..1540540 --- /dev/null +++ b/node_modules/mupdf/dist/mupdf.d.ts @@ -0,0 +1,940 @@ +import { Pointer } from "./mupdf-wasm.js"; +declare global { + var $libmupdf_wasm_Module: any; +} +export declare const memento: { + listBlocks(): void; + checkAllMemory(): void; +}; +export type Matrix = [number, number, number, number, number, number]; +export type Rect = [number, number, number, number]; +export type Quad = [number, number, number, number, number, number, number, number]; +export type Point = [number, number]; +export type Color = [number] | [number, number, number] | [number, number, number, number]; +export type AnnotColor = [] | Color; +export type Rotate = 0 | 90 | 180 | 270; +export declare const Matrix: { + identity: Matrix; + scale(sx: number, sy: number): Matrix; + translate(tx: number, ty: number): Matrix; + rotate(d: number): Matrix; + invert(m: Matrix): Matrix; + concat(one: Matrix, two: Matrix): Matrix; +}; +export declare const Rect: { + MIN_INF_RECT: number; + MAX_INF_RECT: number; + empty: number[]; + invalid: number[]; + infinite: number[]; + isEmpty: (rect: Rect) => boolean; + isValid: (rect: Rect) => boolean; + isInfinite: (rect: Rect) => boolean; + transform: (rect: Rect, matrix: Matrix) => Rect; +}; +export declare function enableICC(): void; +export declare function disableICC(): void; +export declare function setUserCSS(text: string): void; +export declare function emptyStore(): void; +export declare function shrinkStore(percent: number): boolean; +export declare function installLoadFontFunction(f: (name: string, script: string, bold: boolean, italic: boolean) => Font | null): void; +interface Log { + error?(message: string): void; + warning?(message: string): void; +} +declare global { + function $libmupdf_log_error(message: Pointer<"char">): void; + function $libmupdf_log_warning(message: Pointer<"char">): void; +} +export declare function setLog(log: Log | ((message: string) => void) | null): void; +/** The types that can be automatically converted into a Buffer object */ +type AnyBuffer = Buffer | ArrayBuffer | Uint8Array | string; +declare abstract class Userdata { + private static _finalizer; + static readonly _drop: (pointer: any) => void; + pointer: Pointer; + constructor(pointer: Pointer); + destroy(): void; + toString(): string; + valueOf(): void; +} +export declare class Buffer extends Userdata<"fz_buffer"> { + static readonly _drop: (p: Pointer<"fz_buffer">) => void; + /** New empty Buffer. */ + constructor(); + /** New Buffer initialized with string contents as UTF-8. */ + constructor(data: string); + /** New Buffer initialized with typed array contents. */ + constructor(data: ArrayBuffer | Uint8Array); + /** PRIVATE */ + constructor(pointer: Pointer<"fz_buffer">); + get length(): number; + set length(_: number); + getLength(): number; + readByte(at: number): number; + write(s: string): void; + writeByte(b: number): void; + writeLine(s: string): void; + writeBuffer(other: AnyBuffer): void; + asUint8Array(): Uint8Array; + slice(start: number, end?: number): Buffer; + asString(): string; + save(filename: string): void; +} +export type ColorSpaceType = "None" | "Gray" | "RGB" | "BGR" | "CMYK" | "Lab" | "Indexed" | "Separation"; +export declare class ColorSpace extends Userdata<"fz_colorspace"> { + static readonly _drop: (p: Pointer<"fz_colorspace">) => void; + static readonly COLORSPACE_TYPES: ColorSpaceType[]; + constructor(profile: AnyBuffer, name: string); + constructor(pointer: Pointer<"fz_colorspace">); + getName(): string; + getType(): ColorSpaceType; + getNumberOfComponents(): number; + isGray(): boolean; + isRGB(): boolean; + isCMYK(): boolean; + isIndexed(): boolean; + isLab(): boolean; + isDeviceN(): boolean; + isSubtractive(): boolean; + toString(): string; + static readonly DeviceGray: ColorSpace; + static readonly DeviceRGB: ColorSpace; + static readonly DeviceBGR: ColorSpace; + static readonly DeviceCMYK: ColorSpace; + static readonly Lab: ColorSpace; +} +export type FontSimpleEncoding = "Latin" | "Greek" | "Cyrillic"; +export type FontCJKOrdering = 0 | 1 | 2 | 3; +export type FontCJKLanguage = "Adobe-CNS1" | "Adobe-GB1" | "Adobe-Japan1" | "Adobe-Korea1" | "zh-Hant" | "zh-TW" | "zh-HK" | "zh-Hans" | "zh-CN" | "ja" | "ko"; +export declare class Font extends Userdata<"fz_font"> { + static readonly _drop: (p: Pointer<"fz_font">) => void; + static readonly SIMPLE_ENCODING: FontSimpleEncoding[]; + static readonly SIMPLE_ENCODING_LATIN = "Latin"; + static readonly SIMPLE_ENCODING_GREEK = "Greek"; + static readonly SIMPLE_ENCODING_CYRILLIC = "Cyrillic"; + static readonly ADOBE_CNS = 0; + static readonly ADOBE_GB = 1; + static readonly ADOBE_JAPAN = 2; + static readonly ADOBE_KOREA = 3; + static readonly CJK_ORDERING_BY_LANG: Record; + constructor(name: string); + constructor(name: string, filename: string, subfont?: number); + constructor(name: string, data: AnyBuffer, subfont?: number); + constructor(pointer: Pointer<"fz_font">); + getName(): string; + encodeCharacter(uni: number | string): number; + advanceGlyph(gid: number, wmode?: number): number; + isMono(): boolean; + isSerif(): boolean; + isBold(): boolean; + isItalic(): boolean; +} +export declare class Image extends Userdata<"fz_image"> { + static readonly _drop: (p: Pointer<"fz_image">) => void; + constructor(pointer: Pointer<"fz_image">); + constructor(filename: string); + constructor(data: AnyBuffer); + constructor(pixmap: Pixmap, mask?: Image); + getWidth(): number; + getHeight(): number; + getNumberOfComponents(): number; + getBitsPerComponent(): number; + getXResolution(): number; + getYResolution(): number; + getImageMask(): boolean; + getColorSpace(): ColorSpace | null; + getMask(): Image | null; + toPixmap(): Pixmap; +} +export type LineCap = "Butt" | "Round" | "Square" | "Triangle"; +export type LineJoin = "Miter" | "Round" | "Bevel" | "MiterXPS"; +export type StrokeStateData = { + lineCap: LineCap; + lineJoin: LineJoin; + lineWidth: number; + miterLimit: number; + dashPhase?: number; + dashes?: number[]; +}; +export declare class StrokeState extends Userdata<"fz_stroke_state"> { + static readonly _drop: (p: Pointer<"fz_stroke_state">) => void; + static readonly LINE_CAP: LineCap[]; + static readonly LINE_JOIN: LineJoin[]; + constructor(data: Pointer<"fz_stroke_state"> | StrokeStateData); + getLineCap(): number; + getLineJoin(): number; + getLineWidth(): number; + getMiterLimit(): number; + getDashPhase(): number; + getDashes(): number[] | null; +} +interface PathWalker { + moveTo?(x: number, y: number): void; + lineTo?(x: number, y: number): void; + curveTo?(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void; + closePath?(): void; +} +export declare class Path extends Userdata<"fz_path"> { + static readonly _drop: (p: Pointer<"fz_path">) => void; + constructor(pointer?: Pointer<"fz_path">); + getBounds(strokeState: StrokeState, transform: Matrix): Rect; + moveTo(x: number, y: number): void; + lineTo(x: number, y: number): void; + curveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void; + curveToV(cx: number, cy: number, ex: number, ey: number): void; + curveToY(cx: number, cy: number, ex: number, ey: number): void; + closePath(): void; + rect(x1: number, y1: number, x2: number, y2: number): void; + transform(matrix: Matrix): void; + walk(walker: PathWalker): void; +} +interface TextWalker { + beginSpan?(font: Font, trm: Matrix, wmode: number, bidi: number, markupDirection: number, language: string): void; + showGlyph?(font: Font, trm: Matrix, glyph: number, unicode: number, wmode: number, bidi: number): void; + endSpan?(): void; +} +export declare class Text extends Userdata<"fz_text"> { + static readonly _drop: (p: Pointer<"fz_text">) => void; + constructor(pointer?: Pointer<"fz_text">); + getBounds(strokeState: StrokeState, transform: Matrix): Rect; + showGlyph(font: Font, trm: Matrix, gid: number, uni: number, wmode?: number): void; + showString(font: Font, trm: Matrix, str: string, wmode?: number): Matrix; + walk(walker: TextWalker): void; +} +export declare class DisplayList extends Userdata<"fz_display_list"> { + static readonly _drop: (p: Pointer<"fz_display_list">) => void; + constructor(pointer: Pointer<"fz_display_list">); + constructor(mediabox: Rect); + getBounds(): Rect; + toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean): Pixmap; + toStructuredText(options: any): StructuredText; + run(device: Device, matrix: Matrix): void; + search(needle: string, options: any): Quad[][]; +} +export declare class Pixmap extends Userdata<"fz_pixmap"> { + static readonly _drop: (p: Pointer<"fz_pixmap">) => void; + constructor(pointer: Pointer<"fz_pixmap">); + constructor(colorspace: ColorSpace, bbox: Rect, alpha: boolean); + getBounds(): number[]; + clear(value?: number): void; + getWidth(): number; + getHeight(): number; + getX(): number; + getY(): number; + getStride(): number; + getNumberOfComponents(): number; + getAlpha(): number; + getXResolution(): number; + getYResolution(): number; + setResolution(x: number, y: number): void; + getColorSpace(): ColorSpace | null; + getPixels(): Uint8ClampedArray; + asPNG(): Uint8Array; + asPSD(): Uint8Array; + asPAM(): Uint8Array; + asJPEG(quality: number, invert_cmyk?: boolean): Uint8Array; + invert(): void; + invertLuminance(): void; + gamma(p: number): void; + tint(black: number | Color, white: number | Color): void; + convertToColorSpace(colorspace: ColorSpace, keepAlpha?: boolean): Pixmap; + warp(points: Point[], width: number, height: number): Pixmap; +} +export declare class Shade extends Userdata<"fz_shade"> { + static readonly _drop: (p: Pointer<"fz_shade">) => void; + getBounds(): Rect; +} +interface StructuredTextWalker { + onImageBlock?(bbox: Rect, transform: Matrix, image: Image): void; + beginTextBlock?(bbox: Rect): void; + beginLine?(bbox: Rect, wmode: number, direction: Point): void; + onChar?(c: string, origin: Point, font: Font, size: number, quad: Quad, color: Color, bidi: number): void; + endLine?(): void; + endTextBlock?(): void; + onVector?(bbox: Rect, flags: any, color: Color): void; +} +type SelectMode = "chars" | "words" | "lines"; +export declare class StructuredText extends Userdata<"fz_stext_page"> { + static readonly _drop: (p: Pointer<"fz_stext_page">) => void; + static readonly SELECT_MODE: SelectMode[]; + static readonly SELECT_CHARS = "chars"; + static readonly SELECT_WORDS = "words"; + static readonly SELECT_LINES = "lines"; + walk(walker: StructuredTextWalker): void; + asJSON(scale?: number): string; + asHTML(id: number): string; + asText(): string; + snap(p: Point, q: Point, mode: SelectMode): Quad; + copy(p: Point, q: Point): string; + highlight(p: Point, q: Point, max_hits?: number): Quad[]; + search(needle: string, options: any): Quad[][]; +} +export type BlendMode = "Normal" | "Multiply" | "Screen" | "Overlay" | "Darken" | "Lighten" | "ColorDodge" | "ColorBurn" | "HardLight" | "SoftLight" | "Difference" | "Exclusion" | "Hue" | "Saturation" | "Color" | "Luminosity"; +export declare class Device extends Userdata<"fz_device"> { + static readonly _drop: (p: Pointer<"fz_device">) => void; + static readonly BLEND_MODES: BlendMode[]; + static readonly BLEND_NORMAL = "Normal"; + static readonly BLEND_MULTIPLY = "Multiply"; + static readonly BLEND_SCREEN = "Screen"; + static readonly BLEND_OVERLAY = "Overlay"; + static readonly BLEND_DARKEN = "Darken"; + static readonly BLEND_LIGHTEN = "Lighten"; + static readonly BLEND_COLOR_DODGE = "ColorDodge"; + static readonly BLEND_COLOR_BURN = "ColorBurn"; + static readonly BLEND_HARD_LIGHT = "HardLight"; + static readonly BLEND_SOFT_LIGHT = "SoftLight"; + static readonly BLEND_DIFFERENCE = "Difference"; + static readonly BLEND_EXCLUSION = "Exclusion"; + static readonly BLEND_HUE = "Hue"; + static readonly BLEND_SATURATION = "Saturation"; + static readonly BLEND_COLOR = "Color"; + static readonly BLEND_LUMINOSITY = "Luminosity"; + constructor(callbacks: DeviceFunctions); + constructor(pointer: Pointer<"fz_device">); + fillPath(path: Path, evenOdd: boolean, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void; + strokePath(path: Path, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void; + clipPath(path: Path, evenOdd: boolean, ctm: Matrix): void; + clipStrokePath(path: Path, stroke: StrokeState, ctm: Matrix): void; + fillText(text: Text, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void; + strokeText(text: Text, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void; + clipText(text: Text, ctm: Matrix): void; + clipStrokeText(text: Text, stroke: StrokeState, ctm: Matrix): void; + ignoreText(text: Text, ctm: Matrix): void; + fillShade(shade: Shade, ctm: Matrix, alpha: number): void; + fillImage(image: Image, ctm: Matrix, alpha: number): void; + fillImageMask(image: Image, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void; + clipImageMask(image: Image, ctm: Matrix): void; + popClip(): void; + beginMask(area: Rect, luminosity: boolean, colorspace: ColorSpace, color: Color): void; + endMask(): void; + beginGroup(area: Rect, colorspace: ColorSpace, isolated: boolean, knockout: boolean, blendmode: BlendMode, alpha: number): void; + endGroup(): void; + beginTile(area: Rect, view: Rect, xstep: number, ystep: number, ctm: Matrix, id: number, doc_id: number): number; + endTile(): void; + beginLayer(name: string): void; + endLayer(): void; + close(): void; +} +export declare class DrawDevice extends Device { + constructor(matrix: Matrix, pixmap: Pixmap); +} +export declare class DisplayListDevice extends Device { + constructor(displayList: DisplayList); +} +export declare class DocumentWriter extends Userdata<"fz_document_writer"> { + static readonly _drop: (p: Pointer<"fz_document_writer">) => void; + constructor(buffer: Buffer, format: string, options: any); + beginPage(mediabox: Rect): Device; + endPage(): void; + close(): void; +} +export type DocumentPermission = "print" | "copy" | "edit" | "annotate" | "form" | "accessibility" | "assemble" | "print-hq"; +export declare class LinkDestination { + static readonly LINK_DEST: LinkDestType[]; + static readonly FIT = "Fit"; + static readonly FIT_B = "FitB"; + static readonly FIT_H = "FitH"; + static readonly FIT_BH = "FitBH"; + static readonly FIT_V = "FitV"; + static readonly FIT_BV = "FitBV"; + static readonly FIT_R = "FitR"; + static readonly XYZ = "XYZ"; + type: LinkDestType; + chapter: number; + page: number; + x: number; + y: number; + width: number; + height: number; + zoom: number; + constructor(chapter?: number, page?: number, type?: LinkDestType, x?: number, y?: number, width?: number, height?: number, zoom?: number); +} +export declare class Document extends Userdata<"any_document"> { + static readonly _drop: (p: Pointer<"any_document">) => void; + static readonly META_FORMAT = "format"; + static readonly META_ENCRYPTION = "encryption"; + static readonly META_INFO_AUTHOR = "info:Author"; + static readonly META_INFO_TITLE = "info:Title"; + static readonly META_INFO_SUBJECT = "info:Subject"; + static readonly META_INFO_KEYWORDS = "info:Keywords"; + static readonly META_INFO_CREATOR = "info:Creator"; + static readonly META_INFO_PRODUCER = "info:Producer"; + static readonly META_INFO_CREATIONDATE = "info:CreationDate"; + static readonly META_INFO_MODIFICATIONDATE = "info:ModDate"; + static readonly PERMISSION_PRINT = "print"; + static readonly PERMISSION_COPY = "copy"; + static readonly PERMISSION_EDIT = "eedit"; + static readonly PERMISSION_ANNOTATE = "annotate"; + static readonly PERMISSION_FORM = "form"; + static readonly PERMISSION_ACCESSIBILITY = "accessibility"; + static readonly PERMISSION_ASSEMBLE = "assemble"; + static readonly PERMISSION_PRINT_HQ = "print-hq"; + static readonly PERMISSION: Record; + static openDocument(from: Buffer | ArrayBuffer | Uint8Array | Stream | string, magic?: string): Document; + formatLinkURI(dest: LinkDest): string; + asPDF(): (this & PDFDocument) | null; + isPDF(): boolean; + needsPassword(): boolean; + authenticatePassword(password: string): number; + hasPermission(perm: DocumentPermission): boolean; + getMetaData(key: string): string | undefined; + setMetaData(key: string, value: string): void; + countPages(): number; + isReflowable(): void; + style(publisherCSS: boolean, userCSS: string): void; + layout(w: number, h: number, em: number): void; + loadPage(index: number): PDFPage | Page; + loadOutline(): OutlineItem[] | null; + resolveLink(link: string | Link): number; + resolveLinkDestination(link: string | Link): LinkDest; + outlineIterator(): OutlineIterator; +} +interface OutlineItem { + title: string | undefined; + uri: string | undefined; + open: boolean; + down?: OutlineItem[]; + page?: number; +} +export declare class OutlineIterator extends Userdata<"fz_outline_iterator"> { + static readonly _drop: (p: Pointer<"fz_outline_iterator">) => void; + static readonly ITERATOR_DID_NOT_MOVE = -1; + static readonly ITERATOR_AT_ITEM = 0; + static readonly ITERATOR_AT_EMPTY = 1; + static readonly FLAG_BOLD = 1; + static readonly FLAG_ITALIC = 2; + item(): OutlineItem | null; + next(): number; + prev(): number; + up(): number; + down(): number; + delete(): number; + insert(item: OutlineItem): number; + update(item: OutlineItem): void; +} +export type LinkDestType = "Fit" | "FitB" | "FitH" | "FitBH" | "FitV" | "FitBV" | "FitR" | "XYZ"; +interface LinkDest { + type: LinkDestType; + chapter: number; + page: number; + x: number; + y: number; + width: number; + height: number; + zoom: number; +} +export declare class Link extends Userdata<"fz_link"> { + static readonly _drop: (p: Pointer<"fz_link">) => void; + getBounds(): Rect; + setBounds(rect: Rect): void; + getURI(): string; + setURI(uri: string): void; + isExternal(): boolean; +} +export type PageBox = "MediaBox" | "CropBox" | "BleedBox" | "TrimBox" | "ArtBox"; +export declare class Page extends Userdata<"any_page"> { + static readonly _drop: (p: Pointer<"any_page">) => void; + static readonly BOXES: PageBox[]; + static readonly MEDIA_BOX = "MediaBox"; + static readonly CROP_BOX = "CropBox"; + static readonly BLEED_BOX = "BleedBox"; + static readonly TRIM_BOX = "TrimBox"; + static readonly ART_BOX = "ArtBox"; + isPDF(): boolean; + getBounds(box?: PageBox): Rect; + getLabel(): string; + run(device: Device, matrix: Matrix): void; + runPageContents(device: Device, matrix: Matrix): void; + runPageAnnots(device: Device, matrix: Matrix): void; + runPageWidgets(device: Device, matrix: Matrix): void; + toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean, showExtras?: boolean): Pixmap; + toDisplayList(showExtras?: boolean): DisplayList; + toStructuredText(options: any): StructuredText; + getLinks(): Link[]; + createLink(bbox: Rect, uri: string): Link; + deleteLink(link: Link): void; + search(needle: string, options: any): Quad[][]; +} +export declare class PDFDocument extends Document { + constructor(); + constructor(filename: string); + constructor(data: Buffer | ArrayBuffer | Uint8Array | Stream); + constructor(clone: PDFDocument); + constructor(pointer: Pointer<"any_document">); + loadPage(index: number): PDFPage; + _fromPDFObjectNew(ptr: Pointer<"pdf_obj">): PDFObject; + _fromPDFObjectKeep(ptr: Pointer<"pdf_obj">): PDFObject; + _toPDFObject(obj: any): PDFObject; + _PDFOBJ(obj: any): Pointer<"pdf_obj">; + getVersion(): number; + getLanguage(): string | null; + setLanguage(lang: string): void; + countObjects(): number; + getTrailer(): PDFObject; + createObject(): PDFObject; + newNull(): PDFObject; + newBoolean(v: boolean): PDFObject; + newInteger(v: number): PDFObject; + newReal(v: number): PDFObject; + newName(v: string): PDFObject; + newString(v: string): PDFObject; + newByteString(v: Uint8Array | number[]): PDFObject; + newIndirect(v: number): PDFObject; + newArray(): PDFObject; + newDictionary(): PDFObject; + deleteObject(num: number | PDFObject): void; + addObject(obj: any): PDFObject; + addStream(buf: AnyBuffer, obj: any): PDFObject; + addRawStream(buf: AnyBuffer, obj: any): PDFObject; + newGraftMap(): PDFGraftMap; + graftObject(obj: PDFObject): PDFObject; + graftPage(to: number, srcDoc: PDFDocument, srcPage: number): void; + addSimpleFont(font: Font, encoding?: FontSimpleEncoding): PDFObject; + addCJKFont(font: Font, lang: FontCJKOrdering | FontCJKLanguage, wmode?: number, serif?: boolean): PDFObject; + addFont(font: Font): PDFObject; + addImage(image: Image): PDFObject; + loadImage(ref: PDFObject): Image; + findPage(index: number): PDFObject; + setPageTreeCache(enabled: boolean): void; + addPage(mediabox: Rect, rotate: Rotate, resources: any, contents: AnyBuffer): PDFObject; + insertPage(at: number, obj: PDFObject): void; + deletePage(at: number): void; + isEmbeddedFile(ref: PDFObject): boolean; + addEmbeddedFile(filename: string, mimetype: string, contents: AnyBuffer, created: Date, modified: Date, checksum?: boolean): PDFObject; + getFilespecParams(ref: PDFObject): { + filename: string; + mimetype: string; + size: Pointer<"char">; + creationDate: Date; + modificationDate: Date; + }; + getEmbeddedFileContents(ref: PDFObject): Buffer | null; + getEmbeddedFiles(): Record; + loadNameTree(treeName: string): Record; + insertEmbeddedFile(filename: string, filespec: PDFObject): void; + deleteEmbeddedFile(filename: string): void; + _rewriteEmbeddedFiles(efs: Record): void; + saveToBuffer(options: any): Buffer; + save(filename: string, options: any): void; + static readonly PAGE_LABEL_NONE = "\0"; + static readonly PAGE_LABEL_DECIMAL = "D"; + static readonly PAGE_LABEL_ROMAN_UC = "R"; + static readonly PAGE_LABEL_ROMAN_LC = "r"; + static readonly PAGE_LABEL_ALPHA_UC = "A"; + static readonly PAGE_LABEL_ALPHA_LC = "a"; + setPageLabels(index: number, style?: string, prefix?: string, start?: number): void; + deletePageLabels(index: number): void; + wasRepaired(): boolean; + hasUnsavedChanges(): boolean; + countVersions(): number; + countUnsavedVersions(): number; + validateChangeHistory(): number; + canBeSavedIncrementally(): boolean; + enableJournal(): void; + getJournal(): { + position: number; + steps: string[]; + }; + beginOperation(op: string): void; + beginImplicitOperation(): void; + endOperation(): void; + abandonOperation(): void; + canUndo(): boolean; + canRedo(): boolean; + undo(): void; + redo(): void; + isJSSupported(): boolean; + enableJS(): void; + disableJS(): void; + setJSEventListener(_listener: any): void; + rearrangePages(pages: number[]): void; + subsetFonts(): void; + bake(bakeAnnots?: boolean, bakeWidgets?: boolean): void; + countLayerConfigs(): number; + getLayerConfigCreator(config: number): string; + getLayerConfigName(config: number): string; + selectLayerConfig(config: number): void; + countLayerConfigUIs(): number; + getLayerConfigUIInfo(configui: number): Object; + countLayers(): number; + isLayerVisible(layer: number): boolean; + setLayerVisible(layer: number, visible: boolean): void; + getLayerName(layer: number): string; + resetForm(fields: PDFObject, exclude: boolean): void; +} +export declare class PDFPage extends Page { + _doc: PDFDocument; + _annots: PDFAnnotation[] | null; + _widgets: PDFWidget[] | null; + constructor(doc: PDFDocument, pointer: Pointer<"any_page">); + getObject(): PDFObject; + getTransform(): Matrix; + setPageBox(box: PageBox, rect: Rect): void; + toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean, showExtras?: boolean, usage?: string, box?: PageBox): Pixmap; + getWidgets(): PDFWidget[]; + getAnnotations(): PDFAnnotation[]; + createAnnotation(type: PDFAnnotationType): PDFAnnotation; + deleteAnnotation(annot: PDFAnnotation): void; + static readonly REDACT_IMAGE_NONE = 0; + static readonly REDACT_IMAGE_REMOVE = 1; + static readonly REDACT_IMAGE_PIXELS = 2; + static readonly REDACT_IMAGE_UNLESS_INVISIBLE = 3; + static readonly REDACT_LINE_ART_NONE = 0; + static readonly REDACT_LINE_ART_REMOVE_IF_COVERED = 1; + static readonly REDACT_LINE_ART_REMOVE_IF_TOUCHED = 2; + static readonly REDACT_TEXT_REMOVE = 0; + static readonly REDACT_TEXT_NONE = 1; + applyRedactions(black_boxes?: boolean, image_method?: number, line_art_method?: number, text_method?: number): void; + update(): boolean; +} +type PDFObjectPath = Array; +export declare class PDFObject extends Userdata<"pdf_obj"> { + static readonly _drop: (p: Pointer<"pdf_obj">) => void; + static readonly Null: PDFObject; + _doc: PDFDocument; + constructor(doc: PDFDocument, pointer: Pointer<"pdf_obj">); + isNull(): boolean; + isIndirect(): boolean; + isBoolean(): boolean; + isInteger(): boolean; + isReal(): boolean; + isNumber(): boolean; + isName(): boolean; + isString(): boolean; + isArray(): boolean; + isDictionary(): boolean; + isStream(): boolean; + asIndirect(): number; + asBoolean(): boolean; + asNumber(): number; + asName(): string; + asString(): string; + asByteString(): Uint8Array; + readStream(): Buffer; + readRawStream(): Buffer; + writeObject(obj: any): void; + writeStream(buf: AnyBuffer): void; + writeRawStream(buf: AnyBuffer): void; + resolve(): PDFObject; + get length(): number; + set length(_: number); + _get(path: PDFObjectPath): Pointer<"pdf_obj">; + get(...path: PDFObjectPath): PDFObject; + getInheritable(key: string | PDFObject): PDFObject; + put(key: number | string | PDFObject, value: any): any; + push(value: any): any; + delete(key: number | string | PDFObject): void; + valueOf(): string | number | boolean | this | null; + toString(tight?: boolean, ascii?: boolean): string; + forEach(fn: (val: PDFObject, key: number | string, self: PDFObject) => void): void; + asJS(seen?: Record): any; +} +export declare class PDFGraftMap extends Userdata<"pdf_graft_map"> { + static readonly _drop: (p: Pointer<"pdf_graft_map">) => void; + _doc: PDFDocument; + constructor(doc: PDFDocument, pointer: Pointer<"pdf_graft_map">); + graftObject(obj: PDFObject): PDFObject; + graftPage(to: number, srcDoc: PDFDocument, srcPage: number): void; +} +export type PDFAnnotationType = "Text" | "Link" | "FreeText" | "Line" | "Square" | "Circle" | "Polygon" | "PolyLine" | "Highlight" | "Underline" | "Squiggly" | "StrikeOut" | "Redact" | "Stamp" | "Caret" | "Ink" | "Popup" | "FileAttachment" | "Sound" | "Movie" | "RichMedia" | "Widget" | "Screen" | "PrinterMark" | "TrapNet" | "Watermark" | "3D" | "Projection"; +export type PDFAnnotationLineEndingStyle = "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash"; +export type PDFAnnotationBorderStyle = "Solid" | "Dashed" | "Beveled" | "Inset" | "Underline"; +export type PDFAnnotationBorderEffect = "None" | "Cloudy"; +export type PDFAnnotationIntent = null | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PloyLine" | "PolygonCloud" | "PolygonDimension" | "StampImage" | "StampSnapshot"; +export declare class PDFAnnotation extends Userdata<"pdf_annot"> { + static readonly _drop: (p: Pointer<"pdf_annot">) => void; + _doc: PDFDocument; + static readonly ANNOT_TYPES: PDFAnnotationType[]; + static readonly LINE_ENDING: PDFAnnotationLineEndingStyle[]; + static readonly BORDER_STYLE: PDFAnnotationBorderStyle[]; + static readonly BORDER_EFFECT: PDFAnnotationBorderEffect[]; + static readonly INTENT: PDFAnnotationIntent[]; + static readonly IS_INVISIBLE: number; + static readonly IS_HIDDEN: number; + static readonly IS_PRINT: number; + static readonly IS_NO_ZOOM: number; + static readonly IS_NO_ROTATE: number; + static readonly IS_NO_VIEW: number; + static readonly IS_READ_ONLY: number; + static readonly IS_LOCKED: number; + static readonly IS_TOGGLE_NO_VIEW: number; + static readonly IS_LOCKED_CONTENTS: number; + constructor(doc: PDFDocument, pointer: Pointer<"pdf_annot">); + getObject(): PDFObject; + getBounds(): Rect; + run(device: Device, matrix: Matrix): void; + toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean): Pixmap; + toDisplayList(): DisplayList; + update(): boolean; + getType(): PDFAnnotationType; + getLanguage(): string | null; + setLanguage(lang: string): void; + getFlags(): number; + setFlags(flags: number): void; + getContents(): string; + setContents(text: string): void; + getName(): string; + setName(text: string): void; + getAuthor(): string; + setAuthor(text: string): void; + getSubject(): string; + setSubject(text: string): void; + getCreationDate(): Date; + setCreationDate(date: Date): void; + getModificationDate(): Date; + setModificationDate(date: Date): void; + hasRect(): boolean; + hasInkList(): boolean; + hasQuadPoints(): boolean; + hasVertices(): boolean; + hasLine(): boolean; + hasInteriorColor(): boolean; + hasLineEndingStyles(): boolean; + hasBorder(): boolean; + hasBorderEffect(): boolean; + hasIcon(): boolean; + hasOpen(): boolean; + hasAuthor(): boolean; + hasSubject(): boolean; + hasFilespec(): boolean; + hasCallout(): boolean; + hasRichContents(): boolean; + getRect(): Rect; + setRect(rect: Rect): void; + getPopup(): Rect; + setPopup(rect: Rect): void; + getIsOpen(): boolean; + setIsOpen(isOpen: boolean): void; + getHiddenForEditing(): boolean; + setHiddenForEditing(isHidden: boolean): void; + getIcon(): string; + setIcon(text: string): void; + getOpacity(): number; + setOpacity(opacity: number): void; + getQuadding(): number; + setQuadding(quadding: number): void; + getLine(): Point[]; + setLine(a: Point, b: Point): void; + getLineEndingStyles(): { + start: PDFAnnotationLineEndingStyle; + end: PDFAnnotationLineEndingStyle; + }; + setLineEndingStyles(start: PDFAnnotationLineEndingStyle, end: PDFAnnotationLineEndingStyle): void; + getLineCaption(): boolean; + setLineCaption(on: boolean): void; + getLineCaptionOffset(): Point; + setLineCaptionOffset(p: Point): void; + getLineLeader(): number; + getLineLeaderExtension(): number; + getLineLeaderOffset(): number; + setLineLeader(v: number): void; + setLineLeaderExtension(v: number): void; + setLineLeaderOffset(v: number): void; + getCalloutStyle(): PDFAnnotationLineEndingStyle; + setCalloutStyle(style: PDFAnnotationLineEndingStyle): void; + getCalloutLine(): Point[] | null; + setCalloutLine(line: Point[]): void; + getCalloutPoint(): Point | undefined; + setCalloutPoint(p: Point): void; + getColor(): AnnotColor; + getInteriorColor(): AnnotColor; + setColor(color: AnnotColor): void; + setInteriorColor(color: AnnotColor): void; + getBorderWidth(): number; + setBorderWidth(value: number): void; + getBorderStyle(): PDFAnnotationBorderStyle; + setBorderStyle(value: PDFAnnotationBorderStyle): void; + getBorderEffect(): PDFAnnotationBorderEffect; + setBorderEffect(value: PDFAnnotationBorderEffect): void; + getBorderEffectIntensity(): number; + setBorderEffectIntensity(value: number): void; + getBorderDashCount(): number; + getBorderDashItem(idx: number): number; + clearBorderDash(): void; + addBorderDashItem(v: number): void; + getBorderDashPattern(): any[]; + setBorderDashPattern(list: number[]): void; + getIntent(): PDFAnnotationIntent; + setIntent(value: PDFAnnotationIntent): void; + setDefaultAppearance(fontName: string, size: number, color: AnnotColor): void; + getDefaultAppearance(): { + font: string; + size: number; + color: AnnotColor; + }; + getFileSpec(): PDFObject; + setFileSpec(fs: PDFObject): void; + getQuadPoints(): Quad[]; + clearQuadPoints(): void; + addQuadPoint(quad: Quad): void; + setQuadPoints(quadlist: Quad[]): void; + getVertices(): Point[]; + clearVertices(): void; + addVertex(vertex: Point): void; + setVertices(vertexlist: Point[]): void; + getInkList(): Point[][]; + clearInkList(): void; + addInkListStroke(): void; + addInkListStrokeVertex(v: Point): void; + setInkList(inklist: Point[][]): void; + getRichContents(): string; + setRichContents(plain: string, html: string): void; + getRichDefaults(): string; + setRichDefaults(style: string): void; + setStampImage(image: Image): void; + setAppearanceFromDisplayList(appearance: string | null, state: string | null, transform: Matrix, list: DisplayList): void; + setAppearance(appearance: string | null, state: string | null, transform: Matrix, bbox: Rect, resources: any, contents: AnyBuffer): void; + applyRedaction(black_boxes?: number, image_method?: number, line_art_method?: number, text_method?: number): void; +} +export declare class PDFWidget extends PDFAnnotation { + static readonly WIDGET_TYPES: string[]; + static readonly FIELD_IS_READ_ONLY = 1; + static readonly FIELD_IS_REQUIRED: number; + static readonly FIELD_IS_NO_EXPORT: number; + static readonly TX_FIELD_IS_MULTILINE: number; + static readonly TX_FIELD_IS_PASSWORD: number; + static readonly TX_FIELD_IS_FILE_SELECT: number; + static readonly TX_FIELD_IS_DO_NOT_SPELL_CHECK: number; + static readonly TX_FIELD_IS_DO_NOT_SCROLL: number; + static readonly TX_FIELD_IS_COMB: number; + static readonly TX_FIELD_IS_RICH_TEXT: number; + static readonly BTN_FIELD_IS_NO_TOGGLE_TO_OFF: number; + static readonly BTN_FIELD_IS_RADIO: number; + static readonly BTN_FIELD_IS_PUSHBUTTON: number; + static readonly BTN_FIELD_IS_RADIOS_IN_UNISON: number; + static readonly CH_FIELD_IS_COMBO: number; + static readonly CH_FIELD_IS_EDIT: number; + static readonly CH_FIELD_IS_SORT: number; + static readonly CH_FIELD_IS_MULTI_SELECT: number; + static readonly CH_FIELD_IS_DO_NOT_SPELL_CHECK: number; + static readonly CH_FIELD_IS_COMMIT_ON_SEL_CHANGE: number; + getFieldType(): string; + isButton(): boolean; + isPushButton(): boolean; + isCheckbox(): boolean; + isRadioButton(): boolean; + isText(): boolean; + isChoice(): boolean; + isListBox(): boolean; + isComboBox(): boolean; + getFieldFlags(): number; + isMultiline(): boolean; + isPassword(): boolean; + isComb(): boolean; + isReadOnly(): boolean; + getLabel(): string; + getName(): string; + setName(): void; + getValue(): string; + setTextValue(value: string): number; + getMaxLen(): number; + setChoiceValue(value: string): number; + getOptions(isExport?: boolean): string[]; + toggle(): number; +} +declare global { + function $libmupdf_stm_close(ptr: number): void; + function $libmupdf_stm_seek(ptr: number, pos: number, offset: number, whence: number): number; + function $libmupdf_stm_read(ptr: number, pos: number, addr: number, size: number): number; +} +interface StreamHandle { + fileSize(): number; + read(memory: Uint8Array, offset: number, length: number, position: number): number; + close(): void; +} +export declare class Stream extends Userdata<"fz_stream"> { + static readonly _drop: (p: Pointer<"fz_stream">) => void; + constructor(handle: StreamHandle); +} +declare global { + function $libmupdf_load_font_file(name: Pointer<"char">, script: Pointer<"char">, bold: boolean, italic: boolean): Pointer<"fz_font">; +} +interface DeviceFunctions { + drop?(): void; + close?(): void; + fillPath?(path: Path, evenOdd: boolean, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void; + strokePath?(path: Path, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void; + clipPath?(path: Path, evenOdd: boolean, ctm: Matrix): void; + clipStrokePath?(path: Path, stroke: StrokeState, ctm: Matrix): void; + fillText?(text: Text, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void; + strokeText?(text: Text, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void; + clipText?(text: Text, ctm: Matrix): void; + clipStrokeText?(text: Text, stroke: StrokeState, ctm: Matrix): void; + ignoreText?(text: Text, ctm: Matrix): void; + fillShade?(shade: Shade, ctm: Matrix, alpha: number): void; + fillImage?(image: Image, ctm: Matrix, alpha: number): void; + fillImageMask?(image: Image, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void; + clipImageMask?(image: Image, ctm: Matrix): void; + popClip?(): void; + beginMask?(bbox: Rect, luminosity: boolean, colorspace: ColorSpace, color: number[]): void; + endMask?(): void; + beginGroup?(bbox: Rect, colorspace: ColorSpace, isolated: boolean, knockout: boolean, blendmode: BlendMode, alpha: number): void; + endGroup?(): void; + beginTile?(area: Rect, view: Rect, xstep: number, ystep: number, ctm: Matrix, id: number, doc_id: number): number; + endTile?(): void; + beginLayer?(name: string): void; + endLayer?(): void; +} +declare global { + var $libmupdf_path_walk: any; + var $libmupdf_text_walk: any; + var $libmupdf_device: any; +} +declare const _default: { + Matrix: { + identity: Matrix; + scale(sx: number, sy: number): Matrix; + translate(tx: number, ty: number): Matrix; + rotate(d: number): Matrix; + invert(m: Matrix): Matrix; + concat(one: Matrix, two: Matrix): Matrix; + }; + Rect: { + MIN_INF_RECT: number; + MAX_INF_RECT: number; + empty: number[]; + invalid: number[]; + infinite: number[]; + isEmpty: (rect: Rect) => boolean; + isValid: (rect: Rect) => boolean; + isInfinite: (rect: Rect) => boolean; + transform: (rect: Rect, matrix: Matrix) => Rect; + }; + enableICC: typeof enableICC; + disableICC: typeof disableICC; + setUserCSS: typeof setUserCSS; + installLoadFontFunction: typeof installLoadFontFunction; + setLog: typeof setLog; + Buffer: typeof Buffer; + ColorSpace: typeof ColorSpace; + Font: typeof Font; + Image: typeof Image; + StrokeState: typeof StrokeState; + Path: typeof Path; + Text: typeof Text; + DisplayList: typeof DisplayList; + Pixmap: typeof Pixmap; + Shade: typeof Shade; + StructuredText: typeof StructuredText; + Device: typeof Device; + DrawDevice: typeof DrawDevice; + DisplayListDevice: typeof DisplayListDevice; + DocumentWriter: typeof DocumentWriter; + Document: typeof Document; + OutlineIterator: typeof OutlineIterator; + Link: typeof Link; + Page: typeof Page; + PDFDocument: typeof PDFDocument; + PDFPage: typeof PDFPage; + PDFObject: typeof PDFObject; + PDFGraftMap: typeof PDFGraftMap; + PDFAnnotation: typeof PDFAnnotation; + PDFWidget: typeof PDFWidget; + Stream: typeof Stream; + memento: { + listBlocks(): void; + checkAllMemory(): void; + }; +}; +export default _default; diff --git a/node_modules/mupdf/dist/mupdf.js b/node_modules/mupdf/dist/mupdf.js new file mode 100644 index 0000000..849fee6 --- /dev/null +++ b/node_modules/mupdf/dist/mupdf.js @@ -0,0 +1,3317 @@ +// Copyright (C) 2004-2026 Artifex Software, Inc. +// +// This file is part of MuPDF WASM Library. +// +// MuPDF is free software: you can redistribute it and/or modify it under the +// terms of the GNU Affero General Public License as published by the Free +// Software Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +// details. +// +// You should have received a copy of the GNU Affero General Public License +// along with MuPDF. If not, see +// +// Alternative licensing terms are available from the licensor. +// For commercial licensing, see or contact +// Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, +// CA 94129, USA, for further information. +"use strict"; +import libmupdf_wasm from "./mupdf-wasm.js"; +var node_fs = null; +if (typeof process !== "undefined" && process.versions && process.versions.node) + node_fs = await import("node:fs"); +const libmupdf = await libmupdf_wasm(globalThis["$libmupdf_wasm_Module"]); +libmupdf._wasm_init_context(); +function Malloc(size) { + return libmupdf._wasm_malloc(size); +} +function Free(ptr) { + libmupdf._wasm_free(ptr); +} +export const memento = { + listBlocks() { + libmupdf._wasm_Memento_listBlocks(); + }, + checkAllMemory() { + libmupdf._wasm_Memento_checkAllMemory(); + }, +}; +export const Matrix = { + identity: [1, 0, 0, 1, 0, 0], + scale(sx, sy) { + return [sx, 0, 0, sy, 0, 0]; + }, + translate(tx, ty) { + return [1, 0, 0, 1, tx, ty]; + }, + rotate(d) { + while (d < 0) + d += 360; + while (d >= 360) + d -= 360; + let s = Math.sin((d * Math.PI) / 180); + let c = Math.cos((d * Math.PI) / 180); + return [c, s, -s, c, 0, 0]; + }, + invert(m) { + checkMatrix(m); + let det = m[0] * m[3] - m[1] * m[2]; + if (det > -1e-23 && det < 1e-23) + return m; + let rdet = 1 / det; + let inva = m[3] * rdet; + let invb = -m[1] * rdet; + let invc = -m[2] * rdet; + let invd = m[0] * rdet; + let inve = -m[4] * inva - m[5] * invc; + let invf = -m[4] * invb - m[5] * invd; + return [inva, invb, invc, invd, inve, invf]; + }, + concat(one, two) { + checkMatrix(one); + checkMatrix(two); + return [ + one[0] * two[0] + one[1] * two[2], + one[0] * two[1] + one[1] * two[3], + one[2] * two[0] + one[3] * two[2], + one[2] * two[1] + one[3] * two[3], + one[4] * two[0] + one[5] * two[2] + two[4], + one[4] * two[1] + one[5] * two[3] + two[5], + ]; + }, +}; +export const Rect = { + MIN_INF_RECT: 0x80000000, + MAX_INF_RECT: 0x7fffff80, + empty: [0x80000000, 0x80000000, 0x7fffff80, 0x7fffff80], + invalid: [0, 0, -1, -1], + infinite: [0x7fffff80, 0x7fffff80, 0x80000000, 0x80000000], + isEmpty: function (rect) { + checkRect(rect); + return rect[0] >= rect[2] || rect[1] >= rect[3]; + }, + isValid: function (rect) { + checkRect(rect); + return rect[0] <= rect[2] && rect[1] <= rect[3]; + }, + isInfinite: function (rect) { + checkRect(rect); + return (rect[0] === Rect.MAX_INF_RECT && + rect[1] === Rect.MAX_INF_RECT && + rect[2] === Rect.MIN_INF_RECT && + rect[3] === Rect.MIN_INF_RECT); + }, + transform: function (rect, matrix) { + checkRect(rect); + checkMatrix(matrix); + var t; + if (Rect.isInfinite(rect)) + return rect; + if (!Rect.isValid(rect)) + return rect; + var ax0 = rect[0] * matrix[0]; + var ax1 = rect[2] * matrix[0]; + if (ax0 > ax1) + t = ax0, ax0 = ax1, ax1 = t; + var cy0 = rect[1] * matrix[2]; + var cy1 = rect[3] * matrix[2]; + if (cy0 > cy1) + t = cy0, cy0 = cy1, cy1 = t; + ax0 += cy0 + matrix[4]; + ax1 += cy1 + matrix[4]; + var bx0 = rect[0] * matrix[1]; + var bx1 = rect[2] * matrix[1]; + if (bx0 > bx1) + t = bx0, bx0 = bx1, bx1 = t; + var dy0 = rect[1] * matrix[3]; + var dy1 = rect[3] * matrix[3]; + if (dy0 > dy1) + t = dy0, dy0 = dy1, dy1 = t; + bx0 += dy0 + matrix[5]; + bx1 += dy1 + matrix[5]; + return [ax0, bx0, ax1, bx1]; + }, +}; +export function enableICC() { + libmupdf._wasm_enable_icc(); +} +export function disableICC() { + libmupdf._wasm_disable_icc(); +} +export function setUserCSS(text) { + libmupdf._wasm_set_user_css(STRING(text)); +} +export function emptyStore() { + libmupdf._wasm_empty_store(); +} +export function shrinkStore(percent) { + return libmupdf._wasm_shrink_store(percent); +} +export function installLoadFontFunction(f) { + $libmupdf_load_font_file_js = f; +} +var $libmupdf_log = null; +globalThis.$libmupdf_log_error = function (message) { + $libmupdf_log?.error?.(fromString(message)); +}; +globalThis.$libmupdf_log_warning = function (message) { + $libmupdf_log?.warning?.(fromString(message)); +}; +export function setLog(log) { + if (typeof log === "function") { + $libmupdf_log = { error: log, warning: log }; + } + else { + $libmupdf_log = log; + } + libmupdf._wasm_enable_log_callback(log !== null); +} +/* -------------------------------------------------------------------------- */ +// To pass Rect and Matrix as pointer arguments +const _wasm_int = Malloc(4); +const _wasm_point = Malloc(4 * 6) >> 2; +const _wasm_rect = Malloc(4 * 8) >> 2; +const _wasm_matrix = Malloc(4 * 6) >> 2; +const _wasm_color = Malloc(4 * 4) >> 2; +const _wasm_quad = Malloc(4 * 8) >> 2; +const _wasm_string = [0, 0]; +function checkType(value, type) { + if (typeof type === "string" && typeof value !== type) + throw new TypeError("expected " + type); + if (typeof type === "function" && !(value instanceof type)) + throw new TypeError("expected " + type.name); +} +function checkPoint(value) { + if (!Array.isArray(value) || value.length !== 2) + throw new TypeError("expected point"); +} +function checkRect(value) { + if (!Array.isArray(value) || value.length !== 4) + throw new TypeError("expected rectangle"); +} +function checkMatrix(value) { + if (!Array.isArray(value) || value.length !== 6) + throw new TypeError("expected matrix"); +} +function checkQuad(value) { + if (!Array.isArray(value) || value.length !== 8) + throw new TypeError("expected quad"); +} +function checkColor(value) { + if (!Array.isArray(value) || (value.length !== 1 && value.length !== 3 && value.length !== 4)) + throw new TypeError("expected color array"); +} +function checkAnnotColor(value) { + if (!Array.isArray(value) || (value.length !== 0 && value.length !== 1 && value.length !== 3 && value.length !== 4)) + throw new TypeError("expected color array"); +} +function BUFFER(input) { + if (input instanceof Buffer) + return input.pointer; + if (input instanceof ArrayBuffer || input instanceof Uint8Array) + return new Buffer(input).pointer; + if (typeof input === "string") + return new Buffer(input).pointer; + throw new TypeError("expected buffer"); +} +function ENUM(value, list) { + if (typeof value === "number") { + if (value >= 0 && value < list.length) + return value; + } + if (typeof value === "string") { + let idx = list.indexOf(value); + if (idx >= 0) + return idx; + } + throw new TypeError(`invalid enum value ("${value}"; expected ${list.join(", ")})`); +} +function allocateUTF8(str) { + var size = libmupdf.lengthBytesUTF8(str) + 1; + var pointer = Malloc(size); + libmupdf.stringToUTF8(str, pointer, size); + return pointer; +} +function STRING_N(s, i) { + if (_wasm_string[i]) { + Free(_wasm_string[i]); + _wasm_string[i] = 0; + } + return _wasm_string[i] = allocateUTF8(s); +} +function STRING(s) { + return STRING_N(s, 0); +} +function STRING2(s) { + return STRING_N(s, 1); +} +function STRING_OPT(s) { + return typeof s === "string" ? STRING_N(s, 0) : 0; +} +function STRING2_OPT(s) { + return typeof s === "string" ? STRING_N(s, 1) : 0; +} +function POINT(p) { + libmupdf.HEAPF32[_wasm_point + 0] = p[0]; + libmupdf.HEAPF32[_wasm_point + 1] = p[1]; + return _wasm_point << 2; +} +function POINT2(p) { + libmupdf.HEAPF32[_wasm_point + 2] = p[0]; + libmupdf.HEAPF32[_wasm_point + 3] = p[1]; + return (_wasm_point + 2) << 2; +} +function POINT3(p) { + libmupdf.HEAPF32[_wasm_point + 4] = p[0]; + libmupdf.HEAPF32[_wasm_point + 5] = p[1]; + return (_wasm_point + 4) << 2; +} +function RECT(r) { + libmupdf.HEAPF32[_wasm_rect + 0] = r[0]; + libmupdf.HEAPF32[_wasm_rect + 1] = r[1]; + libmupdf.HEAPF32[_wasm_rect + 2] = r[2]; + libmupdf.HEAPF32[_wasm_rect + 3] = r[3]; + return _wasm_rect << 2; +} +function RECT2(r) { + libmupdf.HEAPF32[_wasm_rect + 4] = r[0]; + libmupdf.HEAPF32[_wasm_rect + 5] = r[1]; + libmupdf.HEAPF32[_wasm_rect + 6] = r[2]; + libmupdf.HEAPF32[_wasm_rect + 7] = r[3]; + return (_wasm_rect + 4) << 2; +} +function MATRIX(m) { + libmupdf.HEAPF32[_wasm_matrix + 0] = m[0]; + libmupdf.HEAPF32[_wasm_matrix + 1] = m[1]; + libmupdf.HEAPF32[_wasm_matrix + 2] = m[2]; + libmupdf.HEAPF32[_wasm_matrix + 3] = m[3]; + libmupdf.HEAPF32[_wasm_matrix + 4] = m[4]; + libmupdf.HEAPF32[_wasm_matrix + 5] = m[5]; + return _wasm_matrix << 2; +} +function QUAD(q) { + libmupdf.HEAPF32[_wasm_quad + 0] = q[0]; + libmupdf.HEAPF32[_wasm_quad + 1] = q[1]; + libmupdf.HEAPF32[_wasm_quad + 2] = q[2]; + libmupdf.HEAPF32[_wasm_quad + 3] = q[3]; + libmupdf.HEAPF32[_wasm_quad + 4] = q[4]; + libmupdf.HEAPF32[_wasm_quad + 5] = q[5]; + libmupdf.HEAPF32[_wasm_quad + 6] = q[6]; + libmupdf.HEAPF32[_wasm_quad + 7] = q[7]; + return _wasm_quad << 2; +} +function COLOR(c) { + if (typeof c !== "undefined") { + switch (c.length) { + case 0: + break; + case 1: + libmupdf.HEAPF32[_wasm_color + 0] = c[0]; + break; + case 3: + libmupdf.HEAPF32[_wasm_color + 0] = c[0]; + libmupdf.HEAPF32[_wasm_color + 1] = c[1]; + libmupdf.HEAPF32[_wasm_color + 2] = c[2]; + break; + case 4: + libmupdf.HEAPF32[_wasm_color + 0] = c[0]; + libmupdf.HEAPF32[_wasm_color + 1] = c[1]; + libmupdf.HEAPF32[_wasm_color + 2] = c[2]; + libmupdf.HEAPF32[_wasm_color + 3] = c[3]; + break; + } + } + return _wasm_color << 2; +} +function ensureOptions(value) { + if (value === (void 0) || value === null) + return ""; + if (typeof value === "string") + return value; + return JSON.stringify(value); +} +/* -------------------------------------------------------------------------- */ +function fromColor(n) { + if (n === 1) + return [ + libmupdf.HEAPF32[_wasm_color] + ]; + if (n === 3) + return [ + libmupdf.HEAPF32[_wasm_color + 0], + libmupdf.HEAPF32[_wasm_color + 1], + libmupdf.HEAPF32[_wasm_color + 2], + ]; + if (n === 4) + return [ + libmupdf.HEAPF32[_wasm_color + 0], + libmupdf.HEAPF32[_wasm_color + 1], + libmupdf.HEAPF32[_wasm_color + 2], + libmupdf.HEAPF32[_wasm_color + 3], + ]; + throw new TypeError("invalid number of components for Color: " + n); +} +function fromAnnotColor(n) { + if (n === 0) + return []; + return fromColor(n); +} +function fromColorArray(n, ptr) { + let addr = ptr >> 2; + let color = []; + for (let i = 0; i < n; ++i) + color.push(libmupdf.HEAPF32[addr + i]); + return color; +} +function fromStringOrNull(ptr) { + if (ptr === 0) + return null; + return libmupdf.UTF8ToString(ptr); +} +function fromString(ptr) { + return libmupdf.UTF8ToString(ptr); +} +function fromStringFree(ptr) { + let str = libmupdf.UTF8ToString(ptr); + Free(ptr); + return str; +} +function fromPoint(ptr) { + let addr = ptr >> 2; + return [ + libmupdf.HEAPF32[addr + 0], + libmupdf.HEAPF32[addr + 1], + ]; +} +function fromRect(ptr) { + let addr = ptr >> 2; + return [ + libmupdf.HEAPF32[addr + 0], + libmupdf.HEAPF32[addr + 1], + libmupdf.HEAPF32[addr + 2], + libmupdf.HEAPF32[addr + 3], + ]; +} +function fromMatrix(ptr) { + let addr = ptr >> 2; + return [ + libmupdf.HEAPF32[addr + 0], + libmupdf.HEAPF32[addr + 1], + libmupdf.HEAPF32[addr + 2], + libmupdf.HEAPF32[addr + 3], + libmupdf.HEAPF32[addr + 4], + libmupdf.HEAPF32[addr + 5], + ]; +} +function fromQuad(ptr) { + let addr = ptr >> 2; + return [ + libmupdf.HEAPF32[addr + 0], + libmupdf.HEAPF32[addr + 1], + libmupdf.HEAPF32[addr + 2], + libmupdf.HEAPF32[addr + 3], + libmupdf.HEAPF32[addr + 4], + libmupdf.HEAPF32[addr + 5], + libmupdf.HEAPF32[addr + 6], + libmupdf.HEAPF32[addr + 7], + ]; +} +function fromBuffer(ptr) { + let data = libmupdf._wasm_buffer_get_data(ptr); + let size = libmupdf._wasm_buffer_get_len(ptr); + return libmupdf.HEAPU8.slice(data, data + size); +} +function fromLayerConfigUIInfo(ptr) { + return { + text: libmupdf._wasm_pdf_layer_config_ui_get_text(ptr), + depth: libmupdf._wasm_pdf_layer_config_ui_get_depth(ptr), + type: libmupdf._wasm_pdf_layer_config_ui_get_type(ptr), + selected: libmupdf._wasm_pdf_layer_config_ui_get_selected(ptr), + locked: libmupdf._wasm_pdf_layer_config_ui_get_locked(ptr), + }; +} +/* unused for now +function rgbFromColor(c?: Color): [number, number, number] { + var r = 0, g = 0, b = 0 + if (typeof c !== "undefined") { + switch (c.length) { + case 1: + r = g = b = c[0] + break + case 3: + r = c[0] + g = c[1] + b = c[2] + break + case 4: + r = 1 - Math.min(1, c[0] + c[3]) + g = 1 - Math.min(1, c[1] + c[3]) + b = 1 - Math.min(1, c[2] + c[3]) + break + } + } + return [ r, g, b ] +} + +function numberFromColor(c?: Color): number { + var [ r, g, b ] = rgbFromColor(c) + return (255 << 24) | (r << 16) | (g << 8) | b +} +*/ +function colorFromNumber(argb) { + var r = (argb >> 16) & 255; + var g = (argb >> 8) & 255; + var b = (argb) & 255; + return [r / 255, g / 255, b / 255]; +} +function runSearch(searchFun, haystack, needle, options) { + const max_hits = 500; + checkType(needle, "string"); + options = ensureOptions(options); + let hits = 0; + let marks = 0; + try { + hits = Malloc(32 * max_hits); + marks = Malloc(4 * max_hits); + let n = searchFun(haystack, STRING(needle), marks, hits, max_hits, STRING2(options)); + let outer = []; + if (n > 0) { + let inner = []; + for (let i = 0; i < n; ++i) { + let mark = libmupdf.HEAP32[(marks >> 2) + i]; + let quad = fromQuad(hits + i * 32); + if (i > 0 && mark) { + outer.push(inner); + inner = []; + } + inner.push(quad); + } + outer.push(inner); + } + return outer; + } + finally { + Free(marks); + Free(hits); + } +} +/* -------------------------------------------------------------------------- */ +class Userdata { + constructor(pointer) { + if (typeof pointer !== "number") + throw new Error("invalid pointer: " + typeof pointer); + if (pointer !== 0) { + let ctor = this.constructor; + if (!ctor._finalizer) + ctor._finalizer = new FinalizationRegistry(ctor._drop); + ctor._finalizer.register(this, pointer, this); + } + this.pointer = pointer; + } + destroy() { + if (this.pointer !== 0) { + let ctor = this.constructor; + ctor._finalizer.unregister(this); + ctor._drop(this.pointer); + } + this.pointer = 0; + } + // Custom "console.log" formatting for Node + [Symbol.for("nodejs.util.inspect.custom")]() { + return this.toString(); + } + toString() { + return `[${this.constructor.name} ${this.pointer}]`; + } + valueOf() { + throw new Error("cannot convert Userdata to Javascript value"); + } +} +export class Buffer extends Userdata { + constructor(arg) { + if (typeof arg === "undefined") + super(libmupdf._wasm_new_buffer(1024)); + else if (typeof arg === "number") + super(arg); + else if (typeof arg === "string") { + let data_len = libmupdf.lengthBytesUTF8(arg); + let data_ptr = Malloc(data_len + 1); + libmupdf.stringToUTF8(arg, data_ptr, data_len + 1); + super(libmupdf._wasm_new_buffer_from_data(data_ptr, data_len)); + } + else if (arg instanceof ArrayBuffer || arg instanceof Uint8Array) { + let data_len = arg.byteLength; + let data_ptr = Malloc(data_len); + libmupdf.HEAPU8.set(new Uint8Array(arg), data_ptr); + super(libmupdf._wasm_new_buffer_from_data(data_ptr, data_len)); + } + } + get length() { + return this.getLength(); + } + set length(_) { + throw new TypeError("buffer length is read-only"); + } + getLength() { + return libmupdf._wasm_buffer_get_len(this.pointer); + } + readByte(at) { + let data = libmupdf._wasm_buffer_get_data(this.pointer); + return libmupdf.HEAPU8[data + at]; + } + write(s) { + libmupdf._wasm_append_string(this.pointer, STRING(s)); + } + writeByte(b) { + libmupdf._wasm_append_byte(this.pointer, b); + } + writeLine(s) { + this.write(s); + this.writeByte(10); + } + writeBuffer(other) { + libmupdf._wasm_append_buffer(this.pointer, BUFFER(other)); + } + asUint8Array() { + let data = libmupdf._wasm_buffer_get_data(this.pointer); + let size = libmupdf._wasm_buffer_get_len(this.pointer); + return libmupdf.HEAPU8.subarray(data, data + size); + } + slice(start, end) { + if (typeof end === "undefined") + end = this.getLength(); + return new Buffer(libmupdf._wasm_slice_buffer(this.pointer, start, end)); + } + asString() { + return fromString(libmupdf._wasm_string_from_buffer(this.pointer)); + } + save(filename) { + if (node_fs) + node_fs.writeFileSync(filename, this.asUint8Array()); + else + throw new Error("missing 'fs' module"); + } +} +Buffer._drop = libmupdf._wasm_drop_buffer; +export class ColorSpace extends Userdata { + constructor(from, name) { + if (typeof from === "number") { + super(from); + } + else { + if (typeof from === "string") { + if (node_fs) + from = node_fs.readFileSync(from); + else + throw new Error("missing 'fs' module"); + } + super(libmupdf._wasm_new_icc_colorspace(STRING_OPT(name), BUFFER(from))); + } + } + getName() { + return fromString(libmupdf._wasm_colorspace_get_name(this.pointer)); + } + getType() { + return ColorSpace.COLORSPACE_TYPES[libmupdf._wasm_colorspace_get_type(this.pointer)] || "None"; + } + getNumberOfComponents() { + return libmupdf._wasm_colorspace_get_n(this.pointer); + } + isGray() { return this.getType() === "Gray"; } + isRGB() { return this.getType() === "RGB"; } + isCMYK() { return this.getType() === "CMYK"; } + isIndexed() { return this.getType() === "Indexed"; } + isLab() { return this.getType() === "Lab"; } + isDeviceN() { return this.getType() === "Separation"; } + isSubtractive() { return this.getType() === "CMYK" || this.getType() === "Separation"; } + toString() { + return "[ColorSpace " + this.getName() + "]"; + } +} +ColorSpace._drop = libmupdf._wasm_drop_colorspace; +ColorSpace.COLORSPACE_TYPES = [ + "None", + "Gray", + "RGB", + "BGR", + "CMYK", + "Lab", + "Indexed", + "Separation" +]; +ColorSpace.DeviceGray = new ColorSpace(libmupdf._wasm_device_gray()); +ColorSpace.DeviceRGB = new ColorSpace(libmupdf._wasm_device_rgb()); +ColorSpace.DeviceBGR = new ColorSpace(libmupdf._wasm_device_bgr()); +ColorSpace.DeviceCMYK = new ColorSpace(libmupdf._wasm_device_cmyk()); +ColorSpace.Lab = new ColorSpace(libmupdf._wasm_device_lab()); +export class Font extends Userdata { + constructor(name_or_pointer, data, subfont = 0) { + let pointer = 0; + if (typeof name_or_pointer === "number") { + pointer = libmupdf._wasm_keep_font(name_or_pointer); + } + else { + if (typeof data === "string") { + if (node_fs) + data = node_fs.readFileSync(data); + else + throw new Error("missing 'fs' module"); + } + if (data) + pointer = libmupdf._wasm_new_font_from_buffer(STRING(name_or_pointer), BUFFER(data), subfont); + else if (name_or_pointer === "zh-Hant") + pointer = libmupdf._wasm_new_cjk_font(Font.ADOBE_CNS); + else if (name_or_pointer === "zh-Hans") + pointer = libmupdf._wasm_new_cjk_font(Font.ADOBE_GB); + else if (name_or_pointer === "ja") + pointer = libmupdf._wasm_new_cjk_font(Font.ADOBE_JAPAN); + else if (name_or_pointer === "ko") + pointer = libmupdf._wasm_new_cjk_font(Font.ADOBE_KOREA); + else + pointer = libmupdf._wasm_new_base14_font(STRING(name_or_pointer)); + } + super(pointer); + } + getName() { + return fromString(libmupdf._wasm_font_get_name(this.pointer)); + } + encodeCharacter(uni) { + if (typeof uni === "string") + uni = uni.charCodeAt(0); + return libmupdf._wasm_encode_character(this.pointer, uni); + } + advanceGlyph(gid, wmode = 0) { + return libmupdf._wasm_advance_glyph(this.pointer, gid, wmode); + } + isMono() { + return !!libmupdf._wasm_font_is_monospaced(this.pointer); + } + isSerif() { + return !!libmupdf._wasm_font_is_serif(this.pointer); + } + isBold() { + return !!libmupdf._wasm_font_is_bold(this.pointer); + } + isItalic() { + return !!libmupdf._wasm_font_is_italic(this.pointer); + } +} +Font._drop = libmupdf._wasm_drop_font; +Font.SIMPLE_ENCODING = [ + "Latin", + "Greek", + "Cyrillic" +]; +Font.SIMPLE_ENCODING_LATIN = "Latin"; +Font.SIMPLE_ENCODING_GREEK = "Greek"; +Font.SIMPLE_ENCODING_CYRILLIC = "Cyrillic"; +Font.ADOBE_CNS = 0; +Font.ADOBE_GB = 1; +Font.ADOBE_JAPAN = 2; +Font.ADOBE_KOREA = 3; +Font.CJK_ORDERING_BY_LANG = { + "Adobe-CNS1": 0, + "Adobe-GB1": 1, + "Adobe-Japan1": 2, + "Adobe-Korea1": 3, + "zh-Hant": 0, + "zh-TW": 0, + "zh-HK": 0, + "zh-Hans": 1, + "zh-CN": 1, + "ja": 2, + "ko": 3, +}; +export class Image extends Userdata { + constructor(data, mask) { + let pointer = 0; + if (typeof data === "number") { + pointer = libmupdf._wasm_keep_image(data); + } + else if (data instanceof Pixmap) { + pointer = libmupdf._wasm_new_image_from_pixmap(data.pointer, mask ? mask.pointer : 0); + } + else { + if (typeof data === "string") { + if (node_fs) + data = node_fs.readFileSync(data); + else + throw new Error("missing 'fs' module"); + } + pointer = libmupdf._wasm_new_image_from_buffer(BUFFER(data)); + } + super(pointer); + } + getWidth() { + return libmupdf._wasm_image_get_w(this.pointer); + } + getHeight() { + return libmupdf._wasm_image_get_h(this.pointer); + } + getNumberOfComponents() { + return libmupdf._wasm_image_get_n(this.pointer); + } + getBitsPerComponent() { + return libmupdf._wasm_image_get_bpc(this.pointer); + } + getXResolution() { + return libmupdf._wasm_image_get_xres(this.pointer); + } + getYResolution() { + return libmupdf._wasm_image_get_yres(this.pointer); + } + getImageMask() { + return !!libmupdf._wasm_image_get_imagemask(this.pointer); + } + getColorSpace() { + let cs = libmupdf._wasm_image_get_colorspace(this.pointer); + if (cs) + return new ColorSpace(libmupdf._wasm_keep_colorspace(cs)); + return null; + } + getMask() { + let mask = libmupdf._wasm_image_get_mask(this.pointer); + if (mask) + return new Image(libmupdf._wasm_keep_image(mask)); + return null; + } + toPixmap() { + return new Pixmap(libmupdf._wasm_get_pixmap_from_image(this.pointer)); + } +} +Image._drop = libmupdf._wasm_drop_image; +export class StrokeState extends Userdata { + constructor(data) { + if (typeof data === "number") { + super(data); + return this; + } + super(libmupdf._wasm_new_stroke_state(data?.dashes?.length ?? 0)); + let lineCap = ENUM(data.lineCap, StrokeState.LINE_CAP); + let lineJoin = ENUM(data.lineJoin, StrokeState.LINE_JOIN); + libmupdf._wasm_stroke_state_set_start_cap(this.pointer, lineCap); + libmupdf._wasm_stroke_state_set_dash_cap(this.pointer, lineCap); + libmupdf._wasm_stroke_state_set_end_cap(this.pointer, lineCap); + libmupdf._wasm_stroke_state_set_linejoin(this.pointer, lineJoin); + libmupdf._wasm_stroke_state_set_linewidth(this.pointer, data.lineWidth); + libmupdf._wasm_stroke_state_set_miterlimit(this.pointer, data.miterLimit); + libmupdf._wasm_stroke_state_set_dash_phase(this.pointer, data.dashPhase ?? 0); + if (data.dashes) { + for (let i = 0; i < data.dashes.length; ++i) + libmupdf._wasm_stroke_state_set_dash_item(this.pointer, i, data.dashes[i] ?? 0); + } + } + getLineCap() { + return libmupdf._wasm_stroke_state_get_start_cap(this.pointer); + } + getLineJoin() { + return libmupdf._wasm_stroke_state_get_linejoin(this.pointer); + } + getLineWidth() { + return libmupdf._wasm_stroke_state_get_linewidth(this.pointer); + } + getMiterLimit() { + return libmupdf._wasm_stroke_state_get_miterlimit(this.pointer); + } + getDashPhase() { + return libmupdf._wasm_stroke_state_get_dash_phase(this.pointer); + } + getDashes() { + var n = libmupdf._wasm_stroke_state_get_dash_len(this.pointer); + if (n > 0) { + var out = []; + for (let i = 0; i < n; ++i) + out[i] = libmupdf._wasm_stroke_state_get_dash_item(this.pointer, i); + return out; + } + return null; + } +} +StrokeState._drop = libmupdf._wasm_drop_stroke_state; +StrokeState.LINE_CAP = [ + "Butt", + "Round", + "Square", + "Triangle" +]; +StrokeState.LINE_JOIN = [ + "Miter", + "Round", + "Bevel", + "MiterXPS" +]; +export class Path extends Userdata { + constructor(pointer) { + if (typeof pointer === "number") + super(pointer); + else + super(libmupdf._wasm_new_path()); + } + getBounds(strokeState, transform) { + if (strokeState !== null) + checkType(strokeState, StrokeState); + checkMatrix(transform); + return fromRect(libmupdf._wasm_bound_path(this.pointer, strokeState?.pointer, MATRIX(transform))); + } + moveTo(x, y) { + checkType(x, "number"); + checkType(y, "number"); + libmupdf._wasm_moveto(this.pointer, x, y); + } + lineTo(x, y) { + checkType(x, "number"); + checkType(y, "number"); + libmupdf._wasm_lineto(this.pointer, x, y); + } + curveTo(x1, y1, x2, y2, x3, y3) { + checkType(x1, "number"); + checkType(y1, "number"); + checkType(x2, "number"); + checkType(y2, "number"); + checkType(x3, "number"); + checkType(y3, "number"); + libmupdf._wasm_curveto(this.pointer, x1, y1, x2, y2, x3, y3); + } + curveToV(cx, cy, ex, ey) { + checkType(cx, "number"); + checkType(cy, "number"); + checkType(ex, "number"); + checkType(ey, "number"); + libmupdf._wasm_curvetov(this.pointer, cx, cy, ex, ey); + } + curveToY(cx, cy, ex, ey) { + checkType(cx, "number"); + checkType(cy, "number"); + checkType(ex, "number"); + checkType(ey, "number"); + libmupdf._wasm_curvetoy(this.pointer, cx, cy, ex, ey); + } + closePath() { + libmupdf._wasm_closepath(this.pointer); + } + rect(x1, y1, x2, y2) { + checkType(x1, "number"); + checkType(y1, "number"); + checkType(x2, "number"); + checkType(y2, "number"); + libmupdf._wasm_rectto(this.pointer, x1, y1, x2, y2); + } + transform(matrix) { + checkMatrix(matrix); + libmupdf._wasm_transform_path(this.pointer, MATRIX(matrix)); + } + walk(walker) { + let id = $libmupdf_path_id++; + $libmupdf_path_table.set(id, walker); + libmupdf._wasm_walk_path(this.pointer, id); + $libmupdf_path_table.delete(id); + } +} +Path._drop = libmupdf._wasm_drop_path; +export class Text extends Userdata { + constructor(pointer) { + if (typeof pointer === "number") + super(pointer); + else + super(libmupdf._wasm_new_text()); + } + getBounds(strokeState, transform) { + if (strokeState !== null) + checkType(strokeState, StrokeState); + checkMatrix(transform); + return fromRect(libmupdf._wasm_bound_text(this.pointer, strokeState?.pointer, MATRIX(transform))); + } + showGlyph(font, trm, gid, uni, wmode = 0) { + checkType(font, Font); + checkMatrix(trm); + checkType(gid, "number"); + checkType(uni, "number"); + libmupdf._wasm_show_glyph(this.pointer, font.pointer, MATRIX(trm), gid, uni, wmode); + } + showString(font, trm, str, wmode = 0) { + checkType(font, Font); + checkMatrix(trm); + checkType(str, "string"); + return fromMatrix(libmupdf._wasm_show_string(this.pointer, font.pointer, MATRIX(trm), STRING(str), wmode)); + } + walk(walker) { + let id = $libmupdf_text_id++; + $libmupdf_text_table.set(id, walker); + libmupdf._wasm_walk_text(this.pointer, id); + $libmupdf_text_table.delete(id); + } +} +Text._drop = libmupdf._wasm_drop_text; +export class DisplayList extends Userdata { + constructor(arg1) { + let pointer = 0; + if (typeof arg1 === "number") { + pointer = arg1; + } + else { + checkRect(arg1); + pointer = libmupdf._wasm_new_display_list(RECT(arg1)); + } + super(pointer); + } + getBounds() { + return fromRect(libmupdf._wasm_bound_display_list(this.pointer)); + } + toPixmap(matrix, colorspace, alpha = false) { + checkMatrix(matrix); + checkType(colorspace, ColorSpace); + return new Pixmap(libmupdf._wasm_new_pixmap_from_display_list(this.pointer, MATRIX(matrix), colorspace.pointer, alpha)); + } + toStructuredText(options) { + options = ensureOptions(options); + return new StructuredText(libmupdf._wasm_new_stext_page_from_display_list(this.pointer, STRING(options))); + } + run(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_run_display_list(this.pointer, device.pointer, MATRIX(matrix)); + } + search(needle, options) { + return runSearch(libmupdf._wasm_search_display_list, this.pointer, needle, options); + } +} +DisplayList._drop = libmupdf._wasm_drop_display_list; +export class Pixmap extends Userdata { + constructor(arg1, bbox, alpha = false) { + if (typeof arg1 === "number") { + super(arg1); + } + if (arg1 instanceof ColorSpace) { + checkRect(bbox); + super(libmupdf._wasm_new_pixmap_with_bbox(arg1.pointer, RECT(bbox), alpha)); + } + if (arg1 === null) { + checkRect(bbox); + super(libmupdf._wasm_new_pixmap_with_bbox(0, RECT(bbox), alpha)); + } + } + getBounds() { + let x = libmupdf._wasm_pixmap_get_x(this.pointer); + let y = libmupdf._wasm_pixmap_get_y(this.pointer); + let w = libmupdf._wasm_pixmap_get_w(this.pointer); + let h = libmupdf._wasm_pixmap_get_h(this.pointer); + return [x, y, x + w, y + h]; + } + clear(value) { + if (typeof value === "undefined") + libmupdf._wasm_clear_pixmap(this.pointer); + else + libmupdf._wasm_clear_pixmap_with_value(this.pointer, value); + } + getWidth() { + return libmupdf._wasm_pixmap_get_w(this.pointer); + } + getHeight() { + return libmupdf._wasm_pixmap_get_h(this.pointer); + } + getX() { + return libmupdf._wasm_pixmap_get_x(this.pointer); + } + getY() { + return libmupdf._wasm_pixmap_get_y(this.pointer); + } + getStride() { + return libmupdf._wasm_pixmap_get_stride(this.pointer); + } + getNumberOfComponents() { + return libmupdf._wasm_pixmap_get_n(this.pointer); + } + getAlpha() { + return libmupdf._wasm_pixmap_get_alpha(this.pointer); + } + getXResolution() { + return libmupdf._wasm_pixmap_get_xres(this.pointer); + } + getYResolution() { + return libmupdf._wasm_pixmap_get_yres(this.pointer); + } + setResolution(x, y) { + libmupdf._wasm_pixmap_set_xres(this.pointer, x); + libmupdf._wasm_pixmap_set_yres(this.pointer, y); + } + getColorSpace() { + let cs = libmupdf._wasm_pixmap_get_colorspace(this.pointer); + if (cs) + return new ColorSpace(libmupdf._wasm_keep_colorspace(cs)); + return null; + } + getPixels() { + let s = libmupdf._wasm_pixmap_get_stride(this.pointer); + let h = libmupdf._wasm_pixmap_get_h(this.pointer); + let p = libmupdf._wasm_pixmap_get_samples(this.pointer); + return new Uint8ClampedArray(libmupdf.HEAPU8.buffer, p, s * h); + } + asPNG() { + let buf = libmupdf._wasm_new_buffer_from_pixmap_as_png(this.pointer); + try { + return fromBuffer(buf); + } + finally { + libmupdf._wasm_drop_buffer(buf); + } + } + asPSD() { + let buf = libmupdf._wasm_new_buffer_from_pixmap_as_psd(this.pointer); + try { + return fromBuffer(buf); + } + finally { + libmupdf._wasm_drop_buffer(buf); + } + } + asPAM() { + let buf = libmupdf._wasm_new_buffer_from_pixmap_as_pam(this.pointer); + try { + return fromBuffer(buf); + } + finally { + libmupdf._wasm_drop_buffer(buf); + } + } + asJPEG(quality, invert_cmyk = false) { + let buf = libmupdf._wasm_new_buffer_from_pixmap_as_jpeg(this.pointer, quality, invert_cmyk); + try { + return fromBuffer(buf); + } + finally { + libmupdf._wasm_drop_buffer(buf); + } + } + invert() { + libmupdf._wasm_invert_pixmap(this.pointer); + } + invertLuminance() { + libmupdf._wasm_invert_pixmap_luminance(this.pointer); + } + gamma(p) { + libmupdf._wasm_gamma_pixmap(this.pointer, p); + } + tint(black, white) { + let black_hex = 0x000000; + let white_hex = 0xffffff; + if (typeof black === "number") + black_hex = black; + else if (black instanceof Array && black.length === 3) + black_hex = (((black[0] * 255) << 16) | ((black[1] * 255) << 8) | ((black[2] * 255))); + if (typeof white === "number") + white_hex = white; + else if (white instanceof Array && white.length === 3) + white = (((white[0] * 255) << 16) | ((white[1] * 255) << 8) | ((white[2] * 255))); + libmupdf._wasm_tint_pixmap(this.pointer, black_hex, white_hex); + } + convertToColorSpace(colorspace, keepAlpha = false) { + checkType(colorspace, ColorSpace); + checkType(keepAlpha, "boolean"); + return new Pixmap(libmupdf._wasm_convert_pixmap(this.pointer, colorspace.pointer, keepAlpha)); + } + warp(points, width, height) { + let quad = points.flat(); + checkQuad(quad); + checkType(width, "number"); + checkType(height, "number"); + return new Pixmap(libmupdf._wasm_warp_pixmap(this.pointer, QUAD(quad), width, height)); + } +} +Pixmap._drop = libmupdf._wasm_drop_pixmap; +export class Shade extends Userdata { + getBounds() { + return fromRect(libmupdf._wasm_bound_shade(this.pointer)); + } +} +Shade._drop = libmupdf._wasm_drop_shade; +export class StructuredText extends Userdata { + walk(walker) { + let block = libmupdf._wasm_stext_page_get_first_block(this.pointer); + while (block) { + let block_type = libmupdf._wasm_stext_block_get_type(block); + let block_bbox = fromRect(libmupdf._wasm_stext_block_get_bbox(block)); + if (block_type === 0) { + if (walker.beginTextBlock) + walker.beginTextBlock(block_bbox); + let line = libmupdf._wasm_stext_block_get_first_line(block); + while (line) { + let line_bbox = fromRect(libmupdf._wasm_stext_line_get_bbox(line)); + let line_wmode = libmupdf._wasm_stext_line_get_wmode(line); + let line_dir = fromPoint(libmupdf._wasm_stext_line_get_dir(line)); + if (walker.beginLine) + walker.beginLine(line_bbox, line_wmode, line_dir); + if (walker.onChar) { + let ch = libmupdf._wasm_stext_line_get_first_char(line); + while (ch) { + let ch_rune = String.fromCharCode(libmupdf._wasm_stext_char_get_c(ch)); + let ch_origin = fromPoint(libmupdf._wasm_stext_char_get_origin(ch)); + let ch_font = new Font(libmupdf._wasm_stext_char_get_font(ch)); + let ch_size = libmupdf._wasm_stext_char_get_size(ch); + let ch_quad = fromQuad(libmupdf._wasm_stext_char_get_quad(ch)); + let ch_color = colorFromNumber(libmupdf._wasm_stext_char_get_argb(ch)); + let ch_bidi = libmupdf._wasm_stext_char_get_bidi(ch); + walker.onChar(ch_rune, ch_origin, ch_font, ch_size, ch_quad, ch_color, ch_bidi); + ch = libmupdf._wasm_stext_char_get_next(ch); + } + } + if (walker.endLine) + walker.endLine(); + line = libmupdf._wasm_stext_line_get_next(line); + } + if (walker.endTextBlock) + walker.endTextBlock(); + } + else if (block_type === 1) { + /* image */ + if (walker.onImageBlock) { + let matrix = fromMatrix(libmupdf._wasm_stext_block_get_transform(block)); + let image = new Image(libmupdf._wasm_stext_block_get_image(block)); + walker.onImageBlock(block_bbox, matrix, image); + } + } + else if (block_type === 2) { + /* struct */ + } + else if (block_type === 3) { + /* vector */ + if (walker.onVector) { + let v_flags_word = libmupdf._wasm_stext_block_get_v_flags(block); + let v_flags = { + isStroked: !!(v_flags_word & 1), + isRectangle: !!(v_flags_word & 2), + }; + let v_color = colorFromNumber(libmupdf._wasm_stext_block_get_v_argb(block)); + walker.onVector(block_bbox, v_flags, v_color); + } + } + else if (block_type === 4) { + /* grid */ + } + block = libmupdf._wasm_stext_block_get_next(block); + } + } + asJSON(scale = 1) { + return fromStringFree(libmupdf._wasm_print_stext_page_as_json(this.pointer, scale)); + } + asHTML(id) { + return fromStringFree(libmupdf._wasm_print_stext_page_as_html(this.pointer, id)); + } + asText() { + return fromStringFree(libmupdf._wasm_print_stext_page_as_text(this.pointer)); + } + snap(p, q, mode) { + let mm = ENUM(mode, StructuredText.SELECT_MODE); + return fromQuad(libmupdf._wasm_snap_selection(this.pointer, POINT(p), POINT2(q), mm)); + } + copy(p, q) { + return fromStringFree(libmupdf._wasm_copy_selection(this.pointer, POINT(p), POINT2(q))); + } + highlight(p, q, max_hits = 100) { + let hits = 0; + let result = []; + try { + hits = Malloc(32 * max_hits); + let n = libmupdf._wasm_highlight_selection(this.pointer, POINT(p), POINT2(q), hits, max_hits); + for (let i = 0; i < n; ++i) + result.push(fromQuad(hits + i * 32)); + } + finally { + Free(hits); + } + return result; + } + search(needle, options) { + return runSearch(libmupdf._wasm_search_stext_page, this.pointer, needle, options); + } +} +StructuredText._drop = libmupdf._wasm_drop_stext_page; +StructuredText.SELECT_MODE = [ + "chars", + "words", + "lines" +]; +StructuredText.SELECT_CHARS = "chars"; +StructuredText.SELECT_WORDS = "words"; +StructuredText.SELECT_LINES = "lines"; +export class Device extends Userdata { + constructor(pointer_or_callbacks) { + if (typeof pointer_or_callbacks === "number") + super(pointer_or_callbacks); + else { + let id = $libmupdf_device_id++; + $libmupdf_device_table.set(id, pointer_or_callbacks); + super(libmupdf._wasm_new_js_device(id)); + } + } + fillPath(path, evenOdd, ctm, colorspace, color, alpha) { + checkType(path, Path); + checkMatrix(ctm); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_fill_path(this.pointer, path.pointer, evenOdd, MATRIX(ctm), colorspace.pointer, COLOR(color), alpha); + } + strokePath(path, stroke, ctm, colorspace, color, alpha) { + checkType(path, Path); + checkType(stroke, StrokeState); + checkMatrix(ctm); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_stroke_path(this.pointer, path.pointer, stroke.pointer, MATRIX(ctm), colorspace.pointer, COLOR(color), alpha); + } + clipPath(path, evenOdd, ctm) { + checkType(path, Path); + checkMatrix(ctm); + libmupdf._wasm_clip_path(this.pointer, path.pointer, evenOdd, MATRIX(ctm)); + } + clipStrokePath(path, stroke, ctm) { + checkType(path, Path); + checkType(stroke, StrokeState); + checkMatrix(ctm); + libmupdf._wasm_clip_stroke_path(this.pointer, path.pointer, stroke.pointer, MATRIX(ctm)); + } + fillText(text, ctm, colorspace, color, alpha) { + checkType(text, Text); + checkMatrix(ctm); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_fill_text(this.pointer, text.pointer, MATRIX(ctm), colorspace.pointer, COLOR(color), alpha); + } + strokeText(text, stroke, ctm, colorspace, color, alpha) { + checkType(text, Text); + checkType(stroke, StrokeState); + checkMatrix(ctm); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_stroke_text(this.pointer, text.pointer, stroke.pointer, MATRIX(ctm), colorspace.pointer, COLOR(color), alpha); + } + clipText(text, ctm) { + checkType(text, Text); + checkMatrix(ctm); + libmupdf._wasm_clip_text(this.pointer, text.pointer, MATRIX(ctm)); + } + clipStrokeText(text, stroke, ctm) { + checkType(text, Text); + checkType(stroke, StrokeState); + checkMatrix(ctm); + libmupdf._wasm_clip_stroke_text(this.pointer, text.pointer, stroke.pointer, MATRIX(ctm)); + } + ignoreText(text, ctm) { + checkType(text, Text); + checkMatrix(ctm); + libmupdf._wasm_ignore_text(this.pointer, text.pointer, MATRIX(ctm)); + } + fillShade(shade, ctm, alpha) { + checkType(shade, Shade); + checkMatrix(ctm); + libmupdf._wasm_fill_shade(this.pointer, shade.pointer, MATRIX(ctm), alpha); + } + fillImage(image, ctm, alpha) { + checkType(image, Image); + checkMatrix(ctm); + libmupdf._wasm_fill_image(this.pointer, image.pointer, MATRIX(ctm), alpha); + } + fillImageMask(image, ctm, colorspace, color, alpha) { + checkType(image, Image); + checkMatrix(ctm); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_fill_image_mask(this.pointer, image.pointer, MATRIX(ctm), colorspace.pointer, COLOR(color), alpha); + } + clipImageMask(image, ctm) { + checkType(image, Image); + checkMatrix(ctm); + libmupdf._wasm_clip_image_mask(this.pointer, image.pointer, MATRIX(ctm)); + } + popClip() { + libmupdf._wasm_pop_clip(this.pointer); + } + beginMask(area, luminosity, colorspace, color) { + checkRect(area); + checkType(colorspace, ColorSpace); + checkColor(color); + libmupdf._wasm_begin_mask(this.pointer, RECT(area), luminosity, colorspace.pointer, COLOR(color)); + } + endMask() { + libmupdf._wasm_end_mask(this.pointer); + } + beginGroup(area, colorspace, isolated, knockout, blendmode, alpha) { + checkRect(area); + checkType(colorspace, ColorSpace); + let blendmode_ix = ENUM(blendmode, Device.BLEND_MODES); + libmupdf._wasm_begin_group(this.pointer, RECT(area), colorspace.pointer, isolated, knockout, blendmode_ix, alpha); + } + endGroup() { + libmupdf._wasm_end_group(this.pointer); + } + beginTile(area, view, xstep, ystep, ctm, id, doc_id) { + checkRect(area); + checkRect(view); + checkMatrix(ctm); + return libmupdf._wasm_begin_tile(this.pointer, RECT(area), RECT2(view), xstep, ystep, MATRIX(ctm), id, doc_id); + } + endTile() { + libmupdf._wasm_end_tile(this.pointer); + } + beginLayer(name) { + libmupdf._wasm_begin_layer(this.pointer, STRING(name)); + } + endLayer() { + libmupdf._wasm_end_layer(this.pointer); + } + close() { + libmupdf._wasm_close_device(this.pointer); + } +} +Device._drop = libmupdf._wasm_drop_device; +Device.BLEND_MODES = [ + "Normal", + "Multiply", + "Screen", + "Overlay", + "Darken", + "Lighten", + "ColorDodge", + "ColorBurn", + "HardLight", + "SoftLight", + "Difference", + "Exclusion", + "Hue", + "Saturation", + "Color", + "Luminosity", +]; +Device.BLEND_NORMAL = "Normal"; +Device.BLEND_MULTIPLY = "Multiply"; +Device.BLEND_SCREEN = "Screen"; +Device.BLEND_OVERLAY = "Overlay"; +Device.BLEND_DARKEN = "Darken"; +Device.BLEND_LIGHTEN = "Lighten"; +Device.BLEND_COLOR_DODGE = "ColorDodge"; +Device.BLEND_COLOR_BURN = "ColorBurn"; +Device.BLEND_HARD_LIGHT = "HardLight"; +Device.BLEND_SOFT_LIGHT = "SoftLight"; +Device.BLEND_DIFFERENCE = "Difference"; +Device.BLEND_EXCLUSION = "Exclusion"; +Device.BLEND_HUE = "Hue"; +Device.BLEND_SATURATION = "Saturation"; +Device.BLEND_COLOR = "Color"; +Device.BLEND_LUMINOSITY = "Luminosity"; +export class DrawDevice extends Device { + constructor(matrix, pixmap) { + checkMatrix(matrix); + checkType(pixmap, Pixmap); + super(libmupdf._wasm_new_draw_device(MATRIX(matrix), pixmap.pointer)); + } +} +export class DisplayListDevice extends Device { + constructor(displayList) { + checkType(displayList, DisplayList); + super(libmupdf._wasm_new_display_list_device(displayList.pointer)); + } +} +export class DocumentWriter extends Userdata { + constructor(buffer, format, options) { + options = ensureOptions(options); + super(libmupdf._wasm_new_document_writer_with_buffer(BUFFER(buffer), STRING(format), STRING2(options))); + } + beginPage(mediabox) { + checkRect(mediabox); + return new Device(libmupdf._wasm_keep_device(libmupdf._wasm_begin_page(this.pointer, RECT(mediabox)))); + } + endPage() { + libmupdf._wasm_end_page(this.pointer); + } + close() { + libmupdf._wasm_close_document_writer(this.pointer); + } +} +DocumentWriter._drop = libmupdf._wasm_drop_document_writer; +export class LinkDestination { + constructor(chapter = 0, page = 0, type = "Fit", x = NaN, y = NaN, width = NaN, height = NaN, zoom = NaN) { + this.chapter = chapter; + this.page = page; + this.type = type; + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.zoom = zoom; + } +} +LinkDestination.LINK_DEST = [ + "Fit", + "FitB", + "FitH", + "FitBH", + "FitV", + "FitBV", + "FitR", + "XYZ", +]; +LinkDestination.FIT = "Fit"; +LinkDestination.FIT_B = "FitB"; +LinkDestination.FIT_H = "FitH"; +LinkDestination.FIT_BH = "FitBH"; +LinkDestination.FIT_V = "FitV"; +LinkDestination.FIT_BV = "FitBV"; +LinkDestination.FIT_R = "FitR"; +LinkDestination.XYZ = "XYZ"; +export class Document extends Userdata { + static openDocument(from, magic) { + let pointer = 0; + let free_from = false; + if (typeof from === "string") { + magic = from; + if (node_fs) + from = node_fs.readFileSync(from); + else + throw new Error("missing 'fs' module"); + } + else { + if (typeof magic === "undefined") + magic = "application/pdf"; + } + checkType(magic, "string"); + if (from instanceof ArrayBuffer || from instanceof Uint8Array) { + from = new Buffer(from); + free_from = true; + } + if (from instanceof Buffer) + pointer = libmupdf._wasm_open_document_with_buffer(STRING(magic), from.pointer); + else if (from instanceof Stream) + pointer = libmupdf._wasm_open_document_with_stream(STRING(magic), from.pointer); + else + throw new Error("not a Buffer or Stream"); + if (free_from) { + // Destroy any implicit Buffer instances immediately! + // This may help the GC and FinalizationRegistry out when + // processing many documents without a pause. + from.destroy(); + } + let pdf = libmupdf._wasm_pdf_document_from_fz_document(pointer); + if (pdf) + return new PDFDocument(pdf); + return new Document(pointer); + } + formatLinkURI(dest) { + return fromStringFree(libmupdf._wasm_format_link_uri(this.pointer, dest.chapter | 0, dest.page | 0, ENUM(dest.type, LinkDestination.LINK_DEST), +dest.x, +dest.y, +dest.width, +dest.height, +dest.zoom)); + } + asPDF() { + if (this instanceof PDFDocument) + return this; + return null; + } + isPDF() { + return this instanceof PDFDocument; + } + needsPassword() { + return !!libmupdf._wasm_needs_password(this.pointer); + } + authenticatePassword(password) { + return libmupdf._wasm_authenticate_password(this.pointer, STRING(password)); + } + hasPermission(perm) { + let perm_ix = (typeof perm === "number") ? perm : Document.PERMISSION[perm]; + return !!libmupdf._wasm_has_permission(this.pointer, perm_ix); + } + getMetaData(key) { + let value = libmupdf._wasm_lookup_metadata(this.pointer, STRING(key)); + if (value) + return fromString(value); + return undefined; + } + setMetaData(key, value) { + libmupdf._wasm_set_metadata(this.pointer, STRING(key), STRING2(value)); + } + countPages() { + return libmupdf._wasm_count_pages(this.pointer); + } + isReflowable() { + libmupdf._wasm_is_document_reflowable(this.pointer); + } + style(publisherCSS, userCSS) { + checkType(publisherCSS, "boolean"); + checkType(userCSS, "string"); + libmupdf._wasm_style_document(this.pointer, publisherCSS, STRING(userCSS)); + } + layout(w, h, em) { + libmupdf._wasm_layout_document(this.pointer, w, h, em); + } + loadPage(index) { + let fz_ptr = libmupdf._wasm_load_page(this.pointer, index); + if (this instanceof PDFDocument) { + let pdf_ptr = libmupdf._wasm_pdf_page_from_fz_page(fz_ptr); + if (pdf_ptr) + return new PDFPage(this, pdf_ptr); + } + return new Page(fz_ptr); + } + loadOutline() { + let doc = this.pointer; + function to_outline(outline) { + let result = []; + while (outline) { + let title = libmupdf._wasm_outline_get_title(outline); + let uri = libmupdf._wasm_outline_get_uri(outline); + let open = libmupdf._wasm_outline_get_is_open(outline); + let item = { + title: title ? fromString(title) : undefined, + uri: uri ? fromString(uri) : undefined, + open: !!open, + }; + let page = libmupdf._wasm_outline_get_page(doc, outline); + if (page >= 0) + item.page = page; + let down = libmupdf._wasm_outline_get_down(outline); + if (down) + item.down = to_outline(down); + result.push(item); + outline = libmupdf._wasm_outline_get_next(outline); + } + return result; + } + let root = libmupdf._wasm_load_outline(doc); + if (root) + return to_outline(root); + return null; + } + resolveLink(link) { + if (link instanceof Link) + return libmupdf._wasm_resolve_link(this.pointer, libmupdf._wasm_link_get_uri(link.pointer)); + return libmupdf._wasm_resolve_link(this.pointer, STRING(link)); + } + resolveLinkDestination(link) { + let dest; + if (link instanceof Link) + dest = libmupdf._wasm_resolve_link_dest(this.pointer, libmupdf._wasm_link_get_uri(link.pointer)); + else + dest = libmupdf._wasm_resolve_link_dest(this.pointer, STRING(link)); + return { + type: LinkDestination.LINK_DEST[libmupdf._wasm_link_dest_get_type(dest)], + chapter: libmupdf._wasm_link_dest_get_chapter(dest), + page: libmupdf._wasm_link_dest_get_page(dest), + x: libmupdf._wasm_link_dest_get_x(dest), + y: libmupdf._wasm_link_dest_get_y(dest), + width: libmupdf._wasm_link_dest_get_w(dest), + height: libmupdf._wasm_link_dest_get_h(dest), + zoom: libmupdf._wasm_link_dest_get_zoom(dest), + }; + } + outlineIterator() { + return new OutlineIterator(libmupdf._wasm_new_outline_iterator(this.pointer)); + } +} +Document._drop = libmupdf._wasm_drop_document; +Document.META_FORMAT = "format"; +Document.META_ENCRYPTION = "encryption"; +Document.META_INFO_AUTHOR = "info:Author"; +Document.META_INFO_TITLE = "info:Title"; +Document.META_INFO_SUBJECT = "info:Subject"; +Document.META_INFO_KEYWORDS = "info:Keywords"; +Document.META_INFO_CREATOR = "info:Creator"; +Document.META_INFO_PRODUCER = "info:Producer"; +Document.META_INFO_CREATIONDATE = "info:CreationDate"; +Document.META_INFO_MODIFICATIONDATE = "info:ModDate"; +Document.PERMISSION_PRINT = "print"; +Document.PERMISSION_COPY = "copy"; +Document.PERMISSION_EDIT = "eedit"; +Document.PERMISSION_ANNOTATE = "annotate"; +Document.PERMISSION_FORM = "form"; +Document.PERMISSION_ACCESSIBILITY = "accessibility"; +Document.PERMISSION_ASSEMBLE = "assemble"; +Document.PERMISSION_PRINT_HQ = "print-hq"; +Document.PERMISSION = { + "print": "p".charCodeAt(0), + "copy": "c".charCodeAt(0), + "edit": "e".charCodeAt(0), + "annotate": "n".charCodeAt(0), + "form": "f".charCodeAt(0), + "accessibility": "y".charCodeAt(0), + "assemble": "a".charCodeAt(0), + "print-hq": "h".charCodeAt(0), +}; +export class OutlineIterator extends Userdata { + item() { + let item = libmupdf._wasm_outline_iterator_item(this.pointer); + if (item) { + let title_ptr = libmupdf._wasm_outline_item_get_title(item); + let uri_ptr = libmupdf._wasm_outline_item_get_uri(item); + let is_open = libmupdf._wasm_outline_item_get_is_open(item); + return { + title: title_ptr ? fromString(title_ptr) : undefined, + uri: uri_ptr ? fromString(uri_ptr) : undefined, + open: !!is_open, + }; + } + return null; + } + next() { + return libmupdf._wasm_outline_iterator_next(this.pointer); + } + prev() { + return libmupdf._wasm_outline_iterator_prev(this.pointer); + } + up() { + return libmupdf._wasm_outline_iterator_up(this.pointer); + } + down() { + return libmupdf._wasm_outline_iterator_down(this.pointer); + } + delete() { + return libmupdf._wasm_outline_iterator_delete(this.pointer); + } + insert(item) { + return libmupdf._wasm_outline_iterator_insert(this.pointer, STRING_OPT(item.title), STRING2_OPT(item.uri), item.open); + } + update(item) { + libmupdf._wasm_outline_iterator_update(this.pointer, STRING_OPT(item.title), STRING2_OPT(item.uri), item.open); + } +} +OutlineIterator._drop = libmupdf._wasm_drop_outline_iterator; +OutlineIterator.ITERATOR_DID_NOT_MOVE = -1; +OutlineIterator.ITERATOR_AT_ITEM = 0; +OutlineIterator.ITERATOR_AT_EMPTY = 1; +OutlineIterator.FLAG_BOLD = 1; +OutlineIterator.FLAG_ITALIC = 2; +export class Link extends Userdata { + getBounds() { + return fromRect(libmupdf._wasm_link_get_rect(this.pointer)); + } + setBounds(rect) { + checkRect(rect); + libmupdf._wasm_link_set_rect(this.pointer, RECT(rect)); + } + getURI() { + return fromString(libmupdf._wasm_link_get_uri(this.pointer)); + } + setURI(uri) { + checkType(uri, "string"); + libmupdf._wasm_link_set_uri(this.pointer, STRING(uri)); + } + isExternal() { + return /^\w[\w+-.]*:/.test(this.getURI()); + } +} +Link._drop = libmupdf._wasm_drop_link; +export class Page extends Userdata { + isPDF() { + return this instanceof PDFPage; + } + getBounds(box = "CropBox") { + let box_ix = ENUM(box, Page.BOXES); + return fromRect(libmupdf._wasm_bound_page(this.pointer, box_ix)); + } + getLabel() { + return fromString(libmupdf._wasm_page_label(this.pointer)); + } + run(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_run_page(this.pointer, device.pointer, MATRIX(matrix)); + } + runPageContents(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_run_page_contents(this.pointer, device.pointer, MATRIX(matrix)); + } + runPageAnnots(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_run_page_annots(this.pointer, device.pointer, MATRIX(matrix)); + } + runPageWidgets(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_run_page_widgets(this.pointer, device.pointer, MATRIX(matrix)); + } + toPixmap(matrix, colorspace, alpha = false, showExtras = true) { + checkType(colorspace, ColorSpace); + checkMatrix(matrix); + let result; + if (showExtras) + result = libmupdf._wasm_new_pixmap_from_page(this.pointer, MATRIX(matrix), colorspace.pointer, alpha); + else + result = libmupdf._wasm_new_pixmap_from_page_contents(this.pointer, MATRIX(matrix), colorspace.pointer, alpha); + return new Pixmap(result); + } + toDisplayList(showExtras = true) { + let result; + if (showExtras) + result = libmupdf._wasm_new_display_list_from_page(this.pointer); + else + result = libmupdf._wasm_new_display_list_from_page_contents(this.pointer); + return new DisplayList(result); + } + toStructuredText(options) { + options = ensureOptions(options); + return new StructuredText(libmupdf._wasm_new_stext_page_from_page(this.pointer, STRING(options))); + } + getLinks() { + let links = []; + let link = libmupdf._wasm_load_links(this.pointer); + while (link) { + links.push(new Link(libmupdf._wasm_keep_link(link))); + link = libmupdf._wasm_link_get_next(link); + } + return links; + } + createLink(bbox, uri) { + checkRect(bbox); + return new Link(libmupdf._wasm_create_link(this.pointer, RECT(bbox), STRING(uri))); + } + deleteLink(link) { + checkType(link, Link); + libmupdf._wasm_delete_link(this.pointer, link.pointer); + } + search(needle, options) { + return runSearch(libmupdf._wasm_search_page, this.pointer, needle, options); + } +} +Page._drop = libmupdf._wasm_drop_page; +Page.BOXES = [ + "MediaBox", + "CropBox", + "BleedBox", + "TrimBox", + "ArtBox" +]; +Page.MEDIA_BOX = "MediaBox"; +Page.CROP_BOX = "CropBox"; +Page.BLEED_BOX = "BleedBox"; +Page.TRIM_BOX = "TrimBox"; +Page.ART_BOX = "ArtBox"; +/* -------------------------------------------------------------------------- */ +export class PDFDocument extends Document { + constructor(arg1) { + if (typeof arg1 === "undefined") + super(libmupdf._wasm_pdf_create_document()); + else if (typeof arg1 === "number") + super(arg1); + else if (arg1 instanceof PDFDocument) { + super(arg1.pointer); + libmupdf._wasm_keep_document(this.pointer); + } + else { + let doc = Document.openDocument(arg1, "application/pdf"); + if (doc instanceof PDFDocument) + return doc; + throw new Error("not a PDF document"); + } + } + loadPage(index) { + return super.loadPage(index); + } + // PDFObject instances are always bound to a document, so the WASM/JS value interface lives here. + // Wrap a pdf_obj in a Userdata object. The pointer must be newly created or we already own it. + _fromPDFObjectNew(ptr) { + if (ptr === 0) + return PDFObject.Null; + return new PDFObject(this, ptr); + } + // Wrap a pdf_obj in a Userdata object. The pointer must be a borrowed pointer, so we have to take ownership. + _fromPDFObjectKeep(ptr) { + if (ptr === 0) + return PDFObject.Null; + return new PDFObject(this, libmupdf._wasm_pdf_keep_obj(ptr)); + } + _toPDFObject(obj) { + if (obj instanceof PDFObject) + return obj; + if (obj === null || obj === undefined) + return this.newNull(); + if (typeof obj === "string") { + // if a JS string is surrounded by parens, convert it to a PDF string + if (obj.startsWith("(") && obj.endsWith(")")) + return this.newString(obj.slice(1, -1)); + // otherwise treat it as a name + return this.newName(obj); + } + if (typeof obj === "number") { + if (obj === (obj | 0)) + return this.newInteger(obj); + return this.newReal(obj); + } + if (typeof obj === "boolean") + return this.newBoolean(obj); + if (obj instanceof Array) { + let result = this.newArray(); + for (let item of obj) + result.push(item); + return result; + } + if (obj instanceof Object) { + let result = this.newDictionary(); + for (let key in obj) + result.put(key, obj[key]); + return result; + } + throw new TypeError("cannot convert value to PDFObject"); + } + _PDFOBJ(obj) { + // Note: We have to create a PDFObject instance for garbage collection. + return this._toPDFObject(obj).pointer; + } + getVersion() { + return libmupdf._wasm_pdf_version(this.pointer); + } + getLanguage() { + return fromStringOrNull(libmupdf._wasm_pdf_document_language(this.pointer)); + } + setLanguage(lang) { + libmupdf._wasm_pdf_set_document_language(this.pointer, STRING(lang)); + } + countObjects() { + return libmupdf._wasm_pdf_xref_len(this.pointer); + } + getTrailer() { + return new PDFObject(this, libmupdf._wasm_pdf_trailer(this.pointer)); + } + createObject() { + let num = libmupdf._wasm_pdf_create_object(this.pointer); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_indirect(this.pointer, num)); + } + newNull() { return PDFObject.Null; } + newBoolean(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_bool(v)); } + newInteger(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_int(v)); } + newReal(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_real(v)); } + newName(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_name(STRING(v))); } + newString(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_text_string(STRING(v))); } + newByteString(v) { + if (v instanceof Array) + v = Uint8Array.from(v); + checkType(v, Uint8Array); + let len = v.byteLength; + let ptr = Malloc(len); + libmupdf.HEAPU8.set(v, ptr); + try { + return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_string(ptr, len)); + } + finally { + Free(ptr); + } + } + newIndirect(v) { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_indirect(this.pointer, v)); } + newArray() { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_array(this.pointer)); } + newDictionary() { return this._fromPDFObjectNew(libmupdf._wasm_pdf_new_dict(this.pointer)); } + deleteObject(num) { + if (num instanceof PDFObject) + num = num.asIndirect(); + else + checkType(num, "number"); + libmupdf._wasm_pdf_delete_object(this.pointer, num); + } + addObject(obj) { + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_object(this.pointer, this._PDFOBJ(obj))); + } + addStream(buf, obj) { + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_stream(this.pointer, BUFFER(buf), this._PDFOBJ(obj), 0)); + } + addRawStream(buf, obj) { + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_stream(this.pointer, BUFFER(buf), this._PDFOBJ(obj), 1)); + } + newGraftMap() { + return new PDFGraftMap(this, libmupdf._wasm_pdf_new_graft_map(this.pointer)); + } + graftObject(obj) { + checkType(obj, PDFObject); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_graft_object(this.pointer, obj.pointer)); + } + graftPage(to, srcDoc, srcPage) { + checkType(to, "number"); + checkType(srcDoc, PDFDocument); + checkType(srcPage, "number"); + libmupdf._wasm_pdf_graft_page(this.pointer, to, srcDoc.pointer, srcPage); + } + addSimpleFont(font, encoding = "Latin") { + checkType(font, Font); + var encoding_ix = ENUM(encoding, Font.SIMPLE_ENCODING); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_simple_font(this.pointer, font.pointer, encoding_ix)); + } + addCJKFont(font, lang, wmode = 0, serif = true) { + checkType(font, Font); + if (typeof lang === "string") + lang = Font.CJK_ORDERING_BY_LANG[lang]; + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_cjk_font(this.pointer, font.pointer, lang, wmode, serif)); + } + addFont(font) { + checkType(font, Font); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_cid_font(this.pointer, font.pointer)); + } + addImage(image) { + checkType(image, Image); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_image(this.pointer, image.pointer)); + } + loadImage(ref) { + checkType(ref, PDFObject); + return new Image(libmupdf._wasm_pdf_load_image(this.pointer, ref.pointer)); + } + findPage(index) { + checkType(index, "number"); + return this._fromPDFObjectKeep(libmupdf._wasm_pdf_lookup_page_obj(this.pointer, index)); + } + setPageTreeCache(enabled) { + checkType(enabled, "boolean"); + libmupdf._wasm_pdf_set_page_tree_cache(this.pointer, enabled); + } + addPage(mediabox, rotate, resources, contents) { + checkRect(mediabox); + checkType(rotate, "number"); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_page(this.pointer, RECT(mediabox), rotate, this._PDFOBJ(resources), BUFFER(contents))); + } + insertPage(at, obj) { + checkType(at, "number"); + libmupdf._wasm_pdf_insert_page(this.pointer, at, this._PDFOBJ(obj)); + } + deletePage(at) { + checkType(at, "number"); + libmupdf._wasm_pdf_delete_page(this.pointer, at); + } + isEmbeddedFile(ref) { + checkType(ref, PDFObject); + return !!libmupdf._wasm_pdf_is_embedded_file(ref.pointer); + } + addEmbeddedFile(filename, mimetype, contents, created, modified, checksum = false) { + checkType(filename, "string"); + checkType(mimetype, "string"); + checkType(created, Date); + checkType(modified, Date); + checkType(checksum, "boolean"); + return this._fromPDFObjectNew(libmupdf._wasm_pdf_add_embedded_file(this.pointer, STRING(filename), STRING2(mimetype), BUFFER(contents), created.getTime() / 1000 | 0, modified.getTime() / 1000 | 0, checksum)); + } + getFilespecParams(ref) { + checkType(ref, PDFObject); + let ptr = libmupdf._wasm_pdf_get_filespec_params(ref.pointer); + return { + filename: fromString(libmupdf._wasm_pdf_filespec_params_get_filename(ptr)), + mimetype: fromString(libmupdf._wasm_pdf_filespec_params_get_mimetype(ptr)), + size: libmupdf._wasm_pdf_filespec_params_get_filename(ptr), + creationDate: new Date(libmupdf._wasm_pdf_filespec_params_get_created(ptr) * 1000), + modificationDate: new Date(libmupdf._wasm_pdf_filespec_params_get_modified(ptr) * 1000), + }; + } + getEmbeddedFileContents(ref) { + checkType(ref, PDFObject); + let contents = libmupdf._wasm_pdf_load_embedded_file_contents(ref.pointer); + if (contents) + return new Buffer(contents); + return null; + } + getEmbeddedFiles() { + function _getEmbeddedFilesRec(result, N) { + var i, n; + if (N.isDictionary()) { + var NN = N.get("Names"); + if (NN) + for (i = 0, n = NN.length; i < n; i += 2) + result[NN.get(i + 0).asString()] = NN.get(i + 1); + var NK = N.get("Kids"); + if (NK) + for (i = 0, n = NK.length; i < n; i += 1) + _getEmbeddedFilesRec(result, NK.get(i)); + } + return result; + } + return _getEmbeddedFilesRec({}, this.getTrailer().get("Root", "Names", "EmbeddedFiles")); + } + loadNameTree(treeName) { + function _loadNameTreeRec(dict, node) { + var kids = node.get("Kids"); + if (kids && kids.isArray()) + for (var i = 0; i < kids.length; i += 1) + _loadNameTreeRec(dict, kids.get(i)); + var names = node.get("Names"); + if (names && names.isArray()) + for (var i = 0; i < names.length; i += 2) + dict[names.get(i).asString()] = names.get(i + 1); + } + var node = this.getTrailer().get("Root").get("Names").get(treeName); + var dict = {}; + if (node.isDictionary()) + _loadNameTreeRec(dict, node); + return dict; + } + insertEmbeddedFile(filename, filespec) { + var efs = this.getEmbeddedFiles(); + efs[filename] = filespec; + this._rewriteEmbeddedFiles(efs); + } + deleteEmbeddedFile(filename) { + var efs = this.getEmbeddedFiles(); + delete efs[filename]; + this._rewriteEmbeddedFiles(efs); + } + _rewriteEmbeddedFiles(efs) { + var efs_keys = Object.keys(efs); + efs_keys.sort(); + var root = this.getTrailer().get("Root"); + var root_names = root.get("Names"); + if (!root_names.isDictionary()) + root_names = root.put("Names", this.newDictionary()); + var root_names_efs = root_names.put("EmbeddedFiles", this.newDictionary()); + var root_names_efs_names = root_names_efs.put("Names", this.newArray()); + for (var key of efs_keys) { + root_names_efs_names.push(this.newString(key)); + root_names_efs_names.push(efs[key]); + } + } + saveToBuffer(options) { + options = ensureOptions(options); + return new Buffer(libmupdf._wasm_pdf_write_document_buffer(this.pointer, STRING(options))); + } + save(filename, options) { + if (node_fs) + node_fs.writeFileSync(filename, this.saveToBuffer(options).asUint8Array()); + else + throw new Error("missing 'fs' module"); + } + setPageLabels(index, style = "D", prefix = "", start = 1) { + libmupdf._wasm_pdf_set_page_labels(this.pointer, index, style.charCodeAt(0), STRING(prefix), start); + } + deletePageLabels(index) { + libmupdf._wasm_pdf_delete_page_labels(this.pointer, index); + } + wasRepaired() { + return !!libmupdf._wasm_pdf_was_repaired(this.pointer); + } + hasUnsavedChanges() { + return !!libmupdf._wasm_pdf_has_unsaved_changes(this.pointer); + } + countVersions() { + return libmupdf._wasm_pdf_count_versions(this.pointer); + } + countUnsavedVersions() { + return libmupdf._wasm_pdf_count_unsaved_versions(this.pointer); + } + validateChangeHistory() { + return libmupdf._wasm_pdf_validate_change_history(this.pointer); + } + canBeSavedIncrementally() { + return !!libmupdf._wasm_pdf_can_be_saved_incrementally(this.pointer); + } + enableJournal() { + libmupdf._wasm_pdf_enable_journal(this.pointer); + } + getJournal() { + let position = libmupdf._wasm_pdf_undoredo_state_position(this.pointer); + let n = libmupdf._wasm_pdf_undoredo_state_count(this.pointer); + let steps = []; + for (let i = 0; i < n; ++i) + steps.push(fromString(libmupdf._wasm_pdf_undoredo_step(this.pointer, i))); + return { position, steps }; + } + beginOperation(op) { + libmupdf._wasm_pdf_begin_operation(this.pointer, STRING(op)); + } + beginImplicitOperation() { + libmupdf._wasm_pdf_begin_implicit_operation(this.pointer); + } + endOperation() { + libmupdf._wasm_pdf_end_operation(this.pointer); + } + abandonOperation() { + libmupdf._wasm_pdf_abandon_operation(this.pointer); + } + canUndo() { + return !!libmupdf._wasm_pdf_can_undo(this.pointer); + } + canRedo() { + return !!libmupdf._wasm_pdf_can_redo(this.pointer); + } + undo() { + libmupdf._wasm_pdf_undo(this.pointer); + } + redo() { + libmupdf._wasm_pdf_redo(this.pointer); + } + isJSSupported() { + return !!libmupdf._wasm_pdf_js_supported(this.pointer); + } + enableJS() { + libmupdf._wasm_pdf_enable_js(this.pointer); + } + disableJS() { + libmupdf._wasm_pdf_disable_js(this.pointer); + } + setJSEventListener(_listener) { + throw "TODO"; + } + rearrangePages(pages) { + let n = pages.length; + let ptr = Malloc(n << 2); + for (let i = 0; i < n; ++i) + libmupdf.HEAPU32[(ptr >> 2) + i] = pages[i] || 0; + try { + libmupdf._wasm_pdf_rearrange_pages(this.pointer, n, ptr); + } + finally { + Free(ptr); + } + } + subsetFonts() { + libmupdf._wasm_pdf_subset_fonts(this.pointer); + } + bake(bakeAnnots = true, bakeWidgets = true) { + libmupdf._wasm_pdf_bake_document(this.pointer, bakeAnnots, bakeWidgets); + } + countLayerConfigs() { + return libmupdf._wasm_pdf_count_layer_configs(this.pointer); + } + getLayerConfigCreator(config) { + return fromString(libmupdf._wasm_pdf_layer_config_creator(this.pointer, config)); + } + getLayerConfigName(config) { + return fromString(libmupdf._wasm_pdf_layer_config_name(this.pointer, config)); + } + selectLayerConfig(config) { + libmupdf._wasm_pdf_select_layer_config(this.pointer, config); + } + countLayerConfigUIs() { + return libmupdf._wasm_pdf_count_layer_config_uis(this.pointer); + } + getLayerConfigUIInfo(configui) { + return fromLayerConfigUIInfo(libmupdf._wasm_pdf_layer_config_ui_info(this.pointer, configui)); + } + countLayers() { + return libmupdf._wasm_pdf_count_layers(this.pointer); + } + isLayerVisible(layer) { + return !!libmupdf._wasm_pdf_layer_is_enabled(this.pointer, layer); + } + setLayerVisible(layer, visible) { + libmupdf._wasm_pdf_enable_layer(this.pointer, layer, Number(visible)); + } + getLayerName(layer) { + return fromString(libmupdf._wasm_pdf_layer_name(this.pointer, layer)); + } + resetForm(fields, exclude) { + libmupdf._wasm_pdf_reset_form(this.pointer, this._PDFOBJ(fields), Number(exclude)); + } +} +PDFDocument.PAGE_LABEL_NONE = "\0"; +PDFDocument.PAGE_LABEL_DECIMAL = "D"; +PDFDocument.PAGE_LABEL_ROMAN_UC = "R"; +PDFDocument.PAGE_LABEL_ROMAN_LC = "r"; +PDFDocument.PAGE_LABEL_ALPHA_UC = "A"; +PDFDocument.PAGE_LABEL_ALPHA_LC = "a"; +export class PDFPage extends Page { + // PRIVATE + constructor(doc, pointer) { + super(pointer); + this._doc = doc; + this._annots = null; + this._widgets = null; + } + getObject() { + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_page_get_obj(this.pointer)); + } + getTransform() { + return fromMatrix(libmupdf._wasm_pdf_page_transform(this.pointer)); + } + setPageBox(box, rect) { + let box_ix = ENUM(box, Page.BOXES); + checkRect(rect); + libmupdf._wasm_pdf_set_page_box(this.pointer, box_ix, RECT(rect)); + } + toPixmap(matrix, colorspace, alpha = false, showExtras = true, usage = "View", box = "CropBox") { + checkMatrix(matrix); + checkType(colorspace, ColorSpace); + let box_ix = ENUM(box, Page.BOXES); + let result; + if (showExtras) + result = libmupdf._wasm_pdf_new_pixmap_from_page_with_usage(this.pointer, MATRIX(matrix), colorspace.pointer, alpha, STRING(usage), box_ix); + else + result = libmupdf._wasm_pdf_new_pixmap_from_page_contents_with_usage(this.pointer, MATRIX(matrix), colorspace.pointer, alpha, STRING(usage), box_ix); + return new Pixmap(result); + } + getWidgets() { + if (!this._widgets) { + this._widgets = []; + let widget = libmupdf._wasm_pdf_first_widget(this.pointer); + while (widget) { + this._widgets.push(new PDFWidget(this._doc, libmupdf._wasm_pdf_keep_annot(widget))); + widget = libmupdf._wasm_pdf_next_widget(widget); + } + } + return this._widgets; + } + getAnnotations() { + if (!this._annots) { + this._annots = []; + let annot = libmupdf._wasm_pdf_first_annot(this.pointer); + while (annot) { + this._annots.push(new PDFAnnotation(this._doc, libmupdf._wasm_pdf_keep_annot(annot))); + annot = libmupdf._wasm_pdf_next_annot(annot); + } + } + return this._annots; + } + createAnnotation(type) { + let type_ix = ENUM(type, PDFAnnotation.ANNOT_TYPES); + let annot = new PDFAnnotation(this._doc, libmupdf._wasm_pdf_create_annot(this.pointer, type_ix)); + if (this._annots) + this._annots.push(annot); + return annot; + } + deleteAnnotation(annot) { + checkType(annot, PDFAnnotation); + libmupdf._wasm_pdf_delete_annot(this.pointer, annot.pointer); + if (this._annots) { + let ix = this._annots.indexOf(annot); + if (ix >= 0) + this._annots.splice(ix, 1); + } + } + applyRedactions(black_boxes = true, image_method = 2, line_art_method = 1, text_method = 0) { + libmupdf._wasm_pdf_redact_page(this.pointer, Number(black_boxes), image_method, line_art_method, text_method); + } + update() { + return !!libmupdf._wasm_pdf_update_page(this.pointer); + } +} +PDFPage.REDACT_IMAGE_NONE = 0; +PDFPage.REDACT_IMAGE_REMOVE = 1; +PDFPage.REDACT_IMAGE_PIXELS = 2; +PDFPage.REDACT_IMAGE_UNLESS_INVISIBLE = 3; +PDFPage.REDACT_LINE_ART_NONE = 0; +PDFPage.REDACT_LINE_ART_REMOVE_IF_COVERED = 1; +PDFPage.REDACT_LINE_ART_REMOVE_IF_TOUCHED = 2; +PDFPage.REDACT_TEXT_REMOVE = 0; +PDFPage.REDACT_TEXT_NONE = 1; +export class PDFObject extends Userdata { + // PRIVATE + constructor(doc, pointer) { + super(libmupdf._wasm_pdf_keep_obj(pointer)); + this._doc = doc; + } + isNull() { return this === PDFObject.Null; } + isIndirect() { return !!libmupdf._wasm_pdf_is_indirect(this.pointer); } + isBoolean() { return !!libmupdf._wasm_pdf_is_bool(this.pointer); } + isInteger() { return !!libmupdf._wasm_pdf_is_int(this.pointer); } + isReal() { return !!libmupdf._wasm_pdf_is_real(this.pointer); } + isNumber() { return !!libmupdf._wasm_pdf_is_number(this.pointer); } + isName() { return !!libmupdf._wasm_pdf_is_name(this.pointer); } + isString() { return !!libmupdf._wasm_pdf_is_string(this.pointer); } + isArray() { return !!libmupdf._wasm_pdf_is_array(this.pointer); } + isDictionary() { return !!libmupdf._wasm_pdf_is_dict(this.pointer); } + isStream() { return !!libmupdf._wasm_pdf_is_stream(this.pointer); } + asIndirect() { return libmupdf._wasm_pdf_to_num(this.pointer); } + asBoolean() { return !!libmupdf._wasm_pdf_to_bool(this.pointer); } + asNumber() { return libmupdf._wasm_pdf_to_real(this.pointer); } + asName() { return fromString(libmupdf._wasm_pdf_to_name(this.pointer)); } + asString() { return fromString(libmupdf._wasm_pdf_to_text_string(this.pointer)); } + asByteString() { + let ptr = libmupdf._wasm_pdf_to_string(this.pointer, _wasm_int); + let len = libmupdf.HEAPU32[_wasm_int >> 2]; + return libmupdf.HEAPU8.slice(ptr, ptr + len); + } + readStream() { return new Buffer(libmupdf._wasm_pdf_load_stream(this.pointer)); } + readRawStream() { return new Buffer(libmupdf._wasm_pdf_load_raw_stream(this.pointer)); } + writeObject(obj) { + if (!this.isIndirect()) + throw new TypeError("can only call PDFObject.writeObject on an indirect reference"); + libmupdf._wasm_pdf_update_object(this._doc.pointer, this.asIndirect(), this._doc._PDFOBJ(obj)); + } + writeStream(buf) { + if (!this.isIndirect()) + throw new TypeError("can only call PDFObject.writeStream on an indirect reference"); + libmupdf._wasm_pdf_update_stream(this._doc.pointer, this.pointer, BUFFER(buf), 0); + } + writeRawStream(buf) { + if (!this.isIndirect()) + throw new TypeError("can only call PDFObject.writeRawStream on an indirect reference"); + libmupdf._wasm_pdf_update_stream(this._doc.pointer, this.pointer, BUFFER(buf), 1); + } + resolve() { + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_resolve_indirect(this.pointer)); + } + get length() { + return libmupdf._wasm_pdf_array_len(this.pointer); + } + set length(_) { + throw new TypeError("object length is read-only"); + } + _get(path) { + let obj = this.pointer; + for (let key of path) { + if (typeof key === "number") + obj = libmupdf._wasm_pdf_array_get(obj, key); + else if (key instanceof PDFObject) + obj = libmupdf._wasm_pdf_dict_get(obj, key.pointer); + else + obj = libmupdf._wasm_pdf_dict_gets(obj, STRING(key)); + if (obj === 0) + break; + } + return obj; + } + get(...path) { + return this._doc._fromPDFObjectKeep(this._get(path)); + } + getInheritable(key) { + if (key instanceof PDFObject) + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_dict_get_inheritable(this.pointer, key.pointer)); + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_dict_gets_inheritable(this.pointer, STRING(key))); + } + put(key, value) { + value = this._doc._toPDFObject(value); + if (typeof key === "number") + libmupdf._wasm_pdf_array_put(this.pointer, key, value.pointer); + else if (key instanceof PDFObject) + libmupdf._wasm_pdf_dict_put(this.pointer, key.pointer, value.pointer); + else + libmupdf._wasm_pdf_dict_puts(this.pointer, STRING(key), value.pointer); + return value; + } + push(value) { + value = this._doc._toPDFObject(value); + libmupdf._wasm_pdf_array_push(this.pointer, value.pointer); + return value; + } + delete(key) { + if (typeof key === "number") + libmupdf._wasm_pdf_array_delete(this.pointer, key); + else if (key instanceof PDFObject) + libmupdf._wasm_pdf_dict_del(this.pointer, key.pointer); + else + libmupdf._wasm_pdf_dict_dels(this.pointer, STRING(key)); + } + valueOf() { + if (this.isNull()) + return null; + if (this.isBoolean()) + return this.asBoolean(); + if (this.isNumber()) + return this.asNumber(); + if (this.isName()) + return this.asName(); + if (this.isString()) + return this.asString(); + if (this.isIndirect()) + return `${this.asIndirect()} 0 R`; + return this; + } + toString(tight = true, ascii = true) { + return fromStringFree(libmupdf._wasm_pdf_sprint_obj(this.pointer, tight, ascii)); + } + forEach(fn) { + if (this.isArray()) { + let n = this.length; + for (let i = 0; i < n; ++i) + fn(this.get(i), i, this); + } + else if (this.isDictionary()) { + let n = libmupdf._wasm_pdf_dict_len(this.pointer); + for (let i = 0; i < n; ++i) { + let key = this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_dict_get_key(this.pointer, i)); + let val = this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_dict_get_val(this.pointer, i)); + fn(val, key.asName(), this); + } + } + } + // Convert to plain Javascript values, objects, and arrays. + // If you want to resolve indirect references, pass an empty object or array as the first argument. + // On exit, this object will contain all indirect objects encountered indexed by object number. + // Note: This function will omit cyclic references. + asJS(seen) { + if (this.isIndirect()) { + let ref = this.asIndirect(); + if (!seen) + return `${ref} 0 R`; + if (ref in seen) + return seen[ref]; + seen[ref] = PDFObject.Null; // stop recursion! + return seen[ref] = this.resolve().asJS(seen); + } + if (this.isArray()) { + let result = []; + this.forEach(val => { + result.push(val.asJS(seen)); + }); + return result; + } + if (this.isDictionary()) { + let result = {}; + this.forEach((val, key) => { + result[key] = val.asJS(seen); + }); + return result; + } + return this.valueOf(); + } +} +PDFObject._drop = libmupdf._wasm_pdf_drop_obj; +PDFObject.Null = new PDFObject(null, 0); +export class PDFGraftMap extends Userdata { + // PRIVATE + constructor(doc, pointer) { + super(pointer); + this._doc = doc; + } + graftObject(obj) { + checkType(obj, PDFObject); + return this._doc._fromPDFObjectNew(libmupdf._wasm_pdf_graft_mapped_object(this.pointer, obj.pointer)); + } + graftPage(to, srcDoc, srcPage) { + checkType(to, "number"); + checkType(srcDoc, PDFDocument); + checkType(srcPage, "number"); + libmupdf._wasm_pdf_graft_mapped_page(this.pointer, to, srcDoc.pointer, srcPage); + } +} +PDFGraftMap._drop = libmupdf._wasm_pdf_drop_graft_map; +export class PDFAnnotation extends Userdata { + // PRIVATE + constructor(doc, pointer) { + super(pointer); + this._doc = doc; + } + getObject() { + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_annot_obj(this.pointer)); + } + getBounds() { + return fromRect(libmupdf._wasm_pdf_bound_annot(this.pointer)); + } + run(device, matrix) { + checkType(device, Device); + checkMatrix(matrix); + libmupdf._wasm_pdf_run_annot(this.pointer, device.pointer, MATRIX(matrix)); + } + toPixmap(matrix, colorspace, alpha = false) { + checkMatrix(matrix); + checkType(colorspace, ColorSpace); + return new Pixmap(libmupdf._wasm_pdf_new_pixmap_from_annot(this.pointer, MATRIX(matrix), colorspace.pointer, alpha)); + } + toDisplayList() { + return new DisplayList(libmupdf._wasm_pdf_new_display_list_from_annot(this.pointer)); + } + update() { + return !!libmupdf._wasm_pdf_update_annot(this.pointer); + } + getType() { + let type = libmupdf._wasm_pdf_annot_type(this.pointer); + return PDFAnnotation.ANNOT_TYPES[type] || "Text"; + } + getLanguage() { + return fromStringOrNull(libmupdf._wasm_pdf_annot_language(this.pointer)); + } + setLanguage(lang) { + libmupdf._wasm_pdf_set_annot_language(this.pointer, STRING(lang)); + } + getFlags() { + return libmupdf._wasm_pdf_annot_flags(this.pointer); + } + setFlags(flags) { + return libmupdf._wasm_pdf_set_annot_flags(this.pointer, flags); + } + getContents() { + return fromString(libmupdf._wasm_pdf_annot_contents(this.pointer)); + } + setContents(text) { + libmupdf._wasm_pdf_set_annot_contents(this.pointer, STRING(text)); + } + getName() { + return fromString(libmupdf._wasm_pdf_annot_name(this.pointer)); + } + setName(text) { + libmupdf._wasm_pdf_set_annot_name(this.pointer, STRING(text)); + } + getAuthor() { + return fromString(libmupdf._wasm_pdf_annot_author(this.pointer)); + } + setAuthor(text) { + libmupdf._wasm_pdf_set_annot_author(this.pointer, STRING(text)); + } + getSubject() { + return fromString(libmupdf._wasm_pdf_annot_subject(this.pointer)); + } + setSubject(text) { + libmupdf._wasm_pdf_set_annot_subject(this.pointer, STRING(text)); + } + getCreationDate() { + return new Date(libmupdf._wasm_pdf_annot_creation_date(this.pointer) * 1000); + } + setCreationDate(date) { + checkType(date, Date); + libmupdf._wasm_pdf_set_annot_creation_date(this.pointer, date.getTime() / 1000); + } + getModificationDate() { + return new Date(libmupdf._wasm_pdf_annot_modification_date(this.pointer) * 1000); + } + setModificationDate(date) { + checkType(date, Date); + libmupdf._wasm_pdf_set_annot_modification_date(this.pointer, date.getTime() / 1000); + } + hasRect() { + return !!libmupdf._wasm_pdf_annot_has_rect(this.pointer); + } + hasInkList() { + return !!libmupdf._wasm_pdf_annot_has_ink_list(this.pointer); + } + hasQuadPoints() { + return !!libmupdf._wasm_pdf_annot_has_quad_points(this.pointer); + } + hasVertices() { + return !!libmupdf._wasm_pdf_annot_has_vertices(this.pointer); + } + hasLine() { + return !!libmupdf._wasm_pdf_annot_has_line(this.pointer); + } + hasInteriorColor() { + return !!libmupdf._wasm_pdf_annot_has_interior_color(this.pointer); + } + hasLineEndingStyles() { + return !!libmupdf._wasm_pdf_annot_has_line_ending_styles(this.pointer); + } + hasBorder() { + return !!libmupdf._wasm_pdf_annot_has_border(this.pointer); + } + hasBorderEffect() { + return !!libmupdf._wasm_pdf_annot_has_border_effect(this.pointer); + } + hasIcon() { + return !!libmupdf._wasm_pdf_annot_has_icon_name(this.pointer); + } + hasOpen() { + return !!libmupdf._wasm_pdf_annot_has_open(this.pointer); + } + hasAuthor() { + return !!libmupdf._wasm_pdf_annot_has_author(this.pointer); + } + hasSubject() { + return !!libmupdf._wasm_pdf_annot_has_subject(this.pointer); + } + hasFilespec() { + return !!libmupdf._wasm_pdf_annot_has_filespec(this.pointer); + } + hasCallout() { + return !!libmupdf._wasm_pdf_annot_has_callout(this.pointer); + } + hasRichContents() { + return !!libmupdf._wasm_pdf_annot_has_rich_contents(this.pointer); + } + getRect() { + return fromRect(libmupdf._wasm_pdf_annot_rect(this.pointer)); + } + setRect(rect) { + checkRect(rect); + libmupdf._wasm_pdf_set_annot_rect(this.pointer, RECT(rect)); + } + getPopup() { + return fromRect(libmupdf._wasm_pdf_annot_popup(this.pointer)); + } + setPopup(rect) { + checkRect(rect); + libmupdf._wasm_pdf_set_annot_popup(this.pointer, RECT(rect)); + } + getIsOpen() { + return !!libmupdf._wasm_pdf_annot_is_open(this.pointer); + } + setIsOpen(isOpen) { + checkType(isOpen, "boolean"); + libmupdf._wasm_pdf_set_annot_is_open(this.pointer, isOpen); + } + getHiddenForEditing() { + return !!libmupdf._wasm_pdf_annot_hidden_for_editing(this.pointer); + } + setHiddenForEditing(isHidden) { + checkType(isHidden, "boolean"); + libmupdf._wasm_pdf_set_annot_hidden_for_editing(this.pointer, isHidden); + } + getIcon() { + return fromString(libmupdf._wasm_pdf_annot_icon_name(this.pointer)); + } + setIcon(text) { + checkType(text, "string"); + libmupdf._wasm_pdf_set_annot_icon_name(this.pointer, STRING(text)); + } + getOpacity() { + return libmupdf._wasm_pdf_annot_opacity(this.pointer); + } + setOpacity(opacity) { + checkType(opacity, "number"); + libmupdf._wasm_pdf_set_annot_opacity(this.pointer, opacity); + } + getQuadding() { + return libmupdf._wasm_pdf_annot_quadding(this.pointer); + } + setQuadding(quadding) { + checkType(quadding, "number"); + libmupdf._wasm_pdf_set_annot_quadding(this.pointer, quadding); + } + getLine() { + let a = fromPoint(libmupdf._wasm_pdf_annot_line_1(this.pointer)); + let b = fromPoint(libmupdf._wasm_pdf_annot_line_2(this.pointer)); + return [a, b]; + } + setLine(a, b) { + checkPoint(a); + checkPoint(b); + libmupdf._wasm_pdf_set_annot_line(this.pointer, POINT(a), POINT2(b)); + } + getLineEndingStyles() { + let a = libmupdf._wasm_pdf_annot_line_ending_styles_start(this.pointer); + let b = libmupdf._wasm_pdf_annot_line_ending_styles_end(this.pointer); + return { + start: PDFAnnotation.LINE_ENDING[a] || "None", + end: PDFAnnotation.LINE_ENDING[b] || "None", + }; + } + setLineEndingStyles(start, end) { + let start_ix = ENUM(start, PDFAnnotation.LINE_ENDING); + let end_ix = ENUM(end, PDFAnnotation.LINE_ENDING); + libmupdf._wasm_pdf_set_annot_line_ending_styles(this.pointer, start_ix, end_ix); + } + getLineCaption() { + return libmupdf._wasm_pdf_annot_line_caption(this.pointer); + } + setLineCaption(on) { + return libmupdf._wasm_pdf_set_annot_line_caption(this.pointer, on); + } + getLineCaptionOffset() { + return fromPoint(libmupdf._wasm_pdf_annot_line_caption_offset(this.pointer)); + } + setLineCaptionOffset(p) { + return libmupdf._wasm_pdf_set_annot_line_caption_offset(this.pointer, POINT(p)); + } + getLineLeader() { + return libmupdf._wasm_pdf_annot_line_leader(this.pointer); + } + getLineLeaderExtension() { + return libmupdf._wasm_pdf_annot_line_leader_extension(this.pointer); + } + getLineLeaderOffset() { + return libmupdf._wasm_pdf_annot_line_leader_offset(this.pointer); + } + setLineLeader(v) { + return libmupdf._wasm_pdf_set_annot_line_leader(this.pointer, v); + } + setLineLeaderExtension(v) { + return libmupdf._wasm_pdf_set_annot_line_leader_extension(this.pointer, v); + } + setLineLeaderOffset(v) { + return libmupdf._wasm_pdf_set_annot_line_leader_offset(this.pointer, v); + } + getCalloutStyle() { + let style = libmupdf._wasm_pdf_annot_callout_style(this.pointer); + return PDFAnnotation.LINE_ENDING[style] || "None"; + } + setCalloutStyle(style) { + let style_ix = ENUM(style, PDFAnnotation.LINE_ENDING); + libmupdf._wasm_pdf_set_annot_callout_style(this.pointer, style_ix); + } + getCalloutLine() { + let n = libmupdf._wasm_pdf_annot_callout_line(this.pointer, (_wasm_point << 2)); + if (n == 3) + return [ + fromPoint((_wasm_point + 0) << 2), + fromPoint((_wasm_point + 1) << 2), + fromPoint((_wasm_point + 2) << 2) + ]; + if (n == 2) + return [ + fromPoint((_wasm_point + 0) << 2), + fromPoint((_wasm_point + 1) << 2) + ]; + return null; + } + setCalloutLine(line) { + let a = line[0] || [0, 0]; + let b = line[1] || [0, 0]; + let c = line[2] || [0, 0]; + libmupdf._wasm_pdf_set_annot_callout_line(this.pointer, line.length, POINT(a), POINT2(b), POINT3(c)); + } + getCalloutPoint() { + let line = this.getCalloutLine(); + if (line) + return line[0]; + return undefined; + } + setCalloutPoint(p) { + libmupdf._wasm_pdf_set_annot_callout_point(this.pointer, POINT(p)); + } + getColor() { + return fromAnnotColor(libmupdf._wasm_pdf_annot_color(this.pointer, COLOR())); + } + getInteriorColor() { + return fromAnnotColor(libmupdf._wasm_pdf_annot_interior_color(this.pointer, COLOR())); + } + setColor(color) { + checkAnnotColor(color); + libmupdf._wasm_pdf_set_annot_color(this.pointer, color.length, COLOR(color)); + } + setInteriorColor(color) { + checkAnnotColor(color); + libmupdf._wasm_pdf_set_annot_interior_color(this.pointer, color.length, COLOR(color)); + } + getBorderWidth() { + return libmupdf._wasm_pdf_annot_border_width(this.pointer); + } + setBorderWidth(value) { + checkType(value, "number"); + return libmupdf._wasm_pdf_set_annot_border_width(this.pointer, value); + } + getBorderStyle() { + return PDFAnnotation.BORDER_STYLE[libmupdf._wasm_pdf_annot_border_style(this.pointer)] || "Solid"; + } + setBorderStyle(value) { + let value_ix = ENUM(value, PDFAnnotation.BORDER_STYLE); + return libmupdf._wasm_pdf_set_annot_border_style(this.pointer, value_ix); + } + getBorderEffect() { + return PDFAnnotation.BORDER_EFFECT[libmupdf._wasm_pdf_annot_border_effect(this.pointer)] || "None"; + } + setBorderEffect(value) { + let value_ix = ENUM(value, PDFAnnotation.BORDER_EFFECT); + return libmupdf._wasm_pdf_set_annot_border_effect(this.pointer, value_ix); + } + getBorderEffectIntensity() { + return libmupdf._wasm_pdf_annot_border_effect_intensity(this.pointer); + } + setBorderEffectIntensity(value) { + checkType(value, "number"); + return libmupdf._wasm_pdf_set_annot_border_effect_intensity(this.pointer, value); + } + getBorderDashCount() { + return libmupdf._wasm_pdf_annot_border_dash_count(this.pointer); + } + getBorderDashItem(idx) { + return libmupdf._wasm_pdf_annot_border_dash_item(this.pointer, idx); + } + clearBorderDash() { + libmupdf._wasm_pdf_clear_annot_border_dash(this.pointer); + } + addBorderDashItem(v) { + checkType(v, "number"); + return libmupdf._wasm_pdf_add_annot_border_dash_item(this.pointer, v); + } + getBorderDashPattern() { + let n = this.getBorderDashCount(); + let result = new Array(n); + for (let i = 0; i < n; ++i) + result[i] = this.getBorderDashItem(i); + return result; + } + setBorderDashPattern(list) { + this.clearBorderDash(); + for (let v of list) + this.addBorderDashItem(v); + } + getIntent() { + return PDFAnnotation.INTENT[libmupdf._wasm_pdf_annot_intent(this.pointer)] || null; + } + setIntent(value) { + let value_ix = ENUM(value, PDFAnnotation.INTENT); + return libmupdf._wasm_pdf_set_annot_intent(this.pointer, value_ix); + } + setDefaultAppearance(fontName, size, color) { + checkType(fontName, "string"); + checkType(size, "number"); + checkAnnotColor(color); + libmupdf._wasm_pdf_set_annot_default_appearance(this.pointer, STRING(fontName), size, color.length, COLOR(color)); + } + getDefaultAppearance() { + let font = fromString(libmupdf._wasm_pdf_annot_default_appearance_font(this.pointer)); + let size = libmupdf._wasm_pdf_annot_default_appearance_size(this.pointer); + let color = fromAnnotColor(libmupdf._wasm_pdf_annot_default_appearance_color(this.pointer, COLOR())); + return { font, size, color }; + } + getFileSpec() { + return this._doc._fromPDFObjectKeep(libmupdf._wasm_pdf_annot_filespec(this.pointer)); + } + setFileSpec(fs) { + return libmupdf._wasm_pdf_set_annot_filespec(this.pointer, this._doc._PDFOBJ(fs)); + } + getQuadPoints() { + let n = libmupdf._wasm_pdf_annot_quad_point_count(this.pointer); + let result = []; + for (let i = 0; i < n; ++i) + result.push(fromQuad(libmupdf._wasm_pdf_annot_quad_point(this.pointer, i))); + return result; + } + clearQuadPoints() { + libmupdf._wasm_pdf_clear_annot_quad_points(this.pointer); + } + addQuadPoint(quad) { + checkQuad(quad); + libmupdf._wasm_pdf_add_annot_quad_point(this.pointer, QUAD(quad)); + } + setQuadPoints(quadlist) { + this.clearQuadPoints(); + for (let quad of quadlist) + this.addQuadPoint(quad); + } + getVertices() { + let n = libmupdf._wasm_pdf_annot_vertex_count(this.pointer); + let result = new Array(n); + for (let i = 0; i < n; ++i) + result[i] = fromPoint(libmupdf._wasm_pdf_annot_vertex(this.pointer, i)); + return result; + } + clearVertices() { + libmupdf._wasm_pdf_clear_annot_vertices(this.pointer); + } + addVertex(vertex) { + checkPoint(vertex); + libmupdf._wasm_pdf_add_annot_vertex(this.pointer, POINT(vertex)); + } + setVertices(vertexlist) { + this.clearVertices(); + for (let vertex of vertexlist) + this.addVertex(vertex); + } + getInkList() { + let n = libmupdf._wasm_pdf_annot_ink_list_count(this.pointer); + let outer = []; + for (let i = 0; i < n; ++i) { + let m = libmupdf._wasm_pdf_annot_ink_list_stroke_count(this.pointer, i); + let inner = new Array(m); + for (let k = 0; k < m; ++k) + inner[k] = fromPoint(libmupdf._wasm_pdf_annot_ink_list_stroke_vertex(this.pointer, i, k)); + outer.push(inner); + } + return outer; + } + clearInkList() { + libmupdf._wasm_pdf_clear_annot_ink_list(this.pointer); + } + addInkListStroke() { + libmupdf._wasm_pdf_add_annot_ink_list_stroke(this.pointer); + } + addInkListStrokeVertex(v) { + checkPoint(v); + libmupdf._wasm_pdf_add_annot_ink_list_stroke_vertex(this.pointer, POINT(v)); + } + setInkList(inklist) { + this.clearInkList(); + for (let stroke of inklist) { + this.addInkListStroke(); + for (let vertex of stroke) + this.addInkListStrokeVertex(vertex); + } + } + getRichContents() { + return fromString(libmupdf._wasm_pdf_annot_rich_contents(this.pointer)); + } + setRichContents(plain, html) { + checkType(plain, "string"); + checkType(html, "string"); + libmupdf._wasm_pdf_set_annot_rich_contents(this.pointer, STRING(plain), STRING2(html)); + } + getRichDefaults() { + return fromString(libmupdf._wasm_pdf_annot_rich_defaults(this.pointer)); + } + setRichDefaults(style) { + checkType(style, "string"); + libmupdf._wasm_pdf_set_annot_rich_defaults(this.pointer, STRING(style)); + } + setStampImage(image) { + libmupdf._wasm_pdf_set_annot_stamp_image(this.pointer, image.pointer); + } + setAppearanceFromDisplayList(appearance, state, transform, list) { + checkMatrix(transform); + checkType(list, DisplayList); + libmupdf._wasm_pdf_set_annot_appearance_from_display_list(this.pointer, STRING_OPT(appearance), STRING2_OPT(state), MATRIX(transform), list.pointer); + } + setAppearance(appearance, state, transform, bbox, resources, contents) { + checkMatrix(transform); + checkRect(bbox); + libmupdf._wasm_pdf_set_annot_appearance(this.pointer, STRING_OPT(appearance), STRING2_OPT(state), MATRIX(transform), RECT(bbox), this._doc._PDFOBJ(resources), BUFFER(contents)); + } + applyRedaction(black_boxes = 1, image_method = 2, line_art_method = 1, text_method = 0) { + libmupdf._wasm_pdf_apply_redaction(this.pointer, black_boxes, image_method, line_art_method, text_method); + } +} +PDFAnnotation._drop = libmupdf._wasm_pdf_drop_annot; +/* IMPORTANT: Keep in sync with mupdf/pdf/annot.h and PDFAnnotation.java */ +PDFAnnotation.ANNOT_TYPES = [ + "Text", + "Link", + "FreeText", + "Line", + "Square", + "Circle", + "Polygon", + "PolyLine", + "Highlight", + "Underline", + "Squiggly", + "StrikeOut", + "Redact", + "Stamp", + "Caret", + "Ink", + "Popup", + "FileAttachment", + "Sound", + "Movie", + "RichMedia", + "Widget", + "Screen", + "PrinterMark", + "TrapNet", + "Watermark", + "3D", + "Projection", +]; +PDFAnnotation.LINE_ENDING = [ + "None", + "Square", + "Circle", + "Diamond", + "OpenArrow", + "ClosedArrow", + "Butt", + "ROpenArrow", + "RClosedArrow", + "Slash", +]; +PDFAnnotation.BORDER_STYLE = ["Solid", "Dashed", "Beveled", "Inset", "Underline"]; +PDFAnnotation.BORDER_EFFECT = ["None", "Cloudy"]; +PDFAnnotation.INTENT = [ + null, + "FreeTextCallout", + "FreeTextTypeWriter", + "LineArrow", + "LineDimension", + "PloyLine", + "PolygonCloud", + "PolygonDimension", + "StampImage", + "StampSnapshot" +]; +// Bit masks for getFlags and setFlags +PDFAnnotation.IS_INVISIBLE = 1 << (1 - 1); +PDFAnnotation.IS_HIDDEN = 1 << (2 - 1); +PDFAnnotation.IS_PRINT = 1 << (3 - 1); +PDFAnnotation.IS_NO_ZOOM = 1 << (4 - 1); +PDFAnnotation.IS_NO_ROTATE = 1 << (5 - 1); +PDFAnnotation.IS_NO_VIEW = 1 << (6 - 1); +PDFAnnotation.IS_READ_ONLY = 1 << (7 - 1); +PDFAnnotation.IS_LOCKED = 1 << (8 - 1); +PDFAnnotation.IS_TOGGLE_NO_VIEW = 1 << (9 - 1); +PDFAnnotation.IS_LOCKED_CONTENTS = 1 << (10 - 1); +export class PDFWidget extends PDFAnnotation { + getFieldType() { + return PDFWidget.WIDGET_TYPES[libmupdf._wasm_pdf_annot_field_type(this.pointer)] || "button"; + } + isButton() { + let type = this.getFieldType(); + return type === "button" || type === "checkbox" || type === "radiobutton"; + } + isPushButton() { + return this.getFieldType() === "button"; + } + isCheckbox() { + return this.getFieldType() === "checkbox"; + } + isRadioButton() { + return this.getFieldType() === "radiobutton"; + } + isText() { + return this.getFieldType() === "text"; + } + isChoice() { + let type = this.getFieldType(); + return type === "combobox" || type === "listbox"; + } + isListBox() { + return this.getFieldType() === "listbox"; + } + isComboBox() { + return this.getFieldType() === "combobox"; + } + getFieldFlags() { + return libmupdf._wasm_pdf_annot_field_flags(this.pointer); + } + isMultiline() { + return (this.getFieldFlags() & PDFWidget.TX_FIELD_IS_MULTILINE) !== 0; + } + isPassword() { + return (this.getFieldFlags() & PDFWidget.TX_FIELD_IS_PASSWORD) !== 0; + } + isComb() { + return (this.getFieldFlags() & PDFWidget.TX_FIELD_IS_COMB) !== 0; + } + isReadOnly() { + return (this.getFieldFlags() & PDFWidget.FIELD_IS_READ_ONLY) !== 0; + } + getLabel() { + return fromString(libmupdf._wasm_pdf_annot_field_label(this.pointer)); + } + getName() { + return fromStringFree(libmupdf._wasm_pdf_load_field_name(this.pointer)); + } + setName() { + throw new Error("widget field name is read-only"); + } + getValue() { + return fromString(libmupdf._wasm_pdf_annot_field_value(this.pointer)); + } + setTextValue(value) { + return libmupdf._wasm_pdf_set_annot_text_field_value(this.pointer, STRING(value)); + } + getMaxLen() { + return libmupdf._wasm_pdf_annot_text_widget_max_len(this.pointer); + } + setChoiceValue(value) { + return libmupdf._wasm_pdf_set_annot_choice_field_value(this.pointer, STRING(value)); + } + getOptions(isExport = false) { + let result = []; + let n = libmupdf._wasm_pdf_annot_choice_field_option_count(this.pointer); + for (let i = 0; i < n; ++i) { + result.push(fromString(libmupdf._wasm_pdf_annot_choice_field_option(this.pointer, isExport, i))); + } + return result; + } + toggle() { + return libmupdf._wasm_pdf_toggle_widget(this.pointer); + } +} +/* IMPORTANT: Keep in sync with mupdf/pdf/widget.h and PDFWidget.java */ +PDFWidget.WIDGET_TYPES = [ + "widget", // unknown + "button", + "checkbox", + "combobox", + "listbox", + "radiobutton", + "signature", + "text", +]; +/* Field flags */ +PDFWidget.FIELD_IS_READ_ONLY = 1; +PDFWidget.FIELD_IS_REQUIRED = 1 << 1; +PDFWidget.FIELD_IS_NO_EXPORT = 1 << 2; +/* Text fields */ +PDFWidget.TX_FIELD_IS_MULTILINE = 1 << 12; +PDFWidget.TX_FIELD_IS_PASSWORD = 1 << 13; +PDFWidget.TX_FIELD_IS_FILE_SELECT = 1 << 20; +PDFWidget.TX_FIELD_IS_DO_NOT_SPELL_CHECK = 1 << 22; +PDFWidget.TX_FIELD_IS_DO_NOT_SCROLL = 1 << 23; +PDFWidget.TX_FIELD_IS_COMB = 1 << 24; +PDFWidget.TX_FIELD_IS_RICH_TEXT = 1 << 25; +/* Button fields */ +PDFWidget.BTN_FIELD_IS_NO_TOGGLE_TO_OFF = 1 << 14; +PDFWidget.BTN_FIELD_IS_RADIO = 1 << 15; +PDFWidget.BTN_FIELD_IS_PUSHBUTTON = 1 << 16; +PDFWidget.BTN_FIELD_IS_RADIOS_IN_UNISON = 1 << 25; +/* Choice fields */ +PDFWidget.CH_FIELD_IS_COMBO = 1 << 17; +PDFWidget.CH_FIELD_IS_EDIT = 1 << 18; +PDFWidget.CH_FIELD_IS_SORT = 1 << 19; +PDFWidget.CH_FIELD_IS_MULTI_SELECT = 1 << 21; +PDFWidget.CH_FIELD_IS_DO_NOT_SPELL_CHECK = 1 << 22; +PDFWidget.CH_FIELD_IS_COMMIT_ON_SEL_CHANGE = 1 << 25; +var $libmupdf_stm_id = 0; +var $libmupdf_stm_table = new Map(); +globalThis.$libmupdf_stm_close = function (id) { + let handle = $libmupdf_stm_table.get(id); + if (handle) { + handle.close(); + $libmupdf_stm_table.delete(id); + return; + } + throw new Error("invalid file handle"); +}; +globalThis.$libmupdf_stm_seek = function (id, pos, offset, whence) { + let handle = $libmupdf_stm_table.get(id); + if (handle) { + if (whence === 0) + return offset; + if (whence === 1) + return pos + offset; + if (whence === 2) { + let size = handle.fileSize(); + if (size < 0) + return -1; + return size + offset; + } + throw new Error("invalid whence argument"); + } + throw new Error("invalid file handle"); +}; +globalThis.$libmupdf_stm_read = function (id, pos, addr, size) { + let handle = $libmupdf_stm_table.get(id); + if (handle) { + return handle.read(libmupdf.HEAPU8, addr, size, pos); + } + throw new Error("invalid file handle"); +}; +export class Stream extends Userdata { + constructor(handle) { + let id = $libmupdf_stm_id++; + $libmupdf_stm_table.set(id, handle); + super(libmupdf._wasm_new_stream(id)); + } +} +Stream._drop = libmupdf._wasm_drop_stream; +/* -------------------------------------------------------------------------- */ +var $libmupdf_load_font_file_js; +globalThis.$libmupdf_load_font_file = function (name, script, bold, italic) { + if ($libmupdf_load_font_file_js) { + var font = $libmupdf_load_font_file_js(fromString(name), fromString(script), bold, italic); + if (font) { + checkType(font, Font); + return font.pointer; + } + } + return 0; +}; +var $libmupdf_device_id = 0; +var $libmupdf_device_table = new Map(); +var $libmupdf_path_id = 0; +var $libmupdf_path_table = new Map(); +var $libmupdf_text_id = 0; +var $libmupdf_text_table = new Map(); +globalThis.$libmupdf_path_walk = { + moveto(id, x, y) { + $libmupdf_path_table.get(id)?.moveTo?.(x, y); + }, + lineto(id, x, y) { + $libmupdf_path_table.get(id)?.lineTo?.(x, y); + }, + curveto(id, x1, y1, x2, y2, x3, y3) { + $libmupdf_path_table.get(id)?.curveTo?.(x1, y1, x2, y2, x3, y3); + }, + closepath(id) { + $libmupdf_path_table.get(id)?.closePath?.(); + }, +}; +var $libmupdf_text_font = null; +globalThis.$libmupdf_text_walk = { + begin_span(id, font, trm, wmode, bidi, dir, lang) { + if (font !== $libmupdf_text_font?.pointer) + $libmupdf_text_font = new Font(font); + $libmupdf_text_table.get(id)?.beginSpan?.($libmupdf_text_font, fromMatrix(trm), wmode, bidi, dir, fromString(lang)); + }, + end_span(id) { + $libmupdf_text_table.get(id)?.endSpan?.(); + }, + show_glyph(id, font, trm, glyph, unicode, wmode, bidi) { + if (font !== $libmupdf_text_font?.pointer) + $libmupdf_text_font = new Font(font); + $libmupdf_text_table.get(id)?.showGlyph?.($libmupdf_text_font, fromMatrix(trm), glyph, unicode, wmode, bidi); + }, +}; +globalThis.$libmupdf_device = { + drop_device(id) { + $libmupdf_device_table.get(id)?.drop?.(); + $libmupdf_device_table.delete(id); + }, + close_device(id) { + $libmupdf_device_table.get(id)?.close?.(); + }, + fill_path(id, path, even_odd, ctm, colorspace, color_n, color_arr, alpha) { + $libmupdf_device_table.get(id)?.fillPath?.(new Path(libmupdf._wasm_keep_path(path)), !!even_odd, fromMatrix(ctm), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr), alpha); + }, + clip_path(id, path, even_odd, ctm) { + $libmupdf_device_table.get(id)?.clipPath?.(new Path(libmupdf._wasm_keep_path(path)), !!even_odd, fromMatrix(ctm)); + }, + stroke_path(id, path, stroke, ctm, colorspace, color_n, color_arr, alpha) { + $libmupdf_device_table.get(id)?.strokePath?.(new Path(libmupdf._wasm_keep_path(path)), new StrokeState(libmupdf._wasm_keep_stroke_state(stroke)), fromMatrix(ctm), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr), alpha); + }, + clip_stroke_path(id, path, stroke, ctm) { + $libmupdf_device_table.get(id)?.clipStrokePath?.(new Path(libmupdf._wasm_keep_path(path)), new StrokeState(libmupdf._wasm_keep_stroke_state(stroke)), fromMatrix(ctm)); + }, + fill_text(id, text, ctm, colorspace, color_n, color_arr, alpha) { + $libmupdf_device_table.get(id)?.fillText?.(new Text(libmupdf._wasm_keep_text(text)), fromMatrix(ctm), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr), alpha); + }, + stroke_text(id, text, stroke, ctm, colorspace, color_n, color_arr, alpha) { + $libmupdf_device_table.get(id)?.strokeText?.(new Text(libmupdf._wasm_keep_text(text)), new StrokeState(libmupdf._wasm_keep_stroke_state(stroke)), fromMatrix(ctm), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr), alpha); + }, + clip_text(id, text, ctm) { + $libmupdf_device_table.get(id)?.clipText?.(new Text(libmupdf._wasm_keep_text(text)), fromMatrix(ctm)); + }, + clip_stroke_text(id, text, stroke, ctm) { + $libmupdf_device_table.get(id)?.clipStrokeText?.(new Text(libmupdf._wasm_keep_text(text)), new StrokeState(libmupdf._wasm_keep_stroke_state(stroke)), fromMatrix(ctm)); + }, + ignore_text(id, text, ctm) { + $libmupdf_device_table.get(id)?.ignoreText?.(new Text(libmupdf._wasm_keep_text(text)), fromMatrix(ctm)); + }, + fill_shade(id, shade, ctm, alpha) { + $libmupdf_device_table.get(id)?.fillShade?.(new Shade(shade), fromMatrix(ctm), alpha); + }, + fill_image(id, image, ctm, alpha) { + $libmupdf_device_table.get(id)?.fillImage?.(new Image(image), fromMatrix(ctm), alpha); + }, + fill_image_mask(id, image, ctm, colorspace, color_n, color_arr, alpha) { + $libmupdf_device_table.get(id)?.fillImageMask?.(new Image(image), fromMatrix(ctm), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr), alpha); + }, + clip_image_mask(id, image, ctm) { + $libmupdf_device_table.get(id)?.clipImageMask?.(new Image(image), fromMatrix(ctm)); + }, + pop_clip(id) { + $libmupdf_device_table.get(id)?.popClip?.(); + }, + begin_mask(id, bbox, luminosity, colorspace, color_n, color_arr) { + $libmupdf_device_table.get(id)?.beginMask?.(fromRect(bbox), !!luminosity, new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), fromColorArray(color_n, color_arr)); + }, + begin_group(id, bbox, colorspace, isolated, knockout, blendmode, alpha) { + $libmupdf_device_table.get(id)?.beginGroup?.(fromRect(bbox), new ColorSpace(libmupdf._wasm_keep_colorspace(colorspace)), !!isolated, !!knockout, Device.BLEND_MODES[blendmode], alpha); + }, + begin_tile(id, area, view, xstep, ystep, ctm, tile_id, doc_id) { + return $libmupdf_device_table.get(id)?.beginTile?.(fromRect(area), fromRect(view), xstep, ystep, fromMatrix(ctm), tile_id, doc_id) || 0; + }, + begin_layer(id, name) { + $libmupdf_device_table.get(id)?.beginLayer?.(fromString(name)); + }, + end_mask(id) { + $libmupdf_device_table.get(id)?.endMask?.(); + }, + end_group(id) { + $libmupdf_device_table.get(id)?.endGroup?.(); + }, + end_tile(id) { + $libmupdf_device_table.get(id)?.endTile?.(); + }, + end_layer(id) { + $libmupdf_device_table.get(id)?.endLayer?.(); + }, +}; +/* default exports */ +export default { + // const + Matrix, + Rect, + // function + enableICC, + disableICC, + setUserCSS, + installLoadFontFunction, + setLog, + // class + Buffer, + ColorSpace, + Font, + Image, + StrokeState, + Path, + Text, + DisplayList, + Pixmap, + Shade, + StructuredText, + Device, + DrawDevice, + DisplayListDevice, + DocumentWriter, + Document, + OutlineIterator, + Link, + Page, + PDFDocument, + PDFPage, + PDFObject, + PDFGraftMap, + PDFAnnotation, + PDFWidget, + Stream, + // debugging + memento +}; diff --git a/node_modules/mupdf/dist/mupdf.js.br b/node_modules/mupdf/dist/mupdf.js.br new file mode 100644 index 0000000..95d4613 Binary files /dev/null and b/node_modules/mupdf/dist/mupdf.js.br differ diff --git a/node_modules/mupdf/package.json b/node_modules/mupdf/package.json new file mode 100644 index 0000000..0bd6760 --- /dev/null +++ b/node_modules/mupdf/package.json @@ -0,0 +1,37 @@ +{ + "name": "mupdf", + "version": "1.28.1", + "description": "MuPDF.js", + "author": "Artifex Software, Inc.", + "license": "AGPL-3.0-or-later", + "keywords": [ + "mupdf", + "pdf" + ], + "homepage": "https://mupdf.readthedocs.io/en/latest/", + "repository": { + "type": "git", + "url": "https://cgit.ghostscript.com/mupdf.git/" + }, + "type": "module", + "exports": { + ".": { + "types": "./dist/mupdf.d.ts", + "default": "./dist/mupdf.js" + } + }, + "files": [ + "dist/*" + ], + "scripts": { + "prepack": "bash tools/build.sh && bash tools/compress.sh", + "simple-viewer": "npx http-server -c -1 -b -o examples/simple-viewer", + "super-simple-viewer": "npx http-server -c -1 -b -o examples/super-simple-viewer" + }, + "devDependencies": { + "@types/node": "latest", + "http-server": "latest", + "terser": "^5.39.2", + "typescript": "^5.8.3" + } +} diff --git a/node_modules/p-limit/index.d.ts b/node_modules/p-limit/index.d.ts new file mode 100644 index 0000000..6bbfad4 --- /dev/null +++ b/node_modules/p-limit/index.d.ts @@ -0,0 +1,38 @@ +export interface Limit { + /** + @param fn - Promise-returning/async function. + @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + @returns The promise returned by calling `fn(...arguments)`. + */ + ( + fn: (...arguments: Arguments) => PromiseLike | ReturnType, + ...arguments: Arguments + ): Promise; + + /** + The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; + + /** + Discard pending promises that are waiting to run. + + This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + + Note: This does not cancel promises that are already running. + */ + clearQueue(): void; +} + +/** +Run multiple promise-returning & async functions with limited concurrency. + +@param concurrency - Concurrency limit. Minimum: `1`. +@returns A `limit` function. +*/ +export default function pLimit(concurrency: number): Limit; diff --git a/node_modules/p-limit/index.js b/node_modules/p-limit/index.js new file mode 100644 index 0000000..6a72a4c --- /dev/null +++ b/node_modules/p-limit/index.js @@ -0,0 +1,57 @@ +'use strict'; +const pTry = require('p-try'); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + const run = (fn, resolve, ...args) => { + activeCount++; + + const result = pTry(fn, ...args); + + resolve(result); + + result.then(next, next); + }; + + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + + const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + + return generator; +}; + +module.exports = pLimit; +module.exports.default = pLimit; diff --git a/node_modules/p-limit/license b/node_modules/p-limit/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/p-limit/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-limit/package.json b/node_modules/p-limit/package.json new file mode 100644 index 0000000..99a814f --- /dev/null +++ b/node_modules/p-limit/package.json @@ -0,0 +1,52 @@ +{ + "name": "p-limit", + "version": "2.3.0", + "description": "Run multiple promise-returning & async functions with limited concurrency", + "license": "MIT", + "repository": "sindresorhus/p-limit", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "limit", + "limited", + "concurrency", + "throttle", + "throat", + "rate", + "batch", + "ratelimit", + "task", + "queue", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-try": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + } +} diff --git a/node_modules/p-limit/readme.md b/node_modules/p-limit/readme.md new file mode 100644 index 0000000..64aa476 --- /dev/null +++ b/node_modules/p-limit/readme.md @@ -0,0 +1,101 @@ +# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) + +> Run multiple promise-returning & async functions with limited concurrency + +## Install + +``` +$ npm install p-limit +``` + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`\ +Minimum: `1`\ +Default: `Infinity` + +Concurrency limit. + +### limit(fn, ...args) + +Returns the promise returned by calling `fn(...args)`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + +#### args + +Any arguments to pass through to `fn`. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + +### limit.clearQueue() + +Discard pending promises that are waiting to run. + +This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + +Note: This does not cancel promises that are already running. + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue. + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/p-locate/index.d.ts b/node_modules/p-locate/index.d.ts new file mode 100644 index 0000000..14115e1 --- /dev/null +++ b/node_modules/p-locate/index.d.ts @@ -0,0 +1,64 @@ +declare namespace pLocate { + interface Options { + /** + Number of concurrently pending promises returned by `tester`. Minimum: `1`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + Preserve `input` order when searching. + + Disable this to improve performance if you don't care about the order. + + @default true + */ + readonly preserveOrder?: boolean; + } +} + +declare const pLocate: { + /** + Get the first fulfilled promise that satisfies the provided testing function. + + @param input - An iterable of promises/values to test. + @param tester - This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. + @returns A `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + + @example + ``` + import pathExists = require('path-exists'); + import pLocate = require('p-locate'); + + const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' + ]; + + (async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' + })(); + ``` + */ + ( + input: Iterable | ValueType>, + tester: (element: ValueType) => PromiseLike | boolean, + options?: pLocate.Options + ): Promise; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function pLocate( + // input: Iterable | ValueType>, + // tester: (element: ValueType) => PromiseLike | boolean, + // options?: pLocate.Options + // ): Promise; + // export = pLocate; + default: typeof pLocate; +}; + +export = pLocate; diff --git a/node_modules/p-locate/index.js b/node_modules/p-locate/index.js new file mode 100644 index 0000000..e13ce15 --- /dev/null +++ b/node_modules/p-locate/index.js @@ -0,0 +1,52 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// The input can also be a promise, so we await it +const testElement = async (element, tester) => tester(await element); + +// The input can also be a promise, so we `Promise.all()` them both +const finder = async element => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + + return false; +}; + +const pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + + const limit = pLimit(options.concurrency); + + // Start all the promises concurrently with optional limit + const items = [...iterable].map(element => [element, limit(testElement, element, tester)]); + + // Check the promises either serially or concurrently + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + + try { + await Promise.all(items.map(element => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + + throw error; + } +}; + +module.exports = pLocate; +// TODO: Remove this for the next major release +module.exports.default = pLocate; diff --git a/node_modules/p-locate/license b/node_modules/p-locate/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/p-locate/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-locate/package.json b/node_modules/p-locate/package.json new file mode 100644 index 0000000..e3de275 --- /dev/null +++ b/node_modules/p-locate/package.json @@ -0,0 +1,53 @@ +{ + "name": "p-locate", + "version": "4.1.0", + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "license": "MIT", + "repository": "sindresorhus/p-locate", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "locate", + "find", + "finder", + "search", + "searcher", + "test", + "array", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "fastest", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-limit": "^2.2.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "time-span": "^3.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/p-locate/readme.md b/node_modules/p-locate/readme.md new file mode 100644 index 0000000..f8e2c2e --- /dev/null +++ b/node_modules/p-locate/readme.md @@ -0,0 +1,90 @@ +# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + + +## Install + +``` +$ npm install p-locate +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + + +## API + +### pLocate(input, tester, [options]) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable` + +An iterable of promises/values to test. + +#### tester(element) + +Type: `Function` + +This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-try/index.d.ts b/node_modules/p-try/index.d.ts new file mode 100644 index 0000000..2a7319e --- /dev/null +++ b/node_modules/p-try/index.d.ts @@ -0,0 +1,39 @@ +declare const pTry: { + /** + Start a promise chain. + + @param fn - The function to run to start the promise chain. + @param arguments - Arguments to pass to `fn`. + @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + + @example + ``` + import pTry = require('p-try'); + + (async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } + })(); + ``` + */ + ( + fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + ...arguments: ArgumentsType + ): Promise; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function pTry( + // fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + // ...arguments: ArgumentsType + // ): Promise; + // export = pTry; + default: typeof pTry; +}; + +export = pTry; diff --git a/node_modules/p-try/index.js b/node_modules/p-try/index.js new file mode 100644 index 0000000..db858da --- /dev/null +++ b/node_modules/p-try/index.js @@ -0,0 +1,9 @@ +'use strict'; + +const pTry = (fn, ...arguments_) => new Promise(resolve => { + resolve(fn(...arguments_)); +}); + +module.exports = pTry; +// TODO: remove this in the next major version +module.exports.default = pTry; diff --git a/node_modules/p-try/license b/node_modules/p-try/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/p-try/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-try/package.json b/node_modules/p-try/package.json new file mode 100644 index 0000000..81c4d32 --- /dev/null +++ b/node_modules/p-try/package.json @@ -0,0 +1,42 @@ +{ + "name": "p-try", + "version": "2.2.0", + "description": "`Start a promise chain", + "license": "MIT", + "repository": "sindresorhus/p-try", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "try", + "resolve", + "function", + "catch", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/p-try/readme.md b/node_modules/p-try/readme.md new file mode 100644 index 0000000..4d7bd64 --- /dev/null +++ b/node_modules/p-try/readme.md @@ -0,0 +1,58 @@ +# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) + +> Start a promise chain + +[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) + + +## Install + +``` +$ npm install p-try +``` + + +## Usage + +```js +const pTry = require('p-try'); + +(async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } +})(); +``` + + +## API + +### pTry(fn, ...arguments) + +Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +#### fn + +The function to run to start the promise chain. + +#### arguments + +Arguments to pass to `fn`. + + +## Related + +- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pako/CHANGELOG.md b/node_modules/pako/CHANGELOG.md new file mode 100644 index 0000000..a861326 --- /dev/null +++ b/node_modules/pako/CHANGELOG.md @@ -0,0 +1,164 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [1.0.11] - 2020-01-29 +### Fixed +- Fix tests in node.js v12+, #179. + + +## [1.0.10] - 2019-02-28 +### Fixed +- Fix minified version, #161. + + +## [1.0.9] - 2019-02-28 +### Fixed +- Fix `new Buffer()` warning, #154. + + +## [1.0.8] - 2019-01-14 +### Fixed +- Fix raw inflate with dictionary, #155. + + +## [1.0.7] - 2018-11-29 +### Fixed +- Fixed RangeError in Crome 72, #150. + + +## [1.0.6] - 2017-09-14 +### Changed +- Improve @std/esm compatibility. + + +## [1.0.5] - 2017-03-17 +### Changed +- Maintenance. More formal `zlib` attribution and related + changes, #93. Thanks to @bastien-roucaries for the help. + + +## [1.0.4] - 2016-12-15 +### Changed +- Bump dev dependencies. + +### Fixed +- Make sure `err.message` is filled on throw. + +### Added +- Code examples for utf-16 string encoding & object compression. + + +## [1.0.3] - 2016-07-25 +### Fixed +- Maintenance: re-release to properly display latest version in npm registry + and badges. Because `npm publish` timestamp used instead of versions. + + +## [1.0.2] - 2016-07-21 +### Fixed +- Fixed nasty bug in deflate (wrong `d_buf` offset), which could cause + broken data in some rare cases. +- Also released as 0.2.9 to give chance to old dependents, not updated to 1.x + version. + + +## [1.0.1] - 2016-04-01 +### Added +- Added dictionary support. Thanks to @dignifiedquire. + + +## [1.0.0] - 2016-02-17 +### Changed +- Maintenance release (semver, coding style). + + +## [0.2.8] - 2015-09-14 +### Fixed +- Fixed regression after 0.2.4 for edge conditions in inflate wrapper (#65). + Added more tests to cover possible cases. + + +## [0.2.7] - 2015-06-09 +### Added +- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. + + +## [0.2.6] - 2015-03-24 +### Added +- Allow ArrayBuffer input. + + +## [0.2.5] - 2014-07-19 +### Fixed +- Workaround for Chrome 38.0.2096.0 script parser bug, #30. + + +## [0.2.4] - 2014-07-07 +### Fixed +- Fixed bug in inflate wrapper, #29 + + +## [0.2.3] - 2014-06-09 +### Changed +- Maintenance release, dependencies update. + + +## [0.2.2] - 2014-06-04 +### Fixed +- Fixed iOS 5.1 Safari issue with `apply(typed_array)`, #26. + + +## [0.2.1] - 2014-05-01 +### Fixed +- Fixed collision on switch dynamic/fixed tables. + + +## [0.2.0] - 2014-04-18 +### Added +- Added custom gzip headers support. +- Added strings support. +- More coverage tests. + +### Fixed +- Improved memory allocations for small chunks. +- ZStream properties rename/cleanup. + + +## [0.1.1] - 2014-03-20 +### Fixed +- Bugfixes for inflate/deflate. + + +## [0.1.0] - 2014-03-15 +### Added +- First release. + + +[1.0.10]: https://github.com/nodeca/pako/compare/1.0.10...1.0.11 +[1.0.10]: https://github.com/nodeca/pako/compare/1.0.9...1.0.10 +[1.0.9]: https://github.com/nodeca/pako/compare/1.0.8...1.0.9 +[1.0.8]: https://github.com/nodeca/pako/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/nodeca/pako/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/nodeca/pako/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/nodeca/pako/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/nodeca/pako/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/nodeca/pako/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/pako/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/pako/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/pako/compare/0.2.8...1.0.0 +[0.2.8]: https://github.com/nodeca/pako/compare/0.2.7...0.2.8 +[0.2.7]: https://github.com/nodeca/pako/compare/0.2.6...0.2.7 +[0.2.6]: https://github.com/nodeca/pako/compare/0.2.5...0.2.6 +[0.2.5]: https://github.com/nodeca/pako/compare/0.2.4...0.2.5 +[0.2.4]: https://github.com/nodeca/pako/compare/0.2.3...0.2.4 +[0.2.3]: https://github.com/nodeca/pako/compare/0.2.2...0.2.3 +[0.2.2]: https://github.com/nodeca/pako/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/nodeca/pako/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/nodeca/pako/compare/0.1.1...0.2.0 +[0.1.1]: https://github.com/nodeca/pako/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/nodeca/pako/releases/tag/0.1.0 diff --git a/node_modules/pako/LICENSE b/node_modules/pako/LICENSE new file mode 100644 index 0000000..a934ef8 --- /dev/null +++ b/node_modules/pako/LICENSE @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pako/README.md b/node_modules/pako/README.md new file mode 100644 index 0000000..e952992 --- /dev/null +++ b/node_modules/pako/README.md @@ -0,0 +1,191 @@ +pako +========================================== + +[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) +[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) + +> zlib port to javascript, very fast! + +__Why pako is cool:__ + +- Almost as fast in modern JS engines as C implementation (see benchmarks). +- Works in browsers, you can browserify any separate component. +- Chunking support for big blobs. +- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8). + +This project was done to understand how fast JS can be and is it necessary to +develop native C modules for CPU-intensive tasks. Enjoy the result! + + +__Famous projects, using pako:__ + +- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) +- [JSZip](http://stuk.github.io/jszip/) +- [mincer](https://github.com/nodeca/mincer) +- [JS-Git](https://github.com/creationix/js-git) and + [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) + by [@creationix](https://github.com/creationix) + + +__Benchmarks:__ + +``` +node v0.10.26, 1mb sample: + + deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) + deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) + deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) + ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) + deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) + deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) + * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) + inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) + inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) + ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) + inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) + inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) + * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) + +node v0.11.12, 1mb sample: + + deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) + deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) + deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) + ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) + deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) + deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) + * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) + inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) + inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) + ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) + inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) + inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) + * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) +``` + +zlib's test is partially affected by marshalling (that make sense for inflate only). +You can change deflate level to 0 in benchmark source, to investigate details. +For deflate level 6 results can be considered as correct. + +__Install:__ + +node.js: + +``` +npm install pako +``` + +browser: + +``` +bower install pako +``` + + +Example & API +------------- + +Full docs - http://nodeca.github.io/pako/ + +```javascript +var pako = require('pako'); + +// Deflate +// +var input = new Uint8Array(); +//... fill input data here +var output = pako.deflate(input); + +// Inflate (simple wrapper can throw exception on broken stream) +// +var compressed = new Uint8Array(); +//... fill data to uncompress here +try { + var result = pako.inflate(compressed); +} catch (err) { + console.log(err); +} + +// +// Alternate interface for chunking & without exceptions +// + +var inflator = new pako.Inflate(); + +inflator.push(chunk1, false); +inflator.push(chunk2, false); +... +inflator.push(chunkN, true); // true -> last chunk + +if (inflator.err) { + console.log(inflator.msg); +} + +var output = inflator.result; + +``` + +Sometime you can wish to work with strings. For example, to send +big objects as json to server. Pako detects input data type. You can +force output to be string with option `{ to: 'string' }`. + +```javascript +var pako = require('pako'); + +var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; + +var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); + +// +// Here you can do base64 encode, make xhr requests and so on. +// + +var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); +``` + + +Notes +----- + +Pako does not contain some specific zlib functions: + +- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, + `deflatePending`, `deflatePrime`, `deflateTune`. +- __inflate__ - methods `inflateCopy`, `inflateMark`, + `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`. +- High level inflate/deflate wrappers (classes) may not support some flush + modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH. + + +pako for enterprise +------------------- + +Available as part of the Tidelift Subscription + +The maintainers of pako and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-pako?utm_source=npm-pako&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +Authors +------- + +- Andrey Tupitsin [@anrd83](https://github.com/andr83) +- Vitaly Puzrin [@puzrin](https://github.com/puzrin) + +Personal thanks to: + +- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome + tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/) + tool and his advices. +- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with + testing. + +Original implementation (in C): + +- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler. + + +License +------- + +- MIT - all files, except `/lib/zlib` folder +- ZLIB - `/lib/zlib` content diff --git a/node_modules/pako/dist/pako.js b/node_modules/pako/dist/pako.js new file mode 100644 index 0000000..9ab7c68 --- /dev/null +++ b/node_modules/pako/dist/pako.js @@ -0,0 +1,6818 @@ +/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + +/** + * Deflate.result -> Uint8Array|Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Deflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + +/** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + +/** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ +function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: '' + }, options || {}); + + var opt = this.options; + + if (opt.raw && (opt.windowBits > 0)) { + opt.windowBits = -opt.windowBits; + } + + else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { + opt.windowBits += 16; + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + + if (opt.dictionary) { + var dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + this._dict_set = true; + } +} + +/** + * Deflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the compression context. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * array format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Deflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + + if (this.ended) { return false; } + + _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ + + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { + if (this.options.to === 'string') { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + + // Finalize on the last chunk. + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Deflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Deflate.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * deflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * Compress `data` with deflate algorithm and `options`. + * + * Supported options are: + * + * - level + * - windowBits + * - memLevel + * - strategy + * - dictionary + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); + * + * console.log(pako.deflate(data)); + * ``` + **/ +function deflate(input, options) { + var deflator = new Deflate(options); + + deflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (deflator.err) { throw deflator.msg || msg[deflator.err]; } + + return deflator.result; +} + + +/** + * deflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); +} + + +/** + * gzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but create gzip wrapper instead of + * deflate one. + **/ +function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); +} + + +exports.Deflate = Deflate; +exports.deflate = deflate; +exports.deflateRaw = deflateRaw; +exports.gzip = gzip; + +},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ +'use strict'; + + +var zlib_inflate = require('./zlib/inflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var c = require('./zlib/constants'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); +var GZheader = require('./zlib/gzheader'); + +var toString = Object.prototype.toString; + +/** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + +/* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + +/** + * Inflate.result -> Uint8Array|Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Inflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + +/** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + +/** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ +function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: '' + }, options || {}); + + var opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { opt.windowBits = -15; } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if ((opt.windowBits >= 0) && (opt.windowBits < 16) && + !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if ((opt.windowBits > 15) && (opt.windowBits < 48)) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + + this.header = new GZheader(); + + zlib_inflate.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { //In raw mode we need to set the dictionary early + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } +} + +/** + * Inflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the decompression context. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Inflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + + // Flag to properly process Z_BUF_ERROR on testing inflate call + // when we check that all output data was flushed. + var allowBufError = false; + + if (this.ended) { return false; } + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // Only binary strings can be decompressed on practice + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ + + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { + + if (this.options.to === 'string') { + + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } + + this.onData(utf8str); + + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + + // When no more input data, we should check that internal inflate buffers + // are flushed. The only way to do it when avail_out = 0 - run one more + // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. + // Here we set flag to process this error properly. + // + // NOTE. Deflate does not return error in this case and does not needs such + // logic. + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + + // Finalize on the last chunk. + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Inflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Inflate.prototype.onEnd = function (status) { + // On success - join + if (status === c.Z_OK) { + if (this.options.to === 'string') { + // Glue & convert here, until we teach pako to send + // utf8 aligned strings to onData + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * inflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) + * , output; + * + * try { + * output = pako.inflate(input); + * } catch (err) + * console.log(err); + * } + * ``` + **/ +function inflate(input, options) { + var inflator = new Inflate(options); + + inflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) { throw inflator.msg || msg[inflator.err]; } + + return inflator.result; +} + + +/** + * inflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); +} + + +/** + * ungzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + +exports.Inflate = Inflate; +exports.inflate = inflate; +exports.inflateRaw = inflateRaw; +exports.ungzip = inflate; + +},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ +'use strict'; + + +var TYPED_OK = (typeof Uint8Array !== 'undefined') && + (typeof Uint16Array !== 'undefined') && + (typeof Int32Array !== 'undefined'); + +function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.assign = function (obj /*from1, from2, from3, ...*/) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { continue; } + + if (typeof source !== 'object') { + throw new TypeError(source + 'must be non-object'); + } + + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + + return obj; +}; + + +// reduce buffer size, avoiding mem copy +exports.shrinkBuf = function (buf, size) { + if (buf.length === size) { return buf; } + if (buf.subarray) { return buf.subarray(0, size); } + buf.length = size; + return buf; +}; + + +var fnTyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + // Fallback to ordinary array + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + var i, l, len, pos, chunk, result; + + // calculate data length + len = 0; + for (i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + + // join chunks + result = new Uint8Array(len); + pos = 0; + for (i = 0, l = chunks.length; i < l; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + + return result; + } +}; + +var fnUntyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + return [].concat.apply([], chunks); + } +}; + + +// Enable/Disable typed arrays use, for testing +// +exports.setTyped = function (on) { + if (on) { + exports.Buf8 = Uint8Array; + exports.Buf16 = Uint16Array; + exports.Buf32 = Int32Array; + exports.assign(exports, fnTyped); + } else { + exports.Buf8 = Array; + exports.Buf16 = Array; + exports.Buf32 = Array; + exports.assign(exports, fnUntyped); + } +}; + +exports.setTyped(TYPED_OK); + +},{}],4:[function(require,module,exports){ +// String encode/decode helpers +'use strict'; + + +var utils = require('./common'); + + +// Quick check if we can use fast array to bin string conversion +// +// - apply(Array) can fail on Android 2.2 +// - apply(Uint8Array) can fail on iOS 5.1 Safari +// +var STR_APPLY_OK = true; +var STR_APPLY_UIA_OK = true; + +try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } +try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } + + +// Table with utf8 lengths (calculated by first byte of sequence) +// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, +// because max possible codepoint is 0x10ffff +var _utf8len = new utils.Buf8(256); +for (var q = 0; q < 256; q++) { + _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":3}],5:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var trees = require('./trees'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var msg = require('./messages'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ + +},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; +} + +module.exports = GZheader; + +},{}],10:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var inflate_fast = require('./inffast'); +var inflate_table = require('./inftrees'); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ + +},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; + +},{"../utils/common":3}],13:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = require('../utils/common'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; + +},{"../utils/common":3}],15:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/":[function(require,module,exports){ +// Top level file is just a mixin of submodules & constants +'use strict'; + +var assign = require('./lib/utils/common').assign; + +var deflate = require('./lib/deflate'); +var inflate = require('./lib/inflate'); +var constants = require('./lib/zlib/constants'); + +var pako = {}; + +assign(pako, deflate, inflate, constants); + +module.exports = pako; + +},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") +}); diff --git a/node_modules/pako/dist/pako.min.js b/node_modules/pako/dist/pako.min.js new file mode 100644 index 0000000..ba39731 --- /dev/null +++ b/node_modules/pako/dist/pako.min.js @@ -0,0 +1 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d="function"==typeof require&&require,t=0;t>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,sl&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<>>=v,c-=v),c<15&&(u+=B[i++]<>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<>>=v,c-=v,(v=r-s)>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d>>=g)),h>>>=3,d-=3}else{for(B=g+7;d>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(lu?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;i>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/node_modules/pako/dist/pako_deflate.js b/node_modules/pako/dist/pako_deflate.js new file mode 100644 index 0000000..d6bbaa1 --- /dev/null +++ b/node_modules/pako/dist/pako_deflate.js @@ -0,0 +1,3997 @@ +/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":1}],3:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],4:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],5:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var trees = require('./trees'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var msg = require('./messages'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ + +},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = require('../utils/common'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; + +},{"../utils/common":1}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/lib/deflate.js":[function(require,module,exports){ +'use strict'; + + +var zlib_deflate = require('./zlib/deflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); + +var toString = Object.prototype.toString; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + +var Z_NO_FLUSH = 0; +var Z_FINISH = 4; + +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_SYNC_FLUSH = 2; + +var Z_DEFAULT_COMPRESSION = -1; + +var Z_DEFAULT_STRATEGY = 0; + +var Z_DEFLATED = 8; + +/* ===========================================================================*/ + + +/** + * class Deflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[deflate]], + * [[deflateRaw]] and [[gzip]]. + **/ + +/* internal + * Deflate.chunks -> Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + +/** + * Deflate.result -> Uint8Array|Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Deflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + +/** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + +/** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ +function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: '' + }, options || {}); + + var opt = this.options; + + if (opt.raw && (opt.windowBits > 0)) { + opt.windowBits = -opt.windowBits; + } + + else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { + opt.windowBits += 16; + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + + if (opt.dictionary) { + var dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + this._dict_set = true; + } +} + +/** + * Deflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the compression context. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * array format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Deflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + + if (this.ended) { return false; } + + _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ + + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { + if (this.options.to === 'string') { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + + // Finalize on the last chunk. + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Deflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Deflate.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * deflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * Compress `data` with deflate algorithm and `options`. + * + * Supported options are: + * + * - level + * - windowBits + * - memLevel + * - strategy + * - dictionary + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); + * + * console.log(pako.deflate(data)); + * ``` + **/ +function deflate(input, options) { + var deflator = new Deflate(options); + + deflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (deflator.err) { throw deflator.msg || msg[deflator.err]; } + + return deflator.result; +} + + +/** + * deflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); +} + + +/** + * gzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but create gzip wrapper instead of + * deflate one. + **/ +function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); +} + + +exports.Deflate = Deflate; +exports.deflate = deflate; +exports.deflateRaw = deflateRaw; +exports.gzip = gzip; + +},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") +}); diff --git a/node_modules/pako/dist/pako_deflate.min.js b/node_modules/pako/dist/pako_deflate.min.js new file mode 100644 index 0000000..7792553 --- /dev/null +++ b/node_modules/pako/dist/pako_deflate.min.js @@ -0,0 +1 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function i(s,h,l){function o(e,t){if(!h[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(_)return _(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=h[e]={exports:{}};s[e][0].call(r.exports,function(t){return o(s[e][1][t]||t)},r,r.exports,i,s,h,l)}return h[e].exports}for(var _="function"==typeof require&&require,t=0;t>>6:(a<65536?e[i++]=224|a>>>12:(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63),e[i++]=128|a>>>6&63),e[i++]=128|63&a);return e},a.buf2binstring=function(t){return _(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,n=e.length;a>10&1023,h[n++]=56320|1023&r)}return _(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,n){var r=h,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t}},{}],5:[function(t,e,a){"use strict";var l,u=t("../utils/common"),o=t("./trees"),f=t("./adler32"),c=t("./crc32"),n=t("./messages"),_=0,d=4,p=0,g=-2,m=-1,b=4,r=2,v=8,w=9,i=286,s=30,h=19,y=2*i+1,k=15,z=3,x=258,B=x+z+1,A=42,C=113,S=1,j=2,E=3,U=4;function D(t,e){return t.msg=n[e],e}function I(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(u.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function T(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,q(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function N(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function R(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+x,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&il&&0!=--r);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,n,r,i,s,h,l,o,_,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-B)){for(u.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--a;);for(e=a=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--a;);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,o=r,_=void 0,_=s.avail_in,o<_&&(_=o),a=0===_?0:(s.avail_in-=_,u.arraySet(h,s.input,s.next_in,_,l),1===s.state.wrap?s.adler=f(s.adler,h,_,l):2===s.state.wrap&&(s.adler=c(s.adler,h,_,l)),s.next_in+=_,s.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=z)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-z),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=z){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-z,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-z),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===_)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-B&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),S)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return Q(t,e,v,15,8,0)},a.deflateInit2=Q,a.deflateReset=J,a.deflateResetKeep=G,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},a.deflate=function(t,e){var a,n,r,i;if(!t||!t.state||5>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=c(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=C);else{var s=v+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=C,N(n,s),0!==n.strstart&&(N(n,t.adler>>>16),N(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&q(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=C)):n.status=C),0!==n.pending){if(q(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&I(e)<=I(a)&&e!==d)return D(t,-5);if(666===n.status&&0!==t.avail_in)return D(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==_&&666!==n.status){var h=2===n.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===_)return S;break}if(t.match_length=0,a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):3===n.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===_)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=z&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=z?(a=o._tr_tally(t,1,t.match_length-z),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):l[n.level].func(n,e);if(h!==E&&h!==U||(n.status=666),h===S||h===E)return 0===t.avail_out&&(n.last_flush=-1),p;if(h===j&&(1===e?o._tr_align(n):5!==e&&(o._tr_stored_block(n,0,0,!1),3===e&&(O(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(N(n,t.adler>>>16),N(n,65535&t.adler)),q(t),0=a.w_size&&(0===i&&(O(a.head),a.strstart=0,a.block_start=0,a.insert=0),o=new u.Buf8(a.w_size),u.arraySet(o,e,_-a.w_size,a.w_size,0),e=o,_=a.w_size),s=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,H(a);a.lookahead>=z;){for(n=a.strstart,r=a.lookahead-(z-1);a.ins_h=(a.ins_h<>>7)]}function L(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function N(t,e,a){t.bi_valid>r-a?(t.bi_buf|=e<>r-t.bi_valid,t.bi_valid+=a-r):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function F(t,e,a){var n,r,i=new Array(m+1),s=0;for(n=1;n<=m;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=H(i[h]++,h))}}function K(t){var e;for(e=0;e>1;1<=a;a--)G(t,i,a);for(r=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,G(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=m;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return h;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?Y(t,e,a,n):4===t.strategy||i===r?(N(t,2+(n?1:0),3),J(t,A,C)):(N(t,4+(n?1:0),3),function(t,e,a,n){var r;for(N(t,e-257,5),N(t,a-1,5),N(t,n-4,4),r=0;r>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(j[a]+d+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;N(t,2,3),R(t,b,A),16===(e=t).bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var s=t("./zlib/deflate"),h=t("./utils/common"),l=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),o=Object.prototype.toString,_=0,d=-1,u=0,f=8;function c(t){if(!(this instanceof c))return new c(t);this.options=h.assign({level:d,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&0= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":1}],3:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],4:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; + +},{}],5:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; +} + +module.exports = GZheader; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; + +},{}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var inflate_fast = require('./inffast'); +var inflate_table = require('./inftrees'); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ + +},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; + +},{"../utils/common":1}],10:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/lib/inflate.js":[function(require,module,exports){ +'use strict'; + + +var zlib_inflate = require('./zlib/inflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var c = require('./zlib/constants'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); +var GZheader = require('./zlib/gzheader'); + +var toString = Object.prototype.toString; + +/** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + +/* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + +/** + * Inflate.result -> Uint8Array|Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Inflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + +/** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + +/** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ +function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: '' + }, options || {}); + + var opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { opt.windowBits = -15; } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if ((opt.windowBits >= 0) && (opt.windowBits < 16) && + !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if ((opt.windowBits > 15) && (opt.windowBits < 48)) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + + this.header = new GZheader(); + + zlib_inflate.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { //In raw mode we need to set the dictionary early + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } +} + +/** + * Inflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the decompression context. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Inflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + + // Flag to properly process Z_BUF_ERROR on testing inflate call + // when we check that all output data was flushed. + var allowBufError = false; + + if (this.ended) { return false; } + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // Only binary strings can be decompressed on practice + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ + + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { + + if (this.options.to === 'string') { + + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } + + this.onData(utf8str); + + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + + // When no more input data, we should check that internal inflate buffers + // are flushed. The only way to do it when avail_out = 0 - run one more + // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. + // Here we set flag to process this error properly. + // + // NOTE. Deflate does not return error in this case and does not needs such + // logic. + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + + // Finalize on the last chunk. + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Inflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Inflate.prototype.onEnd = function (status) { + // On success - join + if (status === c.Z_OK) { + if (this.options.to === 'string') { + // Glue & convert here, until we teach pako to send + // utf8 aligned strings to onData + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * inflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) + * , output; + * + * try { + * output = pako.inflate(input); + * } catch (err) + * console.log(err); + * } + * ``` + **/ +function inflate(input, options) { + var inflator = new Inflate(options); + + inflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) { throw inflator.msg || msg[inflator.err]; } + + return inflator.result; +} + + +/** + * inflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); +} + + +/** + * ungzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + +exports.Inflate = Inflate; +exports.inflate = inflate; +exports.inflateRaw = inflateRaw; +exports.ungzip = inflate; + +},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") +}); diff --git a/node_modules/pako/dist/pako_inflate.min.js b/node_modules/pako/dist/pako_inflate.min.js new file mode 100644 index 0000000..a191a78 --- /dev/null +++ b/node_modules/pako/dist/pako_inflate.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<>>=v,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=w,d-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg="invalid distance code",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + +/** + * Deflate.result -> Uint8Array|Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Deflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + +/** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + +/** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ +function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: '' + }, options || {}); + + var opt = this.options; + + if (opt.raw && (opt.windowBits > 0)) { + opt.windowBits = -opt.windowBits; + } + + else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { + opt.windowBits += 16; + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + + if (opt.dictionary) { + var dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + this._dict_set = true; + } +} + +/** + * Deflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the compression context. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * array format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Deflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + + if (this.ended) { return false; } + + _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ + + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { + if (this.options.to === 'string') { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + + // Finalize on the last chunk. + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Deflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Deflate.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * deflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * Compress `data` with deflate algorithm and `options`. + * + * Supported options are: + * + * - level + * - windowBits + * - memLevel + * - strategy + * - dictionary + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); + * + * console.log(pako.deflate(data)); + * ``` + **/ +function deflate(input, options) { + var deflator = new Deflate(options); + + deflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (deflator.err) { throw deflator.msg || msg[deflator.err]; } + + return deflator.result; +} + + +/** + * deflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); +} + + +/** + * gzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but create gzip wrapper instead of + * deflate one. + **/ +function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); +} + + +exports.Deflate = Deflate; +exports.deflate = deflate; +exports.deflateRaw = deflateRaw; +exports.gzip = gzip; diff --git a/node_modules/pako/lib/inflate.js b/node_modules/pako/lib/inflate.js new file mode 100644 index 0000000..7535d15 --- /dev/null +++ b/node_modules/pako/lib/inflate.js @@ -0,0 +1,423 @@ +'use strict'; + + +var zlib_inflate = require('./zlib/inflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var c = require('./zlib/constants'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); +var GZheader = require('./zlib/gzheader'); + +var toString = Object.prototype.toString; + +/** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + +/* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + +/** + * Inflate.result -> Uint8Array|Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Inflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + +/** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + +/** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ +function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: '' + }, options || {}); + + var opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { opt.windowBits = -15; } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if ((opt.windowBits >= 0) && (opt.windowBits < 16) && + !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if ((opt.windowBits > 15) && (opt.windowBits < 48)) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + + this.header = new GZheader(); + + zlib_inflate.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { //In raw mode we need to set the dictionary early + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } +} + +/** + * Inflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the decompression context. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Inflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + + // Flag to properly process Z_BUF_ERROR on testing inflate call + // when we check that all output data was flushed. + var allowBufError = false; + + if (this.ended) { return false; } + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // Only binary strings can be decompressed on practice + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ + + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { + + if (this.options.to === 'string') { + + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } + + this.onData(utf8str); + + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + + // When no more input data, we should check that internal inflate buffers + // are flushed. The only way to do it when avail_out = 0 - run one more + // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. + // Here we set flag to process this error properly. + // + // NOTE. Deflate does not return error in this case and does not needs such + // logic. + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + + // Finalize on the last chunk. + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Inflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Inflate.prototype.onEnd = function (status) { + // On success - join + if (status === c.Z_OK) { + if (this.options.to === 'string') { + // Glue & convert here, until we teach pako to send + // utf8 aligned strings to onData + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * inflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) + * , output; + * + * try { + * output = pako.inflate(input); + * } catch (err) + * console.log(err); + * } + * ``` + **/ +function inflate(input, options) { + var inflator = new Inflate(options); + + inflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) { throw inflator.msg || msg[inflator.err]; } + + return inflator.result; +} + + +/** + * inflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); +} + + +/** + * ungzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + +exports.Inflate = Inflate; +exports.inflate = inflate; +exports.inflateRaw = inflateRaw; +exports.ungzip = inflate; diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js new file mode 100644 index 0000000..58be4be --- /dev/null +++ b/node_modules/pako/lib/utils/common.js @@ -0,0 +1,105 @@ +'use strict'; + + +var TYPED_OK = (typeof Uint8Array !== 'undefined') && + (typeof Uint16Array !== 'undefined') && + (typeof Int32Array !== 'undefined'); + +function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.assign = function (obj /*from1, from2, from3, ...*/) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { continue; } + + if (typeof source !== 'object') { + throw new TypeError(source + 'must be non-object'); + } + + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + + return obj; +}; + + +// reduce buffer size, avoiding mem copy +exports.shrinkBuf = function (buf, size) { + if (buf.length === size) { return buf; } + if (buf.subarray) { return buf.subarray(0, size); } + buf.length = size; + return buf; +}; + + +var fnTyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + // Fallback to ordinary array + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + var i, l, len, pos, chunk, result; + + // calculate data length + len = 0; + for (i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + + // join chunks + result = new Uint8Array(len); + pos = 0; + for (i = 0, l = chunks.length; i < l; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + + return result; + } +}; + +var fnUntyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + return [].concat.apply([], chunks); + } +}; + + +// Enable/Disable typed arrays use, for testing +// +exports.setTyped = function (on) { + if (on) { + exports.Buf8 = Uint8Array; + exports.Buf16 = Uint16Array; + exports.Buf32 = Int32Array; + exports.assign(exports, fnTyped); + } else { + exports.Buf8 = Array; + exports.Buf16 = Array; + exports.Buf32 = Array; + exports.assign(exports, fnUntyped); + } +}; + +exports.setTyped(TYPED_OK); diff --git a/node_modules/pako/lib/utils/strings.js b/node_modules/pako/lib/utils/strings.js new file mode 100644 index 0000000..b07a732 --- /dev/null +++ b/node_modules/pako/lib/utils/strings.js @@ -0,0 +1,187 @@ +// String encode/decode helpers +'use strict'; + + +var utils = require('./common'); + + +// Quick check if we can use fast array to bin string conversion +// +// - apply(Array) can fail on Android 2.2 +// - apply(Uint8Array) can fail on iOS 5.1 Safari +// +var STR_APPLY_OK = true; +var STR_APPLY_UIA_OK = true; + +try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } +try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } + + +// Table with utf8 lengths (calculated by first byte of sequence) +// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, +// because max possible codepoint is 0x10ffff +var _utf8len = new utils.Buf8(256); +for (var q = 0; q < 256; q++) { + _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; diff --git a/node_modules/pako/lib/zlib/README b/node_modules/pako/lib/zlib/README new file mode 100644 index 0000000..88a8752 --- /dev/null +++ b/node_modules/pako/lib/zlib/README @@ -0,0 +1,59 @@ +Content of this folder follows zlib C sources as close as possible. +That's intended to simplify maintainability and guarantee equal API +and result. + +Key differences: + +- Everything is in JavaScript. +- No platform-dependent blocks. +- Some things like crc32 rewritten to keep size small and make JIT + work better. +- Some code is different due missed features in JS (macros, pointers, + structures, header files) +- Specific API methods are not implemented (see notes in root readme) + +This port is based on zlib 1.2.8. + +This port is under zlib license (see below) with contribution and addition of javascript +port under expat license (see LICENSE at root of project) + +Copyright: +(C) 1995-2013 Jean-loup Gailly and Mark Adler +(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + + +From zlib's README +============================================================================= + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. + +Copyright notice: + + (C) 1995-2013 Jean-loup Gailly and Mark Adler + +Copyright (c) <''year''> <''copyright holders''> + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu diff --git a/node_modules/pako/lib/zlib/adler32.js b/node_modules/pako/lib/zlib/adler32.js new file mode 100644 index 0000000..d440a98 --- /dev/null +++ b/node_modules/pako/lib/zlib/adler32.js @@ -0,0 +1,51 @@ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; diff --git a/node_modules/pako/lib/zlib/constants.js b/node_modules/pako/lib/zlib/constants.js new file mode 100644 index 0000000..569b872 --- /dev/null +++ b/node_modules/pako/lib/zlib/constants.js @@ -0,0 +1,68 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; diff --git a/node_modules/pako/lib/zlib/crc32.js b/node_modules/pako/lib/zlib/crc32.js new file mode 100644 index 0000000..6a96092 --- /dev/null +++ b/node_modules/pako/lib/zlib/crc32.js @@ -0,0 +1,59 @@ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; diff --git a/node_modules/pako/lib/zlib/deflate.js b/node_modules/pako/lib/zlib/deflate.js new file mode 100644 index 0000000..3145698 --- /dev/null +++ b/node_modules/pako/lib/zlib/deflate.js @@ -0,0 +1,1874 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var trees = require('./trees'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var msg = require('./messages'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ diff --git a/node_modules/pako/lib/zlib/gzheader.js b/node_modules/pako/lib/zlib/gzheader.js new file mode 100644 index 0000000..9582cba --- /dev/null +++ b/node_modules/pako/lib/zlib/gzheader.js @@ -0,0 +1,58 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; +} + +module.exports = GZheader; diff --git a/node_modules/pako/lib/zlib/inffast.js b/node_modules/pako/lib/zlib/inffast.js new file mode 100644 index 0000000..4cc958f --- /dev/null +++ b/node_modules/pako/lib/zlib/inffast.js @@ -0,0 +1,345 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; diff --git a/node_modules/pako/lib/zlib/inflate.js b/node_modules/pako/lib/zlib/inflate.js new file mode 100644 index 0000000..6384844 --- /dev/null +++ b/node_modules/pako/lib/zlib/inflate.js @@ -0,0 +1,1556 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var inflate_fast = require('./inffast'); +var inflate_table = require('./inftrees'); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ diff --git a/node_modules/pako/lib/zlib/inftrees.js b/node_modules/pako/lib/zlib/inftrees.js new file mode 100644 index 0000000..ec4e4e9 --- /dev/null +++ b/node_modules/pako/lib/zlib/inftrees.js @@ -0,0 +1,343 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; diff --git a/node_modules/pako/lib/zlib/messages.js b/node_modules/pako/lib/zlib/messages.js new file mode 100644 index 0000000..426daec --- /dev/null +++ b/node_modules/pako/lib/zlib/messages.js @@ -0,0 +1,32 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; diff --git a/node_modules/pako/lib/zlib/trees.js b/node_modules/pako/lib/zlib/trees.js new file mode 100644 index 0000000..aaf15db --- /dev/null +++ b/node_modules/pako/lib/zlib/trees.js @@ -0,0 +1,1222 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = require('../utils/common'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; diff --git a/node_modules/pako/lib/zlib/zstream.js b/node_modules/pako/lib/zlib/zstream.js new file mode 100644 index 0000000..122acfe --- /dev/null +++ b/node_modules/pako/lib/zlib/zstream.js @@ -0,0 +1,47 @@ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; diff --git a/node_modules/pako/package.json b/node_modules/pako/package.json new file mode 100644 index 0000000..7aaade8 --- /dev/null +++ b/node_modules/pako/package.json @@ -0,0 +1,44 @@ +{ + "name": "pako", + "description": "zlib port to javascript - fast, modularized, with browser support", + "version": "1.0.11", + "keywords": [ + "zlib", + "deflate", + "inflate", + "gzip" + ], + "homepage": "https://github.com/nodeca/pako", + "contributors": [ + "Andrei Tuputcyn (https://github.com/andr83)", + "Vitaly Puzrin (https://github.com/puzrin)", + "Friedel Ziegelmayer (https://github.com/dignifiedquire)", + "Kirill Efimov (https://github.com/Kirill89)", + "Jean-loup Gailly", + "Mark Adler" + ], + "files": [ + "index.js", + "dist/", + "lib/" + ], + "license": "(MIT AND Zlib)", + "repository": "nodeca/pako", + "scripts": { + "test": "make test" + }, + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "browserify": "^16.2.3", + "buffer-from": "^1.1.1", + "eslint": "^5.9.0", + "istanbul": "^0.4.5", + "mocha": "^5.2.0", + "multiparty": "^4.1.3", + "ndoc": "^5.0.1", + "uglify-js": "=3.4.8", + "zlibjs": "^0.3.1" + }, + "dependencies": {} +} diff --git a/node_modules/path-exists/index.d.ts b/node_modules/path-exists/index.d.ts new file mode 100644 index 0000000..54b7ab8 --- /dev/null +++ b/node_modules/path-exists/index.d.ts @@ -0,0 +1,28 @@ +declare const pathExists: { + /** + Check if a path exists. + + @returns Whether the path exists. + + @example + ``` + // foo.ts + import pathExists = require('path-exists'); + + (async () => { + console.log(await pathExists('foo.ts')); + //=> true + })(); + ``` + */ + (path: string): Promise; + + /** + Synchronously check if a path exists. + + @returns Whether the path exists. + */ + sync(path: string): boolean; +}; + +export = pathExists; diff --git a/node_modules/path-exists/index.js b/node_modules/path-exists/index.js new file mode 100644 index 0000000..1943921 --- /dev/null +++ b/node_modules/path-exists/index.js @@ -0,0 +1,23 @@ +'use strict'; +const fs = require('fs'); +const {promisify} = require('util'); + +const pAccess = promisify(fs.access); + +module.exports = async path => { + try { + await pAccess(path); + return true; + } catch (_) { + return false; + } +}; + +module.exports.sync = path => { + try { + fs.accessSync(path); + return true; + } catch (_) { + return false; + } +}; diff --git a/node_modules/path-exists/license b/node_modules/path-exists/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/path-exists/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/path-exists/package.json b/node_modules/path-exists/package.json new file mode 100644 index 0000000..0755256 --- /dev/null +++ b/node_modules/path-exists/package.json @@ -0,0 +1,39 @@ +{ + "name": "path-exists", + "version": "4.0.0", + "description": "Check if a path exists", + "license": "MIT", + "repository": "sindresorhus/path-exists", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "path", + "exists", + "exist", + "file", + "filepath", + "fs", + "filesystem", + "file-system", + "access", + "stat" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/path-exists/readme.md b/node_modules/path-exists/readme.md new file mode 100644 index 0000000..81f9845 --- /dev/null +++ b/node_modules/path-exists/readme.md @@ -0,0 +1,52 @@ +# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) + +> Check if a path exists + +NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed. + +While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. + +Never use this before handling a file though: + +> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. + + +## Install + +``` +$ npm install path-exists +``` + + +## Usage + +```js +// foo.js +const pathExists = require('path-exists'); + +(async () => { + console.log(await pathExists('foo.js')); + //=> true +})(); +``` + + +## API + +### pathExists(path) + +Returns a `Promise` of whether the path exists. + +### pathExists.sync(path) + +Returns a `boolean` of whether the path exists. + + +## Related + +- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pdf-lib/LICENSE.md b/node_modules/pdf-lib/LICENSE.md new file mode 100644 index 0000000..7a237e6 --- /dev/null +++ b/node_modules/pdf-lib/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Andrew Dillon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/pdf-lib/README.md b/node_modules/pdf-lib/README.md new file mode 100644 index 0000000..02c9bed --- /dev/null +++ b/node_modules/pdf-lib/README.md @@ -0,0 +1,1504 @@ + +

+pdf-lib +

+
+ +
+ Create and modify PDF documents in any JavaScript environment. +
+
+ Designed to work in any modern JavaScript runtime. Tested in Node, Browser, Deno, and React Native environments. +
+ +
+ +
+ + + NPM Version + + + + CircleCI Build Status + + + + Prettier Badge + + + + Discord Badge + +
+ +
+ +> **Learn more at [pdf-lib.js.org](https://pdf-lib.js.org)** + +## Table of Contents + +- [Features](#features) +- [Motivation](#motivation) +- [Usage Examples](#usage-examples) + - [Create Document](#create-document) + - [Modify Document](#modify-document) + - [Create Form](#create-form) + - [Fill Form](#fill-form) + - [Flatten Form](#flatten-form) + - [Copy Pages](#copy-pages) + - [Embed PNG and JPEG Images](#embed-png-and-jpeg-images) + - [Embed PDF Pages](#embed-pdf-pages) + - [Embed Font and Measure Text](#embed-font-and-measure-text) + - [Add Attachments](#add-attachments) + - [Set Document Metadata](#set-document-metadata) + - [Read Document Metadata](#read-document-metadata) + - [Set Viewer Preferences](#set-viewer-preferences) + - [Read Viewer Preferences](#read-viewer-preferences) + - [Draw SVG Paths](#draw-svg-paths) +- [Deno Usage](#deno-usage) +- [Complete Examples](#complete-examples) +- [Installation](#installation) +- [Documentation](#documentation) +- [Fonts and Unicode](#fonts-and-unicode) +- [Creating and Filling Forms](#creating-and-filling-forms) +- [Limitations](#limitations) +- [Help and Discussion](#help-and-discussion) +- [Encryption Handling](#encryption-handling) +- [Migrating to v1.0.0](docs/MIGRATION.md) +- [Contributing](#contributing) +- [Maintainership](#maintainership) +- [Tutorials and Cool Stuff](#tutorials-and-cool-stuff) +- [Prior Art](#prior-art) +- [Git History Rewrite](#git-history-rewrite) +- [License](#license) + +## Features + +- Create new PDFs +- Modify existing PDFs +- Create forms +- Fill forms +- Flatten forms +- Add Pages +- Insert Pages +- Remove Pages +- Copy pages between PDFs +- Draw Text +- Draw Images +- Draw PDF Pages +- Draw Vector Graphics +- Draw SVG Paths +- Measure width and height of text +- Embed Fonts (supports UTF-8 and UTF-16 character sets) +- Set document metadata +- Read document metadata +- Set viewer preferences +- Read viewer preferences +- Add attachments + +## Motivation + +`pdf-lib` was created to address the JavaScript ecosystem's lack of robust support for PDF manipulation (especially for PDF _modification_). + +Two of `pdf-lib`'s distinguishing features are: + +1. Supporting modification (editing) of existing documents. +2. Working in all JavaScript environments - not just in Node or the Browser. + +There are [other](#prior-art) good open source JavaScript PDF libraries available. However, most of them can only _create_ documents, they cannot _modify_ existing ones. And many of them only work in particular environments. + +## Usage Examples + +### Create Document + +_This example produces [this PDF](assets/pdfs/examples/create_document.pdf)._ + +[Try the JSFiddle demo](https://jsfiddle.net/Hopding/rxwsc8f5/13/) + + +```js +import { PDFDocument, StandardFonts, rgb } from 'pdf-lib' + +// Create a new PDFDocument +const pdfDoc = await PDFDocument.create() + +// Embed the Times Roman font +const timesRomanFont = await pdfDoc.embedFont(StandardFonts.TimesRoman) + +// Add a blank page to the document +const page = pdfDoc.addPage() + +// Get the width and height of the page +const { width, height } = page.getSize() + +// Draw a string of text toward the top of the page +const fontSize = 30 +page.drawText('Creating PDFs in JavaScript is awesome!', { + x: 50, + y: height - 4 * fontSize, + size: fontSize, + font: timesRomanFont, + color: rgb(0, 0.53, 0.71), +}) + +// Serialize the PDFDocument to bytes (a Uint8Array) +const pdfBytes = await pdfDoc.save() + +// For example, `pdfBytes` can be: +// • Written to a file in Node +// • Downloaded from the browser +// • Rendered in an + + + + + + + + + + diff --git a/test/data.test.js b/test/data.test.js new file mode 100644 index 0000000..a1034f3 --- /dev/null +++ b/test/data.test.js @@ -0,0 +1,83 @@ +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert'); + +const LabelData = require('../src/data'); + +test('baris "KODE UNIK | SN" dipecah menjadi payload dan SN', () => { + const items = LabelData.parseText('ONT-0910 26-5BD9 | 12345678'); + assert.strictEqual(items.length, 1); + const item = items[0]; + assert.strictEqual(item.payload, 'ONT-0910 26-5BD9'); + assert.strictEqual(item.sn, '12345678'); + assert.strictEqual(item.main, 'ONT-0910'); + assert.strictEqual(item.unique, '26-5BD9'); + assert.strictEqual(item.snText, 'SN: - 12345678'); +}); + +test('SN tidak ikut masuk ke payload QR Code', () => { + const items = LabelData.parseText('ONT-0910 26-5BD9 | 12345678'); + assert.ok(items[0].payload.indexOf('12345678') === -1, 'SN tidak boleh ada di payload QR'); +}); + +test('baris tanpa SN tetap memakai format "SN: -"', () => { + const items = LabelData.parseText('ONT-0910 26-5BD9'); + assert.strictEqual(items[0].sn, ''); + assert.strictEqual(items[0].snText, 'SN: -'); + assert.strictEqual(items[0].payload, 'ONT-0910 26-5BD9'); +}); + +test('prefix "SN:" pada nilai SN dibuang otomatis', () => { + const items = LabelData.parseText('ONT-0910 26-5BD9 | SN: 99887766'); + assert.strictEqual(items[0].sn, '99887766'); + assert.strictEqual(items[0].snText, 'SN: - 99887766'); +}); + +test('baris kosong, komentar, dan BOM diabaikan', () => { + const items = LabelData.parseText('\uFEFF\r\n# komentar\r\nONT-0910 26-5BD9\r\n\r\n \r\n'); + assert.strictEqual(items.length, 1); + assert.strictEqual(items[0].payload, 'ONT-0910 26-5BD9'); +}); + +test('input JSON dibaca dan payload dirakit dari code + unique', () => { + const items = LabelData.parseText(JSON.stringify([ + { code: 'ONT-0910', unique: '26-5BD9', sn: '12345678' }, + { code: 'ONT-0910', unique: '26-3D0F' } + ])); + assert.strictEqual(items.length, 2); + assert.strictEqual(items[0].payload, 'ONT-0910 26-5BD9'); + assert.strictEqual(items[0].main, 'ONT-0910'); + assert.strictEqual(items[0].unique, '26-5BD9'); + assert.strictEqual(items[0].snText, 'SN: - 12345678'); + assert.strictEqual(items[1].snText, 'SN: -'); +}); + +test('kode gabungan ONT-191026-3BA3 tetap ditampilkan dua baris', () => { + const items = LabelData.parseText('ONT-191026-3BA3 | 12345678'); + assert.strictEqual(items.length, 1); + const item = items[0]; + assert.strictEqual(item.payload, 'ONT-191026-3BA3'); + assert.strictEqual(item.main, 'ONT-1910'); + assert.strictEqual(item.unique, '26-3BA3'); + assert.strictEqual(item.snText, 'SN: - 12345678'); + + const fromJson = LabelData.parseText(JSON.stringify([ + { code: 'ONT-191026-3BA3', sn: '12345678' } + ])); + assert.strictEqual(fromJson[0].payload, 'ONT-191026-3BA3'); + assert.strictEqual(fromJson[0].main, 'ONT-1910'); + assert.strictEqual(fromJson[0].unique, '26-3BA3'); +}); + +test('kode tanpa spasi yang bukan format gabungan tidak dipecah', () => { + const items = LabelData.parseText('TSA0409265BD9'); + assert.strictEqual(items[0].main, 'TSA0409265BD9'); + assert.strictEqual(items[0].unique, ''); +}); + +test('kode dengan spasi dipecah pada spasi terakhir (sama seperti aplikasi awal)', () => { + const items = LabelData.parseText('ONT-0910 26-5BD9'); + assert.strictEqual(items[0].main, 'ONT-0910'); + assert.strictEqual(items[0].unique, '26-5BD9'); +}); diff --git a/test/layout.test.js b/test/layout.test.js new file mode 100644 index 0000000..74ef8ce --- /dev/null +++ b/test/layout.test.js @@ -0,0 +1,237 @@ +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert'); + +const LabelLayout = require('../src/layout'); +const HelveticaMetrics = require('../assets/helvetica-metrics').HelveticaMetrics; + +function approx(actual, expected, tolerance, message) { + assert.ok( + Math.abs(actual - expected) <= tolerance, + (message || 'nilai') + ': ' + actual + ' !== ' + expected + ' (toleransi ' + tolerance + ')' + ); +} + +test('ukuran halaman 100 x 150 mm dikonversi ke point dengan rumus 1 mm = 72/25.4 pt', () => { + const layout = LabelLayout.create(); + approx(layout.page.widthPt, 283.4646, 0.001, 'lebar halaman (pt)'); + approx(layout.page.heightPt, 425.1969, 0.001, 'tinggi halaman (pt)'); + approx(layout.page.widthMm, 100, 0.0001, 'lebar halaman (mm)'); + approx(layout.page.heightMm, 150, 0.0001, 'tinggi halaman (mm)'); +}); + +test('layout bawaan: 3 kolom x 6 baris = 18 label per halaman', () => { + const layout = LabelLayout.create(); + assert.strictEqual(layout.grid.columns, 3); + assert.strictEqual(layout.grid.rows, 6); + assert.strictEqual(layout.perPage, 18); +}); + +test('ukuran sel label mengikuti format 100 x 150 mm 3 kolom x 6 baris', () => { + const layout = LabelLayout.create(); + // (100 - 2*2.5 margin - 2*4.5 gap) / 3 kolom = 28.667 mm + approx(layout.grid.cellWidthMm, 28.6667, 0.001, 'lebar sel'); + // (150 - 2*2.5 margin - 5*5 gap) / 6 baris = 20 mm + approx(layout.grid.cellHeightMm, 20, 0.001, 'tinggi sel'); +}); + +test('jarak antar baris mengisi tinggi halaman (6 baris)', () => { + const layout = LabelLayout.create(); + const row2 = layout.labelBox(3); + approx(row2.yMm, 2.5 + 20 + 5, 0.0001, 'baris kedua'); + const row4 = layout.labelBox(9); + approx(row4.yMm, 2.5 + 3 * 25, 0.0001, 'baris keempat'); + const row6 = layout.labelBox(15); + approx(row6.yMm, 2.5 + 5 * 25, 0.0001, 'baris keenam'); + approx(row6.yMm + row6.heightMm, 147.5, 0.0001, 'tepi bawah baris keenam'); +}); + +test('teks dan QR rata tengah di dalam sel label', () => { + const layout = LabelLayout.create(); + const box = layout.labelBox(0); + const boxes = layout.contentBoxes(0); + const centerYMm = box.yMm + box.heightMm / 2; + approx(boxes.textBox.yMm, 2.5 + 1.0, 0.0001, 'teks memakai padding atas'); + approx(boxes.qrBox.yMm, 2.5 + (20 - 13.5) / 2, 0.0001, 'QR rata tengah'); + approx(boxes.qrBox.yMm + boxes.qrBox.heightMm / 2, centerYMm, 0.0001, 'pusat QR'); + assert.strictEqual(layout.config.verticalAlign, 'center'); + + const text = LabelLayout.composeText( + { main: 'ONT-1910', unique: '26-3BA3', snText: 'SN: - 12345678' }, + boxes.textBox, + layout.config, + HelveticaMetrics.measure + ); + const first = text.blocks[0]; + const last = text.blocks[text.blocks.length - 1]; + approx( + (first.yMm + last.yMm + last.heightMm) / 2, + centerYMm, + 0.0001, + 'pusat blok teks' + ); +}); + +test('QR tepat di pusat area barcode pada semua label dan halaman', () => { + const layout = LabelLayout.create(); + const offsets = []; + + // Dua halaman penuh: pola koordinat harus sama di halaman berikutnya. + for (let i = 0; i < layout.perPage * 2; i++) { + const box = layout.labelBox(i); + const boxes = layout.contentBoxes(i); + const area = boxes.barcodeArea; + const qr = boxes.qrBox; + + approx(qr.widthMm, layout.config.qrSizeMm, 1e-9, 'ukuran QR label ' + i); + approx(qr.heightMm, qr.widthMm, 1e-9, 'QR harus persegi pada label ' + i); + approx(qr.xMm + qr.widthMm / 2, area.xMm + area.widthMm / 2, 1e-9, + 'pusat X QR pada label ' + i); + approx(qr.yMm + qr.heightMm / 2, area.yMm + area.heightMm / 2, 1e-9, + 'pusat Y QR pada label ' + i); + + assert.ok(qr.xMm >= area.xMm - 1e-9 && qr.xMm + qr.widthMm <= area.xMm + area.widthMm + 1e-9, + 'QR di dalam area barcode (X) pada label ' + i); + assert.ok(qr.yMm >= area.yMm - 1e-9 && qr.yMm + qr.heightMm <= area.yMm + area.heightMm + 1e-9, + 'QR di dalam area barcode (Y) pada label ' + i); + assert.ok(qr.xMm >= box.xMm && qr.xMm + qr.widthMm <= box.xMm + box.widthMm + 1e-9, + 'QR di dalam label (X) pada label ' + i); + assert.ok(qr.yMm >= box.yMm && qr.yMm + qr.heightMm <= box.yMm + box.heightMm + 1e-9, + 'QR di dalam label (Y) pada label ' + i); + + offsets.push({ + x: qr.xMm - box.xMm, + y: qr.yMm - box.yMm + }); + } + + // Satu fungsi layout untuk semua label: offset tidak boleh berbeda-beda. + offsets.forEach(function (offset, index) { + approx(offset.x, offsets[0].x, 1e-9, 'offset X konsisten pada label ' + index); + approx(offset.y, offsets[0].y, 1e-9, 'offset Y konsisten pada label ' + index); + }); +}); + +test('semua kotak label berada di dalam halaman dan tidak saling tumpang tindih', () => { + const layout = LabelLayout.create(); + const boxes = []; + for (let i = 0; i < layout.perPage; i++) { + const box = layout.labelBox(i); + assert.ok(box.xMm >= 0, 'x label di dalam halaman'); + assert.ok(box.yMm >= 0, 'y label di dalam halaman'); + assert.ok(box.xMm + box.widthMm <= layout.page.widthMm + 1e-9, 'label tidak melewati tepi kanan'); + assert.ok(box.yMm + box.heightMm <= layout.page.heightMm + 1e-9, 'label tidak melewati tepi bawah'); + boxes.push(box); + } + for (let a = 0; a < boxes.length; a++) { + for (let b = a + 1; b < boxes.length; b++) { + const A = boxes[a]; + const B = boxes[b]; + const overlap = A.xMm < B.xMm + B.widthMm - 1e-9 && + B.xMm < A.xMm + A.widthMm - 1e-9 && + A.yMm < B.yMm + B.heightMm - 1e-9 && + B.yMm < A.yMm + A.heightMm - 1e-9; + assert.ok(!overlap, 'label ' + a + ' dan ' + b + ' tumpang tindih'); + } + } +}); + +test('area teks dan QR tidak saling menimpa dan tetap di dalam sel', () => { + const layout = LabelLayout.create(); + for (let i = 0; i < layout.perPage; i++) { + const box = layout.labelBox(i); + const boxes = layout.contentBoxes(i); + assert.ok(boxes.qrBox.xMm >= box.xMm, 'QR di dalam sel (kiri)'); + assert.ok(boxes.qrBox.xMm + boxes.qrBox.widthMm <= box.xMm + box.widthMm + 1e-9, 'QR di dalam sel (kanan)'); + assert.ok(boxes.textBox.xMm + boxes.textBox.widthMm <= boxes.qrBox.xMm + 1e-9, 'teks berhenti sebelum QR'); + assert.ok(boxes.textBox.widthMm > 0, 'area teks tidak nol'); + } +}); + +test('jumlah baris dihitung otomatis dari tinggi label (roll 18 mm)', () => { + const layout = LabelLayout.create({ labelHeightMm: 18, rows: 0 }); + // (150 - 5 + 5) / (18 + 5) = 6 baris + assert.strictEqual(layout.grid.rows, 6); + assert.strictEqual(layout.perPage, 18); + approx(layout.grid.cellHeightMm, 18, 0.0001, 'tinggi sel label'); +}); + +test('jumlah baris dapat dipatok dan tidak boleh melebihi kapasitas halaman', () => { + const duaBaris = LabelLayout.create({ rows: 2 }); + assert.strictEqual(duaBaris.grid.rows, 2); + assert.strictEqual(duaBaris.perPage, 6); + + const terlaluBanyak = LabelLayout.create({ labelHeightMm: 18, rows: 99 }); + assert.strictEqual(terlaluBanyak.grid.rows, 6, 'baris dibatasi oleh tinggi halaman'); +}); + +test('ukuran halaman dan jumlah baris mengikuti opsi', () => { + const strip = LabelLayout.create({ pageHeightMm: 43.6, rows: 2, labelHeightMm: 0 }); + assert.strictEqual(strip.grid.rows, 2); + assert.strictEqual(strip.perPage, 6); + approx(strip.page.heightPt, 43.6 * 72 / 25.4, 0.001, 'tinggi halaman strip (pt)'); +}); + +test('jumlah halaman dihitung dari jumlah label', () => { + const layout = LabelLayout.create(); + assert.strictEqual(LabelLayout.pageCount(layout, 1), 1); + assert.strictEqual(LabelLayout.pageCount(layout, 18), 1); + assert.strictEqual(LabelLayout.pageCount(layout, 19), 2); + assert.strictEqual(LabelLayout.pageCount(layout, 36), 2); + assert.strictEqual(LabelLayout.pageCount(layout, 37), 3); +}); + +test('ukuran font turun otomatis agar teks tidak keluar dari area teks', () => { + const layout = LabelLayout.create(); + const boxes = layout.contentBoxes(0); + const measure = function (text, sizeMm) { + return text.length * sizeMm * 0.6; + }; + const long = { + main: 'KODE-UTAMA-SANGAT-PANJANG-1234567890', + unique: 'KODE-UNIK-YANG-PANJANG-ABCDEF', + snText: 'SN: - 12345678901234567890' + }; + const text = LabelLayout.composeText(long, boxes.textBox, layout.config, measure); + assert.ok(text.blocks.length >= 3, 'semua baris tetap digambar'); + text.blocks.forEach(function (block) { + assert.ok( + block.xMm + block.sizeMm * 0.6 * block.text.length <= boxes.textBox.xMm + boxes.textBox.widthMm + 1e-6, + 'baris "' + block.text + '" melebihi lebar area teks' + ); + }); + const last = text.blocks[text.blocks.length - 1]; + assert.ok(last.yMm + last.heightMm <= boxes.textBox.yMm + boxes.textBox.heightMm + 1e-6, 'blok teks keluar dari area teks'); +}); + +test('teks contoh ONT-0910 tetap dua baris, tidak terpecah di tengah kode', () => { + const layout = LabelLayout.create(); + const boxes = layout.contentBoxes(0); + const text = LabelLayout.composeText( + { main: 'ONT-0910', unique: '26-5BD9', snText: 'SN: - 12345678' }, + boxes.textBox, + layout.config, + HelveticaMetrics.measure + ); + assert.deepStrictEqual( + text.blocks.map(function (block) { return block.text; }), + ['ONT-0910', '26-5BD9', 'SN: - 12345678'] + ); +}); + +test('teks panjang dipecah baris, tidak dipotong', () => { + const layout = LabelLayout.create(); + const boxes = layout.contentBoxes(0); + const measure = function (text, sizeMm) { + return text.length * sizeMm * 0.6; + }; + const text = LabelLayout.composeText( + { main: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', unique: '', snText: 'SN: - 1' }, + boxes.textBox, + layout.config, + measure + ); + const joined = text.blocks.map(function (b) { return b.text; }).join(' ').replace(/\s+/g, ''); + assert.strictEqual(joined, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789SN:-1'); +}); diff --git a/test/pdf.test.js b/test/pdf.test.js new file mode 100644 index 0000000..d90176e --- /dev/null +++ b/test/pdf.test.js @@ -0,0 +1,297 @@ +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert'); +const fs = require('node:fs'); +const path = require('node:path'); +const os = require('node:os'); +const { PNG } = require('pngjs'); +const jsQR = require('jsqr'); +const { PDFDocument } = require('pdf-lib'); + +const LabelLayout = require('../src/layout'); +const LabelData = require('../src/data'); +const { writePdfFile } = require('../src/pdf'); + +const MM_PER_INCH = 25.4; +const DPI = 300; +const PPM = DPI / MM_PER_INCH; + +function makeItems(count) { + const lines = []; + for (let i = 0; i < count; i++) { + const uniq = i.toString(16).toUpperCase().padStart(4, '0'); + lines.push('ONT-191026-' + uniq + ' | ' + (12345678 + i)); + } + return LabelData.parseText(lines.join('\n')); +} + +async function renderPdf(pdfBytes, dpi) { + const mupdf = await import('mupdf'); + const doc = mupdf.Document.openDocument(pdfBytes, 'application/pdf'); + const zoom = (dpi || DPI) / 72; + const matrix = mupdf.Matrix.scale(zoom, zoom); + const pages = []; + for (let i = 0; i < doc.countPages(); i++) { + const page = doc.loadPage(i); + const pixmap = page.toPixmap(matrix, mupdf.ColorSpace.DeviceRGB, false, false); + const raw = pixmap.asPNG(); + const png = PNG.sync.read(Buffer.from( + raw.buffer ? raw.buffer : raw, + raw.byteOffset || 0, + raw.byteLength || raw.length + )); + const structured = page.toStructuredText('preserve-whitespace'); + pages.push({ png: png, text: structured.asText(), ppm: (dpi || DPI) / MM_PER_INCH }); + pixmap.destroy(); + } + return pages; +} + +/** Potong area QR sebuah label lalu pindai dengan jsQR. */ +function decodeQrAt(png, boxMm, marginMm, ppm) { + const scale = ppm || PPM; + const margin = marginMm === undefined ? 2 : marginMm; + const x = Math.round((boxMm.xMm - margin) * scale); + const y = Math.round((boxMm.yMm - margin) * scale); + const w = Math.round((boxMm.widthMm + margin * 2) * scale); + const h = Math.round((boxMm.heightMm + margin * 2) * scale); + if (x < 0 || y < 0 || x + w > png.width || y + h > png.height) { + return null; + } + const data = new Uint8ClampedArray(w * h * 4); + for (let r = 0; r < h; r++) { + for (let c = 0; c < w; c++) { + const si = ((y + r) * png.width + (x + c)) * 4; + const di = (r * w + c) * 4; + data[di] = png.data[si]; + data[di + 1] = png.data[si + 1]; + data[di + 2] = png.data[si + 2]; + data[di + 3] = 255; + } + } + const result = jsQR(data, w, h); + return result ? result.data : null; +} + +/** Ukur pusat tinta QR hasil raster (mm) di dalam area yang diberikan. */ +function measureInkCenter(png, boxMm, marginMm, ppm) { + const scale = ppm || PPM; + const margin = marginMm === undefined ? 0.2 : marginMm; + const x0 = Math.max(0, Math.floor((boxMm.xMm - margin) * scale)); + const y0 = Math.max(0, Math.floor((boxMm.yMm - margin) * scale)); + const x1 = Math.min(png.width - 1, Math.ceil((boxMm.xMm + boxMm.widthMm + margin) * scale)); + const y1 = Math.min(png.height - 1, Math.ceil((boxMm.yMm + boxMm.heightMm + margin) * scale)); + let minX = Infinity; + let minY = Infinity; + let maxX = -Infinity; + let maxY = -Infinity; + + for (let y = y0; y <= y1; y++) { + for (let x = x0; x <= x1; x++) { + const i = (y * png.width + x) * 4; + if (png.data[i] < 64 && png.data[i + 1] < 64 && png.data[i + 2] < 64) { + if (x < minX) { minX = x; } + if (x > maxX) { maxX = x; } + if (y < minY) { minY = y; } + if (y > maxY) { maxY = y; } + } + } + } + + if (!isFinite(minX)) { return null; } + return { + xMm: (minX + maxX + 1) / 2 / scale, + yMm: (minY + maxY + 1) / 2 / scale + }; +} + +/** Pastikan tepi luar halaman benar-benar kosong (tidak ada elemen terpotong). */ +function assertCleanPageBorder(png) { + const borderPx = Math.round(2 * PPM); + for (let y = 0; y < png.height; y++) { + for (let x = 0; x < png.width; x++) { + const inBorder = x < borderPx || x >= png.width - borderPx || + y < borderPx || y >= png.height - borderPx; + if (!inBorder) { continue; } + const i = (y * png.width + x) * 4; + assert.ok( + png.data[i] > 245 && png.data[i + 1] > 245 && png.data[i + 2] > 245, + 'ada tinta pada tepi halaman di piksel (' + x + ',' + y + ')' + ); + } + } +} + +async function generate(items, options) { + const out = path.join(os.tmpdir(), 'label-test-' + Date.now() + '-' + Math.random().toString(16).slice(2) + '.pdf'); + const result = await writePdfFile(Object.assign({ items: items, out: out }, options || {})); + const bytes = fs.readFileSync(result.file); + fs.unlinkSync(result.file); + return { bytes: bytes, pageCount: result.pageCount, layout: result.layout }; +} + +test('PDF 1 label: 1 halaman berukuran tepat 100 x 150 mm', async () => { + const items = makeItems(1); + const { bytes, pageCount } = await generate(items); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 1); + assert.strictEqual(pageCount, 1); + const size = pdf.getPage(0).getSize(); + assert.ok(Math.abs(size.width - 283.4646) < 0.01, 'lebar halaman ' + size.width + ' pt'); + assert.ok(Math.abs(size.height - 425.1969) < 0.01, 'tinggi halaman ' + size.height + ' pt'); + assert.ok(Math.abs(size.width / 72 * MM_PER_INCH - 100) < 0.01, 'lebar dalam mm'); + assert.ok(Math.abs(size.height / 72 * MM_PER_INCH - 150) < 0.01, 'tinggi dalam mm'); +}); + +test('PDF 10 label: 1 halaman, QR semua dapat dipindai', async () => { + const items = makeItems(10); + const { bytes, layout } = await generate(items); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 1); + + const pages = await renderPdf(bytes); + assert.strictEqual(pages.length, 1); + for (let i = 0; i < items.length; i++) { + const boxes = layout.contentBoxes(i); + const decoded = decodeQrAt(pages[0].png, boxes.qrBox); + assert.strictEqual(decoded, items[i].payload, 'payload QR label ke-' + (i + 1)); + } +}); + +test('PDF 18 label: tepat 1 halaman penuh 3 x 6', async () => { + const items = makeItems(18); + const { bytes, pageCount, layout } = await generate(items); + assert.strictEqual(pageCount, 1); + assert.strictEqual(layout.perPage, 18); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 1); + + const pages = await renderPdf(bytes); + for (let i = 0; i < items.length; i++) { + const boxes = layout.contentBoxes(i); + const decoded = decodeQrAt(pages[0].png, boxes.qrBox); + assert.strictEqual(decoded, items[i].payload, 'payload QR label ke-' + (i + 1)); + } +}); + +test('PDF 22 label: 2 halaman, label ke-22 pindah ke halaman 2', async () => { + const items = makeItems(22); + const { bytes, layout } = await generate(items); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 2); + + const pages = await renderPdf(bytes); + assert.strictEqual(pages.length, 2); + for (let i = 0; i < items.length; i++) { + const pageIndex = Math.floor(i / layout.perPage); + const boxes = layout.contentBoxes(i); + const decoded = decodeQrAt(pages[pageIndex].png, boxes.qrBox); + assert.strictEqual(decoded, items[i].payload, 'payload QR label ke-' + (i + 1)); + } +}); + +test('pusat QR hasil render maksimal 0,5 mm dari pusat area barcode di semua halaman', async () => { + const items = makeItems(22); + const { bytes, layout } = await generate(items); + const pages = await renderPdf(bytes); + assert.strictEqual(pages.length, 2, 'pengujian harus mencakup dua halaman'); + + for (let i = 0; i < items.length; i++) { + const pageIndex = Math.floor(i / layout.perPage); + const boxes = layout.contentBoxes(i); + const area = boxes.barcodeArea; + const ink = measureInkCenter(pages[pageIndex].png, boxes.qrBox, 0.2, pages[pageIndex].ppm); + assert.ok(ink, 'tinta QR label ' + (i + 1) + ' tidak ditemukan'); + const targetX = area.xMm + area.widthMm / 2; + const targetY = area.yMm + area.heightMm / 2; + assert.ok( + Math.abs(ink.xMm - targetX) <= 0.5, + 'pusat X QR label ' + (i + 1) + ' menyimpang ' + + Math.abs(ink.xMm - targetX).toFixed(4) + ' mm' + ); + assert.ok( + Math.abs(ink.yMm - targetY) <= 0.5, + 'pusat Y QR label ' + (i + 1) + ' menyimpang ' + + Math.abs(ink.yMm - targetY).toFixed(4) + ' mm' + ); + } +}); + +test('semua halaman PDF berukuran 100 x 150 mm dan tidak ada elemen di tepi halaman', async () => { + const items = makeItems(30); + const { bytes } = await generate(items); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 2); + pdf.getPages().forEach(function (page, index) { + const size = page.getSize(); + assert.ok(Math.abs(size.width / 72 * MM_PER_INCH - 100) < 0.01, 'lebar halaman ' + (index + 1)); + assert.ok(Math.abs(size.height / 72 * MM_PER_INCH - 150) < 0.01, 'tinggi halaman ' + (index + 1)); + }); + const pages = await renderPdf(bytes); + pages.forEach(function (page) { assertCleanPageBorder(page.png); }); +}); + +test('format 2 baris (seperti referensi) menghasilkan 6 label per halaman', async () => { + const items = makeItems(7); + const { bytes, layout } = await generate(items, { + config: { pageHeightMm: 43.6, rows: 2, labelHeightMm: 0 } + }); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 2); + assert.strictEqual(layout.perPage, 6); + + const size = pdf.getPage(0).getSize(); + assert.ok(Math.abs(size.width / 72 * MM_PER_INCH - 100) < 0.01, 'lebar strip 100 mm'); + assert.ok(Math.abs(size.height / 72 * MM_PER_INCH - 43.6) < 0.01, 'tinggi strip 43.6 mm'); + + const pages = await renderPdf(bytes); + let decodedCount = 0; + for (let i = 0; i < items.length; i++) { + const pageIndex = Math.floor(i / layout.perPage); + const boxes = layout.contentBoxes(i); + if (decodeQrAt(pages[pageIndex].png, boxes.qrBox) === items[i].payload) { decodedCount++; } + } + assert.strictEqual(decodedCount, items.length, 'semua QR pada strip terbaca'); +}); + +test('teks pada PDF sama persis dengan data sumber', async () => { + const items = makeItems(12); + const { bytes } = await generate(items); + const pages = await renderPdf(bytes); + const text = pages[0].text.replace(/\s+/g, ' '); + items.forEach(function (item) { + assert.ok(text.indexOf(item.main) >= 0, 'kode utama "' + item.main + '" tidak ditemukan di PDF'); + assert.ok(text.indexOf(item.unique) >= 0, 'kode unik "' + item.unique + '" tidak ditemukan di PDF'); + assert.ok(text.indexOf(item.snText) >= 0, 'SN "' + item.snText + '" tidak ditemukan di PDF'); + }); +}); + +test('jumlah label per halaman dan nomor halaman sesuai data', async () => { + const items = makeItems(25); + const { bytes, layout } = await generate(items); + const pdf = await PDFDocument.load(bytes); + assert.strictEqual(pdf.getPageCount(), 2); + assert.strictEqual(layout.perPage, 18); + + const pages = await renderPdf(bytes); + // Halaman 1 berisi 18 QR, halaman 2 berisi 7 QR. + for (let pageIndex = 0; pageIndex < pages.length; pageIndex++) { + const expected = Math.min(layout.perPage, items.length - pageIndex * layout.perPage); + let found = 0; + for (let i = pageIndex * layout.perPage; i < pageIndex * layout.perPage + expected; i++) { + const boxes = layout.contentBoxes(i); + if (decodeQrAt(pages[pageIndex].png, boxes.qrBox) === items[i].payload) { found++; } + } + assert.strictEqual(found, expected, 'halaman ' + (pageIndex + 1) + ' harusnya ' + expected + ' QR terbaca'); + } +}); + +test('QR tetap dapat dipindai pada resolusi printer thermal 203 dpi', async () => { + const items = makeItems(1); + const { bytes, layout } = await generate(items); + const pages = await renderPdf(bytes, 203); + const boxes = layout.contentBoxes(0); + const decoded = decodeQrAt(pages[0].png, boxes.qrBox, 1, pages[0].ppm); + assert.strictEqual(decoded, items[0].payload, 'QR harus terbaca pada 203 dpi'); +}); diff --git a/test/svg.test.js b/test/svg.test.js new file mode 100644 index 0000000..93ed06e --- /dev/null +++ b/test/svg.test.js @@ -0,0 +1,49 @@ +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert'); + +const LabelSvg = require('../src/svg'); +const { createMatrix } = require('../src/qr'); + +function countRuns(matrix) { + let runs = 0; + for (let r = 0; r < matrix.size; r++) { + let c = 0; + while (c < matrix.size) { + if (matrix.get(r, c)) { + runs++; + while (c < matrix.size && matrix.get(r, c)) { c++; } + } else { + c++; + } + } + } + return runs; +} + +test('SVG QR hanya berisi modul yang gelap (tidak ada kotak penuh)', () => { + const matrix = createMatrix('ONT-0910 26-5BD9', 'M'); + const svg = LabelSvg.matrixToSvg(matrix, { quietZone: 4, sizeMm: 13.5 }); + + assert.ok(svg.indexOf(' 0, 'viewBox menyertakan quiet zone'); + assert.ok(svg.indexOf('width="13.5mm"') > 0, 'ukuran fisik QR ikut ditulis'); + + const path = svg.match(/ { + const matrix = createMatrix('ONT-0910 26-5BD9', 'M'); + const svg = LabelSvg.matrixToSvg(matrix, { quietZone: 4 }); + assert.ok(svg.indexOf(' 0, 'latar putih quiet zone digambar'); + assert.ok(svg.indexOf('shape-rendering="crispEdges"') > 0, 'modul digambar tanpa interpolasi'); +}); diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..9688e52 --- /dev/null +++ b/vercel.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "buildCommand": "npm run build:static", + "outputDirectory": "dist" +}