@progress/kendo-charts 1.19.0 → 1.20.0-dev.202111081615
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/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/chart.js +13 -5
- package/dist/es/chart/constants.js +3 -1
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +8 -4
- package/dist/es/chart/selection.js +41 -1
- package/dist/es/common/create-hash-set.js +11 -1
- package/dist/es/common/mousewheel-delta.js +4 -7
- package/dist/es/core/axis.js +35 -0
- package/dist/es/core/category-axis.js +23 -17
- package/dist/es/core/date-category-axis.js +26 -38
- package/dist/es/core/date-value-axis.js +32 -33
- package/dist/es/core/logarithmic-axis.js +30 -27
- package/dist/es/core/numeric-axis.js +24 -20
- package/dist/es/main.js +1 -0
- package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +103 -0
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +51 -0
- package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +12 -0
- package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +49 -0
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +50 -0
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +29 -0
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +91 -0
- package/dist/es/qrcode/encodings/encoding-result.js +16 -0
- package/dist/es/qrcode/encodings/encoding.js +701 -0
- package/dist/es/qrcode/encodings/free-cell-visitor.js +57 -0
- package/dist/es/qrcode/encodings/version-codewords.js +1289 -0
- package/dist/es/qrcode/qrcode.js +403 -0
- package/dist/es/qrcode/utils.js +28 -0
- package/dist/es/qrcode.js +1 -0
- package/dist/es/stock/navigator.js +3 -2
- package/dist/es2015/chart/chart.js +13 -5
- package/dist/es2015/chart/constants.js +3 -1
- package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +6 -4
- package/dist/es2015/chart/selection.js +40 -1
- package/dist/es2015/common/create-hash-set.js +11 -1
- package/dist/es2015/common/mousewheel-delta.js +4 -7
- package/dist/es2015/core/axis.js +28 -0
- package/dist/es2015/core/category-axis.js +21 -15
- package/dist/es2015/core/date-category-axis.js +27 -36
- package/dist/es2015/core/date-value-axis.js +33 -33
- package/dist/es2015/core/logarithmic-axis.js +29 -26
- package/dist/es2015/core/numeric-axis.js +24 -20
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +91 -0
- package/dist/es2015/qrcode/encodings/data-modes/byte-data-mode.js +41 -0
- package/dist/es2015/qrcode/encodings/data-modes/data-mode-instances.js +13 -0
- package/dist/es2015/qrcode/encodings/data-modes/numeric-data-mode.js +39 -0
- package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +44 -0
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +19 -0
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +83 -0
- package/dist/es2015/qrcode/encodings/encoding-result.js +10 -0
- package/dist/es2015/qrcode/encodings/encoding.js +701 -0
- package/dist/es2015/qrcode/encodings/free-cell-visitor.js +49 -0
- package/dist/es2015/qrcode/encodings/version-codewords.js +1289 -0
- package/dist/es2015/qrcode/qrcode.js +395 -0
- package/dist/es2015/qrcode/utils.js +28 -0
- package/dist/es2015/qrcode.js +1 -0
- package/dist/es2015/stock/navigator.js +3 -2
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +3058 -149
- package/dist/npm/qrcode.d.ts +5 -0
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { QRDataMode } from './qr-data-mode';
|
|
2
|
+
import { extend } from '../../utils';
|
|
3
|
+
import {
|
|
4
|
+
toBitsString,
|
|
5
|
+
splitInto
|
|
6
|
+
} from '../../utils';
|
|
7
|
+
|
|
8
|
+
export var AlphaNumericQRDataMode = (function (QRDataMode) {
|
|
9
|
+
function AlphaNumericQRDataMode () {
|
|
10
|
+
QRDataMode.apply(this, arguments);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if ( QRDataMode ) AlphaNumericQRDataMode.__proto__ = QRDataMode;
|
|
14
|
+
AlphaNumericQRDataMode.prototype = Object.create( QRDataMode && QRDataMode.prototype );
|
|
15
|
+
AlphaNumericQRDataMode.prototype.constructor = AlphaNumericQRDataMode;
|
|
16
|
+
|
|
17
|
+
AlphaNumericQRDataMode.prototype.initProperties = function initProperties () {
|
|
18
|
+
QRDataMode.prototype.initProperties.call(this);
|
|
19
|
+
|
|
20
|
+
extend(this, {
|
|
21
|
+
characters: {
|
|
22
|
+
"0": 0,
|
|
23
|
+
"1": 1,
|
|
24
|
+
"2": 2,
|
|
25
|
+
"3": 3,
|
|
26
|
+
"4": 4,
|
|
27
|
+
"5": 5,
|
|
28
|
+
"6": 6,
|
|
29
|
+
"7": 7,
|
|
30
|
+
"8": 8,
|
|
31
|
+
"9": 9,
|
|
32
|
+
"A": 10,
|
|
33
|
+
"B": 11,
|
|
34
|
+
"C": 12,
|
|
35
|
+
"D": 13,
|
|
36
|
+
"E": 14,
|
|
37
|
+
"F": 15,
|
|
38
|
+
"G": 16,
|
|
39
|
+
"H": 17,
|
|
40
|
+
"I": 18,
|
|
41
|
+
"J": 19,
|
|
42
|
+
"K": 20,
|
|
43
|
+
"L": 21,
|
|
44
|
+
"M": 22,
|
|
45
|
+
"N": 23,
|
|
46
|
+
"O": 24,
|
|
47
|
+
"P": 25,
|
|
48
|
+
"Q": 26,
|
|
49
|
+
"R": 27,
|
|
50
|
+
"S": 28,
|
|
51
|
+
"T": 29,
|
|
52
|
+
"U": 30,
|
|
53
|
+
"V": 31,
|
|
54
|
+
"W": 32,
|
|
55
|
+
"X": 33,
|
|
56
|
+
"Y": 34,
|
|
57
|
+
"Z": 35,
|
|
58
|
+
" ": 36,
|
|
59
|
+
"$": 37,
|
|
60
|
+
"%": 38,
|
|
61
|
+
"*": 39,
|
|
62
|
+
"+": 40,
|
|
63
|
+
"-": 41,
|
|
64
|
+
".": 42,
|
|
65
|
+
"/": 43,
|
|
66
|
+
":": 44
|
|
67
|
+
},
|
|
68
|
+
bitsInCharacterCount: [9, 11, 13],
|
|
69
|
+
modeIndicator: "0010"
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
AlphaNumericQRDataMode.prototype.getValue = function getValue (character) {
|
|
74
|
+
return this.characters[character];
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
AlphaNumericQRDataMode.prototype.encode = function encode (str, version) {
|
|
78
|
+
var this$1 = this;
|
|
79
|
+
|
|
80
|
+
var
|
|
81
|
+
parts = splitInto(str, 2),
|
|
82
|
+
result = this.getModeCountString(str.length, version),
|
|
83
|
+
value;
|
|
84
|
+
var i;
|
|
85
|
+
|
|
86
|
+
for (i = 0; i < parts.length - 1; i++) {
|
|
87
|
+
value = 45 * this$1.getValue(parts[i].charAt(0)) + this$1.getValue(parts[i].charAt(1));
|
|
88
|
+
result += toBitsString(value, 11);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
value = parts[i].length === 2 ?
|
|
92
|
+
45 * this.getValue(parts[i].charAt(0)) + this.getValue(parts[i].charAt(1)) :
|
|
93
|
+
this.getValue(parts[i].charAt(0));
|
|
94
|
+
|
|
95
|
+
return result + toBitsString(value, 1 + 5 * parts[i].length);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
AlphaNumericQRDataMode.prototype.getStringBitsLength = function getStringBitsLength (inputLength, version) {
|
|
99
|
+
return 4 + this.getBitsCharacterCount(version) + 11 * Math.floor(inputLength / 2) + 6 * (inputLength % 2);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return AlphaNumericQRDataMode;
|
|
103
|
+
}(QRDataMode));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { QRDataMode } from './qr-data-mode';
|
|
2
|
+
import { extend } from '../../utils';
|
|
3
|
+
import {
|
|
4
|
+
toBitsString
|
|
5
|
+
} from '../../utils';
|
|
6
|
+
|
|
7
|
+
export var ByteQRDataMode = (function (QRDataMode) {
|
|
8
|
+
function ByteQRDataMode () {
|
|
9
|
+
QRDataMode.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if ( QRDataMode ) ByteQRDataMode.__proto__ = QRDataMode;
|
|
13
|
+
ByteQRDataMode.prototype = Object.create( QRDataMode && QRDataMode.prototype );
|
|
14
|
+
ByteQRDataMode.prototype.constructor = ByteQRDataMode;
|
|
15
|
+
|
|
16
|
+
ByteQRDataMode.prototype.initProperties = function initProperties () {
|
|
17
|
+
QRDataMode.prototype.initProperties.call(this);
|
|
18
|
+
|
|
19
|
+
extend(this, {
|
|
20
|
+
bitsInCharacterCount: [8, 16, 16],
|
|
21
|
+
modeIndicator: "0100"
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
ByteQRDataMode.prototype.getValue = function getValue (character) {
|
|
26
|
+
var code = character.charCodeAt(0);
|
|
27
|
+
|
|
28
|
+
if (code <= 127 || (160 <= code && code <= 255)) {
|
|
29
|
+
return code;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
throw new Error("Unsupported character: " + character);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
ByteQRDataMode.prototype.encode = function encode (str, version) {
|
|
36
|
+
var mode = this,
|
|
37
|
+
result = mode.getModeCountString(str.length, version);
|
|
38
|
+
|
|
39
|
+
for (var i = 0; i < str.length; i++) {
|
|
40
|
+
result += toBitsString(mode.getValue(str.charAt(i)), 8);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
ByteQRDataMode.prototype.getStringBitsLength = function getStringBitsLength (inputLength, version) {
|
|
47
|
+
return 4 + this.getBitsCharacterCount(version) + 8 * inputLength;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return ByteQRDataMode;
|
|
51
|
+
}(QRDataMode));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NumericQRDataMode } from './numeric-data-mode';
|
|
2
|
+
import { AlphaNumericQRDataMode } from './alpha-numeric-data-mode';
|
|
3
|
+
import { ByteQRDataMode } from './byte-data-mode';
|
|
4
|
+
|
|
5
|
+
var NUMERIC = "numeric";
|
|
6
|
+
var ALPHA_NUMERIC = "alphanumeric";
|
|
7
|
+
var BYTE = "byte";
|
|
8
|
+
|
|
9
|
+
export var DataModeInstances = {};
|
|
10
|
+
DataModeInstances[NUMERIC] = new NumericQRDataMode();
|
|
11
|
+
DataModeInstances[ALPHA_NUMERIC] = new AlphaNumericQRDataMode();
|
|
12
|
+
DataModeInstances[BYTE] = new ByteQRDataMode();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { QRDataMode } from './qr-data-mode';
|
|
2
|
+
import { extend } from '../../utils';
|
|
3
|
+
import {
|
|
4
|
+
toBitsString,
|
|
5
|
+
splitInto
|
|
6
|
+
} from '../../utils';
|
|
7
|
+
|
|
8
|
+
export var NumericQRDataMode = (function (QRDataMode) {
|
|
9
|
+
function NumericQRDataMode () {
|
|
10
|
+
QRDataMode.apply(this, arguments);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if ( QRDataMode ) NumericQRDataMode.__proto__ = QRDataMode;
|
|
14
|
+
NumericQRDataMode.prototype = Object.create( QRDataMode && QRDataMode.prototype );
|
|
15
|
+
NumericQRDataMode.prototype.constructor = NumericQRDataMode;
|
|
16
|
+
|
|
17
|
+
NumericQRDataMode.prototype.initProperties = function initProperties () {
|
|
18
|
+
QRDataMode.prototype.initProperties.call(this);
|
|
19
|
+
|
|
20
|
+
extend(this, {
|
|
21
|
+
bitsInCharacterCount: [10, 12, 14],
|
|
22
|
+
modeIndicator: "0001"
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
NumericQRDataMode.prototype.getValue = function getValue (character) {
|
|
27
|
+
return parseInt(character, 10);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
NumericQRDataMode.prototype.encode = function encode (str, version) {
|
|
31
|
+
var mode = this,
|
|
32
|
+
parts = splitInto(str, 3),
|
|
33
|
+
result = mode.getModeCountString(str.length, version);
|
|
34
|
+
var i;
|
|
35
|
+
|
|
36
|
+
for (i = 0; i < parts.length - 1; i++) {
|
|
37
|
+
result += toBitsString(parts[i], 10);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return result + toBitsString(parts[i], 1 + 3 * parts[i].length);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
NumericQRDataMode.prototype.getStringBitsLength = function getStringBitsLength (inputLength, version) {
|
|
44
|
+
var mod3 = inputLength % 3;
|
|
45
|
+
return 4 + this.getBitsCharacterCount(version) + 10 * Math.floor(inputLength / 3) + 3 * mod3 + (mod3 === 0 ? 0 : 1);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return NumericQRDataMode;
|
|
49
|
+
}(QRDataMode));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Class } from '../../../common';
|
|
2
|
+
import { extend } from '../../utils';
|
|
3
|
+
import {
|
|
4
|
+
toBitsString
|
|
5
|
+
} from '../../utils';
|
|
6
|
+
|
|
7
|
+
export var QRDataMode = (function (Class) {
|
|
8
|
+
function QRDataMode() {
|
|
9
|
+
Class.call(this);
|
|
10
|
+
|
|
11
|
+
this.initProperties();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if ( Class ) QRDataMode.__proto__ = Class;
|
|
15
|
+
QRDataMode.prototype = Object.create( Class && Class.prototype );
|
|
16
|
+
QRDataMode.prototype.constructor = QRDataMode;
|
|
17
|
+
|
|
18
|
+
QRDataMode.prototype.initProperties = function initProperties () {
|
|
19
|
+
extend(this, {
|
|
20
|
+
modeIndicator: "",
|
|
21
|
+
bitsInCharacterCount: []
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
QRDataMode.prototype.getVersionIndex = function getVersionIndex (version) {
|
|
26
|
+
if (version < 10) {
|
|
27
|
+
return 0;
|
|
28
|
+
} else if (version > 26) {
|
|
29
|
+
return 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return 1;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
QRDataMode.prototype.getBitsCharacterCount = function getBitsCharacterCount (version) {
|
|
36
|
+
return this.bitsInCharacterCount[this.getVersionIndex(version || 40)];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
QRDataMode.prototype.getModeCountString = function getModeCountString (length, version) {
|
|
40
|
+
return this.modeIndicator + toBitsString(length, this.getBitsCharacterCount(version));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
QRDataMode.prototype.encode = function encode () { };
|
|
44
|
+
|
|
45
|
+
QRDataMode.prototype.getStringBitsLength = function getStringBitsLength () { };
|
|
46
|
+
|
|
47
|
+
QRDataMode.prototype.getValue = function getValue () { };
|
|
48
|
+
|
|
49
|
+
return QRDataMode;
|
|
50
|
+
}(Class));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Class } from '../../../common';
|
|
2
|
+
import { EncodingResult } from '../encoding-result';
|
|
3
|
+
import {
|
|
4
|
+
getModes,
|
|
5
|
+
getVersion,
|
|
6
|
+
getDataCodewordsCount,
|
|
7
|
+
getDataString
|
|
8
|
+
} from '../encoding';
|
|
9
|
+
|
|
10
|
+
export var IsoEncoder = (function (Class) {
|
|
11
|
+
function IsoEncoder () {
|
|
12
|
+
Class.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if ( Class ) IsoEncoder.__proto__ = Class;
|
|
16
|
+
IsoEncoder.prototype = Object.create( Class && Class.prototype );
|
|
17
|
+
IsoEncoder.prototype.constructor = IsoEncoder;
|
|
18
|
+
|
|
19
|
+
IsoEncoder.prototype.getEncodingResult = function getEncodingResult (inputString, errorCorrectionLevel) {
|
|
20
|
+
var modes = getModes(inputString),
|
|
21
|
+
dataCodewordsCount = getDataCodewordsCount(modes),
|
|
22
|
+
version = getVersion(dataCodewordsCount, errorCorrectionLevel),
|
|
23
|
+
dataString = getDataString(modes, version);
|
|
24
|
+
|
|
25
|
+
return new EncodingResult(dataString, version);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return IsoEncoder;
|
|
29
|
+
}(Class));
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Class } from '../../../common';
|
|
2
|
+
import { EncodingResult } from '../encoding-result';
|
|
3
|
+
import { DataModeInstances } from '../data-modes/data-mode-instances';
|
|
4
|
+
import { extend } from '../../utils';
|
|
5
|
+
import { toBitsString } from '../../utils';
|
|
6
|
+
import { getVersion } from '../encoding';
|
|
7
|
+
|
|
8
|
+
var BYTE = "byte";
|
|
9
|
+
|
|
10
|
+
export var Utf8Encoder = (function (Class) {
|
|
11
|
+
function Utf8Encoder() {
|
|
12
|
+
Class.call(this);
|
|
13
|
+
|
|
14
|
+
this.initProperties();
|
|
15
|
+
|
|
16
|
+
this.mode = DataModeInstances[this.encodingMode];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if ( Class ) Utf8Encoder.__proto__ = Class;
|
|
20
|
+
Utf8Encoder.prototype = Object.create( Class && Class.prototype );
|
|
21
|
+
Utf8Encoder.prototype.constructor = Utf8Encoder;
|
|
22
|
+
|
|
23
|
+
Utf8Encoder.prototype.initProperties = function initProperties () {
|
|
24
|
+
extend(this, {
|
|
25
|
+
encodingMode: BYTE,
|
|
26
|
+
utfBOM: "111011111011101110111111",
|
|
27
|
+
initialModeCountStringLength: 20,
|
|
28
|
+
ranges: [128, 2048, 65536, 2097152, 67108864]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
Utf8Encoder.prototype.getEncodingResult = function getEncodingResult (inputString, errorCorrectionLevel) {
|
|
33
|
+
var data = this.encode(inputString),
|
|
34
|
+
dataCodewordsCount = this.getDataCodewordsCount(data),
|
|
35
|
+
version = getVersion(dataCodewordsCount, errorCorrectionLevel),
|
|
36
|
+
dataString = this.mode.getModeCountString(data.length / 8, version) + data;
|
|
37
|
+
|
|
38
|
+
return new EncodingResult(dataString, version);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
Utf8Encoder.prototype.getDataCodewordsCount = function getDataCodewordsCount (data) {
|
|
42
|
+
var dataLength = data.length,
|
|
43
|
+
dataCodewordsCount = Math.ceil((this.initialModeCountStringLength + dataLength) / 8);
|
|
44
|
+
|
|
45
|
+
return dataCodewordsCount;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
Utf8Encoder.prototype.encode = function encode (str) {
|
|
49
|
+
var this$1 = this;
|
|
50
|
+
|
|
51
|
+
var result = this.utfBOM;
|
|
52
|
+
|
|
53
|
+
for (var i = 0; i < str.length; i++) {
|
|
54
|
+
result += this$1.encodeCharacter(str.charCodeAt(i));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return result;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
Utf8Encoder.prototype.encodeCharacter = function encodeCharacter (code) {
|
|
61
|
+
var bytesCount = this.getBytesCount(code),
|
|
62
|
+
bc = bytesCount - 1,
|
|
63
|
+
result = "";
|
|
64
|
+
|
|
65
|
+
if (bytesCount === 1) {
|
|
66
|
+
result = toBitsString(code, 8);
|
|
67
|
+
} else {
|
|
68
|
+
var significantOnes = 8 - bytesCount;
|
|
69
|
+
|
|
70
|
+
for (var i = 0; i < bc; i++) {
|
|
71
|
+
result = toBitsString(code >> (i * 6) & 63 | 128, 8) + result;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
result = ((code >> bc * 6) | ((255 >> significantOnes) << significantOnes)).toString(2) + result;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return result;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
Utf8Encoder.prototype.getBytesCount = function getBytesCount (code) {
|
|
81
|
+
var ranges = this.ranges;
|
|
82
|
+
|
|
83
|
+
for (var i = 0; i < ranges.length; i++) {
|
|
84
|
+
if (code < ranges[i]) {
|
|
85
|
+
return i + 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return Utf8Encoder;
|
|
91
|
+
}(Class));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Class } from '../../common';
|
|
2
|
+
|
|
3
|
+
export var EncodingResult = (function (Class) {
|
|
4
|
+
function EncodingResult(dataString, version) {
|
|
5
|
+
Class.call(this);
|
|
6
|
+
|
|
7
|
+
this.dataString = dataString;
|
|
8
|
+
this.version = version;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if ( Class ) EncodingResult.__proto__ = Class;
|
|
12
|
+
EncodingResult.prototype = Object.create( Class && Class.prototype );
|
|
13
|
+
EncodingResult.prototype.constructor = EncodingResult;
|
|
14
|
+
|
|
15
|
+
return EncodingResult;
|
|
16
|
+
}(Class));
|