puzzle-lib 1.3.0 → 1.6.0
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/LICENSE +21 -21
- package/README.md +38 -39
- package/build/src/Braille/BrailleCharacter.d.ts +15 -15
- package/build/src/Braille/BrailleCharacter.js +38 -37
- package/build/src/Braille/BrailleCharacter.js.map +1 -1
- package/build/src/Braille/BrailleData.d.ts +6 -6
- package/build/src/Braille/BrailleData.js +65 -64
- package/build/src/Braille/BrailleData.js.map +1 -1
- package/build/src/Braille/BrailleDot.d.ts +9 -9
- package/build/src/Braille/BrailleDot.js +13 -12
- package/build/src/Braille/BrailleDot.js.map +1 -1
- package/build/src/Braille/BrailleEncoding.d.ts +54 -54
- package/build/src/Braille/BrailleEncoding.js +65 -64
- package/build/src/Braille/BrailleEncoding.js.map +1 -1
- package/build/src/Braille/BrailleStream.d.ts +18 -18
- package/build/src/Braille/BrailleStream.js +75 -74
- package/build/src/Braille/BrailleStream.js.map +1 -1
- package/build/src/Cipher/AutoKeyString.d.ts +4 -4
- package/build/src/Cipher/AutoKeyString.js +34 -33
- package/build/src/Cipher/AutoKeyString.js.map +1 -1
- package/build/src/Cipher/CaesarString.d.ts +8 -8
- package/build/src/Cipher/CaesarString.js +31 -30
- package/build/src/Cipher/CaesarString.js.map +1 -1
- package/build/src/Cipher/CaesarUtils.d.ts +13 -13
- package/build/src/Cipher/CaesarUtils.js +57 -56
- package/build/src/Cipher/CaesarUtils.js.map +1 -1
- package/build/src/Cipher/KeyedCipherStringBase.d.ts +12 -12
- package/build/src/Cipher/KeyedCipherStringBase.js +28 -27
- package/build/src/Cipher/KeyedCipherStringBase.js.map +1 -1
- package/build/src/Cipher/VigenereString.d.ts +4 -4
- package/build/src/Cipher/VigenereString.js +21 -20
- package/build/src/Cipher/VigenereString.js.map +1 -1
- package/build/src/Common/CharacterImage.d.ts +6 -6
- package/build/src/Common/CharacterImage.js +10 -9
- package/build/src/Common/CharacterImage.js.map +1 -1
- package/build/src/Common/EncodingCategory.d.ts +8 -8
- package/build/src/Common/EncodingCategory.js +12 -11
- package/build/src/Common/EncodingCategory.js.map +1 -1
- package/build/src/Common/EncodingCharacterBase.d.ts +23 -23
- package/build/src/Common/EncodingCharacterBase.js +52 -51
- package/build/src/Common/EncodingCharacterBase.js.map +1 -1
- package/build/src/Common/EncodingDataBase.d.ts +7 -7
- package/build/src/Common/EncodingDataBase.js +29 -28
- package/build/src/Common/EncodingDataBase.js.map +1 -1
- package/build/src/Common/EncodingEntry.d.ts +8 -8
- package/build/src/Common/EncodingEntry.js +14 -13
- package/build/src/Common/EncodingEntry.js.map +1 -1
- package/build/src/Common/EncodingLookupResult.d.ts +6 -6
- package/build/src/Common/EncodingLookupResult.js +13 -12
- package/build/src/Common/EncodingLookupResult.js.map +1 -1
- package/build/src/Common/Helpers.d.ts +4 -4
- package/build/src/Common/Helpers.js +16 -15
- package/build/src/Common/Helpers.js.map +1 -1
- package/build/src/Common/InlineSvg.d.ts +7 -7
- package/build/src/Common/InlineSvg.js +14 -13
- package/build/src/Common/InlineSvg.js.map +1 -1
- package/build/src/Conversion/CharacterAutoConvert.d.ts +10 -7
- package/build/src/Conversion/CharacterAutoConvert.js +88 -80
- package/build/src/Conversion/CharacterAutoConvert.js.map +1 -1
- package/build/src/Conversion/CharacterConversion.d.ts +8 -8
- package/build/src/Conversion/CharacterConversion.js +50 -49
- package/build/src/Conversion/CharacterConversion.js.map +1 -1
- package/build/src/Conversion/CharacterEncoding.d.ts +9 -8
- package/build/src/Conversion/CharacterEncoding.js +13 -11
- package/build/src/Conversion/CharacterEncoding.js.map +1 -1
- package/build/src/Conversion/CharacterTableEntry.d.ts +10 -10
- package/build/src/Conversion/CharacterTableEntry.js +19 -18
- package/build/src/Conversion/CharacterTableEntry.js.map +1 -1
- package/build/src/Conversion/SignificantFigures.d.ts +7 -7
- package/build/src/Conversion/SignificantFigures.js +50 -49
- package/build/src/Conversion/SignificantFigures.js.map +1 -1
- package/build/src/Conversion/StringAutoConvert.d.ts +6 -6
- package/build/src/Conversion/StringAutoConvert.js +46 -45
- package/build/src/Conversion/StringAutoConvert.js.map +1 -1
- package/build/src/Morse/MorseCharacter.d.ts +22 -22
- package/build/src/Morse/MorseCharacter.js +96 -95
- package/build/src/Morse/MorseCharacter.js.map +1 -1
- package/build/src/Morse/MorseData.d.ts +6 -6
- package/build/src/Morse/MorseData.js +70 -69
- package/build/src/Morse/MorseData.js.map +1 -1
- package/build/src/Morse/MorseEncoding.d.ts +59 -59
- package/build/src/Morse/MorseEncoding.js +94 -93
- package/build/src/Morse/MorseEncoding.js.map +1 -1
- package/build/src/Morse/MorseString.d.ts +10 -10
- package/build/src/Morse/MorseString.js +66 -65
- package/build/src/Morse/MorseString.js.map +1 -1
- package/build/src/Nato/NatoCharacter.d.ts +5 -5
- package/build/src/Nato/NatoCharacter.js +10 -9
- package/build/src/Nato/NatoCharacter.js.map +1 -1
- package/build/src/Nato/NatoData.d.ts +7 -7
- package/build/src/Nato/NatoData.js +51 -50
- package/build/src/Nato/NatoData.js.map +1 -1
- package/build/src/NavalFlags/NavalFlags.d.ts +7 -7
- package/build/src/NavalFlags/NavalFlags.js +52 -50
- package/build/src/NavalFlags/NavalFlags.js.map +1 -1
- package/build/src/Resistor/Resistor.d.ts +24 -24
- package/build/src/Resistor/Resistor.js +86 -85
- package/build/src/Resistor/Resistor.js.map +1 -1
- package/build/src/Resistor/ResistorColorEntry.d.ts +12 -12
- package/build/src/Resistor/ResistorColorEntry.js +31 -30
- package/build/src/Resistor/ResistorColorEntry.js.map +1 -1
- package/build/src/Semaphore/SemaphoreCharacter.d.ts +20 -20
- package/build/src/Semaphore/SemaphoreCharacter.js +75 -74
- package/build/src/Semaphore/SemaphoreCharacter.js.map +1 -1
- package/build/src/Semaphore/SemaphoreData.d.ts +6 -6
- package/build/src/Semaphore/SemaphoreData.js +53 -52
- package/build/src/Semaphore/SemaphoreData.js.map +1 -1
- package/build/src/Semaphore/SemaphoreDegrees.d.ts +5 -5
- package/build/src/Semaphore/SemaphoreDegrees.js +26 -25
- package/build/src/Semaphore/SemaphoreDegrees.js.map +1 -1
- package/build/src/Semaphore/SemaphoreDirection.d.ts +11 -11
- package/build/src/Semaphore/SemaphoreDirection.js +15 -14
- package/build/src/Semaphore/SemaphoreDirection.js.map +1 -1
- package/build/src/Semaphore/SemaphoreEncoding.d.ts +40 -40
- package/build/src/Semaphore/SemaphoreEncoding.js +47 -46
- package/build/src/Semaphore/SemaphoreEncoding.js.map +1 -1
- package/build/src/Semaphore/SemaphoreStream.d.ts +17 -17
- package/build/src/Semaphore/SemaphoreStream.js +72 -71
- package/build/src/Semaphore/SemaphoreStream.js.map +1 -1
- package/build/src/WordSearch/Point.d.ts +4 -4
- package/build/src/WordSearch/Point.js +2 -2
- package/build/src/WordSearch/Result.d.ts +6 -6
- package/build/src/WordSearch/Result.js +10 -9
- package/build/src/WordSearch/Result.js.map +1 -1
- package/build/src/WordSearch/WordSearchDirection.d.ts +6 -6
- package/build/src/WordSearch/WordSearchDirection.js +10 -9
- package/build/src/WordSearch/WordSearchDirection.js.map +1 -1
- package/build/src/WordSearch/WordSearchSolver.d.ts +27 -18
- package/build/src/WordSearch/WordSearchSolver.js +222 -171
- package/build/src/WordSearch/WordSearchSolver.js.map +1 -1
- package/build/src/index.d.ts +35 -35
- package/build/src/index.js +72 -70
- package/build/src/index.js.map +1 -1
- package/package.json +40 -39
- package/src/Braille/BrailleCharacter.ts +49 -0
- package/src/Braille/BrailleData.ts +131 -0
- package/src/Braille/BrailleDot.ts +9 -0
- package/src/Braille/BrailleEncoding.ts +144 -0
- package/src/Braille/BrailleStream.ts +87 -0
- package/src/Cipher/AutoKeyString.ts +35 -0
- package/src/Cipher/CaesarString.ts +38 -0
- package/src/Cipher/CaesarUtils.ts +69 -0
- package/src/Cipher/KeyedCipherStringBase.ts +35 -0
- package/src/Cipher/VigenereString.ts +21 -0
- package/src/Common/CharacterImage.ts +11 -0
- package/src/Common/EncodingCategory.ts +10 -0
- package/src/Common/EncodingCharacterBase.ts +72 -0
- package/src/Common/EncodingDataBase.ts +31 -0
- package/src/Common/EncodingEntry.ts +17 -0
- package/src/Common/EncodingLookupResult.ts +10 -0
- package/src/Common/Helpers.ts +13 -0
- package/src/Common/InlineSvg.ts +15 -0
- package/src/Conversion/CharacterAutoConvert.ts +108 -0
- package/src/Conversion/CharacterConversion.ts +89 -0
- package/src/Conversion/CharacterEncoding.ts +9 -0
- package/src/Conversion/CharacterTableEntry.ts +23 -0
- package/src/Conversion/SignificantFigures.ts +55 -0
- package/src/Conversion/StringAutoConvert.ts +56 -0
- package/src/Morse/MorseCharacter.ts +112 -0
- package/src/Morse/MorseData.ts +143 -0
- package/src/Morse/MorseEncoding.ts +98 -0
- package/src/Morse/MorseString.ts +106 -0
- package/src/Nato/NatoCharacter.ts +9 -0
- package/src/Nato/NatoData.ts +49 -0
- package/src/NavalFlags/LICENSE +7 -0
- package/src/NavalFlags/NavalFlags.ts +293 -0
- package/src/Resistor/Resistor.ts +135 -0
- package/src/Resistor/ResistorColorEntry.ts +43 -0
- package/src/Semaphore/SemaphoreCharacter.ts +107 -0
- package/src/Semaphore/SemaphoreData.ts +58 -0
- package/src/Semaphore/SemaphoreDegrees.ts +26 -0
- package/src/Semaphore/SemaphoreDirection.ts +11 -0
- package/src/Semaphore/SemaphoreEncoding.ts +48 -0
- package/src/Semaphore/SemaphoreStream.ts +89 -0
- package/src/WordSearch/Point.ts +4 -0
- package/src/WordSearch/Result.ts +10 -0
- package/src/WordSearch/WordSearchDirection.ts +6 -0
- package/src/WordSearch/WordSearchSolver.ts +271 -0
- package/src/index.ts +38 -0
- package/src/trie-prefix-tree.d.ts +70 -0
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Helpers_1.Helpers.assertMsg(
|
|
13
|
-
Helpers_1.Helpers.assertMsg(
|
|
14
|
-
Helpers_1.Helpers.assertMsg(characterDivider !==
|
|
15
|
-
Helpers_1.Helpers.assertMsg(characterDivider !== MorseCharacter_1.MorseCharacter.
|
|
16
|
-
Helpers_1.Helpers.assertMsg(characterDivider !== MorseCharacter_1.MorseCharacter.
|
|
17
|
-
Helpers_1.Helpers.assertMsg(
|
|
18
|
-
Helpers_1.Helpers.assertMsg(wordDivider !== MorseCharacter_1.MorseCharacter.
|
|
19
|
-
Helpers_1.Helpers.assertMsg(wordDivider !== MorseCharacter_1.MorseCharacter.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// the
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
MorseString
|
|
65
|
-
MorseString.
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MorseString = void 0;
|
|
4
|
+
const Helpers_1 = require("../Common/Helpers");
|
|
5
|
+
const MorseCharacter_1 = require("./MorseCharacter");
|
|
6
|
+
// MorseString represents a string of multiple morse characters. It allows for a longer representation
|
|
7
|
+
// to be converted to a single string and allows for sentence-level transforms such as reversing
|
|
8
|
+
// the order of tokens.
|
|
9
|
+
class MorseString {
|
|
10
|
+
constructor(morse = '', characterDivider = MorseString.CHARACTER_DIVIDER, wordDivider = MorseString.WORD_DIVIDER) {
|
|
11
|
+
// The dividers should be single characters which don't clash with the other string content
|
|
12
|
+
Helpers_1.Helpers.assertMsg(characterDivider.length === 1, 'Divider must be a single character');
|
|
13
|
+
Helpers_1.Helpers.assertMsg(wordDivider.length === 1, 'Divider must be a single character');
|
|
14
|
+
Helpers_1.Helpers.assertMsg(characterDivider !== wordDivider, 'Dividers must be different from each other');
|
|
15
|
+
Helpers_1.Helpers.assertMsg(characterDivider !== MorseCharacter_1.MorseCharacter.DASH, 'Character divider must not be a reserved value');
|
|
16
|
+
Helpers_1.Helpers.assertMsg(characterDivider !== MorseCharacter_1.MorseCharacter.DOT, 'Character divider must not be a reserved value');
|
|
17
|
+
Helpers_1.Helpers.assertMsg(characterDivider !== MorseCharacter_1.MorseCharacter.RESERVED_DIVIDER, 'Character divider must not be a reserved value');
|
|
18
|
+
Helpers_1.Helpers.assertMsg(wordDivider !== MorseCharacter_1.MorseCharacter.DASH, 'Word divider must not be a reserved value');
|
|
19
|
+
Helpers_1.Helpers.assertMsg(wordDivider !== MorseCharacter_1.MorseCharacter.DOT, 'Word divider must not be a reserved value');
|
|
20
|
+
Helpers_1.Helpers.assertMsg(wordDivider !== MorseCharacter_1.MorseCharacter.RESERVED_DIVIDER, 'Word divider must not be a reserved value');
|
|
21
|
+
const words = morse.split(wordDivider).filter(w => w.length > 0);
|
|
22
|
+
// Discard any empty characters (caused by trailing separator)
|
|
23
|
+
const wordCharacters = words.map(w => w.split(characterDivider).filter(wc => wc.length > 0));
|
|
24
|
+
this._words = wordCharacters.map(subarray => subarray.map(wc => new MorseCharacter_1.MorseCharacter(wc)));
|
|
25
|
+
}
|
|
26
|
+
// reverse reverses the order of all tokens in the string (including separators), such as would be
|
|
27
|
+
// the case if you were reading the data for a puzzle backwards.
|
|
28
|
+
reverse() {
|
|
29
|
+
for (let i = 0; i < this._words.length; i++) {
|
|
30
|
+
for (const c of this._words[i]) {
|
|
31
|
+
// Reverse the dots/dashes in each letter
|
|
32
|
+
c.reverse();
|
|
33
|
+
}
|
|
34
|
+
// Reverse the letters in each word
|
|
35
|
+
this._words[i] = this._words[i].reverse();
|
|
36
|
+
}
|
|
37
|
+
// Reverse the order of the words
|
|
38
|
+
this._words = this._words.reverse();
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
// invertDotsAndDashes switches all dots and dashes in the input, such as would be the case if
|
|
42
|
+
// you had two ambiguous symbols for dot/dash and selected the wrong mapping.
|
|
43
|
+
invertDotsAndDashes() {
|
|
44
|
+
for (const word of this._words) {
|
|
45
|
+
for (const c of word) {
|
|
46
|
+
c.invertDotsAndDashes();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
toString() {
|
|
52
|
+
let s = '';
|
|
53
|
+
for (let i = 0; i < this._words.length; i++) {
|
|
54
|
+
if (i > 0) {
|
|
55
|
+
s += ' '; // This is a new word
|
|
56
|
+
}
|
|
57
|
+
for (const c of this._words[i]) {
|
|
58
|
+
s += c.toString() || '?';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return s;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.MorseString = MorseString;
|
|
65
|
+
MorseString.CHARACTER_DIVIDER = '/';
|
|
66
|
+
MorseString.WORD_DIVIDER = ' ';
|
|
66
67
|
//# sourceMappingURL=MorseString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MorseString.js","sourceRoot":"","sources":["../../../src/Morse/MorseString.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MorseString.js","sourceRoot":"","sources":["../../../src/Morse/MorseString.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,qDAAgD;AAEhD,uGAAuG;AACv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IAAI,GAAG,CAAC,CAAC,qBAAqB;aAChC;YACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;gBAC9B,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC;aAC1B;SACF;QACD,OAAO,CAAC,CAAC;IACX,CAAC;;AAhGH,kCAmGC;AAlGiB,6BAAiB,GAAW,GAAG,CAAC;AAChC,wBAAY,GAAG,GAAG,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare class NatoCharacter {
|
|
2
|
-
readonly character: string;
|
|
3
|
-
readonly word: string;
|
|
4
|
-
constructor(character: string, word: string);
|
|
5
|
-
}
|
|
1
|
+
export declare class NatoCharacter {
|
|
2
|
+
readonly character: string;
|
|
3
|
+
readonly word: string;
|
|
4
|
+
constructor(character: string, word: string);
|
|
5
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NatoCharacter = void 0;
|
|
4
|
+
class NatoCharacter {
|
|
5
|
+
constructor(character, word) {
|
|
6
|
+
this.character = character;
|
|
7
|
+
this.word = word;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.NatoCharacter = NatoCharacter;
|
|
10
11
|
//# sourceMappingURL=NatoCharacter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NatoCharacter.js","sourceRoot":"","sources":["../../../src/Nato/NatoCharacter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NatoCharacter.js","sourceRoot":"","sources":["../../../src/Nato/NatoCharacter.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;IAIxB,YAAY,SAAiB,EAAE,IAAY;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AARD,sCAQC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NatoCharacter } from './NatoCharacter';
|
|
2
|
-
export declare class NatoData {
|
|
3
|
-
static readonly instance: NatoData;
|
|
4
|
-
private readonly _entries;
|
|
5
|
-
get entries(): NatoCharacter[];
|
|
6
|
-
lookup(letter: string): NatoCharacter | null;
|
|
7
|
-
}
|
|
1
|
+
import { NatoCharacter } from './NatoCharacter';
|
|
2
|
+
export declare class NatoData {
|
|
3
|
+
static readonly instance: NatoData;
|
|
4
|
+
private readonly _entries;
|
|
5
|
+
get entries(): NatoCharacter[];
|
|
6
|
+
lookup(letter: string): NatoCharacter | null;
|
|
7
|
+
}
|
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
new NatoCharacter_1.NatoCharacter('
|
|
11
|
-
new NatoCharacter_1.NatoCharacter('
|
|
12
|
-
new NatoCharacter_1.NatoCharacter('
|
|
13
|
-
new NatoCharacter_1.NatoCharacter('
|
|
14
|
-
new NatoCharacter_1.NatoCharacter('
|
|
15
|
-
new NatoCharacter_1.NatoCharacter('
|
|
16
|
-
new NatoCharacter_1.NatoCharacter('
|
|
17
|
-
new NatoCharacter_1.NatoCharacter('
|
|
18
|
-
new NatoCharacter_1.NatoCharacter('
|
|
19
|
-
new NatoCharacter_1.NatoCharacter('
|
|
20
|
-
new NatoCharacter_1.NatoCharacter('
|
|
21
|
-
new NatoCharacter_1.NatoCharacter('
|
|
22
|
-
new NatoCharacter_1.NatoCharacter('
|
|
23
|
-
new NatoCharacter_1.NatoCharacter('
|
|
24
|
-
new NatoCharacter_1.NatoCharacter('
|
|
25
|
-
new NatoCharacter_1.NatoCharacter('
|
|
26
|
-
new NatoCharacter_1.NatoCharacter('
|
|
27
|
-
new NatoCharacter_1.NatoCharacter('
|
|
28
|
-
new NatoCharacter_1.NatoCharacter('
|
|
29
|
-
new NatoCharacter_1.NatoCharacter('
|
|
30
|
-
new NatoCharacter_1.NatoCharacter('
|
|
31
|
-
new NatoCharacter_1.NatoCharacter('
|
|
32
|
-
new NatoCharacter_1.NatoCharacter('
|
|
33
|
-
new NatoCharacter_1.NatoCharacter('
|
|
34
|
-
new NatoCharacter_1.NatoCharacter('
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
NatoData
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NatoData = void 0;
|
|
4
|
+
const NatoCharacter_1 = require("./NatoCharacter");
|
|
5
|
+
// There's no concept of a 'partial match' for a NATO letter, so there's no
|
|
6
|
+
// reason to derive from EncodingDataBase.
|
|
7
|
+
class NatoData {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._entries = [
|
|
10
|
+
new NatoCharacter_1.NatoCharacter('A', 'Alfa'),
|
|
11
|
+
new NatoCharacter_1.NatoCharacter('B', 'Bravo'),
|
|
12
|
+
new NatoCharacter_1.NatoCharacter('C', 'Charlie'),
|
|
13
|
+
new NatoCharacter_1.NatoCharacter('D', 'Delta'),
|
|
14
|
+
new NatoCharacter_1.NatoCharacter('E', 'Echo'),
|
|
15
|
+
new NatoCharacter_1.NatoCharacter('F', 'Foxtrot'),
|
|
16
|
+
new NatoCharacter_1.NatoCharacter('G', 'Golf'),
|
|
17
|
+
new NatoCharacter_1.NatoCharacter('H', 'Hotel'),
|
|
18
|
+
new NatoCharacter_1.NatoCharacter('I', 'India'),
|
|
19
|
+
new NatoCharacter_1.NatoCharacter('J', 'Juliet'),
|
|
20
|
+
new NatoCharacter_1.NatoCharacter('K', 'Kilo'),
|
|
21
|
+
new NatoCharacter_1.NatoCharacter('L', 'Lima'),
|
|
22
|
+
new NatoCharacter_1.NatoCharacter('M', 'Mike'),
|
|
23
|
+
new NatoCharacter_1.NatoCharacter('N', 'November'),
|
|
24
|
+
new NatoCharacter_1.NatoCharacter('O', 'Oscar'),
|
|
25
|
+
new NatoCharacter_1.NatoCharacter('P', 'Papa'),
|
|
26
|
+
new NatoCharacter_1.NatoCharacter('Q', 'Quebec'),
|
|
27
|
+
new NatoCharacter_1.NatoCharacter('R', 'Romeo'),
|
|
28
|
+
new NatoCharacter_1.NatoCharacter('S', 'Sierra'),
|
|
29
|
+
new NatoCharacter_1.NatoCharacter('T', 'Tango'),
|
|
30
|
+
new NatoCharacter_1.NatoCharacter('U', 'Uniform'),
|
|
31
|
+
new NatoCharacter_1.NatoCharacter('V', 'Victor'),
|
|
32
|
+
new NatoCharacter_1.NatoCharacter('W', 'Whiskey'),
|
|
33
|
+
new NatoCharacter_1.NatoCharacter('X', 'X-ray'),
|
|
34
|
+
new NatoCharacter_1.NatoCharacter('Y', 'Yankee'),
|
|
35
|
+
new NatoCharacter_1.NatoCharacter('Z', 'Zulu'),
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
get entries() {
|
|
39
|
+
return this._entries;
|
|
40
|
+
}
|
|
41
|
+
lookup(letter) {
|
|
42
|
+
for (const ch of this._entries) {
|
|
43
|
+
if (ch.character.toUpperCase() === letter.toUpperCase()) {
|
|
44
|
+
return ch;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.NatoData = NatoData;
|
|
51
|
+
NatoData.instance = new NatoData();
|
|
51
52
|
//# sourceMappingURL=NatoData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NatoData.js","sourceRoot":"","sources":["../../../src/Nato/NatoData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NatoData.js","sourceRoot":"","sources":["../../../src/Nato/NatoData.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAE9C,2EAA2E;AAC3E,0CAA0C;AAC1C,MAAa,QAAQ;IAArB;QAGmB,aAAQ,GAAoB;YAC3C,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,SAAS,CAAC;YACjC,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,SAAS,CAAC;YACjC,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,UAAU,CAAC;YAClC,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;YAC9B,IAAI,6BAAa,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,SAAS,CAAC;YACjC,IAAI,6BAAa,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI,6BAAa,CAAC,GAAG,EAAE,SAAS,CAAC;YACjC,IAAI,6BAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC/B,IAAI,6BAAa,CAAC,GAAG,EAAE,QAAQ,CAAC;YAChC,IAAI,6BAAa,CAAC,GAAG,EAAE,MAAM,CAAC;SAC/B,CAAC;IAcJ,CAAC;IAZC,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,MAAc;QACnB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,WAAW,EAAE,EAAE;gBACvD,OAAO,EAAE,CAAC;aACX;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AA3CH,4BA4CC;AA3CiB,iBAAQ,GAAa,IAAI,QAAQ,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CharacterImage } from '../Common/CharacterImage';
|
|
2
|
-
export declare class NavalFlags {
|
|
3
|
-
static readonly instance: NavalFlags;
|
|
4
|
-
private readonly _entries;
|
|
5
|
-
get entries(): CharacterImage[];
|
|
6
|
-
lookup(letter: string): CharacterImage | null;
|
|
7
|
-
}
|
|
1
|
+
import { CharacterImage } from '../Common/CharacterImage';
|
|
2
|
+
export declare class NavalFlags {
|
|
3
|
+
static readonly instance: NavalFlags;
|
|
4
|
+
private readonly _entries;
|
|
5
|
+
get entries(): CharacterImage[];
|
|
6
|
+
lookup(letter: string): CharacterImage | null;
|
|
7
|
+
}
|
|
@@ -1,112 +1,114 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavalFlags = void 0;
|
|
4
|
+
const CharacterImage_1 = require("../Common/CharacterImage");
|
|
5
|
+
const InlineSvg_1 = require("../Common/InlineSvg");
|
|
6
|
+
class NavalFlags {
|
|
7
|
+
constructor() {
|
|
8
|
+
this._entries = [
|
|
9
|
+
// tslint:disable:max-line-length (SVG images are messy)
|
|
9
10
|
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"/>
|
|
10
11
|
<rect x="18" y="18" width="72" height="144" fill="#fff"/>
|
|
11
|
-
<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)),
|
|
12
|
-
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
|
+
<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)),
|
|
13
|
+
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)),
|
|
13
14
|
new CharacterImage_1.CharacterImage('C', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
14
15
|
<rect x="18" y="46.8" width="144" height="86.4" fill="#fff"/>
|
|
15
16
|
<rect x="18" y="75.6" width="144" height="28.8" fill="#f00"/>
|
|
16
|
-
<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)),
|
|
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)),
|
|
17
18
|
new CharacterImage_1.CharacterImage('D', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
|
|
18
19
|
<rect x="18" y="54" width="144" height="72" fill="#000094"/>
|
|
19
|
-
<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)),
|
|
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)),
|
|
20
21
|
new CharacterImage_1.CharacterImage('E', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
21
22
|
<rect x="18" y="90" width="144" height="72" fill="#f00"/>
|
|
22
|
-
<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)),
|
|
23
|
+
<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)),
|
|
23
24
|
new CharacterImage_1.CharacterImage('F', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
|
|
24
25
|
<path d="M 90,18 l 72,72 l -72,72 l -72,-72 z" fill="#f00"/>
|
|
25
|
-
<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)),
|
|
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)),
|
|
26
27
|
new CharacterImage_1.CharacterImage('G', new InlineSvg_1.InlineSvg(`<path fill="#000094" d="m18,18h144v144H18"/>
|
|
27
28
|
<path stroke="#FC0" stroke-width="24" d="m30,18v144m48,0V18m48,0v144"/>
|
|
28
|
-
<path d="M18,18H162V162H18z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
|
|
29
|
+
<path d="M18,18H162V162H18z" fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round"/>`, 180, 180)),
|
|
29
30
|
new CharacterImage_1.CharacterImage('H', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
|
|
30
31
|
<rect x="18" y="18" width="72" height="144" fill="#fff"/>
|
|
31
|
-
<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)),
|
|
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)),
|
|
32
33
|
new CharacterImage_1.CharacterImage('I', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
|
|
33
34
|
<circle cx="90" cy="90" r="36" fill="#000"/>
|
|
34
|
-
<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)),
|
|
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)),
|
|
35
36
|
new CharacterImage_1.CharacterImage('J', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
36
37
|
<rect x="18" y="66" width="144" height="48" fill="#fff"/>
|
|
37
|
-
<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)),
|
|
38
|
+
<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)),
|
|
38
39
|
new CharacterImage_1.CharacterImage('K', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
39
40
|
<rect x="18" y="18" width="72" height="144" fill="#fc0"/>
|
|
40
|
-
<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)),
|
|
41
|
+
<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)),
|
|
41
42
|
new CharacterImage_1.CharacterImage('L', new InlineSvg_1.InlineSvg(`<rect x="16" y="16" width="148" height="148" rx="2"/>
|
|
42
|
-
<path fill="#FC0" d="m20,20h70v140h70V90H20"/>`, 180, 180)),
|
|
43
|
+
<path fill="#FC0" d="m20,20h70v140h70V90H20"/>`, 180, 180)),
|
|
43
44
|
new CharacterImage_1.CharacterImage('M', new InlineSvg_1.InlineSvg(`<clipPath id="c">
|
|
44
45
|
<path d="M 18,18 H 162 V 162 H 18 z"/>
|
|
45
46
|
</clipPath>
|
|
46
47
|
<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
47
48
|
<path d="M 18,18 L 162,162 M 162,18 L 18,162" clip-path="url(#c)" stroke="#fff" stroke-width="28.8"/>
|
|
48
|
-
<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)),
|
|
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)),
|
|
49
50
|
new CharacterImage_1.CharacterImage('N', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
|
|
50
51
|
<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"/>
|
|
51
|
-
<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)),
|
|
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)),
|
|
52
53
|
new CharacterImage_1.CharacterImage('O', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
|
|
53
54
|
<path d="M 18,18 H 162 V 162 z" fill="#f00"/>
|
|
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)),
|
|
55
|
+
<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)),
|
|
55
56
|
new CharacterImage_1.CharacterImage('P', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
56
57
|
<rect x="54" y="54" width="72" height="72" fill="#fff"/>
|
|
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)),
|
|
58
|
+
<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)),
|
|
58
59
|
new CharacterImage_1.CharacterImage('Q', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
|
|
59
|
-
<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)),
|
|
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)),
|
|
60
61
|
new CharacterImage_1.CharacterImage('R', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#f00"/>
|
|
61
62
|
<path d="M 90,18 V 162 M 18,90 H 162" stroke="#fc0" stroke-width="36"/>
|
|
62
|
-
<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)),
|
|
63
|
+
<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)),
|
|
63
64
|
new CharacterImage_1.CharacterImage('S', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
|
|
64
65
|
<rect x="54" y="54" width="72" height="72" fill="#000094"/>
|
|
65
|
-
<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)),
|
|
66
|
+
<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)),
|
|
66
67
|
new CharacterImage_1.CharacterImage('T', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
67
68
|
<rect x="18" y="18" width="96" height="144" fill="#fff"/>
|
|
68
69
|
<rect x="18" y="18" width="48" height="144" fill="#f00"/>
|
|
69
|
-
<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)),
|
|
70
|
+
<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)),
|
|
70
71
|
new CharacterImage_1.CharacterImage('U', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#ffffff"/>
|
|
71
72
|
<path d="M 18,18 H 90 V 90 H 18 z" fill="#ff0000"/>
|
|
72
73
|
<path d="M 162,91 H 91 V 162 H 162 z" fill="#ff0000"/>
|
|
73
|
-
<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)),
|
|
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)),
|
|
74
75
|
new CharacterImage_1.CharacterImage('V', new InlineSvg_1.InlineSvg(`<clipPath id="c">
|
|
75
76
|
<path d="M 18,18 H 162 V 162 H 18 z"/>
|
|
76
77
|
</clipPath>
|
|
77
78
|
<rect x="18" y="18" width="144" height="144" fill="#fff"/>
|
|
78
79
|
<path d="M 18,18 L 162,162 M 162,18 L 18,162" clip-path="url(#c)" stroke="#f00" stroke-width="28.8"/>
|
|
79
|
-
<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)),
|
|
80
|
+
<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)),
|
|
80
81
|
new CharacterImage_1.CharacterImage('W', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#000094"/>
|
|
81
82
|
<rect x="42" y="42" width="96" height="96" fill="#fff"/>
|
|
82
83
|
<rect x="66" y="66" width="48" height="48" fill="#f00"/>
|
|
83
|
-
<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)),
|
|
84
|
+
<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)),
|
|
84
85
|
new CharacterImage_1.CharacterImage('X', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fff"/>
|
|
85
86
|
<path d="M 90,18 V 162 M 18,90 H 162" stroke="#000094" stroke-width="36"/>
|
|
86
|
-
<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)),
|
|
87
|
+
<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)),
|
|
87
88
|
new CharacterImage_1.CharacterImage('Y', new InlineSvg_1.InlineSvg(`<clipPath id="c"><path d="m18,18h144v144H18"/></clipPath>
|
|
88
89
|
<path fill="#FC0" d="m18,18h144v144H18"/>
|
|
89
90
|
<path stroke="#F00" stroke-dasharray="18.8" stroke-width="250" clip-path="url(#c)" d="m4,4 160,160"/>
|
|
90
|
-
<path fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round" d="M18,18H162V162H18z"/>`, 180, 180)),
|
|
91
|
+
<path fill="none" stroke="#000" stroke-width="3.75" stroke-linejoin="round" d="M18,18H162V162H18z"/>`, 180, 180)),
|
|
91
92
|
new CharacterImage_1.CharacterImage('Z', new InlineSvg_1.InlineSvg(`<rect x="18" y="18" width="144" height="144" fill="#fc0"/>
|
|
92
93
|
<path d="M 18,18 V 162 H 162 z" fill="#000"/>
|
|
93
94
|
<path d="M 162,18 V 162 H 18 z" fill="#000094"/>
|
|
94
95
|
<path d="M 90,90 L 162,162 H 18 z" fill="#f00"/>
|
|
95
|
-
<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)),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
NavalFlags
|
|
96
|
+
<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)),
|
|
97
|
+
// tslint:enable:max-line-length
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
get entries() {
|
|
101
|
+
return this._entries;
|
|
102
|
+
}
|
|
103
|
+
lookup(letter) {
|
|
104
|
+
for (const ch of this._entries) {
|
|
105
|
+
if (ch.character.toUpperCase() === letter.toUpperCase()) {
|
|
106
|
+
return ch;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.NavalFlags = NavalFlags;
|
|
113
|
+
NavalFlags.instance = new NavalFlags();
|
|
112
114
|
//# sourceMappingURL=NavalFlags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavalFlags.js","sourceRoot":"","sources":["../../../src/NavalFlags/NavalFlags.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavalFlags.js","sourceRoot":"","sources":["../../../src/NavalFlags/NavalFlags.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AACxD,mDAA8C;AAE9C,MAAa,UAAU;IAAvB;QAGmB,aAAQ,GAAqB;YAC5C,wDAAwD;YACxD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;gIAEwH,EACxH,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX,2HAA2H,EAC3H,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;mHAG2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;mHAE2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;mHAE2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;mHAE2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;2GAEmG,EACnG,GAAG,E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qBAAS,CACX;;;mHAG2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;mHAG2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;;;mHAK2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;mHAG2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;mHAE2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;2GAGmG,EACnG,GAAG,EACH,GAAG,CACJ,CACF;YACD,IAAI,+BAAc,CAChB,GAAG,EACH,IAAI,qBAAS,CACX;;;;mHAI2G,EAC3G,GAAG,EACH,GAAG,CACJ,CACF;YACD,gCAAgC;SACjC,CAAC;IAcJ,CAAC;IAZC,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,MAAc;QACnB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,WAAW,EAAE,EAAE;gBACvD,OAAO,EAAE,CAAC;aACX;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAhSH,gCAiSC;AAhSiB,mBAAQ,GAAe,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ResistorColorEntry } from './ResistorColorEntry';
|
|
2
|
-
export declare class Resistor {
|
|
3
|
-
static readonly BLACK: ResistorColorEntry;
|
|
4
|
-
static readonly BROWN: ResistorColorEntry;
|
|
5
|
-
static readonly RED: ResistorColorEntry;
|
|
6
|
-
static readonly ORANGE: ResistorColorEntry;
|
|
7
|
-
static readonly YELLOW: ResistorColorEntry;
|
|
8
|
-
static readonly GREEN: ResistorColorEntry;
|
|
9
|
-
static readonly BLUE: ResistorColorEntry;
|
|
10
|
-
static readonly VIOLET: ResistorColorEntry;
|
|
11
|
-
static readonly GREY: ResistorColorEntry;
|
|
12
|
-
static readonly WHITE: ResistorColorEntry;
|
|
13
|
-
static readonly GOLD: ResistorColorEntry;
|
|
14
|
-
static readonly SILVER: ResistorColorEntry;
|
|
15
|
-
static readonly colorTable: ResistorColorEntry[];
|
|
16
|
-
static readonly INVALID_RESISTOR = -1;
|
|
17
|
-
/**
|
|
18
|
-
* getValue assumes there is no tolerance band, as tolerance is not part of
|
|
19
|
-
* the value calculation
|
|
20
|
-
*/
|
|
21
|
-
static getValue(colors: ResistorColorEntry[]): number;
|
|
22
|
-
static getDisplayValue(value: number): string;
|
|
23
|
-
private static applyMultiplier;
|
|
24
|
-
}
|
|
1
|
+
import { ResistorColorEntry } from './ResistorColorEntry';
|
|
2
|
+
export declare class Resistor {
|
|
3
|
+
static readonly BLACK: ResistorColorEntry;
|
|
4
|
+
static readonly BROWN: ResistorColorEntry;
|
|
5
|
+
static readonly RED: ResistorColorEntry;
|
|
6
|
+
static readonly ORANGE: ResistorColorEntry;
|
|
7
|
+
static readonly YELLOW: ResistorColorEntry;
|
|
8
|
+
static readonly GREEN: ResistorColorEntry;
|
|
9
|
+
static readonly BLUE: ResistorColorEntry;
|
|
10
|
+
static readonly VIOLET: ResistorColorEntry;
|
|
11
|
+
static readonly GREY: ResistorColorEntry;
|
|
12
|
+
static readonly WHITE: ResistorColorEntry;
|
|
13
|
+
static readonly GOLD: ResistorColorEntry;
|
|
14
|
+
static readonly SILVER: ResistorColorEntry;
|
|
15
|
+
static readonly colorTable: ResistorColorEntry[];
|
|
16
|
+
static readonly INVALID_RESISTOR = -1;
|
|
17
|
+
/**
|
|
18
|
+
* getValue assumes there is no tolerance band, as tolerance is not part of
|
|
19
|
+
* the value calculation
|
|
20
|
+
*/
|
|
21
|
+
static getValue(colors: ResistorColorEntry[]): number;
|
|
22
|
+
static getDisplayValue(value: number): string;
|
|
23
|
+
private static applyMultiplier;
|
|
24
|
+
}
|