@helloao/tools 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generation/api.cjs +26 -3
- package/dist/cjs/generation/api.cjs.map +2 -2
- package/dist/cjs/generation/audio.cjs +1 -1
- package/dist/cjs/generation/audio.cjs.map +2 -2
- package/dist/cjs/generation/book-order.cjs +241 -398
- package/dist/cjs/generation/book-order.cjs.map +2 -2
- package/dist/cjs/generation/common-types.cjs.map +1 -1
- package/dist/cjs/generation/dataset.cjs +20 -8
- package/dist/cjs/generation/dataset.cjs.map +2 -2
- package/dist/cjs/parser/types.cjs.map +1 -1
- package/dist/cjs/parser/usx-parser.cjs +41 -1
- package/dist/cjs/parser/usx-parser.cjs.map +2 -2
- package/dist/cjs/utils.cjs +20 -1
- package/dist/cjs/utils.cjs.map +2 -2
- package/dist/esm/generation/api.js +26 -3
- package/dist/esm/generation/api.js.map +2 -2
- package/dist/esm/generation/audio.js +1 -1
- package/dist/esm/generation/audio.js.map +2 -2
- package/dist/esm/generation/book-order.js +239 -398
- package/dist/esm/generation/book-order.js.map +2 -2
- package/dist/esm/generation/dataset.js +25 -9
- package/dist/esm/generation/dataset.js.map +2 -2
- package/dist/esm/parser/usx-parser.js +41 -1
- package/dist/esm/parser/usx-parser.js.map +2 -2
- package/dist/esm/utils.js +18 -1
- package/dist/esm/utils.js.map +2 -2
- package/dist/types/generation/api.d.ts +12 -0
- package/dist/types/generation/book-order.d.ts +4 -0
- package/dist/types/generation/common-types.d.ts +4 -0
- package/dist/types/generation/dataset.d.ts +4 -0
- package/dist/types/parser/types.d.ts +8 -0
- package/dist/types/parser/usx-parser.d.ts +4 -0
- package/dist/types/utils.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../generation/book-order.ts"],
|
|
4
|
-
"sourcesContent": ["\r\n/**\r\n * Defines a map that maps the book ID to the numerical order of the book.\r\n */\r\nexport const bookOrderMap = new Map([\r\n [\"GEN\", 1]\r\n , [\"EXO\", 2]\r\n , [\"LEV\", 3]\r\n , [\"NUM\", 4]\r\n , [\"DEU\", 5]\r\n , [\"JOS\", 6]\r\n , [\"JDG\", 7]\r\n , [\"RUT\", 8]\r\n , [\"1SA\", 9]\r\n , [\"2SA\", 10]\r\n , [\"1KI\", 11]\r\n , [\"2KI\", 12]\r\n , [\"1CH\", 13]\r\n , [\"2CH\", 14]\r\n , [\"EZR\", 15]\r\n , [\"NEH\", 16]\r\n , [\"EST\", 17]\r\n , [\"JOB\", 18]\r\n , [\"PSA\", 19]\r\n , [\"PRO\", 20]\r\n , [\"ECC\", 21]\r\n , [\"SNG\", 22]\r\n , [\"ISA\", 23]\r\n , [\"JER\", 24]\r\n , [\"LAM\", 25]\r\n , [\"EZK\", 26]\r\n , [\"DAN\", 27]\r\n , [\"HOS\", 28]\r\n , [\"JOL\", 29]\r\n , [\"AMO\", 30]\r\n , [\"OBA\", 31]\r\n , [\"JON\", 32]\r\n , [\"MIC\", 33]\r\n , [\"NAM\", 34]\r\n , [\"HAB\", 35]\r\n , [\"ZEP\", 36]\r\n , [\"HAG\", 37]\r\n , [\"ZEC\", 38]\r\n , [\"MAL\", 39]\r\n , [\"MAT\", 40]\r\n , [\"MRK\", 41]\r\n , [\"LUK\", 42]\r\n , [\"JHN\", 43]\r\n , [\"ACT\", 44]\r\n , [\"ROM\", 45]\r\n , [\"1CO\", 46]\r\n , [\"2CO\", 47]\r\n , [\"GAL\", 48]\r\n , [\"EPH\", 49]\r\n , [\"PHP\", 50]\r\n , [\"COL\", 51]\r\n , [\"1TH\", 52]\r\n , [\"2TH\", 53]\r\n , [\"1TI\", 54]\r\n , [\"2TI\", 55]\r\n , [\"TIT\", 56]\r\n , [\"PHM\", 57]\r\n , [\"HEB\", 58]\r\n , [\"JAS\", 59]\r\n , [\"1PE\", 60]\r\n , [\"2PE\", 61]\r\n , [\"1JN\", 62]\r\n , [\"2JN\", 63]\r\n , [\"3JN\", 64]\r\n , [\"JUD\", 65]\r\n , [\"REV\", 66]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the number of chapters the book has.\r\n */\r\nexport const bookChapterCountMap = new Map([\r\n [\r\n \"GEN\",\r\n 50\r\n ],\r\n [\r\n \"EXO\",\r\n 40\r\n ],\r\n [\r\n \"LEV\",\r\n 27\r\n ],\r\n [\r\n \"NUM\",\r\n 36\r\n ],\r\n [\r\n \"DEU\",\r\n 34\r\n ],\r\n [\r\n \"JOS\",\r\n 24\r\n ],\r\n [\r\n \"JDG\",\r\n 21\r\n ],\r\n [\r\n \"RUT\",\r\n 4\r\n ],\r\n [\r\n \"1SA\",\r\n 31\r\n ],\r\n [\r\n \"2SA\",\r\n 24\r\n ],\r\n [\r\n \"1KI\",\r\n 22\r\n ],\r\n [\r\n \"2KI\",\r\n 25\r\n ],\r\n [\r\n \"1CH\",\r\n 29\r\n ],\r\n [\r\n \"2CH\",\r\n 36\r\n ],\r\n [\r\n \"EZR\",\r\n 10\r\n ],\r\n [\r\n \"NEH\",\r\n 13\r\n ],\r\n [\r\n \"EST\",\r\n 10\r\n ],\r\n [\r\n \"JOB\",\r\n 42\r\n ],\r\n [\r\n \"PSA\",\r\n 150\r\n ],\r\n [\r\n \"PRO\",\r\n 31\r\n ],\r\n [\r\n \"ECC\",\r\n 12\r\n ],\r\n [\r\n \"SNG\",\r\n 8\r\n ],\r\n [\r\n \"ISA\",\r\n 66\r\n ],\r\n [\r\n \"JER\",\r\n 52\r\n ],\r\n [\r\n \"LAM\",\r\n 5\r\n ],\r\n [\r\n \"EZK\",\r\n 48\r\n ],\r\n [\r\n \"DAN\",\r\n 12\r\n ],\r\n [\r\n \"HOS\",\r\n 14\r\n ],\r\n [\r\n \"JOL\",\r\n 3\r\n ],\r\n [\r\n \"AMO\",\r\n 9\r\n ],\r\n [\r\n \"OBA\",\r\n 1\r\n ],\r\n [\r\n \"JON\",\r\n 4\r\n ],\r\n [\r\n \"MIC\",\r\n 7\r\n ],\r\n [\r\n \"NAM\",\r\n 3\r\n ],\r\n [\r\n \"HAB\",\r\n 3\r\n ],\r\n [\r\n \"ZEP\",\r\n 3\r\n ],\r\n [\r\n \"HAG\",\r\n 2\r\n ],\r\n [\r\n \"ZEC\",\r\n 14\r\n ],\r\n [\r\n \"MAL\",\r\n 4\r\n ],\r\n [\r\n \"MAT\",\r\n 28\r\n ],\r\n [\r\n \"MRK\",\r\n 16\r\n ],\r\n [\r\n \"LUK\",\r\n 24\r\n ],\r\n [\r\n \"JHN\",\r\n 21\r\n ],\r\n [\r\n \"ACT\",\r\n 28\r\n ],\r\n [\r\n \"ROM\",\r\n 16\r\n ],\r\n [\r\n \"1CO\",\r\n 16\r\n ],\r\n [\r\n \"2CO\",\r\n 13\r\n ],\r\n [\r\n \"GAL\",\r\n 6\r\n ],\r\n [\r\n \"EPH\",\r\n 6\r\n ],\r\n [\r\n \"PHP\",\r\n 4\r\n ],\r\n [\r\n \"COL\",\r\n 4\r\n ],\r\n [\r\n \"1TH\",\r\n 5\r\n ],\r\n [\r\n \"2TH\",\r\n 3\r\n ],\r\n [\r\n \"1TI\",\r\n 6\r\n ],\r\n [\r\n \"2TI\",\r\n 4\r\n ],\r\n [\r\n \"TIT\",\r\n 3\r\n ],\r\n [\r\n \"PHM\",\r\n 1\r\n ],\r\n [\r\n \"HEB\",\r\n 13\r\n ],\r\n [\r\n \"JAS\",\r\n 5\r\n ],\r\n [\r\n \"1PE\",\r\n 5\r\n ],\r\n [\r\n \"2PE\",\r\n 3\r\n ],\r\n [\r\n \"1JN\",\r\n 5\r\n ],\r\n [\r\n \"2JN\",\r\n 1\r\n ],\r\n [\r\n \"3JN\",\r\n 1\r\n ],\r\n [\r\n \"JUD\",\r\n 1\r\n ],\r\n [\r\n \"REV\",\r\n 22\r\n ]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the \"common\" enligsh name for the book.\r\n */\r\nconst englishBookMap = new Map([\r\n [\"GEN\", { \"commonName\": \"Genesis\" }]\r\n , [\"EXO\", { \"commonName\": \"Exodus\" }]\r\n , [\"LEV\", { \"commonName\": \"Leviticus\" }]\r\n , [\"NUM\", { \"commonName\": \"Numbers\" }]\r\n , [\"DEU\", { \"commonName\": \"Deuteronomy\" }]\r\n , [\"JOS\", { \"commonName\": \"Joshua\" }]\r\n , [\"JDG\", { \"commonName\": \"Judges\" }]\r\n , [\"RUT\", { \"commonName\": \"Ruth\" }]\r\n , [\"1SA\", { \"commonName\": \"1 Samuel\" }]\r\n , [\"2SA\", { \"commonName\": \"2 Samuel\" }]\r\n , [\"1KI\", { \"commonName\": \"1 Kings\" }]\r\n , [\"2KI\", { \"commonName\": \"2 Kings\" }]\r\n , [\"1CH\", { \"commonName\": \"1 Chronicles\" }]\r\n , [\"2CH\", { \"commonName\": \"2 Chronicles\" }]\r\n , [\"EZR\", { \"commonName\": \"Ezra\" }]\r\n , [\"NEH\", { \"commonName\": \"Nehemiah\" }]\r\n , [\"EST\", { \"commonName\": \"Esther\" }]\r\n , [\"JOB\", { \"commonName\": \"Job\" }]\r\n , [\"PSA\", { \"commonName\": \"Psalms\" }]\r\n , [\"PRO\", { \"commonName\": \"Proverbs\" }]\r\n , [\"ECC\", { \"commonName\": \"Ecclesiastes\" }]\r\n , [\"SNG\", { \"commonName\": \"Song of Songs\" }]\r\n , [\"ISA\", { \"commonName\": \"Isaiah\" }]\r\n , [\"JER\", { \"commonName\": \"Jeremiah\" }]\r\n , [\"LAM\", { \"commonName\": \"Lamentations\" }]\r\n , [\"EZK\", { \"commonName\": \"Ezekiel\" }]\r\n , [\"DAN\", { \"commonName\": \"Daniel\" }]\r\n , [\"HOS\", { \"commonName\": \"Hosea\" }]\r\n , [\"JOL\", { \"commonName\": \"Joel\" }]\r\n , [\"AMO\", { \"commonName\": \"Amos\" }]\r\n , [\"OBA\", { \"commonName\": \"Obadiah\" }]\r\n , [\"JON\", { \"commonName\": \"Jonah\" }]\r\n , [\"MIC\", { \"commonName\": \"Micah\" }]\r\n , [\"NAM\", { \"commonName\": \"Nahum\" }]\r\n , [\"HAB\", { \"commonName\": \"Habakkuk\" }]\r\n , [\"ZEP\", { \"commonName\": \"Zephaniah\" }]\r\n , [\"HAG\", { \"commonName\": \"Haggai\" }]\r\n , [\"ZEC\", { \"commonName\": \"Zechariah\" }]\r\n , [\"MAL\", { \"commonName\": \"Malachi\" }]\r\n , [\"MAT\", { \"commonName\": \"Matthew\" }]\r\n , [\"MRK\", { \"commonName\": \"Mark\" }]\r\n , [\"LUK\", { \"commonName\": \"Luke\" }]\r\n , [\"JHN\", { \"commonName\": \"John\" }]\r\n , [\"ACT\", { \"commonName\": \"Acts\" }]\r\n , [\"ROM\", { \"commonName\": \"Romans\" }]\r\n , [\"1CO\", { \"commonName\": \"1 Corinthians\" }]\r\n , [\"2CO\", { \"commonName\": \"2 Corinthians\" }]\r\n , [\"GAL\", { \"commonName\": \"Galatians\" }]\r\n , [\"EPH\", { \"commonName\": \"Ephesians\" }]\r\n , [\"PHP\", { \"commonName\": \"Philippians\" }]\r\n , [\"COL\", { \"commonName\": \"Colossians\" }]\r\n , [\"1TH\", { \"commonName\": \"1 Thessalonians\" }]\r\n , [\"2TH\", { \"commonName\": \"2 Thessalonians\" }]\r\n , [\"1TI\", { \"commonName\": \"1 Timothy\" }]\r\n , [\"2TI\", { \"commonName\": \"2 Timothy\" }]\r\n , [\"TIT\", { \"commonName\": \"Titus\" }]\r\n , [\"PHM\", { \"commonName\": \"Philemon\" }]\r\n , [\"HEB\", { \"commonName\": \"Hebrews\" }]\r\n , [\"JAS\", { \"commonName\": \"James\" }]\r\n , [\"1PE\", { \"commonName\": \"1 Peter\" }]\r\n , [\"2PE\", { \"commonName\": \"2 Peter\" }]\r\n , [\"1JN\", { \"commonName\": \"1 John\" }]\r\n , [\"2JN\", { \"commonName\": \"2 John\" }]\r\n , [\"3JN\", { \"commonName\": \"3 John\" }]\r\n , [\"JUD\", { \"commonName\": \"Jude\" }]\r\n , [\"REV\", { \"commonName\": \"Revelation\" }]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the \"common\" arabic name for the book.\r\n */\r\nconst arabicBookMap = new Map([\r\n [\"GEN\", { \"commonName\": \"\u0627\u0644\u062A\u064E\u0651\u0643\u0648\u064A\u0646\" }]\r\n , [\"EXO\", { \"commonName\": \"\u0627\u0644\u062E\u064F\u0631\u064F\u0648\u062C\" }]\r\n , [\"LEV\", { \"commonName\": \"\u0627\u0644\u0644\u0651\u0627\u0648\u064A\u0650\u0651\u064A\u0646\" }]\r\n , [\"NUM\", { \"commonName\": \"\u0627\u0644\u0639\u064E\u062F\u064E\u062F\" }]\r\n , [\"DEU\", { \"commonName\": \"\u0627\u0644\u062A\u064E\u0651\u062B\u0652\u0646\u0650\u064A\u064E\u0629\" }]\r\n , [\"JOS\", { \"commonName\": \"\u064A\u064E\u0634\u064F\u0648\u0639\" }]\r\n , [\"JDG\", { \"commonName\": \"\u0627\u0644\u0642\u064F\u0636\u0627\u0629\" }]\r\n , [\"RUT\", { \"commonName\": \"\u0631\u0627\u0639\u064F\u0648\u062B\" }]\r\n , [\"1SA\", { \"commonName\": \"\u0635\u064E\u0645\u064F\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F\" }]\r\n , [\"2SA\", { \"commonName\": \"\u0635\u0645\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"1KI\", { \"commonName\": \"\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F\" }]\r\n , [\"2KI\", { \"commonName\": \"\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"1CH\", { \"commonName\": \"\u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u0623\u0648\u0651\u0644\u064F\" }]\r\n , [\"2CH\", { \"commonName\": \" \u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"EZR\", { \"commonName\": \"\u0639\u064E\u0632\u0652\u0631\u0627\" }]\r\n , [\"NEH\", { \"commonName\": \"\u0646\u064E\u062D\u064E\u0645\u0652\u064A\u0627\" }]\r\n , [\"EST\", { \"commonName\": \"\u0623\u0633\u0652\u062A\u0650\u064A\u0631\" }]\r\n , [\"JOB\", { \"commonName\": \"\u0623\u064A\u064F\u0651\u0648\u0628\" }]\r\n , [\"PSA\", { \"commonName\": \"\u0627\u0644\u0645\u064E\u0632\u0627\u0645\u0650\u064A\u0631\" }]\r\n , [\"PRO\", { \"commonName\": \"\u0627\u0644\u0623\u0645\u062B\u0627\u0644\" }]\r\n , [\"ECC\", { \"commonName\": \"\u0627\u0644\u062C\u0627\u0645\u0650\u0639\u064E\u0629\" }]\r\n , [\"SNG\", { \"commonName\": \"\u0646\u064E\u0634\u0650\u064A\u062F\u0650 \u0627\u0644\u0623\u0646\u0634\u0627\u062F\" }]\r\n , [\"ISA\", { \"commonName\": \"\u0625\u0634\u064E\u0639\u0652\u064A\u0627\u0621\" }]\r\n , [\"JER\", { \"commonName\": \"\u0625\u0631\u0652\u0645\u0650\u064A\u0627\" }]\r\n , [\"LAM\", { \"commonName\": \"\uFEE3\uFEAE\uFE8D\uFE9B\uFEF2 \uFE87\uFEAD\uFEE3\uFEF4\uFE8E\" }]\r\n , [\"EZK\", { \"commonName\": \"\u062D\u0650\u0632\u0652\u0642\u0650\u064A\u0627\u0644\" }]\r\n , [\"DAN\", { \"commonName\": \"\u062F\u0627\u0646\u064A\u0627\u0644\" }]\r\n , [\"HOS\", { \"commonName\": \"\u0647\u064F\u0648\u0634\u064E\u0639\" }]\r\n , [\"JOL\", { \"commonName\": \"\u064A\u064F\u0648\u0626\u064A\u0644\" }]\r\n , [\"AMO\", { \"commonName\": \"\u0639\u0627\u0645\u064F\u0648\u0633\" }]\r\n , [\"OBA\", { \"commonName\": \"\u0639\u064F\u0648\u0628\u064E\u062F\u0652\u064A\u0627\" }]\r\n , [\"JON\", { \"commonName\": \"\uFEF3\uFEEE\uFEE7\uFE8E\uFEE5\" }]\r\n , [\"MIC\", { \"commonName\": \"\u0645\u064A\u062E\u0627\" }]\r\n , [\"NAM\", { \"commonName\": \"\u0646\u0627\u062D\u064F\u0648\u0645\" }]\r\n , [\"HAB\", { \"commonName\": \"\u062D\u064E\u0628\u064E\u0642\u064F\u0651\u0648\u0642\" }]\r\n , [\"ZEP\", { \"commonName\": \"\u0635\u064E\u0641\u064E\u0646\u0652\u064A\u0627\" }]\r\n , [\"HAG\", { \"commonName\": \"\u062D\u064E\u062C\u064E\u0651\u064A\" }]\r\n , [\"ZEC\", { \"commonName\": \"\u0632\u064E\u0643\u064E\u0631\u064A\u0651\u0627\" }]\r\n , [\"MAL\", { \"commonName\": \"\u0645\u064E\u0644\u0627\u062E\u0650\u064A\" }]\r\n , [\"MAT\", { \"commonName\": \"\uFEE3\uFE98\uFEF0\" }]\r\n , [\"MRK\", { \"commonName\": \"\u0645\u064E\u0631\u0652\u0642\u064F\u0633\" }]\r\n , [\"LUK\", { \"commonName\": \"\u0644\u064F\u0648\u0642\u0627\" }]\r\n , [\"JHN\", { \"commonName\": \"\u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627\" }]\r\n , [\"ACT\", { \"commonName\": \"\u0627\u0639\u0645\u0627\u0644 \u0627\u0644\u0631\u0633\u0644\" }]\r\n , [\"ROM\", { \"commonName\": \"\uFEAD\uFEED\uFEE3\uFEF4\uFE94\" }]\r\n , [\"1CO\", { \"commonName\": \"\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEFB\uFEED\uFEDD\" }]\r\n , [\"2CO\", { \"commonName\": \"\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEDF\uFE9C\uFE8E\uFEE7\uFEF4\uFE94\" }]\r\n , [\"GAL\", { \"commonName\": \"\u063A\u064E\u0644\u0627\u0637\u0650\u064A\u064E\u0651\u0629\" }]\r\n , [\"EPH\", { \"commonName\": \"\u0623\u0641\u064E\u0633\u064F\u0633\" }]\r\n , [\"PHP\", { \"commonName\": \"\u0641\u0650\u064A\u0644\u0650\u0628\u0650\u0651\u064A\" }]\r\n , [\"COL\", { \"commonName\": \"\u0643\u064F\u0648\u0644\u064F\u0648\u0633\u0650\u064A\" }]\r\n , [\"1TH\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A\" }]\r\n , [\"2TH\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A\" }]\r\n , [\"1TI\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633\" }]\r\n , [\"2TI\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633\" }]\r\n , [\"TIT\", { \"commonName\": \"\u062A\u0650\u064A\u0637\u064F\u0633\" }]\r\n , [\"PHM\", { \"commonName\": \"\u0641\u0650\u0644\u0650\u064A\u0652\u0645\u064F\u0648\u0646\" }]\r\n , [\"HEB\", { \"commonName\": \"\u0627\u0644\u0639\u0650\u0628\u0631\u0627\u0646\u0650\u064A\u0651\u064A\u0646\" }]\r\n , [\"JAS\", { \"commonName\": \"\u064A\u064E\u0639\u0642\u064F\u0648\u0628\" }]\r\n , [\"1PE\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649\" }]\r\n , [\"2PE\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\" }]\r\n , [\"1JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649\" }]\r\n , [\"2JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\" }]\r\n , [\"3JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0644\u062B\u064E\u0629\" }]\r\n , [\"JUD\", { \"commonName\": \"\u064A\u064E\u0647\u064F\u0648\u0630\u0627\" }]\r\n , [\"REV\", { \"commonName\": \"\u0631\u064F\u0624\u064A\u0627 \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627\" }]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps a locale ID to a book name map.\r\n */\r\nexport const bookIdMap = new Map([\r\n ['en', englishBookMap],\r\n ['en-US', englishBookMap],\r\n ['eng', englishBookMap],\r\n ['arb', arabicBookMap]\r\n]);"],
|
|
5
|
-
"mappings": ";AAIO,aAAM,eAAe,oBAAI,IAAI;AAAA,EAChC,CAAC,OAAO,CAAC;AAAA,EACP,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,O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,CAAC,OAAO,EAAE,cAAc,8NAA0C,CAAC;AAAA,EACnE,CAAC,OAAO,EAAE,cAAc,uCAAS,CAAC;AAAA,EAClC,CAAC,OAAO,EAAE,cAAc,+DAAa,CAAC;AAAA,EACtC,CAAC,OAAO,EAAE,cAAc,iFAAgB,CAAC;AAAA,EACzC,CAAC,OAAO,EAAE,cAAc,6CAAU,CAAC;AAAA,EACnC,CAAC,OAAO,EAAE,cAAc,yIAA2B,CAAC;AAAA,EACpD,CAAC,OAAO,EAAE,cAAc,+IAA4B,CAAC;AAAA,EACrD,CAAC,OAAO,EAAE,cAAc,+IAA4B,CAAC;AAAA,EACrD,CAAC,OAAO,EAAE,cAAc,qJAA6B,CAAC;AAAA,EACtD,CAAC,OAAO,EAAE,cAAc,qJAA6B,CAAC;AAAA,EACtD,CAAC,OAAO,EAAE,cAAc,6CAAU,CAAC;AAAA,EACnC,CAAC,OAAO,EAAE,cAAc,kFAAiB,CAAC;AAChD,CAAC;AAKM,aAAM,YAAY,oBAAI,IAAI;AAAA,EAC7B,CAAC,MAAM,cAAc;AAAA,EACrB,CAAC,SAAS,cAAc;AAAA,EACxB,CAAC,OAAO,cAAc;AAAA,EACtB,CAAC,OAAO,aAAa;AACzB,CAAC;",
|
|
4
|
+
"sourcesContent": ["/**\n * Defines a map that maps the book ID of apocryphal books to the numerical order of the book.\n */\nexport const apocryphaBooks = new Map([\n // Apocryphal books\n ['TOB', 67],\n ['JDT', 68],\n ['ESG', 69],\n ['WIS', 70],\n ['SIR', 71],\n ['BAR', 72],\n ['LJE', 73],\n ['S3Y', 74],\n ['SUS', 75],\n ['BEL', 76],\n ['1MA', 77],\n ['2MA', 78],\n ['3MA', 79],\n ['4MA', 80],\n ['1ES', 81],\n ['2ES', 82],\n ['MAN', 83],\n ['PS2', 84],\n ['ODA', 85],\n ['PSS', 86],\n ['EZA', 87],\n ['5EZ', 88],\n ['6EZ', 89],\n ['DAG', 90],\n ['PS3', 91],\n ['2BA', 92],\n ['LBA', 93],\n ['JUB', 94],\n ['ENO', 95],\n ['1MQ', 96],\n ['2MQ', 97],\n ['3MQ', 98],\n ['REP', 99],\n ['4BA', 100],\n ['LAO', 101],\n]);\n\n/**\n * Defines a map that maps the book ID to the numerical order of the book.\n */\nexport const bookOrderMap = new Map([\n ['GEN', 1],\n ['EXO', 2],\n ['LEV', 3],\n ['NUM', 4],\n ['DEU', 5],\n ['JOS', 6],\n ['JDG', 7],\n ['RUT', 8],\n ['1SA', 9],\n ['2SA', 10],\n ['1KI', 11],\n ['2KI', 12],\n ['1CH', 13],\n ['2CH', 14],\n ['EZR', 15],\n ['NEH', 16],\n ['EST', 17],\n ['JOB', 18],\n ['PSA', 19],\n ['PRO', 20],\n ['ECC', 21],\n ['SNG', 22],\n ['ISA', 23],\n ['JER', 24],\n ['LAM', 25],\n ['EZK', 26],\n ['DAN', 27],\n ['HOS', 28],\n ['JOL', 29],\n ['AMO', 30],\n ['OBA', 31],\n ['JON', 32],\n ['MIC', 33],\n ['NAM', 34],\n ['HAB', 35],\n ['ZEP', 36],\n ['HAG', 37],\n ['ZEC', 38],\n ['MAL', 39],\n ['MAT', 40],\n ['MRK', 41],\n ['LUK', 42],\n ['JHN', 43],\n ['ACT', 44],\n ['ROM', 45],\n ['1CO', 46],\n ['2CO', 47],\n ['GAL', 48],\n ['EPH', 49],\n ['PHP', 50],\n ['COL', 51],\n ['1TH', 52],\n ['2TH', 53],\n ['1TI', 54],\n ['2TI', 55],\n ['TIT', 56],\n ['PHM', 57],\n ['HEB', 58],\n ['JAS', 59],\n ['1PE', 60],\n ['2PE', 61],\n ['1JN', 62],\n ['2JN', 63],\n ['3JN', 64],\n ['JUD', 65],\n ['REV', 66],\n ...apocryphaBooks,\n]);\n\n/**\n * Defines a map that maps the book ID to the number of chapters the book has.\n */\nexport const bookChapterCountMap = new Map([\n ['GEN', 50],\n ['EXO', 40],\n ['LEV', 27],\n ['NUM', 36],\n ['DEU', 34],\n ['JOS', 24],\n ['JDG', 21],\n ['RUT', 4],\n ['1SA', 31],\n ['2SA', 24],\n ['1KI', 22],\n ['2KI', 25],\n ['1CH', 29],\n ['2CH', 36],\n ['EZR', 10],\n ['NEH', 13],\n ['EST', 10],\n ['JOB', 42],\n ['PSA', 150],\n ['PRO', 31],\n ['ECC', 12],\n ['SNG', 8],\n ['ISA', 66],\n ['JER', 52],\n ['LAM', 5],\n ['EZK', 48],\n ['DAN', 12],\n ['HOS', 14],\n ['JOL', 3],\n ['AMO', 9],\n ['OBA', 1],\n ['JON', 4],\n ['MIC', 7],\n ['NAM', 3],\n ['HAB', 3],\n ['ZEP', 3],\n ['HAG', 2],\n ['ZEC', 14],\n ['MAL', 4],\n ['MAT', 28],\n ['MRK', 16],\n ['LUK', 24],\n ['JHN', 21],\n ['ACT', 28],\n ['ROM', 16],\n ['1CO', 16],\n ['2CO', 13],\n ['GAL', 6],\n ['EPH', 6],\n ['PHP', 4],\n ['COL', 4],\n ['1TH', 5],\n ['2TH', 3],\n ['1TI', 6],\n ['2TI', 4],\n ['TIT', 3],\n ['PHM', 1],\n ['HEB', 13],\n ['JAS', 5],\n ['1PE', 5],\n ['2PE', 3],\n ['1JN', 5],\n ['2JN', 1],\n ['3JN', 1],\n ['JUD', 1],\n ['REV', 22],\n]);\n\n/**\n * Defines a map that maps the book ID to the \"common\" enligsh name for the book.\n */\nconst englishBookMap = new Map([\n ['GEN', { commonName: 'Genesis' }],\n ['EXO', { commonName: 'Exodus' }],\n ['LEV', { commonName: 'Leviticus' }],\n ['NUM', { commonName: 'Numbers' }],\n ['DEU', { commonName: 'Deuteronomy' }],\n ['JOS', { commonName: 'Joshua' }],\n ['JDG', { commonName: 'Judges' }],\n ['RUT', { commonName: 'Ruth' }],\n ['1SA', { commonName: '1 Samuel' }],\n ['2SA', { commonName: '2 Samuel' }],\n ['1KI', { commonName: '1 Kings' }],\n ['2KI', { commonName: '2 Kings' }],\n ['1CH', { commonName: '1 Chronicles' }],\n ['2CH', { commonName: '2 Chronicles' }],\n ['EZR', { commonName: 'Ezra' }],\n ['NEH', { commonName: 'Nehemiah' }],\n ['EST', { commonName: 'Esther' }],\n ['JOB', { commonName: 'Job' }],\n ['PSA', { commonName: 'Psalms' }],\n ['PRO', { commonName: 'Proverbs' }],\n ['ECC', { commonName: 'Ecclesiastes' }],\n ['SNG', { commonName: 'Song of Songs' }],\n ['ISA', { commonName: 'Isaiah' }],\n ['JER', { commonName: 'Jeremiah' }],\n ['LAM', { commonName: 'Lamentations' }],\n ['EZK', { commonName: 'Ezekiel' }],\n ['DAN', { commonName: 'Daniel' }],\n ['HOS', { commonName: 'Hosea' }],\n ['JOL', { commonName: 'Joel' }],\n ['AMO', { commonName: 'Amos' }],\n ['OBA', { commonName: 'Obadiah' }],\n ['JON', { commonName: 'Jonah' }],\n ['MIC', { commonName: 'Micah' }],\n ['NAM', { commonName: 'Nahum' }],\n ['HAB', { commonName: 'Habakkuk' }],\n ['ZEP', { commonName: 'Zephaniah' }],\n ['HAG', { commonName: 'Haggai' }],\n ['ZEC', { commonName: 'Zechariah' }],\n ['MAL', { commonName: 'Malachi' }],\n ['MAT', { commonName: 'Matthew' }],\n ['MRK', { commonName: 'Mark' }],\n ['LUK', { commonName: 'Luke' }],\n ['JHN', { commonName: 'John' }],\n ['ACT', { commonName: 'Acts' }],\n ['ROM', { commonName: 'Romans' }],\n ['1CO', { commonName: '1 Corinthians' }],\n ['2CO', { commonName: '2 Corinthians' }],\n ['GAL', { commonName: 'Galatians' }],\n ['EPH', { commonName: 'Ephesians' }],\n ['PHP', { commonName: 'Philippians' }],\n ['COL', { commonName: 'Colossians' }],\n ['1TH', { commonName: '1 Thessalonians' }],\n ['2TH', { commonName: '2 Thessalonians' }],\n ['1TI', { commonName: '1 Timothy' }],\n ['2TI', { commonName: '2 Timothy' }],\n ['TIT', { commonName: 'Titus' }],\n ['PHM', { commonName: 'Philemon' }],\n ['HEB', { commonName: 'Hebrews' }],\n ['JAS', { commonName: 'James' }],\n ['1PE', { commonName: '1 Peter' }],\n ['2PE', { commonName: '2 Peter' }],\n ['1JN', { commonName: '1 John' }],\n ['2JN', { commonName: '2 John' }],\n ['3JN', { commonName: '3 John' }],\n ['JUD', { commonName: 'Jude' }],\n ['REV', { commonName: 'Revelation' }],\n]);\n\n/**\n * Defines a map that maps the book ID to the \"common\" arabic name for the book.\n */\nconst arabicBookMap = new Map([\n ['GEN', { commonName: '\u0627\u0644\u062A\u064E\u0651\u0643\u0648\u064A\u0646' }],\n ['EXO', { commonName: '\u0627\u0644\u062E\u064F\u0631\u064F\u0648\u062C' }],\n ['LEV', { commonName: '\u0627\u0644\u0644\u0651\u0627\u0648\u064A\u0650\u0651\u064A\u0646' }],\n ['NUM', { commonName: '\u0627\u0644\u0639\u064E\u062F\u064E\u062F' }],\n ['DEU', { commonName: '\u0627\u0644\u062A\u064E\u0651\u062B\u0652\u0646\u0650\u064A\u064E\u0629' }],\n ['JOS', { commonName: '\u064A\u064E\u0634\u064F\u0648\u0639' }],\n ['JDG', { commonName: '\u0627\u0644\u0642\u064F\u0636\u0627\u0629' }],\n ['RUT', { commonName: '\u0631\u0627\u0639\u064F\u0648\u062B' }],\n ['1SA', { commonName: '\u0635\u064E\u0645\u064F\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F' }],\n ['2SA', { commonName: '\u0635\u0645\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['1KI', { commonName: '\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F' }],\n ['2KI', { commonName: '\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['1CH', { commonName: '\u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u0623\u0648\u0651\u0644\u064F' }],\n ['2CH', { commonName: ' \u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['EZR', { commonName: '\u0639\u064E\u0632\u0652\u0631\u0627' }],\n ['NEH', { commonName: '\u0646\u064E\u062D\u064E\u0645\u0652\u064A\u0627' }],\n ['EST', { commonName: '\u0623\u0633\u0652\u062A\u0650\u064A\u0631' }],\n ['JOB', { commonName: '\u0623\u064A\u064F\u0651\u0648\u0628' }],\n ['PSA', { commonName: '\u0627\u0644\u0645\u064E\u0632\u0627\u0645\u0650\u064A\u0631' }],\n ['PRO', { commonName: '\u0627\u0644\u0623\u0645\u062B\u0627\u0644' }],\n ['ECC', { commonName: '\u0627\u0644\u062C\u0627\u0645\u0650\u0639\u064E\u0629' }],\n ['SNG', { commonName: '\u0646\u064E\u0634\u0650\u064A\u062F\u0650 \u0627\u0644\u0623\u0646\u0634\u0627\u062F' }],\n ['ISA', { commonName: '\u0625\u0634\u064E\u0639\u0652\u064A\u0627\u0621' }],\n ['JER', { commonName: '\u0625\u0631\u0652\u0645\u0650\u064A\u0627' }],\n ['LAM', { commonName: '\uFEE3\uFEAE\uFE8D\uFE9B\uFEF2 \uFE87\uFEAD\uFEE3\uFEF4\uFE8E' }],\n ['EZK', { commonName: '\u062D\u0650\u0632\u0652\u0642\u0650\u064A\u0627\u0644' }],\n ['DAN', { commonName: '\u062F\u0627\u0646\u064A\u0627\u0644' }],\n ['HOS', { commonName: '\u0647\u064F\u0648\u0634\u064E\u0639' }],\n ['JOL', { commonName: '\u064A\u064F\u0648\u0626\u064A\u0644' }],\n ['AMO', { commonName: '\u0639\u0627\u0645\u064F\u0648\u0633' }],\n ['OBA', { commonName: '\u0639\u064F\u0648\u0628\u064E\u062F\u0652\u064A\u0627' }],\n ['JON', { commonName: '\uFEF3\uFEEE\uFEE7\uFE8E\uFEE5' }],\n ['MIC', { commonName: '\u0645\u064A\u062E\u0627' }],\n ['NAM', { commonName: '\u0646\u0627\u062D\u064F\u0648\u0645' }],\n ['HAB', { commonName: '\u062D\u064E\u0628\u064E\u0642\u064F\u0651\u0648\u0642' }],\n ['ZEP', { commonName: '\u0635\u064E\u0641\u064E\u0646\u0652\u064A\u0627' }],\n ['HAG', { commonName: '\u062D\u064E\u062C\u064E\u0651\u064A' }],\n ['ZEC', { commonName: '\u0632\u064E\u0643\u064E\u0631\u064A\u0651\u0627' }],\n ['MAL', { commonName: '\u0645\u064E\u0644\u0627\u062E\u0650\u064A' }],\n ['MAT', { commonName: '\uFEE3\uFE98\uFEF0' }],\n ['MRK', { commonName: '\u0645\u064E\u0631\u0652\u0642\u064F\u0633' }],\n ['LUK', { commonName: '\u0644\u064F\u0648\u0642\u0627' }],\n ['JHN', { commonName: '\u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627' }],\n ['ACT', { commonName: '\u0627\u0639\u0645\u0627\u0644 \u0627\u0644\u0631\u0633\u0644' }],\n ['ROM', { commonName: '\uFEAD\uFEED\uFEE3\uFEF4\uFE94' }],\n ['1CO', { commonName: '\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEFB\uFEED\uFEDD' }],\n ['2CO', { commonName: '\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEDF\uFE9C\uFE8E\uFEE7\uFEF4\uFE94' }],\n ['GAL', { commonName: '\u063A\u064E\u0644\u0627\u0637\u0650\u064A\u064E\u0651\u0629' }],\n ['EPH', { commonName: '\u0623\u0641\u064E\u0633\u064F\u0633' }],\n ['PHP', { commonName: '\u0641\u0650\u064A\u0644\u0650\u0628\u0650\u0651\u064A' }],\n ['COL', { commonName: '\u0643\u064F\u0648\u0644\u064F\u0648\u0633\u0650\u064A' }],\n ['1TH', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A' }],\n ['2TH', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A' }],\n ['1TI', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633' }],\n ['2TI', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633' }],\n ['TIT', { commonName: '\u062A\u0650\u064A\u0637\u064F\u0633' }],\n ['PHM', { commonName: '\u0641\u0650\u0644\u0650\u064A\u0652\u0645\u064F\u0648\u0646' }],\n ['HEB', { commonName: '\u0627\u0644\u0639\u0650\u0628\u0631\u0627\u0646\u0650\u064A\u0651\u064A\u0646' }],\n ['JAS', { commonName: '\u064A\u064E\u0639\u0642\u064F\u0648\u0628' }],\n ['1PE', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649' }],\n ['2PE', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629' }],\n ['1JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649' }],\n ['2JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629' }],\n ['3JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0644\u062B\u064E\u0629' }],\n ['JUD', { commonName: '\u064A\u064E\u0647\u064F\u0648\u0630\u0627' }],\n ['REV', { commonName: '\u0631\u064F\u0624\u064A\u0627 \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627' }],\n]);\n\n/**\n * Defines a map that maps a locale ID to a book name map.\n */\nexport const bookIdMap = new Map([\n ['en', englishBookMap],\n ['en-US', englishBookMap],\n ['eng', englishBookMap],\n ['arb', arabicBookMap],\n]);\n"],
|
|
5
|
+
"mappings": ";AAGO,aAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAElC,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CA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,SAAS,cAAc;AAAA,EACxB,CAAC,OAAO,cAAc;AAAA,EACtB,CAAC,OAAO,aAAa;AACzB,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { UsfmParser } from "../parser/usfm-parser.js";
|
|
3
3
|
import { USXParser } from "../parser/usx-parser.js";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
bookIdMap as defaultBookIdMap,
|
|
6
|
+
bookOrderMap,
|
|
7
|
+
apocryphaBooks
|
|
8
|
+
} from "./book-order.js";
|
|
5
9
|
import { omit, sortBy, sortedIndexBy } from "lodash";
|
|
6
10
|
import { getAudioUrlsForChapter } from "./audio.js";
|
|
7
11
|
import { CodexParser } from "../parser/codex-parser.js";
|
|
@@ -43,6 +47,10 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
43
47
|
continue;
|
|
44
48
|
}
|
|
45
49
|
const parsed = parser2.parse(file.content);
|
|
50
|
+
if ("parseMessages" in parsed && parsed.parseMessages && file.name) {
|
|
51
|
+
const messages = output.parseMessages = output.parseMessages || {};
|
|
52
|
+
messages[file.name] = parsed.parseMessages;
|
|
53
|
+
}
|
|
46
54
|
if (parsed.type === "root") {
|
|
47
55
|
addTranslationTree(file, parsed);
|
|
48
56
|
} else {
|
|
@@ -70,6 +78,7 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
70
78
|
logger.warn("[generate] Book does not have an order!", id);
|
|
71
79
|
return;
|
|
72
80
|
}
|
|
81
|
+
const isApocryphal = apocryphaBooks.has(id);
|
|
73
82
|
const bookName = getBookNames(file, file.metadata, id);
|
|
74
83
|
let translation = parsedTranslations.get(file.metadata.id);
|
|
75
84
|
if (!translation) {
|
|
@@ -81,12 +90,12 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
81
90
|
output.translations.push(translation);
|
|
82
91
|
parsedTranslations.set(file.metadata.id, translation);
|
|
83
92
|
}
|
|
84
|
-
const name = parsed.header ?? bookName?.bookName?.commonName ?? parsed.title;
|
|
93
|
+
const name = parsed.header ?? (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ?? parsed.title ?? bookName?.bookName?.commonName;
|
|
85
94
|
if (!name) {
|
|
86
95
|
logger.warn("[generate] Book does not have a name!", file.name, id);
|
|
87
96
|
return;
|
|
88
97
|
}
|
|
89
|
-
const commonName = bookName?.bookName?.commonName ?? parsed.header ?? parsed.title ?? id;
|
|
98
|
+
const commonName = (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ?? parsed.header ?? parsed.title ?? bookName?.bookName?.commonName ?? id;
|
|
90
99
|
const book = {
|
|
91
100
|
id,
|
|
92
101
|
name,
|
|
@@ -95,6 +104,9 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
95
104
|
order,
|
|
96
105
|
chapters: []
|
|
97
106
|
};
|
|
107
|
+
if (isApocryphal) {
|
|
108
|
+
book.isApocryphal = true;
|
|
109
|
+
}
|
|
98
110
|
for (let content of parsed.content) {
|
|
99
111
|
if (content.type === "chapter") {
|
|
100
112
|
book.chapters.push({
|
|
@@ -194,9 +206,11 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
194
206
|
commentary.profiles = sortBy(commentary.profiles, (p) => p.id);
|
|
195
207
|
}
|
|
196
208
|
function getBookNames(file, metadata, id) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
209
|
+
let exactMatch = true;
|
|
210
|
+
let map = bookMap;
|
|
211
|
+
if (!map) {
|
|
212
|
+
map = defaultBookIdMap.get(metadata.language);
|
|
213
|
+
if (!map) {
|
|
200
214
|
if (!unknownLanguages.has(metadata.language)) {
|
|
201
215
|
logger.warn(
|
|
202
216
|
"[generate] File does not have a known language!",
|
|
@@ -208,11 +222,12 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
208
222
|
logger.warn(
|
|
209
223
|
"[generate] Using English book map for unknown language! This might result in outputting english book names."
|
|
210
224
|
);
|
|
211
|
-
|
|
225
|
+
exactMatch = false;
|
|
226
|
+
map = defaultBookIdMap.get("en");
|
|
212
227
|
}
|
|
213
228
|
}
|
|
214
|
-
const bookName =
|
|
215
|
-
if (!!
|
|
229
|
+
const bookName = map?.get(id);
|
|
230
|
+
if (!!map && !bookName) {
|
|
216
231
|
logger.warn(
|
|
217
232
|
"[generate] Book name not found for ID!",
|
|
218
233
|
file.name,
|
|
@@ -221,6 +236,7 @@ export function generateDataset(files, parser = new globalThis.DOMParser(), book
|
|
|
221
236
|
return null;
|
|
222
237
|
}
|
|
223
238
|
return {
|
|
239
|
+
exactMatch,
|
|
224
240
|
bookName
|
|
225
241
|
};
|
|
226
242
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../generation/dataset.ts"],
|
|
4
|
-
"sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\nimport { USXParser } from '../parser/usx-parser.js';\nimport {\n Commentary,\n CommentaryBook,\n CommentaryBookChapter,\n CommentaryChapterData,\n CommentaryProfile,\n InputCommentaryFile,\n InputFile,\n InputFileBase,\n InputTranslationFile,\n MetadataBase,\n Translation,\n TranslationBook,\n TranslationBookChapter,\n} from './common-types.js';\nimport { bookIdMap as defaultBookIdMap, bookOrderMap } from './book-order.js';\nimport { omit, sortBy, sortedIndexBy } from 'lodash';\nimport { getAudioUrlsForChapter } from './audio.js';\nimport { CodexParser } from '../parser/codex-parser.js';\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\nimport { CommentaryParseTree, ParseTree } from '../parser/types.js';\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\nimport { getLogger } from '../log.js';\n\n/**\n * Defines an interface that contains generated dataset info.\n */\nexport interface DatasetOutput {\n /**\n * The list of translations that are available in the dataset.\n */\n translations: DatasetTranslation[];\n\n /**\n * The list of commentaries that are available in the dataset.\n */\n commentaries: DatasetCommentary[];\n}\n\n/**\n * Defines a translation that is used in the dataset.\n */\nexport interface DatasetTranslation extends Translation {\n /**\n * The list of books that are available for the translation.\n */\n books: DatasetTranslationBook[];\n}\n\n/**\n * Defines a commentary that is used in the dataset.\n */\nexport interface DatasetCommentary extends Commentary {\n /**\n * The list of books that are available for the commentary.\n */\n books: DatasetCommentaryBook[];\n\n /**\n * The list of profiles that are available for the commentary.\n */\n profiles: DatasetCommentaryProfile[];\n}\n\n/**\n * Defines a translation book that is used in the dataset.\n */\nexport interface DatasetTranslationBook extends TranslationBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: TranslationBookChapter[];\n}\n\n/**\n * Defines a commentary book that is used in the dataset.\n */\nexport interface DatasetCommentaryBook extends CommentaryBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: CommentaryBookChapter[];\n}\n\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\n /**\n * The contents of the profile.\n */\n content: string[];\n}\n\n/**\n * Generates a list of output files from the given list of input files.\n * @param file The list of files.\n * @param parser The parser to use for parsing the files.\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\n */\nexport function generateDataset(\n files: InputFile[],\n parser: DOMParser = new globalThis.DOMParser(),\n bookMap?: Map<string, { commonName: string }> | undefined\n): DatasetOutput {\n const logger = getLogger();\n let output: DatasetOutput = {\n translations: [],\n commentaries: [],\n };\n\n let usfmParser = new UsfmParser();\n let usxParser = new USXParser(parser);\n let codexParser = new CodexParser();\n let csvCommentaryParser = new CommentaryCsvParser();\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\n\n let parsedTranslations = new Map<string, DatasetTranslation>();\n let parsedCommentaries = new Map<string, DatasetCommentary>();\n\n const unknownLanguages = new Set<string>();\n for (let file of files) {\n try {\n let parser:\n | UsfmParser\n | USXParser\n | CodexParser\n | CommentaryCsvParser\n | TyndaleXmlParser;\n if (file.fileType === 'usfm') {\n parser = usfmParser;\n } else if (file.fileType === 'usx') {\n parser = usxParser;\n } else if (file.fileType === 'json') {\n parser = codexParser;\n } else if (file.fileType === 'commentary/csv') {\n parser = csvCommentaryParser;\n } else if (file.fileType === 'commentary/tyndale-xml') {\n parser = tyndaleXmlParser;\n } else {\n logger.warn(\n '[generate] File does not have a valid type!',\n file.name\n );\n continue;\n }\n\n const parsed = parser.parse(file.content);\n\n if (parsed.type === 'root') {\n addTranslationTree(file as InputTranslationFile, parsed);\n } else {\n addCommentaryTree(file as InputCommentaryFile, parsed);\n }\n } catch (err) {\n logger.error(\n `[generate] Error occurred while parsing ${file.name}`,\n err\n );\n }\n }\n\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\n const id = parsed.id;\n\n if (!id) {\n logger.warn(\n '[generate] File does not have a valid book ID!',\n file.name,\n id\n );\n return;\n }\n\n const order = bookOrderMap.get(id);\n\n if (typeof order !== 'number') {\n logger.warn('[generate] Book does not have an order!', id);\n return;\n }\n\n const bookName = getBookNames(file, file.metadata, id);\n\n let translation = parsedTranslations.get(file.metadata.id);\n\n if (!translation) {\n translation = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n };\n output.translations.push(translation);\n parsedTranslations.set(file.metadata.id, translation);\n }\n\n const name =\n parsed.header ?? bookName?.bookName?.commonName ?? parsed.title;\n\n if (!name) {\n logger.warn('[generate] Book does not have a name!', file.name, id);\n return;\n }\n\n const commonName =\n bookName?.bookName?.commonName ??\n parsed.header ??\n parsed.title ??\n id;\n\n const book: DatasetTranslationBook = {\n id: id,\n name,\n commonName,\n title: parsed.title ?? null,\n order,\n chapters: [],\n };\n\n for (let content of parsed.content) {\n if (content.type === 'chapter') {\n book.chapters.push({\n chapter: {\n number: content.number,\n content: content.content,\n footnotes: content.footnotes,\n },\n thisChapterAudioLinks: getAudioUrlsForChapter(\n translation.id,\n id,\n content.number\n ),\n });\n }\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\n translation.books.splice(index, 0, book);\n }\n\n function addCommentaryTree(\n file: InputCommentaryFile,\n parsed: CommentaryParseTree\n ) {\n let commentary = parsedCommentaries.get(file.metadata.id);\n\n if (!commentary) {\n commentary = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n profiles: [],\n };\n output.commentaries.push(commentary);\n parsedCommentaries.set(file.metadata.id, commentary);\n }\n\n for (let parsedBook of parsed.books) {\n let book = commentary.books.find((b) => b.id === parsedBook.book);\n if (book && book.introduction && parsedBook.introduction) {\n logger.warn(\n '[generate] Book already exists in commentary!',\n file.name,\n parsedBook.book\n );\n continue;\n }\n\n if (!book) {\n const name = getBookNames(file, file.metadata, parsedBook.book);\n book = {\n id: parsedBook.book,\n order: bookOrderMap.get(parsedBook.book) ?? -1,\n commonName: name?.bookName?.commonName ?? parsedBook.book,\n name: name?.bookName?.commonName ?? parsedBook.book,\n chapters: [],\n };\n }\n\n if (parsedBook.introduction) {\n book.introduction = parsedBook.introduction;\n }\n\n if (parsedBook.introductionSummary && !book.introductionSummary) {\n book.introductionSummary = parsedBook.introductionSummary;\n }\n\n for (let chapter of parsedBook.chapters) {\n let data: CommentaryChapterData = {\n number: chapter.number,\n content: chapter.verses,\n };\n\n if (chapter.introduction) {\n data.introduction = chapter.introduction;\n }\n\n book.chapters.push({\n chapter: data,\n });\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n commentary.books.push(book);\n }\n\n if (parsed.profiles) {\n for (let profile of parsed.profiles) {\n const existing = commentary.profiles.find(\n (p) => p.id === profile.id\n );\n if (existing) {\n logger.warn(\n '[generate] Profile already exists in commentary!',\n file.name,\n profile.id\n );\n continue;\n }\n\n const datasetProfile: DatasetCommentaryProfile = {\n id: profile.id,\n subject: profile.subject,\n reference: profile.reference,\n content: profile.content,\n };\n\n commentary.profiles.push(datasetProfile);\n }\n }\n\n commentary.books = sortBy(commentary.books, (b) => b.order);\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\n }\n\n function getBookNames(\n file: InputFileBase,\n metadata: MetadataBase,\n id: string\n ) {\n if (!bookMap) {\n bookMap = defaultBookIdMap.get(metadata.language);\n\n if (!bookMap) {\n if (!unknownLanguages.has(metadata.language)) {\n logger.warn(\n '[generate] File does not have a known language!',\n file.name,\n metadata.language\n );\n unknownLanguages.add(metadata.language);\n }\n\n logger.warn(\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\n );\n bookMap = defaultBookIdMap.get('en');\n }\n }\n\n const bookName = bookMap?.get(id);\n\n if (!!bookMap && !bookName) {\n logger.warn(\n '[generate] Book name not found for ID!',\n file.name,\n id\n );\n return null;\n }\n\n return {\n bookName,\n };\n }\n\n return output;\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAgB1B,
|
|
4
|
+
"sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\nimport { USXParser } from '../parser/usx-parser.js';\nimport {\n Commentary,\n CommentaryBook,\n CommentaryBookChapter,\n CommentaryChapterData,\n CommentaryProfile,\n InputCommentaryFile,\n InputFile,\n InputFileBase,\n InputTranslationFile,\n MetadataBase,\n Translation,\n TranslationBook,\n TranslationBookChapter,\n} from './common-types.js';\nimport {\n bookIdMap as defaultBookIdMap,\n bookOrderMap,\n apocryphaBooks,\n} from './book-order.js';\nimport { omit, sortBy, sortedIndexBy } from 'lodash';\nimport { getAudioUrlsForChapter } from './audio.js';\nimport { CodexParser } from '../parser/codex-parser.js';\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\nimport {\n CommentaryParseTree,\n ParseMessage,\n ParseTree,\n} from '../parser/types.js';\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\nimport { getLogger } from '../log.js';\n\n/**\n * Defines an interface that contains generated dataset info.\n */\nexport interface DatasetOutput {\n /**\n * The list of translations that are available in the dataset.\n */\n translations: DatasetTranslation[];\n\n /**\n * The list of commentaries that are available in the dataset.\n */\n commentaries: DatasetCommentary[];\n\n parseMessages?: {\n [key: string]: ParseMessage[];\n };\n}\n\n/**\n * Defines a translation that is used in the dataset.\n */\nexport interface DatasetTranslation extends Translation {\n /**\n * The list of books that are available for the translation.\n */\n books: DatasetTranslationBook[];\n}\n\n/**\n * Defines a commentary that is used in the dataset.\n */\nexport interface DatasetCommentary extends Commentary {\n /**\n * The list of books that are available for the commentary.\n */\n books: DatasetCommentaryBook[];\n\n /**\n * The list of profiles that are available for the commentary.\n */\n profiles: DatasetCommentaryProfile[];\n}\n\n/**\n * Defines a translation book that is used in the dataset.\n */\nexport interface DatasetTranslationBook extends TranslationBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: TranslationBookChapter[];\n}\n\n/**\n * Defines a commentary book that is used in the dataset.\n */\nexport interface DatasetCommentaryBook extends CommentaryBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: CommentaryBookChapter[];\n}\n\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\n /**\n * The contents of the profile.\n */\n content: string[];\n}\n\n/**\n * Generates a list of output files from the given list of input files.\n * @param file The list of files.\n * @param parser The parser to use for parsing the files.\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\n */\nexport function generateDataset(\n files: InputFile[],\n parser: DOMParser = new globalThis.DOMParser(),\n bookMap?: Map<string, { commonName: string }> | undefined\n): DatasetOutput {\n const logger = getLogger();\n let output: DatasetOutput = {\n translations: [],\n commentaries: [],\n };\n\n let usfmParser = new UsfmParser();\n let usxParser = new USXParser(parser);\n let codexParser = new CodexParser();\n let csvCommentaryParser = new CommentaryCsvParser();\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\n\n let parsedTranslations = new Map<string, DatasetTranslation>();\n let parsedCommentaries = new Map<string, DatasetCommentary>();\n\n const unknownLanguages = new Set<string>();\n for (let file of files) {\n try {\n let parser:\n | UsfmParser\n | USXParser\n | CodexParser\n | CommentaryCsvParser\n | TyndaleXmlParser;\n if (file.fileType === 'usfm') {\n parser = usfmParser;\n } else if (file.fileType === 'usx') {\n parser = usxParser;\n } else if (file.fileType === 'json') {\n parser = codexParser;\n } else if (file.fileType === 'commentary/csv') {\n parser = csvCommentaryParser;\n } else if (file.fileType === 'commentary/tyndale-xml') {\n parser = tyndaleXmlParser;\n } else {\n logger.warn(\n '[generate] File does not have a valid type!',\n file.name\n );\n continue;\n }\n\n const parsed = parser.parse(file.content);\n\n if (\n 'parseMessages' in parsed &&\n parsed.parseMessages &&\n file.name\n ) {\n const messages = (output.parseMessages =\n output.parseMessages || {});\n messages[file.name] = parsed.parseMessages;\n }\n\n if (parsed.type === 'root') {\n addTranslationTree(file as InputTranslationFile, parsed);\n } else {\n addCommentaryTree(file as InputCommentaryFile, parsed);\n }\n } catch (err) {\n logger.error(\n `[generate] Error occurred while parsing ${file.name}`,\n err\n );\n }\n }\n\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\n const id = parsed.id;\n\n if (!id) {\n logger.warn(\n '[generate] File does not have a valid book ID!',\n file.name,\n id\n );\n return;\n }\n\n const order = bookOrderMap.get(id);\n\n if (typeof order !== 'number') {\n logger.warn('[generate] Book does not have an order!', id);\n return;\n }\n\n const isApocryphal = apocryphaBooks.has(id);\n\n const bookName = getBookNames(file, file.metadata, id);\n\n let translation = parsedTranslations.get(file.metadata.id);\n\n if (!translation) {\n translation = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n };\n output.translations.push(translation);\n parsedTranslations.set(file.metadata.id, translation);\n }\n\n const name =\n parsed.header ??\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\n parsed.title ??\n bookName?.bookName?.commonName;\n\n if (!name) {\n logger.warn('[generate] Book does not have a name!', file.name, id);\n return;\n }\n\n const commonName =\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\n parsed.header ??\n parsed.title ??\n bookName?.bookName?.commonName ??\n id;\n\n const book: DatasetTranslationBook = {\n id: id,\n name,\n commonName,\n title: parsed.title ?? null,\n order,\n chapters: [],\n };\n\n if (isApocryphal) {\n book.isApocryphal = true;\n }\n\n for (let content of parsed.content) {\n if (content.type === 'chapter') {\n book.chapters.push({\n chapter: {\n number: content.number,\n content: content.content,\n footnotes: content.footnotes,\n },\n thisChapterAudioLinks: getAudioUrlsForChapter(\n translation.id,\n id,\n content.number\n ),\n });\n }\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\n translation.books.splice(index, 0, book);\n }\n\n function addCommentaryTree(\n file: InputCommentaryFile,\n parsed: CommentaryParseTree\n ) {\n let commentary = parsedCommentaries.get(file.metadata.id);\n\n if (!commentary) {\n commentary = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n profiles: [],\n };\n output.commentaries.push(commentary);\n parsedCommentaries.set(file.metadata.id, commentary);\n }\n\n for (let parsedBook of parsed.books) {\n let book = commentary.books.find((b) => b.id === parsedBook.book);\n if (book && book.introduction && parsedBook.introduction) {\n logger.warn(\n '[generate] Book already exists in commentary!',\n file.name,\n parsedBook.book\n );\n continue;\n }\n\n if (!book) {\n const name = getBookNames(file, file.metadata, parsedBook.book);\n book = {\n id: parsedBook.book,\n order: bookOrderMap.get(parsedBook.book) ?? -1,\n commonName: name?.bookName?.commonName ?? parsedBook.book,\n name: name?.bookName?.commonName ?? parsedBook.book,\n chapters: [],\n };\n }\n\n if (parsedBook.introduction) {\n book.introduction = parsedBook.introduction;\n }\n\n if (parsedBook.introductionSummary && !book.introductionSummary) {\n book.introductionSummary = parsedBook.introductionSummary;\n }\n\n for (let chapter of parsedBook.chapters) {\n let data: CommentaryChapterData = {\n number: chapter.number,\n content: chapter.verses,\n };\n\n if (chapter.introduction) {\n data.introduction = chapter.introduction;\n }\n\n book.chapters.push({\n chapter: data,\n });\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n commentary.books.push(book);\n }\n\n if (parsed.profiles) {\n for (let profile of parsed.profiles) {\n const existing = commentary.profiles.find(\n (p) => p.id === profile.id\n );\n if (existing) {\n logger.warn(\n '[generate] Profile already exists in commentary!',\n file.name,\n profile.id\n );\n continue;\n }\n\n const datasetProfile: DatasetCommentaryProfile = {\n id: profile.id,\n subject: profile.subject,\n reference: profile.reference,\n content: profile.content,\n };\n\n commentary.profiles.push(datasetProfile);\n }\n }\n\n commentary.books = sortBy(commentary.books, (b) => b.order);\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\n }\n\n function getBookNames(\n file: InputFileBase,\n metadata: MetadataBase,\n id: string\n ) {\n let exactMatch = true;\n let map = bookMap;\n if (!map) {\n map = defaultBookIdMap.get(metadata.language);\n\n if (!map) {\n if (!unknownLanguages.has(metadata.language)) {\n logger.warn(\n '[generate] File does not have a known language!',\n file.name,\n metadata.language\n );\n unknownLanguages.add(metadata.language);\n }\n\n logger.warn(\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\n );\n exactMatch = false;\n map = defaultBookIdMap.get('en');\n }\n }\n\n const bookName = map?.get(id);\n\n if (!!map && !bookName) {\n logger.warn(\n '[generate] Book name not found for ID!',\n file.name,\n id\n );\n return null;\n }\n\n return {\n exactMatch,\n bookName,\n };\n }\n\n return output;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAgB1B;AAAA,EACI,aAAa;AAAA,EACb;AAAA,EACA;AAAA,OACG;AACP,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,SAAS,8BAA8B;AACvC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AAMpC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AA+EnB,gBAAS,gBACZ,OACA,SAAoB,IAAI,WAAW,UAAU,GAC7C,SACa;AACb,QAAM,SAAS,UAAU;AACzB,MAAI,SAAwB;AAAA,IACxB,cAAc,CAAC;AAAA,IACf,cAAc,CAAC;AAAA,EACnB;AAEA,MAAI,aAAa,IAAI,WAAW;AAChC,MAAI,YAAY,IAAI,UAAU,MAAM;AAC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a;AACb,cAAM,iBAAiB,IAAI,IAAI;AAAA,MACnC;AAAA,IACJ;AAEA,UAAM,WAAW,KAAK,IAAI,EAAE;AAE5B,QAAI,CAAC,CAAC,OAAO,CAAC,UAAU;AACpB,aAAO;AAAA,QACH;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACJ;AACA,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
|
|
6
6
|
"names": ["parser"]
|
|
7
7
|
}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
children,
|
|
5
5
|
isParent
|
|
6
6
|
} from "./iterators.js";
|
|
7
|
+
import { KNOWN_SKIPPED_VERSES } from "../utils.js";
|
|
7
8
|
var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
8
9
|
NodeType2[NodeType2["Text"] = 3] = "Text";
|
|
9
10
|
return NodeType2;
|
|
@@ -12,6 +13,10 @@ export const PARSER_VERSION = "2";
|
|
|
12
13
|
export class USXParser {
|
|
13
14
|
_domParser;
|
|
14
15
|
_noteCounter = 0;
|
|
16
|
+
_messages = [];
|
|
17
|
+
_lastVerse = null;
|
|
18
|
+
_currentChapter = null;
|
|
19
|
+
_bookId = null;
|
|
15
20
|
constructor(domParser) {
|
|
16
21
|
this._domParser = domParser;
|
|
17
22
|
}
|
|
@@ -22,6 +27,11 @@ export class USXParser {
|
|
|
22
27
|
* @returns The parse tree that was generated.
|
|
23
28
|
*/
|
|
24
29
|
parse(usx) {
|
|
30
|
+
this._noteCounter = 0;
|
|
31
|
+
this._messages = [];
|
|
32
|
+
this._lastVerse = null;
|
|
33
|
+
this._currentChapter = null;
|
|
34
|
+
this._bookId = null;
|
|
25
35
|
const parser = this._domParser;
|
|
26
36
|
const doc = parser.parseFromString(usx, "application/xml");
|
|
27
37
|
const usxElement = doc.documentElement;
|
|
@@ -39,7 +49,7 @@ export class USXParser {
|
|
|
39
49
|
"The book element does not contain a code attribute."
|
|
40
50
|
);
|
|
41
51
|
}
|
|
42
|
-
root.id = bookCode;
|
|
52
|
+
this._bookId = root.id = bookCode;
|
|
43
53
|
const header = usxElement.querySelector('para[style="h"]');
|
|
44
54
|
if (header) {
|
|
45
55
|
root.header = header.textContent || "";
|
|
@@ -53,6 +63,9 @@ export class USXParser {
|
|
|
53
63
|
for (let content of this.iterateRootContent(usxElement)) {
|
|
54
64
|
root.content.push(content);
|
|
55
65
|
}
|
|
66
|
+
if (this._messages.length > 0) {
|
|
67
|
+
root.parseMessages = this._messages.slice();
|
|
68
|
+
}
|
|
56
69
|
return root;
|
|
57
70
|
}
|
|
58
71
|
*iterateRootContent(usxElement) {
|
|
@@ -75,6 +88,7 @@ export class USXParser {
|
|
|
75
88
|
content: [],
|
|
76
89
|
footnotes: []
|
|
77
90
|
};
|
|
91
|
+
this._currentChapter = chapter;
|
|
78
92
|
for (let content of this.iterateChapterContent(
|
|
79
93
|
chapter,
|
|
80
94
|
iterator
|
|
@@ -134,6 +148,9 @@ export class USXParser {
|
|
|
134
148
|
break;
|
|
135
149
|
}
|
|
136
150
|
if (node.nodeName === "verse") {
|
|
151
|
+
if (!(node instanceof Element) || !node.hasAttribute("eid")) {
|
|
152
|
+
nodes.rewind(1);
|
|
153
|
+
}
|
|
137
154
|
break;
|
|
138
155
|
}
|
|
139
156
|
const parent = node.parentElement;
|
|
@@ -202,6 +219,29 @@ export class USXParser {
|
|
|
202
219
|
number: parseInt(element.getAttribute("number") || "0", 10),
|
|
203
220
|
content: []
|
|
204
221
|
};
|
|
222
|
+
if (this._currentChapter && this._lastVerse) {
|
|
223
|
+
if (this._currentChapter.number === chapter.number) {
|
|
224
|
+
const delta = verse.number - this._lastVerse.number;
|
|
225
|
+
if (delta > 1) {
|
|
226
|
+
for (let v = this._lastVerse.number + 1; v < verse.number; v++) {
|
|
227
|
+
let isExpected = false;
|
|
228
|
+
if (this._bookId) {
|
|
229
|
+
const missingVerse = `${this._bookId} ${chapter.number}:${v}`;
|
|
230
|
+
if (KNOWN_SKIPPED_VERSES.has(missingVerse)) {
|
|
231
|
+
isExpected = true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (!isExpected) {
|
|
235
|
+
this._messages.push({
|
|
236
|
+
type: "warning",
|
|
237
|
+
message: `Verse ${this._bookId ?? "(null)"} ${chapter.number}:${v} is missing.`
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
this._lastVerse = verse;
|
|
205
245
|
for (let content of this.iterateVerseContent(chapter, verse, nodes)) {
|
|
206
246
|
addOrJoin(verse.content, content);
|
|
207
247
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../parser/usx-parser.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n Chapter,\n ChapterContent,\n Footnote,\n FootnoteReference,\n ParseTree,\n Verse,\n Text,\n HebrewSubtitle,\n InlineLineBreak,\n InlineHeading,\n} from './types.js';\nimport {\n iterateAll,\n children,\n RewindableIterator,\n isParent,\n} from './iterators.js';\n\nenum NodeType {\n Text = 3,\n}\n\n/**\n * The version of the parser.\n * Used to determine whether input files need to be re-parsed.\n */\nexport const PARSER_VERSION = '2';\n\n/**\n * Defines a class that is able to parse USX content.\n */\nexport class USXParser {\n private _domParser: DOMParser;\n private _noteCounter: number = 0;\n\n constructor(domParser: DOMParser) {\n this._domParser = domParser;\n }\n\n /**\n * Parses the specified USX content.\n *\n * @param usx The USX content to parse.\n * @returns The parse tree that was generated.\n */\n public parse(usx: string): ParseTree {\n const parser = this._domParser;\n const doc = parser.parseFromString(usx, 'application/xml');\n const usxElement = doc.documentElement;\n\n let root: ParseTree = {\n type: 'root',\n content: [],\n };\n\n const bookElement = usxElement.querySelector('book[code]');\n\n if (!bookElement) {\n throw new Error('The USX content does not contain a book element.');\n }\n\n const bookCode = bookElement.getAttribute('code') || '';\n\n if (!bookCode) {\n throw new Error(\n 'The book element does not contain a code attribute.'\n );\n }\n\n root.id = bookCode;\n\n const header = usxElement.querySelector('para[style=\"h\"]');\n if (header) {\n root.header = header.textContent || '';\n }\n\n const titles = usxElement.querySelectorAll(\n 'para[style=\"mt1\"], para[style=\"mt2\"], para[style=\"mt3\"]'\n );\n // const title2 = usxElement.querySelector('para[style=\"mt2\"]');\n // const title3 = usxElement.querySelector('para[style=\"mt3\"]');\n\n if (titles.length > 0) {\n root.title = [...titles]\n .map((t) => t.textContent)\n .filter((t) => t)\n .join(' ');\n }\n\n for (let content of this.iterateRootContent(usxElement)) {\n root.content.push(content);\n }\n\n return root;\n }\n\n *iterateRootContent(\n usxElement: Element\n ): Generator<ParseTree['content'][0]> {\n const iterator = iterateAll(usxElement);\n while (true) {\n const { done, value: child } = iterator.next();\n if (done) {\n break;\n }\n\n if (!(child instanceof Element)) {\n continue;\n }\n\n if (child.nodeName === 'chapter') {\n if (child.hasAttribute('eid')) {\n continue;\n }\n\n const chapter: Chapter = {\n type: 'chapter',\n number: parseInt(child.getAttribute('number') || '0', 10),\n content: [],\n footnotes: [],\n };\n\n for (let content of this.iterateChapterContent(\n chapter,\n iterator\n )) {\n chapter.content.push(content);\n }\n\n yield chapter;\n } else if (child.nodeName === 'para') {\n const style = child.getAttribute('style');\n if (\n style === 's1' ||\n style === 's2' ||\n style === 's3' ||\n style === 's4'\n ) {\n yield {\n type: 'heading',\n content: child.textContent ? [child.textContent] : [],\n };\n }\n }\n }\n }\n\n *iterateChapterContent(\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<ChapterContent> {\n while (true) {\n const { done, value: element } = nodes.next();\n if (done) {\n break;\n }\n\n if (!(element instanceof Element)) {\n continue;\n }\n\n if (element.nodeName === 'chapter') {\n break;\n } else if (element.nodeName === 'para') {\n const style = element.getAttribute('style');\n if (\n style === 's1' ||\n style === 's2' ||\n style === 's3' ||\n style === 's4'\n ) {\n yield {\n type: 'heading',\n content: element.textContent\n ? [element.textContent]\n : [],\n };\n } else if (style === 'b') {\n yield {\n type: 'line_break',\n };\n } else if (style === 'd') {\n yield* this.parseHebrewSubtitle(element, chapter, nodes);\n }\n } else if (element.nodeName === 'verse') {\n if (element.hasAttribute('eid')) {\n continue;\n }\n\n yield this.parseVerse(element, chapter, nodes);\n }\n }\n }\n\n *iterateVerseContent(\n chapter: Chapter,\n verse: Verse,\n nodes: RewindableIterator<Node>\n ): IterableIterator<string | FootnoteReference | Text | InlineLineBreak> {\n let lastParent: Element | null = null;\n while (true) {\n const { done, value: node } = nodes.next();\n if (done) {\n break;\n }\n\n if (node.nodeName === 'verse') {\n break;\n }\n\n const parent = node.parentElement!;\n let poem: number | null = null;\n let descriptive: boolean | null = null;\n\n if (parent.nodeName === 'para') {\n const style = parent.getAttribute('style');\n if (\n style === 'q1' ||\n style === 'q2' ||\n style === 'q3' ||\n style === 'q4'\n ) {\n poem =\n style === 'q1'\n ? 1\n : style === 'q2'\n ? 2\n : style === 'q3'\n ? 3\n : 4;\n\n // Send explicit line breaks\n // if we are in a new paragraph but the previous paragraph had the same poem style\n if (parent.previousElementSibling?.nodeName === 'para') {\n const previousStyle =\n parent.previousElementSibling?.getAttribute(\n 'style'\n );\n if (previousStyle === style && lastParent !== parent) {\n lastParent = parent;\n yield {\n lineBreak: true,\n };\n }\n }\n } else if (style === 'd') {\n descriptive = true;\n }\n }\n\n for (let content of this.iterateNodeTextContent(\n nodes,\n node,\n chapter,\n verse\n )) {\n if (poem !== null || descriptive !== null) {\n if (typeof content === 'string') {\n let text: Text = {\n text: content,\n };\n\n if (poem !== null) {\n text.poem = poem;\n }\n\n if (descriptive !== null) {\n text.descriptive = true;\n }\n\n yield text;\n } else {\n let text:\n | InlineLineBreak\n | InlineHeading\n | FootnoteReference\n | Text = {\n ...content,\n };\n\n if ('text' in text) {\n if (poem !== null) {\n text.poem = poem;\n }\n\n if (descriptive !== null) {\n text.descriptive = true;\n }\n }\n yield text;\n }\n } else {\n yield content;\n }\n }\n }\n }\n\n parseVerse(\n element: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): Verse {\n const verse: Verse = {\n type: 'verse',\n number: parseInt(element.getAttribute('number') || '0', 10),\n content: [],\n };\n\n for (let content of this.iterateVerseContent(chapter, verse, nodes)) {\n addOrJoin(verse.content, content);\n }\n\n trimContent(verse.content);\n return verse;\n }\n\n *parseHebrewSubtitle(\n para: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<HebrewSubtitle | Verse> {\n const subtitle: HebrewSubtitle = {\n type: 'hebrew_subtitle',\n content: [],\n };\n\n for (let content of this.iterateHebrewSubtitleContent(\n para,\n chapter,\n nodes\n )) {\n if (typeof content === 'object' && 'number' in content) {\n yield content;\n continue;\n }\n addOrJoin(subtitle.content, content);\n }\n\n trimContent(subtitle.content);\n if (subtitle.content.length > 0) {\n yield subtitle;\n }\n }\n\n *iterateHebrewSubtitleContent(\n element: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<\n Verse | string | Text | FootnoteReference | InlineLineBreak\n > {\n while (true) {\n const { done, value: node } = nodes.next();\n if (done) {\n break;\n }\n\n if (!isParent(node, element)) {\n nodes.rewind(1);\n break;\n }\n\n if (node instanceof Element && node.nodeName === 'verse') {\n yield this.parseVerse(node, chapter, nodes);\n } else {\n yield* this.iterateNodeTextContent(nodes, node, chapter);\n }\n }\n }\n\n *iterateNodeTextContent(\n nodes: RewindableIterator<Node>,\n node: Node,\n chapter: Chapter,\n verse?: Verse\n ): IterableIterator<string | Text | FootnoteReference | InlineLineBreak> {\n if (node instanceof Element && node.nodeName === 'note') {\n yield* this.iterateNote(nodes, node, chapter, verse);\n } else if (node instanceof Element && node.nodeName === 'char') {\n yield* this.iterateChar(nodes, node);\n } else if (\n node instanceof Element &&\n node.nodeName === 'para' &&\n node.getAttribute('style') === 'b'\n ) {\n for (let _ of children(nodes, node)) {\n // iterate through all the children to prevent iterating over them multiple times\n }\n yield {\n lineBreak: true,\n };\n } else if (node.nodeType === NodeType.Text) {\n yield node.textContent || '';\n }\n }\n\n *iterateCharContent(char: Element): IterableIterator<string | Text> {\n const style = char.getAttribute('style');\n const text = trimText(char.textContent || '');\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n }\n\n *iterateNote(\n nodes: RewindableIterator<Node>,\n node: Element,\n chapter: Chapter,\n verse?: Verse\n ): IterableIterator<FootnoteReference> {\n const style = node.getAttribute('style');\n if (style === 'f') {\n const verseReferenceRegex = /^[0-9]{1,3}:[0-9]{1,3}/;\n\n let text = '';\n for (let child of children(nodes, node)) {\n if (child.nodeType === NodeType.Text) {\n text += child.textContent || '';\n }\n }\n\n text = text.trim();\n if (verseReferenceRegex.test(text)) {\n text = text.replace(verseReferenceRegex, '').trim();\n }\n\n const note: Footnote = {\n noteId: this._noteCounter++,\n caller: node.getAttribute('caller') || null,\n text,\n reference: {\n chapter: chapter.number,\n verse: verse?.number ?? 0,\n },\n };\n\n chapter.footnotes.push(note);\n\n yield {\n noteId: note.noteId,\n };\n } else {\n for (let _ of children(nodes, node)) {\n // iterate through all the children\n // so that we don't end up with duplicates\n }\n }\n }\n\n *iterateChar(\n nodes: RewindableIterator<Node>,\n node: Element\n ): IterableIterator<string | Text> {\n const style = node.getAttribute('style');\n let text = '';\n\n for (let char of children(nodes, node)) {\n if (char.nodeType === NodeType.Text) {\n text += char.textContent || '';\n }\n }\n\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n\n // if (!parentChar(node) && !parentNote(node)) {\n // yield *iterateCharContent(node);\n // }\n }\n}\n\n// Taken from https://github.com/gracious-tech/fetch/blob/1576cc4eafb32bf347a09332094cf17c2231c90c/converters/usx-to-json/src/elements.ts#L16\nconst ignoredParaStyles = new Set([\n // <para> Identification [exclude all] - Running headings & table of contents\n 'ide', // See https://github.com/schierlm/BibleMultiConverter/issues/67\n 'rem', // Remarks (valid in schema though missed in docs)\n 'h',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'toc1',\n 'toc2',\n 'toc3',\n 'toca1',\n 'toca2',\n 'toca3',\n\n /* <para> Introductions [exclude all] - Introductionary (non-biblical) content\n Which might be helpful in a printed book, but intro material in apps is usually bad UX,\n and users that really care can research a translations methodology themselves\n */\n 'imt',\n 'imt1',\n 'imt2',\n 'imt3',\n 'imt4',\n 'is',\n 'is1',\n 'is2',\n 'is3',\n 'is4',\n 'ip',\n 'ipi',\n 'im',\n 'imi',\n 'ipq',\n 'imq',\n 'ipr',\n 'iq',\n 'iq1',\n 'iq2',\n 'iq3',\n 'iq4',\n 'ib',\n 'ili',\n 'ili1',\n 'ili2',\n 'ili3',\n 'ili4',\n 'iot',\n 'io',\n 'io1',\n 'io2',\n 'io3',\n 'io4',\n 'iex',\n 'imte',\n 'ie',\n\n /* <para> Headings [exclude some] - Exclude book & chapter headings but keep section headings\n Not excluded: ms# | mr | s# | sr | d | sp | sd#\n */\n 'mt',\n 'mt1',\n 'mt2',\n 'mt3',\n 'mt4',\n 'mte',\n 'mte1',\n 'mte2',\n 'mte3',\n 'mte4',\n 'cl',\n 'cd', // Non-biblical chapter summary, more than heading\n 'r', // Parallels to be provided by external data\n]);\n\nfunction* iterateCharContent(char: Element): IterableIterator<string | Text> {\n const style = char.getAttribute('style');\n const text = trimText(char.textContent || '');\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n}\n\nfunction trimText(text: string): string {\n return text.replace(/\\s+/g, ' ');\n}\n\nfunction trimContent<T extends string | unknown>(content: T[]): T[] {\n for (let i = 0; i < content.length; i++) {\n const value = content[i];\n if (typeof value === 'string') {\n content[i] = trimText(value as string).trim() as T;\n if (content[i] === '') {\n content.splice(i, 1);\n i--;\n continue;\n }\n } else if (isVerseText(value)) {\n value.text = trimText(value.text).trim();\n if (value.text === '') {\n content.splice(i, 1);\n i--;\n continue;\n }\n }\n }\n return content;\n}\n\nfunction addOrJoin(array: (string | unknown)[], value: string | unknown) {\n if (array.length === 0) {\n array.push(value);\n } else {\n const last = array[array.length - 1];\n if (typeof last === 'string' && typeof value === 'string') {\n array[array.length - 1] = last + value;\n } else if (\n isVerseText(last) &&\n isVerseText(value) &&\n hasSameFormatting(last, value)\n ) {\n last.text += value.text;\n } else {\n array.push(value);\n }\n }\n}\n\nfunction isVerseText(value: unknown): value is Text {\n return typeof value === 'object' && value !== null && 'text' in value;\n}\n\nfunction hasSameFormatting(a: Text, b: Text): boolean {\n return a.poem === b.poem && a.wordsOfJesus === b.wordsOfJesus;\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import {\n Chapter,\n ChapterContent,\n Footnote,\n FootnoteReference,\n ParseTree,\n Verse,\n Text,\n HebrewSubtitle,\n InlineLineBreak,\n InlineHeading,\n ParseMessage,\n} from './types.js';\nimport {\n iterateAll,\n children,\n RewindableIterator,\n isParent,\n} from './iterators.js';\nimport { KNOWN_SKIPPED_VERSES } from '../utils.js';\n\nenum NodeType {\n Text = 3,\n}\n\n/**\n * The version of the parser.\n * Used to determine whether input files need to be re-parsed.\n */\nexport const PARSER_VERSION = '2';\n\n/**\n * Defines a class that is able to parse USX content.\n */\nexport class USXParser {\n private _domParser: DOMParser;\n private _noteCounter: number = 0;\n private _messages: ParseMessage[] = [];\n private _lastVerse: Verse | null = null;\n private _currentChapter: Chapter | null = null;\n private _bookId: string | null = null;\n\n constructor(domParser: DOMParser) {\n this._domParser = domParser;\n }\n\n /**\n * Parses the specified USX content.\n *\n * @param usx The USX content to parse.\n * @returns The parse tree that was generated.\n */\n public parse(usx: string): ParseTree {\n this._noteCounter = 0;\n this._messages = [];\n this._lastVerse = null;\n this._currentChapter = null;\n this._bookId = null;\n const parser = this._domParser;\n const doc = parser.parseFromString(usx, 'application/xml');\n const usxElement = doc.documentElement;\n\n let root: ParseTree = {\n type: 'root',\n content: [],\n };\n\n const bookElement = usxElement.querySelector('book[code]');\n\n if (!bookElement) {\n throw new Error('The USX content does not contain a book element.');\n }\n\n const bookCode = bookElement.getAttribute('code') || '';\n\n if (!bookCode) {\n throw new Error(\n 'The book element does not contain a code attribute.'\n );\n }\n\n this._bookId = root.id = bookCode;\n\n const header = usxElement.querySelector('para[style=\"h\"]');\n if (header) {\n root.header = header.textContent || '';\n }\n\n const titles = usxElement.querySelectorAll(\n 'para[style=\"mt1\"], para[style=\"mt2\"], para[style=\"mt3\"]'\n );\n // const title2 = usxElement.querySelector('para[style=\"mt2\"]');\n // const title3 = usxElement.querySelector('para[style=\"mt3\"]');\n\n if (titles.length > 0) {\n root.title = [...titles]\n .map((t) => t.textContent)\n .filter((t) => t)\n .join(' ');\n }\n\n for (let content of this.iterateRootContent(usxElement)) {\n root.content.push(content);\n }\n\n if (this._messages.length > 0) {\n root.parseMessages = this._messages.slice();\n }\n\n return root;\n }\n\n *iterateRootContent(\n usxElement: Element\n ): Generator<ParseTree['content'][0]> {\n const iterator = iterateAll(usxElement);\n while (true) {\n const { done, value: child } = iterator.next();\n if (done) {\n break;\n }\n\n if (!(child instanceof Element)) {\n continue;\n }\n\n if (child.nodeName === 'chapter') {\n if (child.hasAttribute('eid')) {\n continue;\n }\n\n const chapter: Chapter = {\n type: 'chapter',\n number: parseInt(child.getAttribute('number') || '0', 10),\n content: [],\n footnotes: [],\n };\n this._currentChapter = chapter;\n\n for (let content of this.iterateChapterContent(\n chapter,\n iterator\n )) {\n chapter.content.push(content);\n }\n\n yield chapter;\n } else if (child.nodeName === 'para') {\n const style = child.getAttribute('style');\n if (\n style === 's1' ||\n style === 's2' ||\n style === 's3' ||\n style === 's4'\n ) {\n yield {\n type: 'heading',\n content: child.textContent ? [child.textContent] : [],\n };\n }\n }\n }\n }\n\n *iterateChapterContent(\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<ChapterContent> {\n while (true) {\n const { done, value: element } = nodes.next();\n if (done) {\n break;\n }\n\n if (!(element instanceof Element)) {\n continue;\n }\n\n if (element.nodeName === 'chapter') {\n break;\n } else if (element.nodeName === 'para') {\n const style = element.getAttribute('style');\n if (\n style === 's1' ||\n style === 's2' ||\n style === 's3' ||\n style === 's4'\n ) {\n yield {\n type: 'heading',\n content: element.textContent\n ? [element.textContent]\n : [],\n };\n } else if (style === 'b') {\n yield {\n type: 'line_break',\n };\n } else if (style === 'd') {\n yield* this.parseHebrewSubtitle(element, chapter, nodes);\n }\n } else if (element.nodeName === 'verse') {\n if (element.hasAttribute('eid')) {\n continue;\n }\n\n yield this.parseVerse(element, chapter, nodes);\n }\n }\n }\n\n *iterateVerseContent(\n chapter: Chapter,\n verse: Verse,\n nodes: RewindableIterator<Node>\n ): IterableIterator<string | FootnoteReference | Text | InlineLineBreak> {\n let lastParent: Element | null = null;\n while (true) {\n const { done, value: node } = nodes.next();\n if (done) {\n break;\n }\n\n if (node.nodeName === 'verse') {\n if (!(node instanceof Element) || !node.hasAttribute('eid')) {\n nodes.rewind(1);\n }\n break;\n }\n\n const parent = node.parentElement!;\n let poem: number | null = null;\n let descriptive: boolean | null = null;\n\n if (parent.nodeName === 'para') {\n const style = parent.getAttribute('style');\n if (\n style === 'q1' ||\n style === 'q2' ||\n style === 'q3' ||\n style === 'q4'\n ) {\n poem =\n style === 'q1'\n ? 1\n : style === 'q2'\n ? 2\n : style === 'q3'\n ? 3\n : 4;\n\n // Send explicit line breaks\n // if we are in a new paragraph but the previous paragraph had the same poem style\n if (parent.previousElementSibling?.nodeName === 'para') {\n const previousStyle =\n parent.previousElementSibling?.getAttribute(\n 'style'\n );\n if (previousStyle === style && lastParent !== parent) {\n lastParent = parent;\n yield {\n lineBreak: true,\n };\n }\n }\n } else if (style === 'd') {\n descriptive = true;\n }\n }\n\n for (let content of this.iterateNodeTextContent(\n nodes,\n node,\n chapter,\n verse\n )) {\n if (poem !== null || descriptive !== null) {\n if (typeof content === 'string') {\n let text: Text = {\n text: content,\n };\n\n if (poem !== null) {\n text.poem = poem;\n }\n\n if (descriptive !== null) {\n text.descriptive = true;\n }\n\n yield text;\n } else {\n let text:\n | InlineLineBreak\n | InlineHeading\n | FootnoteReference\n | Text = {\n ...content,\n };\n\n if ('text' in text) {\n if (poem !== null) {\n text.poem = poem;\n }\n\n if (descriptive !== null) {\n text.descriptive = true;\n }\n }\n yield text;\n }\n } else {\n yield content;\n }\n }\n }\n }\n\n parseVerse(\n element: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): Verse {\n const verse: Verse = {\n type: 'verse',\n number: parseInt(element.getAttribute('number') || '0', 10),\n content: [],\n };\n\n if (this._currentChapter && this._lastVerse) {\n if (this._currentChapter.number === chapter.number) {\n // We're parsing the same chapter as the last one\n const delta = verse.number - this._lastVerse.number;\n if (delta > 1) {\n // Delta is greater than 1, so we might have missed some verses\n for (\n let v = this._lastVerse.number + 1;\n v < verse.number;\n v++\n ) {\n let isExpected = false;\n if (this._bookId) {\n const missingVerse = `${this._bookId} ${chapter.number}:${v}`;\n if (KNOWN_SKIPPED_VERSES.has(missingVerse)) {\n isExpected = true;\n }\n }\n\n if (!isExpected) {\n this._messages.push({\n type: 'warning',\n message: `Verse ${this._bookId ?? '(null)'} ${chapter.number}:${v} is missing.`,\n });\n }\n }\n }\n }\n }\n this._lastVerse = verse;\n\n for (let content of this.iterateVerseContent(chapter, verse, nodes)) {\n addOrJoin(verse.content, content);\n }\n\n trimContent(verse.content);\n return verse;\n }\n\n *parseHebrewSubtitle(\n para: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<HebrewSubtitle | Verse> {\n const subtitle: HebrewSubtitle = {\n type: 'hebrew_subtitle',\n content: [],\n };\n\n for (let content of this.iterateHebrewSubtitleContent(\n para,\n chapter,\n nodes\n )) {\n if (typeof content === 'object' && 'number' in content) {\n yield content;\n continue;\n }\n addOrJoin(subtitle.content, content);\n }\n\n trimContent(subtitle.content);\n if (subtitle.content.length > 0) {\n yield subtitle;\n }\n }\n\n *iterateHebrewSubtitleContent(\n element: Element,\n chapter: Chapter,\n nodes: RewindableIterator<Node>\n ): IterableIterator<\n Verse | string | Text | FootnoteReference | InlineLineBreak\n > {\n while (true) {\n const { done, value: node } = nodes.next();\n if (done) {\n break;\n }\n\n if (!isParent(node, element)) {\n nodes.rewind(1);\n break;\n }\n\n if (node instanceof Element && node.nodeName === 'verse') {\n yield this.parseVerse(node, chapter, nodes);\n } else {\n yield* this.iterateNodeTextContent(nodes, node, chapter);\n }\n }\n }\n\n *iterateNodeTextContent(\n nodes: RewindableIterator<Node>,\n node: Node,\n chapter: Chapter,\n verse?: Verse\n ): IterableIterator<string | Text | FootnoteReference | InlineLineBreak> {\n if (node instanceof Element && node.nodeName === 'note') {\n yield* this.iterateNote(nodes, node, chapter, verse);\n } else if (node instanceof Element && node.nodeName === 'char') {\n yield* this.iterateChar(nodes, node);\n } else if (\n node instanceof Element &&\n node.nodeName === 'para' &&\n node.getAttribute('style') === 'b'\n ) {\n for (let _ of children(nodes, node)) {\n // iterate through all the children to prevent iterating over them multiple times\n }\n yield {\n lineBreak: true,\n };\n } else if (node.nodeType === NodeType.Text) {\n yield node.textContent || '';\n }\n }\n\n *iterateCharContent(char: Element): IterableIterator<string | Text> {\n const style = char.getAttribute('style');\n const text = trimText(char.textContent || '');\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n }\n\n *iterateNote(\n nodes: RewindableIterator<Node>,\n node: Element,\n chapter: Chapter,\n verse?: Verse\n ): IterableIterator<FootnoteReference> {\n const style = node.getAttribute('style');\n if (style === 'f') {\n const verseReferenceRegex = /^[0-9]{1,3}:[0-9]{1,3}/;\n\n let text = '';\n for (let child of children(nodes, node)) {\n if (child.nodeType === NodeType.Text) {\n text += child.textContent || '';\n }\n }\n\n text = text.trim();\n if (verseReferenceRegex.test(text)) {\n text = text.replace(verseReferenceRegex, '').trim();\n }\n\n const note: Footnote = {\n noteId: this._noteCounter++,\n caller: node.getAttribute('caller') || null,\n text,\n reference: {\n chapter: chapter.number,\n verse: verse?.number ?? 0,\n },\n };\n\n chapter.footnotes.push(note);\n\n yield {\n noteId: note.noteId,\n };\n } else {\n for (let _ of children(nodes, node)) {\n // iterate through all the children\n // so that we don't end up with duplicates\n }\n }\n }\n\n *iterateChar(\n nodes: RewindableIterator<Node>,\n node: Element\n ): IterableIterator<string | Text> {\n const style = node.getAttribute('style');\n let text = '';\n\n for (let char of children(nodes, node)) {\n if (char.nodeType === NodeType.Text) {\n text += char.textContent || '';\n }\n }\n\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n\n // if (!parentChar(node) && !parentNote(node)) {\n // yield *iterateCharContent(node);\n // }\n }\n}\n\n// Taken from https://github.com/gracious-tech/fetch/blob/1576cc4eafb32bf347a09332094cf17c2231c90c/converters/usx-to-json/src/elements.ts#L16\nconst ignoredParaStyles = new Set([\n // <para> Identification [exclude all] - Running headings & table of contents\n 'ide', // See https://github.com/schierlm/BibleMultiConverter/issues/67\n 'rem', // Remarks (valid in schema though missed in docs)\n 'h',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'toc1',\n 'toc2',\n 'toc3',\n 'toca1',\n 'toca2',\n 'toca3',\n\n /* <para> Introductions [exclude all] - Introductionary (non-biblical) content\n Which might be helpful in a printed book, but intro material in apps is usually bad UX,\n and users that really care can research a translations methodology themselves\n */\n 'imt',\n 'imt1',\n 'imt2',\n 'imt3',\n 'imt4',\n 'is',\n 'is1',\n 'is2',\n 'is3',\n 'is4',\n 'ip',\n 'ipi',\n 'im',\n 'imi',\n 'ipq',\n 'imq',\n 'ipr',\n 'iq',\n 'iq1',\n 'iq2',\n 'iq3',\n 'iq4',\n 'ib',\n 'ili',\n 'ili1',\n 'ili2',\n 'ili3',\n 'ili4',\n 'iot',\n 'io',\n 'io1',\n 'io2',\n 'io3',\n 'io4',\n 'iex',\n 'imte',\n 'ie',\n\n /* <para> Headings [exclude some] - Exclude book & chapter headings but keep section headings\n Not excluded: ms# | mr | s# | sr | d | sp | sd#\n */\n 'mt',\n 'mt1',\n 'mt2',\n 'mt3',\n 'mt4',\n 'mte',\n 'mte1',\n 'mte2',\n 'mte3',\n 'mte4',\n 'cl',\n 'cd', // Non-biblical chapter summary, more than heading\n 'r', // Parallels to be provided by external data\n]);\n\nfunction* iterateCharContent(char: Element): IterableIterator<string | Text> {\n const style = char.getAttribute('style');\n const text = trimText(char.textContent || '');\n if (style === 'wj') {\n yield {\n text,\n wordsOfJesus: true,\n };\n } else {\n yield text;\n }\n}\n\nfunction trimText(text: string): string {\n return text.replace(/\\s+/g, ' ');\n}\n\nfunction trimContent<T extends string | unknown>(content: T[]): T[] {\n for (let i = 0; i < content.length; i++) {\n const value = content[i];\n if (typeof value === 'string') {\n content[i] = trimText(value as string).trim() as T;\n if (content[i] === '') {\n content.splice(i, 1);\n i--;\n continue;\n }\n } else if (isVerseText(value)) {\n value.text = trimText(value.text).trim();\n if (value.text === '') {\n content.splice(i, 1);\n i--;\n continue;\n }\n }\n }\n return content;\n}\n\nfunction addOrJoin(array: (string | unknown)[], value: string | unknown) {\n if (array.length === 0) {\n array.push(value);\n } else {\n const last = array[array.length - 1];\n if (typeof last === 'string' && typeof value === 'string') {\n array[array.length - 1] = last + value;\n } else if (\n isVerseText(last) &&\n isVerseText(value) &&\n hasSameFormatting(last, value)\n ) {\n last.text += value.text;\n } else {\n array.push(value);\n }\n }\n}\n\nfunction isVerseText(value: unknown): value is Text {\n return typeof value === 'object' && value !== null && 'text' in value;\n}\n\nfunction hasSameFormatting(a: Text, b: Text): boolean {\n return a.poem === b.poem && a.wordsOfJesus === b.wordsOfJesus;\n}\n"],
|
|
5
|
+
"mappings": ";AAaA;AAAA,EACI;AAAA,EACA;AAAA,EAEA;AAAA,OACG;AACP,SAAS,4BAA4B;AAErC,IAAK,WAAL,kBAAKA,cAAL;AACI,EAAAA,oBAAA,UAAO,KAAP;AADC,SAAAA;AAAA,GAAA;AAQE,aAAM,iBAAiB;AAKvB,aAAM,UAAU;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,SAAS,CAAC,IAAI,OAAO;AAAA,IACrC,WACI,YAAY,IAAI,KAChB,YAAY,KAAK,KACjB,kBAAkB,MAAM,KAAK,GAC/B;AACE,WAAK,QAAQ,MAAM;AAAA,IACvB,OAAO;AACH,YAAM,KAAK,KAAK;AAAA,IACpB;AAAA,EACJ;AACJ;AAEA,SAAS,YAAY,OAA+B;AAChD,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;AACpE;AAEA,SAAS,kBAAkB,GAAS,GAAkB;AAClD,SAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE;AACrD;",
|
|
6
6
|
"names": ["NodeType"]
|
|
7
7
|
}
|
package/dist/esm/utils.js
CHANGED
|
@@ -7,7 +7,8 @@ const TRANSLATION_ID_MAP = /* @__PURE__ */ new Map([
|
|
|
7
7
|
["arb_nav", "ARBNAV"],
|
|
8
8
|
["eng_webp", "ENGWEBP"],
|
|
9
9
|
["hin_irv", "HINIRV"],
|
|
10
|
-
["hbo_mas", "HBOMAS"]
|
|
10
|
+
["hbo_mas", "HBOMAS"],
|
|
11
|
+
["eng_drv", "eng_dra"]
|
|
11
12
|
]);
|
|
12
13
|
export function getTranslationId(translationId) {
|
|
13
14
|
return TRANSLATION_ID_MAP.get(translationId) ?? translationId;
|
|
@@ -220,4 +221,20 @@ export function getBookId(book) {
|
|
|
220
221
|
}
|
|
221
222
|
return null;
|
|
222
223
|
}
|
|
224
|
+
export const KNOWN_SKIPPED_VERSES = /* @__PURE__ */ new Set([
|
|
225
|
+
"MAT 17:21",
|
|
226
|
+
"MAT 18:11",
|
|
227
|
+
"MAT 23:14",
|
|
228
|
+
"MAR 7:16",
|
|
229
|
+
"MAR 9:44",
|
|
230
|
+
"MAR 9:46",
|
|
231
|
+
"MAR 11:26",
|
|
232
|
+
"LUK 17:36",
|
|
233
|
+
"JHN 5:4",
|
|
234
|
+
"ACT 8:37",
|
|
235
|
+
"ACT 15:34",
|
|
236
|
+
"ACT 24:7",
|
|
237
|
+
"ACT 28:29",
|
|
238
|
+
"ROM 16:24"
|
|
239
|
+
]);
|
|
223
240
|
//# sourceMappingURL=utils.js.map
|