puzzle-lib 2.0.0-alpha.2 → 2.0.0-beta.2

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.
Files changed (246) hide show
  1. package/README.md +62 -9
  2. package/build/src/{Braille → braille}/braille.d.ts +4 -4
  3. package/build/src/braille/braille.js +121 -0
  4. package/build/src/braille/braille.js.map +1 -0
  5. package/build/src/{Braille/BrailleDot.js → braille/dot.js} +3 -6
  6. package/build/src/braille/dot.js.map +1 -0
  7. package/build/src/{Braille/BrailleEncoding.js → braille/encoding.js} +4 -7
  8. package/build/src/braille/encoding.js.map +1 -0
  9. package/build/src/braille/index.d.ts +3 -0
  10. package/build/src/braille/index.js +4 -0
  11. package/build/src/braille/index.js.map +1 -0
  12. package/build/src/{Cipher → cipher}/cipher.js +10 -20
  13. package/build/src/cipher/cipher.js.map +1 -0
  14. package/build/src/cipher/index.d.ts +1 -0
  15. package/build/src/cipher/index.js +2 -0
  16. package/build/src/cipher/index.js.map +1 -0
  17. package/build/src/{Common/CharacterImage.d.ts → common/character-image.d.ts} +1 -1
  18. package/build/src/common/character-image.js +9 -0
  19. package/build/src/common/character-image.js.map +1 -0
  20. package/build/src/{Common/EncodingCategory.js → common/encoding-category.js} +3 -6
  21. package/build/src/common/encoding-category.js.map +1 -0
  22. package/build/src/{Common/EncodingEntry.d.ts → common/encoding-entry.d.ts} +1 -1
  23. package/build/src/{Common/EncodingEntry.js → common/encoding-entry.js} +2 -6
  24. package/build/src/common/encoding-entry.js.map +1 -0
  25. package/build/src/{Common/EncodingLookupResult.d.ts → common/encoding-lookup-result.d.ts} +1 -1
  26. package/build/src/common/encoding-lookup-result.js +8 -0
  27. package/build/src/common/encoding-lookup-result.js.map +1 -0
  28. package/build/src/common/index.d.ts +5 -0
  29. package/build/src/common/index.js +6 -0
  30. package/build/src/common/index.js.map +1 -0
  31. package/build/src/{Common/InlineSvg.js → common/inline-svg.js} +2 -6
  32. package/build/src/common/inline-svg.js.map +1 -0
  33. package/build/src/{Conversion/characterConversion.d.ts → conversion/character-conversion.d.ts} +1 -1
  34. package/build/src/{Conversion/characterConversion.js → conversion/character-conversion.js} +7 -13
  35. package/build/src/conversion/character-conversion.js.map +1 -0
  36. package/build/src/{Conversion/CharacterEncoding.d.ts → conversion/character-encoding.d.ts} +2 -1
  37. package/build/src/{Conversion/CharacterEncoding.js → conversion/character-encoding.js} +4 -6
  38. package/build/src/conversion/character-encoding.js.map +1 -0
  39. package/build/src/{Conversion/CharacterTableEntry.js → conversion/character-table-entry.js} +2 -6
  40. package/build/src/conversion/character-table-entry.js.map +1 -0
  41. package/build/src/{Conversion → conversion}/conversion.d.ts +3 -1
  42. package/build/src/conversion/conversion.js +183 -0
  43. package/build/src/conversion/conversion.js.map +1 -0
  44. package/build/src/conversion/index.d.ts +5 -0
  45. package/build/src/conversion/index.js +6 -0
  46. package/build/src/conversion/index.js.map +1 -0
  47. package/build/src/{Conversion/significantFigures.js → conversion/significant-figures.js} +4 -9
  48. package/build/src/conversion/significant-figures.js.map +1 -0
  49. package/build/src/{Morse/MorseEncoding.js → morse/encoding.js} +3 -6
  50. package/build/src/morse/encoding.js.map +1 -0
  51. package/build/src/morse/index.d.ts +2 -0
  52. package/build/src/morse/index.js +3 -0
  53. package/build/src/morse/index.js.map +1 -0
  54. package/build/src/{Morse → morse}/morse.d.ts +5 -5
  55. package/build/src/morse/morse.js +222 -0
  56. package/build/src/morse/morse.js.map +1 -0
  57. package/build/src/nato/character.js +9 -0
  58. package/build/src/nato/character.js.map +1 -0
  59. package/build/src/nato/index.d.ts +2 -0
  60. package/build/src/nato/index.js +3 -0
  61. package/build/src/nato/index.js.map +1 -0
  62. package/build/src/{Nato → nato}/nato.d.ts +1 -1
  63. package/build/src/nato/nato.js +33 -0
  64. package/build/src/nato/nato.js.map +1 -0
  65. package/build/src/naval-flags/index.d.ts +1 -0
  66. package/build/src/naval-flags/index.js +2 -0
  67. package/build/src/naval-flags/index.js.map +1 -0
  68. package/build/src/{NavalFlags/navalFlags.d.ts → naval-flags/naval-flags.d.ts} +1 -1
  69. package/build/src/{NavalFlags/navalFlags.js → naval-flags/naval-flags.js} +32 -36
  70. package/build/src/naval-flags/naval-flags.js.map +1 -0
  71. package/build/src/ngrams/bigrams.d.ts +2 -0
  72. package/build/src/ngrams/bigrams.js +684 -0
  73. package/build/src/ngrams/bigrams.js.map +1 -0
  74. package/build/src/ngrams/index.d.ts +1 -0
  75. package/build/src/ngrams/index.js +2 -0
  76. package/build/src/ngrams/index.js.map +1 -0
  77. package/build/src/ngrams/ngrams.d.ts +13 -0
  78. package/build/src/ngrams/ngrams.js +71 -0
  79. package/build/src/ngrams/ngrams.js.map +1 -0
  80. package/build/src/ngrams/trigrams.d.ts +2 -0
  81. package/build/src/ngrams/trigrams.js +17583 -0
  82. package/build/src/ngrams/trigrams.js.map +1 -0
  83. package/build/src/ngrams/unigrams.d.ts +2 -0
  84. package/build/src/ngrams/unigrams.js +34 -0
  85. package/build/src/ngrams/unigrams.js.map +1 -0
  86. package/build/src/phone/index.d.ts +2 -0
  87. package/build/src/phone/index.js +2 -0
  88. package/build/src/phone/index.js.map +1 -0
  89. package/build/src/phone/phone-mapping.d.ts +10 -0
  90. package/build/src/phone/phone-mapping.js +27 -0
  91. package/build/src/phone/phone-mapping.js.map +1 -0
  92. package/build/src/phone/phone.d.ts +27 -0
  93. package/build/src/phone/phone.js +62 -0
  94. package/build/src/phone/phone.js.map +1 -0
  95. package/build/src/pigpen/encoding.d.ts +29 -0
  96. package/build/src/pigpen/encoding.js +36 -0
  97. package/build/src/pigpen/encoding.js.map +1 -0
  98. package/build/src/pigpen/index.d.ts +3 -0
  99. package/build/src/pigpen/index.js +4 -0
  100. package/build/src/pigpen/index.js.map +1 -0
  101. package/build/src/pigpen/pigpen.d.ts +35 -0
  102. package/build/src/pigpen/pigpen.js +137 -0
  103. package/build/src/pigpen/pigpen.js.map +1 -0
  104. package/build/src/pigpen/segment.d.ts +12 -0
  105. package/build/src/pigpen/segment.js +14 -0
  106. package/build/src/pigpen/segment.js.map +1 -0
  107. package/build/src/resistor/index.d.ts +2 -0
  108. package/build/src/resistor/index.js +2 -0
  109. package/build/src/resistor/index.js.map +1 -0
  110. package/build/src/{Resistor → resistor}/resistor.js +7 -14
  111. package/build/src/resistor/resistor.js.map +1 -0
  112. package/build/src/{Semaphore/SemaphoreDirection.js → semaphore/direction.js} +3 -6
  113. package/build/src/semaphore/direction.js.map +1 -0
  114. package/build/src/{Semaphore/SemaphoreEncoding.js → semaphore/encoding.js} +4 -7
  115. package/build/src/semaphore/encoding.js.map +1 -0
  116. package/build/src/semaphore/index.d.ts +3 -0
  117. package/build/src/semaphore/index.js +4 -0
  118. package/build/src/semaphore/index.js.map +1 -0
  119. package/build/src/{Semaphore → semaphore}/semaphore.d.ts +4 -4
  120. package/build/src/semaphore/semaphore.js +207 -0
  121. package/build/src/semaphore/semaphore.js.map +1 -0
  122. package/build/src/{WordSearch/WordSearchDirection.js → word-search/direction.js} +3 -6
  123. package/build/src/word-search/direction.js.map +1 -0
  124. package/build/src/word-search/index.d.ts +5 -0
  125. package/build/src/word-search/index.js +4 -0
  126. package/build/src/word-search/index.js.map +1 -0
  127. package/build/src/word-search/point.d.ts +4 -0
  128. package/build/src/word-search/point.js +2 -0
  129. package/build/src/word-search/point.js.map +1 -0
  130. package/build/src/word-search/result.d.ts +6 -0
  131. package/build/src/word-search/result.js +9 -0
  132. package/build/src/word-search/result.js.map +1 -0
  133. package/build/src/word-search/word-search.d.ts +10 -0
  134. package/build/src/{WordSearch/wordSearch.js → word-search/word-search.js} +28 -55
  135. package/build/src/word-search/word-search.js.map +1 -0
  136. package/package.json +57 -3
  137. package/src/{Braille → braille}/braille.ts +5 -5
  138. package/src/{Braille/BrailleEncoding.ts → braille/encoding.ts} +1 -1
  139. package/src/braille/index.ts +8 -0
  140. package/src/{Cipher → cipher}/cipher.ts +1 -1
  141. package/src/cipher/index.ts +10 -0
  142. package/src/{Common/CharacterImage.ts → common/character-image.ts} +1 -1
  143. package/src/{Common/EncodingEntry.ts → common/encoding-entry.ts} +1 -1
  144. package/src/{Common/EncodingLookupResult.ts → common/encoding-lookup-result.ts} +1 -1
  145. package/src/common/index.ts +5 -0
  146. package/src/{Conversion/characterConversion.ts → conversion/character-conversion.ts} +1 -1
  147. package/src/{Conversion/CharacterEncoding.ts → conversion/character-encoding.ts} +1 -0
  148. package/src/{Conversion → conversion}/conversion.ts +77 -2
  149. package/src/conversion/index.ts +15 -0
  150. package/src/morse/index.ts +14 -0
  151. package/src/{Morse → morse}/morse.ts +6 -6
  152. package/src/nato/index.ts +2 -0
  153. package/src/{Nato → nato}/nato.ts +1 -1
  154. package/src/naval-flags/index.ts +1 -0
  155. package/src/{NavalFlags/navalFlags.ts → naval-flags/naval-flags.ts} +2 -2
  156. package/src/ngrams/bigrams.ts +684 -0
  157. package/src/ngrams/index.ts +1 -0
  158. package/src/ngrams/ngrams.ts +73 -0
  159. package/src/ngrams/trigrams.ts +17584 -0
  160. package/src/ngrams/unigrams.ts +34 -0
  161. package/src/phone/index.ts +2 -0
  162. package/src/phone/phone-mapping.ts +27 -0
  163. package/src/phone/phone.ts +77 -0
  164. package/src/pigpen/encoding.ts +66 -0
  165. package/src/pigpen/index.ts +11 -0
  166. package/src/pigpen/pigpen.ts +168 -0
  167. package/src/pigpen/segment.ts +12 -0
  168. package/src/resistor/index.ts +9 -0
  169. package/src/{Semaphore/SemaphoreEncoding.ts → semaphore/encoding.ts} +1 -1
  170. package/src/semaphore/index.ts +13 -0
  171. package/src/{Semaphore → semaphore}/semaphore.ts +5 -5
  172. package/src/trie-prefix-tree.d.ts +1 -3
  173. package/src/word-search/index.ts +5 -0
  174. package/src/word-search/point.ts +4 -0
  175. package/src/word-search/result.ts +10 -0
  176. package/src/{WordSearch/wordSearch.ts → word-search/word-search.ts} +44 -70
  177. package/build/src/Braille/BrailleDot.js.map +0 -1
  178. package/build/src/Braille/BrailleEncoding.js.map +0 -1
  179. package/build/src/Braille/braille.js +0 -127
  180. package/build/src/Braille/braille.js.map +0 -1
  181. package/build/src/Cipher/cipher.js.map +0 -1
  182. package/build/src/Common/CharacterImage.js +0 -13
  183. package/build/src/Common/CharacterImage.js.map +0 -1
  184. package/build/src/Common/EncodingCategory.js.map +0 -1
  185. package/build/src/Common/EncodingEntry.js.map +0 -1
  186. package/build/src/Common/EncodingLookupResult.js +0 -12
  187. package/build/src/Common/EncodingLookupResult.js.map +0 -1
  188. package/build/src/Common/InlineSvg.js.map +0 -1
  189. package/build/src/Conversion/CharacterEncoding.js.map +0 -1
  190. package/build/src/Conversion/CharacterTableEntry.js.map +0 -1
  191. package/build/src/Conversion/characterConversion.js.map +0 -1
  192. package/build/src/Conversion/conversion.js +0 -130
  193. package/build/src/Conversion/conversion.js.map +0 -1
  194. package/build/src/Conversion/significantFigures.js.map +0 -1
  195. package/build/src/Morse/MorseEncoding.js.map +0 -1
  196. package/build/src/Morse/morse.js +0 -232
  197. package/build/src/Morse/morse.js.map +0 -1
  198. package/build/src/Nato/NatoCharacter.js +0 -13
  199. package/build/src/Nato/NatoCharacter.js.map +0 -1
  200. package/build/src/Nato/nato.js +0 -37
  201. package/build/src/Nato/nato.js.map +0 -1
  202. package/build/src/NavalFlags/navalFlags.js.map +0 -1
  203. package/build/src/Resistor/resistor.js.map +0 -1
  204. package/build/src/Semaphore/SemaphoreDirection.js.map +0 -1
  205. package/build/src/Semaphore/SemaphoreEncoding.js.map +0 -1
  206. package/build/src/Semaphore/semaphore.js +0 -218
  207. package/build/src/Semaphore/semaphore.js.map +0 -1
  208. package/build/src/WordSearch/Point.d.ts +0 -4
  209. package/build/src/WordSearch/Point.js +0 -3
  210. package/build/src/WordSearch/Point.js.map +0 -1
  211. package/build/src/WordSearch/Result.d.ts +0 -6
  212. package/build/src/WordSearch/Result.js +0 -13
  213. package/build/src/WordSearch/Result.js.map +0 -1
  214. package/build/src/WordSearch/WordSearchDirection.js.map +0 -1
  215. package/build/src/WordSearch/wordSearch.d.ts +0 -16
  216. package/build/src/WordSearch/wordSearch.js.map +0 -1
  217. package/build/src/index.d.ts +0 -29
  218. package/build/src/index.js +0 -102
  219. package/build/src/index.js.map +0 -1
  220. package/src/WordSearch/Point.ts +0 -4
  221. package/src/WordSearch/Result.ts +0 -10
  222. package/src/index.ts +0 -90
  223. /package/build/src/{Braille/BrailleDot.d.ts → braille/dot.d.ts} +0 -0
  224. /package/build/src/{Braille/BrailleEncoding.d.ts → braille/encoding.d.ts} +0 -0
  225. /package/build/src/{Cipher → cipher}/cipher.d.ts +0 -0
  226. /package/build/src/{Common/EncodingCategory.d.ts → common/encoding-category.d.ts} +0 -0
  227. /package/build/src/{Common/InlineSvg.d.ts → common/inline-svg.d.ts} +0 -0
  228. /package/build/src/{Conversion/CharacterTableEntry.d.ts → conversion/character-table-entry.d.ts} +0 -0
  229. /package/build/src/{Conversion/significantFigures.d.ts → conversion/significant-figures.d.ts} +0 -0
  230. /package/build/src/{Morse/MorseEncoding.d.ts → morse/encoding.d.ts} +0 -0
  231. /package/build/src/{Nato/NatoCharacter.d.ts → nato/character.d.ts} +0 -0
  232. /package/build/src/{Resistor → resistor}/resistor.d.ts +0 -0
  233. /package/build/src/{Semaphore/SemaphoreDirection.d.ts → semaphore/direction.d.ts} +0 -0
  234. /package/build/src/{Semaphore/SemaphoreEncoding.d.ts → semaphore/encoding.d.ts} +0 -0
  235. /package/build/src/{WordSearch/WordSearchDirection.d.ts → word-search/direction.d.ts} +0 -0
  236. /package/src/{Braille/BrailleDot.ts → braille/dot.ts} +0 -0
  237. /package/src/{Common/EncodingCategory.ts → common/encoding-category.ts} +0 -0
  238. /package/src/{Common/InlineSvg.ts → common/inline-svg.ts} +0 -0
  239. /package/src/{Conversion/CharacterTableEntry.ts → conversion/character-table-entry.ts} +0 -0
  240. /package/src/{Conversion/significantFigures.ts → conversion/significant-figures.ts} +0 -0
  241. /package/src/{Morse/MorseEncoding.ts → morse/encoding.ts} +0 -0
  242. /package/src/{Nato/NatoCharacter.ts → nato/character.ts} +0 -0
  243. /package/src/{NavalFlags → naval-flags}/LICENSE +0 -0
  244. /package/src/{Resistor → resistor}/resistor.ts +0 -0
  245. /package/src/{Semaphore/SemaphoreDirection.ts → semaphore/direction.ts} +0 -0
  246. /package/src/{WordSearch/WordSearchDirection.ts → word-search/direction.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character.js","sourceRoot":"","sources":["../../../src/nato/character.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAa;IACf,SAAS,CAAS;IAClB,IAAI,CAAS;IAEtB,YAAY,SAAiB,EAAE,IAAY;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { lookupNatoPhonetic, NATO_ALPHABET } from './nato.js';
2
+ export { NatoCharacter } from './character.js';
@@ -0,0 +1,3 @@
1
+ export { lookupNatoPhonetic, NATO_ALPHABET } from './nato.js';
2
+ export { NatoCharacter } from './character.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nato/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC"}
@@ -1,3 +1,3 @@
1
- import { NatoCharacter } from './NatoCharacter';
1
+ import { NatoCharacter } from './character.js';
2
2
  export declare const NATO_ALPHABET: readonly NatoCharacter[];
3
3
  export declare function lookupNatoPhonetic(character: string): NatoCharacter | undefined;
@@ -0,0 +1,33 @@
1
+ import { NatoCharacter } from './character.js';
2
+ export const NATO_ALPHABET = [
3
+ new NatoCharacter('A', 'Alfa'),
4
+ new NatoCharacter('B', 'Bravo'),
5
+ new NatoCharacter('C', 'Charlie'),
6
+ new NatoCharacter('D', 'Delta'),
7
+ new NatoCharacter('E', 'Echo'),
8
+ new NatoCharacter('F', 'Foxtrot'),
9
+ new NatoCharacter('G', 'Golf'),
10
+ new NatoCharacter('H', 'Hotel'),
11
+ new NatoCharacter('I', 'India'),
12
+ new NatoCharacter('J', 'Juliett'),
13
+ new NatoCharacter('K', 'Kilo'),
14
+ new NatoCharacter('L', 'Lima'),
15
+ new NatoCharacter('M', 'Mike'),
16
+ new NatoCharacter('N', 'November'),
17
+ new NatoCharacter('O', 'Oscar'),
18
+ new NatoCharacter('P', 'Papa'),
19
+ new NatoCharacter('Q', 'Quebec'),
20
+ new NatoCharacter('R', 'Romeo'),
21
+ new NatoCharacter('S', 'Sierra'),
22
+ new NatoCharacter('T', 'Tango'),
23
+ new NatoCharacter('U', 'Uniform'),
24
+ new NatoCharacter('V', 'Victor'),
25
+ new NatoCharacter('W', 'Whiskey'),
26
+ new NatoCharacter('X', 'X-ray'),
27
+ new NatoCharacter('Y', 'Yankee'),
28
+ new NatoCharacter('Z', 'Zulu'),
29
+ ];
30
+ export function lookupNatoPhonetic(character) {
31
+ return NATO_ALPHABET.find(ch => ch.character.toUpperCase() === character.toUpperCase());
32
+ }
33
+ //# sourceMappingURL=nato.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nato.js","sourceRoot":"","sources":["../../../src/nato/nato.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC;IAC9B,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;IAC/B,IAAI,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;IACjC,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;IAC/B,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC;IAC9B,IAAI,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;IACjC,IAAI,aAAa,CAAC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0,0 +1,2 @@
1
+ export { getNavalFlag, NAVAL_FLAGS } from './naval-flags.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/naval-flags/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC"}
@@ -1,3 +1,3 @@
1
- import { CharacterImage } from '../Common/CharacterImage';
1
+ import { CharacterImage } from '../common/character-image.js';
2
2
  export declare const NAVAL_FLAGS: readonly CharacterImage[];
3
3
  export declare function getNavalFlag(character: string): CharacterImage | undefined;
@@ -1,99 +1,95 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NAVAL_FLAGS = void 0;
4
- exports.getNavalFlag = getNavalFlag;
5
- const CharacterImage_1 = require("../Common/CharacterImage");
6
- const InlineSvg_1 = require("../Common/InlineSvg");
7
- exports.NAVAL_FLAGS = [
8
- new CharacterImage_1.CharacterImage('A', new InlineSvg_1.InlineSvg(`<path d="M 18,18 H 162 L 126,90 L 162,162 H 18 z" fill="#000094"/>
1
+ import { CharacterImage } from '../common/character-image.js';
2
+ import { InlineSvg } from '../common/inline-svg.js';
3
+ export const NAVAL_FLAGS = [
4
+ new CharacterImage('A', new InlineSvg(`<path d="M 18,18 H 162 L 126,90 L 162,162 H 18 z" fill="#000094"/>
9
5
  <rect x="18" y="18" width="72" height="144" fill="#fff"/>
10
6
  <path d="M 18,18 H 162 L 126,90 L 162,162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
11
- new CharacterImage_1.CharacterImage('B', new InlineSvg_1.InlineSvg('<path d="M 18,18 H 162 L 126,90 L 162,162 H 18 z" fill="#f00" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>', 180, 180)),
12
- new CharacterImage_1.CharacterImage('C', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
7
+ new CharacterImage('B', new InlineSvg('<path d="M 18,18 H 162 L 126,90 L 162,162 H 18 z" fill="#f00" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>', 180, 180)),
8
+ new CharacterImage('C', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
13
9
  <rect x="18" y="46.8" width="144" height="86.4" fill="#fff"/>
14
10
  <rect x="18" y="75.6" width="144" height="28.8" fill="#f00"/>
15
11
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
16
- new CharacterImage_1.CharacterImage('D', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
12
+ new CharacterImage('D', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
17
13
  <rect x="18" y="54" width="144" height="72" fill="#000094"/>
18
14
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
19
- new CharacterImage_1.CharacterImage('E', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
15
+ new CharacterImage('E', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
20
16
  <rect x="18" y="90" width="144" height="72" fill="#f00"/>
21
17
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
22
- new CharacterImage_1.CharacterImage('F', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
18
+ new CharacterImage('F', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
23
19
  <path d="M 90,18 l 72,72 l -72,72 l -72,-72 z" fill="#f00"/>
24
20
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
25
- new CharacterImage_1.CharacterImage('G', new InlineSvg_1.InlineSvg(`<path fill="#000094" d="m18,18h144v144H18"/>
21
+ new CharacterImage('G', new InlineSvg(`<path fill="#000094" d="m18,18h144v144H18"/>
26
22
  <path stroke="#FC0" stroke-width="24" d="m30,18v144m48,0V18m48,0v144"/>
27
23
  <path d="M18,18H162V162H18z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
28
- new CharacterImage_1.CharacterImage('H', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
24
+ new CharacterImage('H', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
29
25
  <rect x="18" y="18" width="72" height="144" fill="#fff"/>
30
26
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
31
- new CharacterImage_1.CharacterImage('I', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
27
+ new CharacterImage('I', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
32
28
  <circle cx="90" cy="90" r="36" fill="#000"/>
33
29
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
34
- new CharacterImage_1.CharacterImage('J', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
30
+ new CharacterImage('J', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
35
31
  <rect x="18" y="66" width="144" height="48" fill="#fff"/>
36
32
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
37
- new CharacterImage_1.CharacterImage('K', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
33
+ new CharacterImage('K', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
38
34
  <rect x="18" y="18" width="72" height="144" fill="#fc0"/>
39
35
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
40
- new CharacterImage_1.CharacterImage('L', new InlineSvg_1.InlineSvg(`<rect x="16" y="16" width="148" height="148" rx="2"/>
36
+ new CharacterImage('L', new InlineSvg(`<rect x="16" y="16" width="148" height="148" rx="2"/>
41
37
  <path fill="#FC0" d="m20,20h70v140h70V90H20"/>`, 180, 180)),
42
- new CharacterImage_1.CharacterImage('M', new InlineSvg_1.InlineSvg(`<clipPath id="c">
38
+ new CharacterImage('M', new InlineSvg(`<clipPath id="c">
43
39
  <path d="M 18,18 H 162 V 162 H 18 z"/>
44
40
  </clipPath>
45
41
  <rect x="18" y="18" width="144" height="144" fill="#000094"/>
46
42
  <path d="M 18,18 L 162,162 M 162,18 L 18,162" clip-path="url(#c)" stroke="#fff" stroke-width="28.8"/>
47
43
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
48
- new CharacterImage_1.CharacterImage('N', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
44
+ new CharacterImage('N', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
49
45
  <path d="M 18,18 H 54 V 162 H 90 V 18 H 126 V 162 H 162 V 126 H 18 V 90 H 162 V 54 H 18 z" fill="#000094"/>
50
46
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
51
- new CharacterImage_1.CharacterImage('O', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
47
+ new CharacterImage('O', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
52
48
  <path d="M 18,18 H 162 V 162 z" fill="#f00"/>
53
49
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
54
- new CharacterImage_1.CharacterImage('P', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
50
+ new CharacterImage('P', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
55
51
  <rect x="54" y="54" width="72" height="72" fill="#fff"/>
56
52
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
57
- new CharacterImage_1.CharacterImage('Q', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
53
+ new CharacterImage('Q', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
58
54
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
59
- new CharacterImage_1.CharacterImage('R', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
55
+ new CharacterImage('R', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
60
56
  <path d="M 90,18 V 162 M 18,90 H 162" stroke="#fc0" stroke-width="36"/>
61
57
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
62
- new CharacterImage_1.CharacterImage('S', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
58
+ new CharacterImage('S', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
63
59
  <rect x="54" y="54" width="72" height="72" fill="#000094"/>
64
60
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
65
- new CharacterImage_1.CharacterImage('T', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
61
+ new CharacterImage('T', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
66
62
  <rect x="18" y="18" width="96" height="144" fill="#fff"/>
67
63
  <rect x="18" y="18" width="48" height="144" fill="#f00"/>
68
64
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
69
- new CharacterImage_1.CharacterImage('U', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#ffffff"/>
65
+ new CharacterImage('U', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#ffffff"/>
70
66
  <path d="M 18,18 H 90 V 90 H 18 z" fill="#ff0000"/>
71
67
  <path d="M 162,91 H 91 V 162 H 162 z" fill="#ff0000"/>
72
68
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
73
- new CharacterImage_1.CharacterImage('V', new InlineSvg_1.InlineSvg(`<clipPath id="c">
69
+ new CharacterImage('V', new InlineSvg(`<clipPath id="c">
74
70
  <path d="M 18,18 H 162 V 162 H 18 z"/>
75
71
  </clipPath>
76
72
  <rect x="18" y="18" width="144" height="144" fill="#fff"/>
77
73
  <path d="M 18,18 L 162,162 M 162,18 L 18,162" clip-path="url(#c)" stroke="#f00" stroke-width="28.8"/>
78
74
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
79
- new CharacterImage_1.CharacterImage('W', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
75
+ new CharacterImage('W', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
80
76
  <rect x="42" y="42" width="96" height="96" fill="#fff"/>
81
77
  <rect x="66" y="66" width="48" height="48" fill="#f00"/>
82
78
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
83
- new CharacterImage_1.CharacterImage('X', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
79
+ new CharacterImage('X', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
84
80
  <path d="M 90,18 V 162 M 18,90 H 162" stroke="#000094" stroke-width="36"/>
85
81
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
86
- new CharacterImage_1.CharacterImage('Y', new InlineSvg_1.InlineSvg(`<clipPath id="c"><path d="m18,18h144v144H18"/></clipPath>
82
+ new CharacterImage('Y', new InlineSvg(`<clipPath id="c"><path d="m18,18h144v144H18"/></clipPath>
87
83
  <path fill="#FC0" d="m18,18h144v144H18"/>
88
84
  <path stroke="#F00" stroke-dasharray="18.8" stroke-width="250" clip-path="url(#c)" d="m4,4 160,160"/>
89
85
  <path fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round" d="M18,18H162V162H18z"/>`, 180, 180)),
90
- new CharacterImage_1.CharacterImage('Z', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
86
+ new CharacterImage('Z', new InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
91
87
  <path d="M 18,18 V 162 H 162 z" fill="#000"/>
92
88
  <path d="M 162,18 V 162 H 18 z" fill="#000094"/>
93
89
  <path d="M 90,90 L 162,162 H 18 z" fill="#f00"/>
94
90
  <path d="M 18,18 H 162 V 162 H 18 z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
95
91
  ];
96
- function getNavalFlag(character) {
97
- return exports.NAVAL_FLAGS.find(ch => ch.character.toUpperCase() === character.toUpperCase());
92
+ export function getNavalFlag(character) {
93
+ return NAVAL_FLAGS.find(ch => ch.character.toUpperCase() === character.toUpperCase());
98
94
  }
99
- //# sourceMappingURL=navalFlags.js.map
95
+ //# sourceMappingURL=naval-flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"naval-flags.js","sourceRoot":"","sources":["../../../src/naval-flags/naval-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAElD,MAAM,CAAC,MAAM,WAAW,GAA8B;IACpD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;gIAE0H,EAC1H,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX,2HAA2H,EAC3H,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;;mHAG6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;2GAEqG,EACrG,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,S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EACH,IAAI,SAAS,CACX;;mHAE6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;;2GAGqG,EACrG,GAAG,EACH,GAAG,CACJ,CACF;IACD,IAAI,cAAc,CAChB,GAAG,EACH,IAAI,SAAS,CACX;;;;mHAI6G,EAC7G,GAAG,EACH,GAAG,CACJ,CACF;CACF,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,OAAO,WAAW,CAAC,IAAI,CACrB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,WAAW,EAAE,CAC7D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const BIGRAM_LOG_PROB: Record<string, number>;
2
+ export declare const MIN_BIGRAM_LOG_PROB = -19.662799;